Just got a call from end user saying that their workflow is no longer working. I opened up the Designer and ran a search and I noticed there were a lot of Workflows with No Entry ID running and a few that had a Status of Created (See below). I also noticed there were a bunch in the "waiting" status, however, the Workflow has no "Wait Conditions". They seem to be stuck on a Query?? Any ideas as I tried restarting the Workflow Service and I don't see anything unusual in the Event Viewer? Is it just taking that long to run perhaps? All it's doing is looking for any document that has a check number and doing a query to update the template info.
Question
Question
Replies
Double click on one of the waiting workflow instances and look at the Workflow diagram to see where it may be hung up.
From your screenshot and what you described, I'd say some resource is in contention. Open some of those running workflows and see what activity is running.
Workflow Status Descriptions
Created workflows are workflows that were created but have not transitioned into the running or waiting state.
Waiting workflows are typically workflows that are either waiting for a timer, wait condition or 'task' to complete. A task is an activity that is purposely throttled to make sure external resources aren't overloaded by workflow instances.
Running indicates that the workflow is running an activity at the moment. A lot of running workflows indicates that there might be a resource in contention.
When I logged in it was slow and I looked and the Laserficheworkflowservice was running at 97% CPU. I stopped and restarted the service and it is seemed good for about 30 seconds and then climbed to 90 percent CPU and then hovered around 70-85% CPU. I did a search on ALL Workflows running at that time and there was only 1 Workflow that ran and it was terminated due to a permissions error (but that workflow wasn't running yesterday when it was also sluggish).
Also, I stopped my Starting Rule, and changed the Workflow to a Business Process so I could try kicking it off manually on a specific document. When I do that nothing happens. I did a search in Workflow and the result was No Starting Name, No Entry ID, No Path, and Workflow Status Created. You'll see in my screenshot there's a bunch of errors...the message indicates "Permission Denied", even though the workflow user has proper rights to this folder. I tried logging into the Repository as the workflow user and get the message "The user has not been allocated a named user license, or the maximum number of sessions that this server instance is licensed for has been reached [9030]. I can login as admin just fine
Update...so I was able to correct the error...the Workflow User didn't have Assigned Privledges. WIth that being said...in taking a look at the Workflow...I have a lot of Running Workflows, Most all started yesterday, and you can see some of them the last action was performed yesterday but they're still running as well as some of the last action were performed today, and they're sitll running? They seem to be getting hung up on the Query...but there's no errors or messages in those...the few where there are messages it's stating an Entry is Locked while it's trying to Assign Field Values Permission Denied. Is there a way I can kill all these running and start it over?
I need you to open the instance details of one of those search results and view the running activities so we can see what activity is taking up your CPU. Follow Devin's instructions and you should see a screen that allows you to view the activities tab like this and see the running activities:
Well since its a custom query, I can't tell you exactly what is slow about it without knowing your database and query.
Can you share the query and what type of database it is querying?
Is the query going to be running against a lot of rows?
If it is SQL Server, and you have access to Sql Server Management Studio, one tool that can help is the Activity Monitor if you have it available. You reach it by right clicking on the SQL Server Node.
You can use that to see recent expensive queries. If you right click on a query and ask it to show the execution plan it'll sometimes suggest new database indexes to speed queries up.
Finally, can you tell me if you are running Database Activities as a task and in an external process. You can find this information in the Advanced Server Options dialog, Activity Performance tab in the Workflow Admin Console (Server Configuration node).
I did not set this up originally...but it's using the iSeries Access ODBC Driver which I believe is for IBM (I think it's an AS/400).
Yes, running Database Activites as a Task, as well as External Process
At this point I'd have to recommend opening a support case.