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

Discussion

Discussion

Issue: Interrupted User Task Still Submits a Form

posted on October 19, 2021 Show version history

I have a process that is counting votes with Workflow as they come in from completed user tasks, but they only have 7 days to vote. So the user task is being interrupted. However, I am unable to keep count of these votes when they are interrupted because the interrupt action submits the Starting Form. My starting form declares the vote count variables with a default value of 0. So when the user task is interrupted all of my vote counts get reset to zero. I need the interrupt to submit the form that is actually assigned to the user task not the starting form.

0 0
replied on October 26, 2021

Hi Elexis, by default Workflow will retrieve content from time of the most recent submission (when the workflow started). Since the approval task before the Workflow activity is being interrupted by a Timer Catch Event, Workflow is looking further back and retrieving content from the time of the submission that precedes the interrupted task - in this case, the starting event.

If you enable "Started by Laserfiche Forms" in Workflow properties, you can retrieve Submission IDs from the Forms process and instruct Workflow to retrieve content from the most recently submitted approval task, even if it's in a different process branch. This way you can iterate vote counts in Workflow without overwriting them with the starting form variable values. I've attached two screenshots that should clarify the Workflow configuration.

1. Last Submission ID Token.PNG
2. Retrieve from Last Submission ID.PNG
1 0
replied on October 25, 2021

Hi Elexis

Have a look at this (change the file type to xml), Based on Discuss being an Action Button, this closes the task when any Approver chooses Discuss, and exits the gateway. When it gets to the Exclusive task, I test to see if Last Action = Discuss. 

0 0
replied on October 25, 2021

Ok. I see. The inclusive merge actually behaves the way I need it to. Ok I can work with this a bit for sure. Thanks!

0 0
replied on October 20, 2021

Hi Elexis, I can have a look at this later today. I'll drop you a note with any ideas I come up with.

Steve

0 0
replied on October 20, 2021

Hi Elexis, a couple notes about what I've seen. When the Timer kicks off on the Task to the Workflow, true enough, it appears that WF is grabbing the form data from the previous task last submitted on the path (which in this case is the starting form) and whatever the data values were at that time.

Thinking about this further though, there is another inherit problem even after overcoming that. The Workflow engine is not sequential but Multitasking and may run multiple WF's at the same time meaning that as they get their data from the form, each workflow instance may not get the last updated data from the other WF's from the form, but what was available when the workflow started which could be before the data was updated. As you are terminating the Task and started kicking off the WF from there, there is a possibility they could run together which would cause an undesired outcome.

I'll give it more thought and ping you if I get any ideas

0 0
replied on October 20, 2021

Thanks Steve. I did realize that and plan to account for that by having cascading interrupt timer intervals. So I think I can account for that.

0 0
replied on October 25, 2021

Hi Elexis, well having digging and playing with this some more, here is what I have for you. Because of the way Forms works you're going to have to change your logic a little bit, but not to much.

Explanation. By putting an Inclusive on the back of your parallel, it will wait for your User task to either complete or to be Interrupted before it can move forward. You must add the Workflow at each task so they can each exit to the Inclusive gateway otherwise if they grouped together at the WF Task the Exclusive gateway would only think it was waiting for 1 task and would allow that task to continue beyond the gateway before the others were completed.

In this way, you will know everyone voted or had their task interrupted as it will not continue past the gateway until that point.

For you decisions on the other side, your exclusive gateway can test the Total as the WF's increment the total as each task is completed, but does not run when interrupted. For your Exclusive task to see if a Majority voted or not, you can apply rules such as  ie: >3 then Majority, <4 then Not Majority, etc.

Hope this helps and my explanation makes sense

1 0
replied on October 25, 2021

Oh good idea. I'll give this a try as well. Thanks!

 

I do still have an outlying issue. I am unable to access the current form variables with a WF started from an interrupted path. I have a support case on this to determine root cause, but the inclusive tip definitely helps!

0 0
replied on October 25, 2021

Wait. This may mean I CAN terminate on the interrupt instead of trigger a workflow. Thanks I have some testing to do.

0 0
replied on October 25, 2021

Yes, the Timers can/will Terminate the Approver Task

0 0
replied on October 25, 2021

And you don't have to worry about that Forms variable support ticket to be resolved as it no longer applies here, I think :)

0 0
replied on October 25, 2021

I need to evaluate the decision for a discuss after every user task. So I'm not sure this gets me there yet.

0 0
replied on October 25, 2021

Is Discuss an Action button or a Field Selection on the form?

0 0
replied on October 25, 2021

Both technically, but action button. Yes.

0 0
replied on October 20, 2021

Simplified process demonstrating the problem.

https://www.screencast.com/t/dvycNNneUi

I have attached a zip that is renamed as a txt. Save it and rename it to .zip. This zip contains the process and the wf.

0 0
replied on October 20, 2021
0 0
replied on October 19, 2021

Hi Elexis, are the task inside a Parallel or Inclusive gateway in a single process, or is each Vote a separate Forms Instance? Could you add a snip of the Forms process?

0 0
replied on October 19, 2021

It is a complicated process, but here it is.
Everything works except now I am trying to add the 7 day interrupt. When the timer interrupts the tasks, I kick off a workflow that analyzes the variables that forms brings in and counts the new vote. Adding it to the running tally. The form that comes in as an interrupted task has a different Form Name (default forms variable) than the form that it would have if a user actually submitted it. Because it is interrupted the variables are different. The Form Name is the form from the message start event and not the interrupted task.

 

0 0
replied on October 19, 2021

Your Task that are Interrupted are still running the workflow, but in that correct? Would they not on interruption END and not run the workflow so they wouldn't be counted at all, or are you adding votes from a variable on the form as opposed to the count being the Approval of the form? Also, would you not have a closing Parallel between the workflow and the Exclusive so all task are waiting before moving on, or is your Exclusive gateway providing that?

0 0
replied on October 19, 2021

Yes I still need to count it to know that all seven votes are in even if they were interrupted by the timer.

0 0
replied on October 19, 2021

I'm thinking it's going to have to go something like this.

The WF task is all the same workflows but separated for each task.. When the timer goes off, it starts the workflow and then the signal(one for each approver) will Interrupt the task immediately. To you this should look like the form data is available when the WF starts. The Parallel exit means until all are the task are approved or interrupted it will wait until that is completed to move on.

Hope this helps

You are not allowed to follow up in this post.

Sign in to reply to this post.