on 04-13-2016 1:04 PM
Hello Experts,
I have been brainstorming in one of the customer system on one issue. Requirement is as below:
1. There is a loop.
2. Inside loop, fork with two parallel branches and one necessary branch(as of now) is being used. One branch triggers sub workflow which creates dialog step for user and other branch waits for an event to occur.
Here requirement is, if suitable event occurs OR that dialog stop gets completed, workflow execution should progress. Also if any one of them occurs, other branch should not be forcefully terminated.
I am quite unsure whether this is possible or not. Please help out.
Regards,
Harsh
Hello,
Execution can't continue after a fork until it (the fork) is completed so you will need to find another way to do this.
Or maybe you could put the rest of the loop in a sub-workflow and call it in both sides of the fork.
I'm struggling to think of an example where you would want to do this. What is your scenario? Why keep waiting for that event?
regards
Rick
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
"if suitable event occurs OR that dialog stop gets completed, workflow execution should progress." this usually means that the other branch of the fork ends and the workflow continues. If not, how should the workflow progress? what should happen next?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ronen,
I want workflow to continue execution in both the branches, some sort of parallel processing. To meet the requirement here, I have developed as per below schematic:
Loop
Task - Determines next course and evaluates next ID from some dynamic structure
|
|
Fork 2 branches
/\
/ \
B1 B2
Branch 1 - Waits for an event which marks change in the dynamic structure
Branch 2 - Calls sub workflow passing evaluated ID from the above task
(Sub workflow creates dialog step for determined agent and other processing happens further)
End Loop
Here, as per use case, once sub workflow is called and after dialog step is created for determined agent, structure could change dynamically and that will raise an event for which Branch 1 is awaiting. Thus, as soon as the event marks the change in structure, execution should continue from branch 1 point onward and iterate loop further (for dynamically changes structure). However, at the same time, branch 2 execution should continue in normal fashion. Currently, everything is working as per I described, except branch 2 is forcefully being discontinued which is leading to logical deletion of work item (dialog step for the agent).
Best Regards,
Harsh
Hi,
Good point.
However, I already applied it. Issue then would be execution of workflow will not continue to iterate next loop entry, in case where event will be triggered (Branch 1), which should actually be the case. Instead, it will wait for completion of execution of sub workflow (Branch 2) - which is awaiting for the agent to take action on the dialog step.
Here, I want both branches to continue its respective execution.
Best Regards,
Harsh
Hi Rick,
Thank you for your response.
It would not fit in our use case. Case here is, event for which B1 is waiting will occur only after sub workflow has been triggered. Until and unless sub workflow is not triggered, event will not be triggered.
I hope we are on same page. Is there any way to build mechanism which will allow parallel execution?
Best Regards,
Harsh
Hello Mike,
To put it in simple words, it is something which is dealing with dynamic level of approvals (could be parallel or sequential). Thank you for your suggestions. Second suggestion appears seemingly helpful here. I would explore asynchronous start of workflow technique to see if it could solve my problem.
Best Regards,
Harsh
Hi,
I think I have the solution.
If this is the requirement.
There is a parallel processing of 2 scenarios. Let's call the whole scenario A
B1 waits for an event which would redetermine approval.
B2 is the approval.
When B2 is finished B1 should be logically deleted, a check for the loop is made and if false the parallel processing begins again (A).
When B1 is finished you want B2 to remain in its state, waiting for approval and also you want to start A again. When B2 is finished it will not effect the newly started A. Unless I'm guessing the condition for the loop is met. Is this correct?
What you can do is the following.
No loop.
Fork 1:2
In branch 1 wait for custom event which should terminate the flow
in branch2 a subflow S1
Subflow consists of determining approval and then a 1:2 fork
B3 and B4
B3 is wait for event on changes, if branch is met then next step is calling its own subflow recursively S1
B4 is the approval, after approval a check is made to see if the approval is done, if so fire an event which should terminate the entire process. if not call the flow recursively S1.
I hope this concurs to your requirement.
Kind regards, Rob Dielemans
Hi Rob,
Appreciate your response.
However, here branch B1 is not waiting for an event which would redetermine approval. Instead, it is waiting for an event which would indicate to continue loop further while the execution of sub workflow - branch 2, could be in state, ongoing or finished.
Best Regards,
Harsh
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.