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

Question

Question

How to use conditions to complete a workflow at any stage if a tag is removed

asked on October 12, 2018

I have a BP workflow that runs if a specific monitoring tag is applied to a document.  The WF creates a shortcut in a supervisor's folder, then has a parallel condition with 3 waiting activities.  After all three tasks are complete, the workflow removes the monitoring tag and the shortcut from the supervisor's folder.

Can I get this workflow to do this:

  • If, at any stage of the game, the monitoring tag is removed:
    • move past the parallel condition regardless of what has or has not been done so far,
    • and complete the last two activities, which include deleting the supervisor's shortcut.
    •  

I'm thinking a Conditional Decision where one branch is the whole parallel condition setup (which works great at this point) and the second branch is what to do at any time if the monitoring tag is removed.  But a conditional branch is an either/or, isn't it?  How can it still move onto the second branch even if it made the decision to start the first branch?  Is there a different way to do this?

Should I use another parallel condition where one of the branches is the nested parallel waiting branches and the other branch actually closes the workflow if the tag is removed even though the first branch is not finished?

0 0

Answer

SELECTED ANSWER
replied on October 12, 2018

Sometimes in cases where a workflow might end up with duplicate sets of activities in multiple branches, it can help to modularize the common functionality. This can mean extracting that functionality into a separate workflow. Then you can have multiple branches that can all call the same workflow regardless of the flow.

Assuming that you are using the Wait For Entry Change activity, you should be able to use that activity to wait for both the changes that you need to continue, or the removal of the tag. Then a Conditional Sequence could be use to decide if the tag has been removed. If there is indeed common logic between the tag removal, and the normal path (as you said, some cleanup items) then that can go in the other workflow. Then if the tag is removed, you invoke the cleanup, and terminate. If it's not removed, proceed as normal.

I mocked up a quick example to explain my ramblings. I also am likely to be misunderstanding what you are after.


1 0
replied on October 12, 2018

Devin, I see what you're saying with the "Has the tag been removed?" activity".  I had been wondering if something like that could be done, but couldn't see how it would move from the Wait activity to that activity, but now both of you have pointed out that I can add a condition to the wait activity for the tag to be removed.  That would take care of it!!  Thanks!

0 0

Replies

replied on October 12, 2018

If I'm reading this right, you should be able to just add a "tag X is not set" in the wait condition so it reads "wait for user to approve it or for the tag to go away". If user A approves it, it moves past that activity and it's still waiting on your other branches. If the tag is removed at this point, the conditions for user B and C on your 2 parallel branches still waiting are satisfied and the doc is out of the parallel approval step.

1 0
replied on October 12, 2018

Hmmm, that sounds nice and easy, Miruna!  So, I would need to place that additional waiting condition on all three waiting activities.  That would trick the parallel condition to accept all conditions met and move on to the final closing activities.  Right?  Thanks!

0 0
replied on October 12, 2018

Correct. Like you noted below, you may have to do a bit of extra work to keep track of which condition was hit if you need to know whether the user did it or Workflow "cancelled" it by removing the tag.

1 0
replied on October 12, 2018

Okay, so, the testing worked perfectly!!  Except, in the end I realized I also want Devan's option in there, because each parallel branch has an update BP notes option that records who did what.  If the tag is removed, some of those activities didn't happen, so I don't want the BP notes to say this user added a template, this user filed the document here, etc.  I need to have an option so the branches know that the only BP update I want is that the tag was removed by ____.  

Thanks!!

0 0
replied on October 12, 2018

I've downloaded the workflow design in case anyone else wants to see this.

New Mail Business Process.png
0 0
replied on October 12, 2018

In your "Find the User making the changes" activities, do you mean the person who started the workflow or the one who satisfied the wait condition for that branch?

0 0
replied on October 12, 2018

The one who satisfied that particular wait condition.

0 0
replied on October 15, 2018

Then you want to switch that out to the user token from the Wait for Entry Change activity. In the screenshot, they're set to the Initiator token.

1 0
replied on October 19, 2018

Miruna, thanks for pointing that out!  I just got back to this today after being away from the office for awhile and noticed that this Find User was not grabbing the right name in my test runs!  I wouldn't have been able to resolve the issue as quickly without your comment here!

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

Sign in to reply to this post.