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

Question

Question

Updating an in-process workflow with a newer revised workflow version

asked on April 10, 2020 Show version history

- Update all running jobs after workflow change - 

An existing, in-process workflow controlling a Requisition Sign-off may go through multiple revisions of design as new features are added over time. 

From what I understand as standard procedure, when the workflow wfx is modified/updated, saved, and published, it does NOT update the existing in-process items.  The existing in-process items continue to follow whatever workflow they STARTED WITH. 

Currently, if I want to make the in-process items follow the NEW updated workflow, I must "restart" each item.  I have a simple workflow that I trigger by adding the Restart field to the existing template, and indicate "Yes" to restart. 

QUESTION: Is there a more efficient way to "update" to the latest revision, other than restarting the workflow so it uses the updated version?

There are almost 500 requisitions in various stages of sign-off in the system, using the same Workflow.  Every time there is an version update to the Workflow, I would need to Restart all the in-process items.  Kind of a pain...(what I'm doing now). 

0 0

Replies

replied on April 10, 2020

I found this from a previous comment:  

Does Workflow Go Stale?

Miruna Babatie / Laserfiche  30064  23 • replied on January 24, 2018

When you publish changes to a workflow (and choose to update the running instances), any currently executing activities will not update. Only activities after the currently running one(s) would update.

------------------
So ONLY activities currently executing (waiting??) will not update, BUT all subsequent activities would reflect any updates/changes?

Please confirm.

0 0
replied on April 10, 2020

Yes, an activity currently waiting on a condition to be satisfied will not update. A good way to see what would update is to look at the instance details. Anything marked in blue is running and it will not update. That includes anything activity inside a currently running one (for ex, if you have a Repeat activity and it is currently waiting on an inner Wait For Entry Change, any other activities inside the Repeat loop will also not update because their parent activity is currently running).

 

0 0
replied on April 10, 2020

To summarize then:
1. When a change is made to a Workflow, then published, it will update any existing in-process items.

2. The updating will NOT change/update the in-process item at the particular step where it may be in a Wait Condition. 

3. If the in-process item needs to have the particular step updated where it's in a Wait Condition, the workflow needs to be restarted to pick up the change.   It will also pick up any changes/updates to the Workflow BEFORE the Wait Condition because it starts from the beginning of the workflow sequence during restart.

0 0
replied on April 13, 2020

Not quite.

  1. When a new version of a workflow is published, the user is prompted to choose whether running instance will be updated.
  2. If running instances are updated, only activities AFTER the currently running activities will be updated.
  3. If the currently running activity needs to be updated, then it's best that you don't update running instances but rather terminate and restart them instead. The workflow definition should account for documents having gone through parts of the workflow already.
0 0
replied on April 13, 2020

Miruna, on #3. above, would it be possible to include a "terminate" activity within a Restart workflow?  How would this work if I need to keep all the Approval metadata that has been created up to the point of Restart? and all template field info?  Thanks!

 

0 0
replied on April 13, 2020

Workflow does not have a concept of "restart", so there are no built-in activities for what you're asking. This thread has a script example.

As far as the approvals up to the current point, that's hard to say in the abstract because it depends on how your conditions are set up and the logic of your workflow. A condition that checks for a specific field value will be evaluated when the document hits the activity and the flow will only stop if it's not satisfied. A condition on "has changed" will always stop the document and wait for a change.

0 0
replied on April 13, 2020

I have a method to restart a workflow using the Invoke Workflow activity.  Would there be a way to use the End Workflow activity as a beginning step to end/complete/terminate the workflow running on the ID, and then Invoke Workflow to restart?
    There are two options on the End Workflow  - end "Parent" workflow, or "Current" workflow.  Could one of those work??

replied on June 12, 2020

Miruna, in your April 13 response, you mention: "If the currently running activity needs to be updated, then it's best that you don't update running instances but rather terminate and restart them instead."

How would I terminate a workflow, then restart it?  I've actually got the restart piece of this already implemented, but when I restart without terminating, it creates two instances, and any subsequent annotations are duplicated.

I've got the workflow set up that if there is a restart initiated, it will bypass any annotation or Approvals Recorded fields so it doesn't duplicate them.  But it's the subsequent annotation steps that are duplicated because of the two instances. 

Wouldn't there be a way to initiate an "End Workflow" activity before I have the Restart steps, and have it terminate the running workflow?

 

 

0 0
replied on June 12, 2020

You can search for the instance, right-click if in the search results and there will be options to end it in the context menu.

0 0
replied on June 12, 2020

Do you mean search for the instance in the Workflow Designer?  I'm trying to come up with a solution that the instance termination is handled through a Restart Workflow process, not a separate manual intervention.  Are there any possibilities??  

0 0
replied on June 12, 2020

This thread has a script example.

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

Sign in to reply to this post.