create multiple sub process/task

Questions and discussion about using ProcessMaker: user interface, running cases & functionality

Moderator: amosbatto

lawrencelcy
Posts: 13
Joined: Tue Nov 08, 2016 12:05 am
Country: Malaysia

create multiple sub process/task

Unread postby lawrencelcy » Fri Apr 21, 2017 3:48 am

Need some advice from the forum, referring to the process step below I need to branch one sub task under Step 1 and assign to difference user to complete Step 1.1 which can be occur multiple time.

Process.PNG
Process.PNG (38.57 KiB) Viewed 331 times


I have some reading about sub process and parallel gateway and not sure which method is best fit my purpose, as the Step 1.1 may or may not trigger and it can be trigger the step multiple time at Step 1

lastly this step 1.1 will need a summary log to be show as below:

summary.PNG
summary.PNG (8.14 KiB) Viewed 331 times

mishika
Posts: 156
Joined: Thu Feb 16, 2017 3:03 am
Country: India

Re: create multiple sub process/task

Unread postby mishika » Fri Apr 21, 2017 5:56 am

Hello,

I would suggest you, use an evaluation gateway after the sub-process which will check if the user wants to continue the loop or end the loop and send the quotation.

The process will look like:

process-layout.png
process-layout.png (17.56 KiB) Viewed 327 times

To assign a different user to step-1.1, you can use one of the various assignment rules.
If the next user to be assigned the step-1.1 task is to be decided in the task step-1, you can use Value Based Assignment Rule.
For more information on this you can refer the following link:
http://wiki.processmaker.com/3.0/Tasks#Assignment_Rules

May you please elaborate the summary log, this will help me to provide you a specific solution for it. What does the Remark column signify in it?

Hope this helps

Best Regards
Mishika
Mishika

amosbatto
Posts: 5018
Joined: Mon Jun 22, 2009 10:28 am
Country: Bolivia
Location: La Paz

Re: create multiple sub process/task

Unread postby amosbatto » Fri Apr 21, 2017 9:33 pm

This code example may help you:
http://wiki.processmaker.com/3.0/Trigger_Examples#Repeating_a_Task_with_a_Loop-Around

If you want to set variables in your subprocess and then use those variables in the condition in the exclusive gateway for the loop-around, then your subprocess should be set to SYNCHRONOUS and you need to pass the variables back from the subprocess to the master process. If you don't understand this explanation, then we might be able to give you an example if you explain the condition you want to use in your exclusive gateway to determine whether to loop back to Step-1 or to move onto Step-2.
Amos B. Batto ♦ ProcessMaker Technical Documentation Writer & Forum Manager ♦ Cofounder of ILLA-A

lawrencelcy
Posts: 13
Joined: Tue Nov 08, 2016 12:05 am
Country: Malaysia

Re: create multiple sub process/task

Unread postby lawrencelcy » Sat Apr 22, 2017 10:42 pm

Hi Mishika,

To clarify on the requirement. this process is a mix of parallel, as the scenario below:

Account Manager(AM) will be the user of step 1, while the AM still work in the step 1

1. AM will create a new task in step 1.1 and assign to own to meet customer to study the requirement
2. AM will create a new task in step 1.1 to a technical person (TP) to meet with customer for technical clarification 1
3. AM will create new task in step 1.1 as when needed
4. Upon all the step 1.1 status is close then AM can move on to step 2


May you please elaborate the summary log, this will help me to provide you a specific solution for it. What does the Remark column signify in it?


Summary log is a list of step 1.1 that created where Remark is a field in the sub process. this will let the AM have a summary of the sub process activity status to track

mishika
Posts: 156
Joined: Thu Feb 16, 2017 3:03 am
Country: India

Re: create multiple sub process/task

Unread postby mishika » Mon Apr 24, 2017 3:19 am

Hello lawrencelcy,

To allow AM to parallelly work on step1 and step1.1, you will have to start it with the parallel gateway instead of using a parallel gateway after step1.

As a gateway cannot be used straight away after the start event, you will have to add a Dummy task which will be assigned to any user. The user will have to start the case with the Dummy task and then continue with the parallel working to step1 and step 1.1
You can either assign any of your Dynaforms in the Dummy task or leave it empty if you want.

After closing the parallel gateway you can proceed to step2 and then end the process.
The process flow for the main process can be something like:
subpr.png
subpr.png (29.17 KiB) Viewed 293 times


We cannot create tasks in a process dynamically. For the tasks in the subprocess step1.1, you can have the following process flow:
subprocesstask.png
subprocesstask.png (11.36 KiB) Viewed 293 times

In this, task1 is assigned to AM, second in assigned to TP and the last task will only be created whenever required.
In the evaluation gateway, you can apply a condition to check whether task 3 is required to be created or the process can end.

The subprocess needs to be of the Synchronous type using which you can pass the USER_LOGGED value through Variables IN from the main process to the subprocess so as to assign the first task of the subprocess to the same AM as the one who has initiated the case.
You can refer the Synchronous type subprocess from the given link: http://wiki.processmaker.com/3.0/Sub-Processes

Assignment for task 1 and task 3 can be done through the Value Based Assignment rule.
Assignment rules can be referred from the following link: http://wiki.processmaker.com/3.0/Tasks#Assignment_Rules

For the Summary log, you can create an Output Document. Create a trigger which fetches the data from the database tables like,
DEL_INIT_DATE as Date, DEL_THREAD_STATUS as Status from APP_DELEGATION table
APP_NUMBER as Case from APPLICATION table etc.
Fetch the data from tables and store it in a grid in the trigger and place the trigger before the output document.
The grid can be directly used in the Output Document as the Summary log.

Hope this helps

Best Regards
Mishika
Mishika


Return to “Using ProcessMaker 3”

Who is online

Users browsing this forum: No registered users and 2 guests