Main task creates 1-n number of Human Tasks

Hello,

I am hoping someone could give me some advice on how to implement the following in a model.

We have a main task form that has 1-n number of assignments on the form. We need to take the form and generate 1-n number of Human Task forms. Each of these task forms are independent assignments that basically are requesting a user to electronically sign off on some information on the task form. Each assignment is independent of the main task form as the main task form is just a way to pick the users to assign. So I believe they should be separate process instances??

My question is how do you implement this in the process engine? Do you use a main process that loops through the n number of assignments and creates a new instance a process based on some message event? Would I use the 1-n pattern and do something to create the forms and assign them to the appropriate users?

Thanks,
Greg

Hi Greg,

I hope I understand the case correctly. There are a couple of ways to model this in BPMN. The most simple that comes to mind is probably:

Pick users would submit a list with the assignees and Do Work would be a multi-instance activity iterating over that list and assigning the task according to the instance element variable.

Cheers,
Thorben

1 Like

Hi Thorben

Thanks for the reply and the help. Sorry for not being clear in my original post.

We have 1 originating task form that needs to create n number of requesting signature forms. Each requesting signature task form can contain different data elements specific to the assignment.

Do you think the Do Work step would be a multi-instance activity that creates a new process or subprocess for each signature task form?

Thanks
Greg

Hi Greg,

I think I don’t understand your case yet. On the one hand, you are talking about n number of task forms. That maps ot n user tasks in my understanding. On the other hand, you also talk about new process instances and subprocesses. Why is that necessary?

Cheers,
Thorben

Hi Thorben

Thanks for the reply and sorry for the confusion.

I thought maybe the best way to explain our use case to provide the mockups of our task forms. Please ignore my previous message as I think the following is probably the best way to explain our use case.

The following is the task assignment form. This form will be used to start a process in Camunda. The purpose of the form is to allow a coordinator the ability to select 1-n number of users to the document to request the selected users to sign the document. Additionally, the coordinator can select a different action per user per document.

Please notice in the mockup that User 1 has been assigned Document A and Document B but User 2 only has been assigned Document B.

Each assignment is independent of each other… meaning that the initial task form does not need to keep track of all assignments. It is basically used to start the process and pick the user assignment and their related documents.

Once the task assignment form is submitted, the requirement is for each user to only receive one assignment task form with the specific documents and the assigned action per document that was specified by the coordinator. The user will receive the form and sign off on each document listed on the form.

As an example, the following is the task form for User 1 that should be created based on the assignment data from the assignment form above. In this case, User 1 needs to sign off on 2 documents.

Please compare user the following is the task form for User 2 that should be created based on the assignment data from the assignment form above. In this case, User 2 needs to sign off on 1 document.

My assumption is that in either case, when user 1 goes to the tasklist, they should only see the the form for user 1. Conversely, when user 2 goes to the tasklist, they should only see the the form for user 2.

With these requirements in mind, how would I make the engine take the assignment form, break up the 1-n assignments into multiple forms… one for each user with their assignment data?

Thanks for the input and advice in advanced.
Greg

@Greg_Svitak for the Assignment Task Form (The form that User 1 and User 2 received), Is the Requesting Action a option/select list?

Edit: Also what do you want as the output of this work? Is it once a user has completed his task, do xyz? once a document has all of its actions completed, once all users or all documents have been completed, etc.

Can a user complete 1 action and leave the other action incomplete?

Hi,

Heres an alternate approach from left field… Rather than model it at a BPMN process, the camunda engine supports creation of ‘ad-hoc’ tasks. Hence you could consider creating sub tasks as per this example. Note this is advanced camunda usage so may take some understanding…

Sub Task Example

regards

Rob

1 Like

Hi Stephen

Thanks for your questions. One thing of note, we are planning on implementing external task forms for this use case if that helps.

Is the Requesting Action a option/select list?
Yes it is an option select list. We need to provide User x the ability to change the action.

Also what do you want as the output of this work?
Once they complete the work the next step in process is to have Camunda electronically sign the document in our repository (we have our own signatures technology).

Can a user complete 1 action and leave the other action incomplete?
They can complete action 1 and come back later to complete action 2. They need to complete all actions for the task to be complete.

Thanks for the help.
Greg

Rob

Thanks for the suggestion. I will look into it. Ideally I would like understand both options to see what works best.

Thanks,
Greg

@Greg_Svitak, I asked those questions because of the following:

  1. Based of your structure wireframes it looks like you will be creating Tasks per Unique User.
  2. Based on the Task there are either a list of Todos in that task’s data or you have Sub-Tasks.
  3. There is a problem with sub-tasks in your use case because of a race-event/chicken and egg: To create the Sub-Tasks you need the Parent Task, but if you create the parent task, it becomes available to the user before the sub-tasks have been created. So some weirdness to handle.
  4. If you support multiple actions that a user can select from per document, then this increases the data model and flows.
  5. Based on your last response about the “1 action and complete other later”, it sounds like you need some concept of Sub-Tasks.
1 Like

Hello all

Thank you very much for your input. Based on the feedback, we ended up creating a POC that used a multi-instance activity with embedded processes. The sub process then used external tasks to “call back” to our system to do work as needed.

Thanks again… we learned a lot and are excited for the building process.

Greg

1 Like