cancel
Showing results for 
Search instead for 
Did you mean: 

Difference in completion deadline for tasks which are parallel for each

Former Member
0 Kudos

Hello Everybody,

We have critical problem wherein we have set a completion deadline for a task against a human activity which is parallel for each but in the runtime, a difference of 1 second is appearing for the parallel tasks generated.

We have raised a COMPLETIONDEADLINEISCRITICALEXCEPTION and if the deadline is met we are executing an ABAP RFC for auto approval.

The automated step for executing the RFC is also parallel for each. When the tasks are created only one gets cancelled on completion of deadline while others get suspended. I am assuming this is happening because of the difference of 1 sec in the completion deadline for parallel tasks in the runtime.

This is very critical and i request all you to please provide your inputs.

Thanks & Regards

Gaurang Dayal

Accepted Solutions (1)

Accepted Solutions (1)

junwu
Active Contributor
0 Kudos
Former Member
0 Kudos

Hello Jun Wu,

Thanks for writing. I am afraid the link you have shared talks about the concepts of boundary events and not the issue i am facing w.r.t difference in completion deadline for parallel tasks. Request you to provide your inputs for this issue.

Thanks & Regards

Gaurang Dayal

junwu
Active Contributor
0 Kudos

please read it

Answers (2)

Answers (2)

former_member191643
Active Contributor
0 Kudos

I think this is the normal behaviour. Jun has indicated the correct article. Please read it thoroughly.

ParForEach in a human task is a bit dicey. Consider changing the flow design if possible.

Former Member
0 Kudos

Hi Guarang,

Do you expect that all the parallel tasks are instantiated at exactly the same point in time? That is an unrealistic expectation....

First off, the Par Foreach doesn't spawn multiple threads, it executes each 'parallel' action in sequence in the same thread. Parallel in this context means all the actions (Task initiation) will occur and a process token will stay at each Task. For the token to pass the subsequent merge ALL the parallel tasks must be complete (all tokens must arrive at the merge). So you won't ever get all the tasks initiated at EXACTLY the same time.

Further, even if the BPM kernel did spawn multiple threads (and there are very good reasons it won't!) it is rather unlikely that in these different threads you would for sure get all the initiations at EXACTLY the same time.

If it's important that you get the task completion deadline the same in all tasks you should get a suitable timestamp in a mapping step which precedes the split and then set the deadline explicitly using that value when the task is initiated - i.e use a specific time value not an offset time value.

An FWIW you should read and understand the documentation on Boundary Events so that you can know what to expect when one is fired and you know how to handle them.

regards, Nick