Skip to Content
avatar image
Former Member

Difference in completion deadline for tasks which are parallel for each

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Best Answer
    Sep 12, 2014 at 05:18 AM
    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Sep 12, 2014 at 12:48 PM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Sep 18, 2014 at 04:28 AM

    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.

    Add comment
    10|10000 characters needed characters exceeded