You are viewing limited content. For full access, please sign in.

Question

Question

Single Instance Mode Workflow Issue With For Each Entry

asked on February 6, 2023 Show version history

We have two workflows that are set to run in 'Single instance mode'.

Workflow1 searches for entries in the repository and uses the For Each Entry activity to loop through them and invokes Workflow2. The Invoke activity in Workflow1 is set to 'Wait for the invoked workflow to finish running before continuing to run the current workflow'.

This works great most of the time, but about once per day Workflow1 will get stuck on the 'Invoke Workflow2' activity. After some research I discovered an error in the 'activity errors log' for the times this happened recently. The error says "Workflow 'Workflow2' did not start because an instance is already running. [0639-WF1]".

So, for some reason Workflow 2 is not completing all the way before Workflow1 loops to the next entry. What would cause this? Is it a known issue?

Workflow Version: 10.4.3.139

0 0

Replies

replied on February 6, 2023

Are you sure there wasn't something outside of Workflow 1 starting an instance of Workflow 2 around that time?

0 0
replied on February 6, 2023

I did look into that. Looking into the workflows that were running during the time of the error is interesting. The error in the activity log was at 6:03:50 AM. The below table is for Workflow2 instances. Each of those instances were invoked by Workflow1.

Start Time | Time of Last Action | Duration

I am not seeing that 2 instances of Workflow1 overlapped, which they shouldn't because of the Single instance mode setting.

Start Time | Time of Last Action | Duration

The Workflow 1 instance that ran at 6:03:50 AM ran for over an hour because it was stuck.

I have also verified that there were no other workflows on this Workflow server running at that time.

0 0
replied on February 13, 2023 Show version history

I may have narrowed down the issue, but do not have a resolution yet.

There is a starting rule on Workflow1 that is scheduled to run every 15 minutes for 17 hours starting at 3:00 AM. The error I found in the Workflow Activity Log corresponds with the 15-minute mark.

The reason there is a schedule is in case when Workflow1 runs and there are no documents to process, the schedule will kick the workflow off again since Workflow1 will end. I tried altering the workflow so that if Workflow1 didn't find anything it would wait 15 minutes and try again, but it eventually gives the error mentioned in this post.

Still trying to figure out a creative alternative as well as why when the schedule on Workflow1 tries to kickoff it causes issues occasionally. It doesn't cause the problem all the time though, just once or twice a day usually.

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.