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

Question

Question

terminate workflow if document is manually moved

asked on April 14, 2016

I have a very simple workflow that performs a couple tasks then waits for the date (from field) plus 5 days, before completing. 

Incase they mess up a field or whatever, I want a really easy way to just cancel the workflow let them manually move it back to the start, fix the issue and start the workflow again.

I know I could have a field that if its changed cancels the workflow, but I would rather not.

What I really want is a simple way for the workflow to cancel the moment someone manually moves it?

Also this document will be basically read only this entire time its waiting there, it shouldn't be edited, if that helps.

0 0

Answer

SELECTED ANSWER
replied on April 15, 2016

That would definitely be better handled with a scheduled workflow.

5 days after each meeting (or daily if your meetings are somewhat irregular), run a scheduled workflow that searches for all documents in that folder with the field set to 5 days ago and moves them.

0 0

Replies

replied on April 15, 2016 Show version history

Hi Joel,

You should be able to open a parallel process with your dealy,   "Wait for Entry Change", that would be able to cancel based on conditions you specify.

The small workflow below demonstrates this with the Wait for Entry Change configured to wait for the FullPath name of our entry to chang.   One gotcha to think of would be if your 5 day delay ends and your workflow continues.  If it were to move the document then the 'Wait for Entry Change' would still kick in and end things.   You could prevent that by setting a token when the Delay finishes.  

Anyhow hope this gives you some ideas ....

 

 

 

1 0
replied on April 15, 2016

Both branches in the parallel have to complete for Workflow to move on. So this workflow will wait for entry change even after the delay has run its course.

0 0
replied on April 15, 2016

So after wait for entry change I could check to see if that date has passed, if it has it just completed, if it hasn't then it runs the terminate. That should work right. The workflow moving the file when it is supposed to should trigger the entry change correct?

0 0
replied on April 15, 2016

The way I'm reading your original post, you have 2 cases:

1. The user sets a field correctly, then Workflow waits until that date hits plus another 5 days.

2. The user messes up the field and you want the workflow to terminate immediately after the user pulls the document out of this folder.

The workflow above would work  for the second case only. And in this case, the second parallel branch is irrelevant because as soon the document is moved, the workflow will end.

If the user sets the right field and 5 days pass, you'll still be waiting for the document to be moved out. You can't check that date has passed after the Wait for Entry change because you'll never hit that point since the user is not moving the document when they don't make mistakes.

0 0
replied on April 15, 2016

You could easily set a token value after the 5 day delay that would initiate the 'Wait for Change' activity.  Based on that the branch would simply complete bypassing the end.

0 0
replied on April 15, 2016

Could you explain what the wait is trying to accomplish? It sounds like you could end up with some very long running workflows. There might be better ways to implement it using schedules.

0 0
replied on April 15, 2016

its an Agenda for a council meeting, so it needs to go up publicly, then 5 days after the meeting the document is moved to another location that is not public.

0 0
SELECTED ANSWER
replied on April 15, 2016

That would definitely be better handled with a scheduled workflow.

5 days after each meeting (or daily if your meetings are somewhat irregular), run a scheduled workflow that searches for all documents in that folder with the field set to 5 days ago and moves them.

0 0
replied on April 16, 2016

Thanks everyone

I will use Miruna's suggestion and break apart the workflow, and go with schedules.

Andrew I think you idea could be made to work though and I have some things coming up I may try it in near future.

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

Sign in to reply to this post.