One Task with Multiple Sub Tasks

Hi,
I have to create a bpmn in which there is a Parent Task and Multiple SubTasks associated with it. I have to complete my parent tasks by two ways

  1. Complete without completting SubTasks
  2. Wait for Parent Task to be completed before all or some of the Subtasks are completed.

Attached is the BPMN i tried but before Feedback Tasks(SubTasks) completes i must have to complete parent task and when we complete FeedBack Task parent task assignee vanishes i.e it behaves like a new Task.

Please advise me the best possible way to achieve itDeclaration.bpmn (19.2 KB)
.

Is there any way to achieve it?

Hi @PrashantD,
You can try this with multiInstance task along with Timer Boundary event(interrupt) in your case.

https://docs.camunda.org/manual/7.6/reference/bpmn20/tasks/task-markers/#boundary-events-and-multi-instance

Cheers,
Sagari

Hi @PrashantD
The model you have shared has some mistakes in sense of BPMN 2.0.

I tried to arrange the layout and to make you model explicit, that means modelling with gateways for all merging, splitting, synchronizing and parallel sequence flows. Declaration.bpmn (22.1 KB)

Now you can see better that the model has some problems when synchronizing at the parallel gateway. You created a deadlock here.

Moreover you can’t use attached boundary events without a following sequence flow.
Everything that I marked red is not working.

Moreover it would be helpful if you work on the layout. So people find it easier to read your model. Therefore it is useful if splitting XOR Gateways have a question and the outgoing sequence flows are labeled with the possible answer to that question.

I am not sure what you try to achieve with the model but I think you might need to think about some other symbols (maybe subprocess, etc. ) but the first step would be to understand the BPMN standard before connecting symbols.

3 Likes

I think the thing you are looking for is the complete condition ${ nrOfCompletedInstances/nrOfInstances == 1 } this is present in extended sub process with multi instance enabled

Cheers,
Udit

Hi Nele,
Thanks for your feedBack.

At boundary event i have added a Timer Event and at that Timer Event there is a Execution Listner to be called that will set Assignee to that Step after certain Time.

Job timerJob = managementService.createJobQuery().processInstanceId(execution.getProcessInstanceId()).activityId(execution.getCurrentActivityId()).singleResult();
Task task = taskService.createTaskQuery().executionId(timerJob.getExecutionId()).singleResult();
task.setAssignee(“demo”);

Please correct me if there is any other way we can do it.

Another point here is i may have to get Feed Back from other UserTasks at any review step or Approve Step and have to return back to Review/Approve step after feedback. In my case assignee of Review Step does not persist when i return back from feedback.

In one line i want FeedBack without completing Review Step. Both feedback and Review Steps should be active at same time. How can we achieve it.

One more thing to add that i am creating BPMN dynamically by Fluent builder API.

Thanks in advance !

Thanks vermauv.

I have a parent task(Review) with multiple subtasks(Feedback) of parent task.  Parent can either wait for feedback tasks to be completed or complete their tasks without waiting feedback. And this cab be back and forth.

Problem here is parent task assignee get removed once feedback returned to to parent.

Can it be achieved with multi instance sub process coz i think this issue will there there also.

In that case, you can always set a assignee value in a variable and then use it by #{assignee} in your modeler.
Also, a previous post: A few questions about assigning users and dynamic User Tasks might interest you.

I have to achieve send back to previous step functionality without changing Task ID. How can we do it?

This might help you https://docs.camunda.org/manual/7.9/reference/bpmn20/events/cancel-and-compensation-events/