http://forum.processmaker.com/viewtopic ... 7&t=701898
The ISssue: to
create a dinamic number of paralel tasks within a process.
KEEP IN MIND:
Processmaker does not have a tool for dinamic creation of the parallel tasks, so FIRST you must create manualy a tree with a maximum expected amount of parallel tasks, so this method is only ok for a small number of parallel tasks, or you will spend all your life to create it for bigger number of cases
1. To KNOW: if you want each user to have a same task to be done but with different filled in information, you should consider to use different variables on each dynaform.
1.1 To KNOW: if you have some info that must be the same in all paralel forms ( for example a header with some common
case details) just leave same variable names for the fields in every copy of the form.
2. To KNOW: for each parallel task you need a separated copy of used dynaform.
3. You need a trigger to count the number of tasks to be started and assign users (if it is the
case), the trigger must start 1 step before parallel tasks in the "Before Assignement" compartment.
4. If you want to monitor an overoll progress , you may consider startnig 1 paralel task with a dynaform that have all the used variables from each parallel task (my
case)
__________________________
My
case: I need to start a variable number of paralel set of tasks according to the number of users in a group, and assign 1 set of tasks per each user. Each set of tasks consist of 3 different tasks.
Here is the tree:
Here is the Trigger used:
See here editable text version of the trigger:
http://forum.processmaker.com/viewtopic ... 7&t=701898
Here is the list of forms :
You may see here that i created 5 copies for each form
In each form, i manually change the variable names that must have unique values for each user by adding a number at the end of the xml tag:
for example if i have a text box :
Code: Select all<name type="text" maxlength="64" validate="Alpha" required="1" size="20" mode="view">
<en>Prenume</en>
</name>
then i will use for first form:
Code: Select all<name1 type="text" maxlength="64" validate="Alpha" required="1" size="20" mode="view">
<en>Prenume</en>
</name1>
For second :
Code: Select all<name2 type="text" maxlength="64" validate="Alpha" required="1" size="20" mode="view">
<en>Prenume</en>
</name2>
and so on....
For example in one of my forms i use this code:
Code: Select all<company_name type="text" maxlength="64" validate="Alpha" required="1" size="20" mode="view">
<en>company name here</en>
</company_name>
<company_phone type="text" maxlength="64" validate="Alpha" required="1" size="20" mode="view">
<en>company phone here</en>
</company_phone>
<user_name1 type="text" maxlength="64" validate="Alpha" required="1" size="20" mode="view">
<en>first user name here</en>
</user_name1>
<user_phone1 type="text" maxlength="64" validate="Alpha" required="1" size="20" mode="view">
<en>first user name here</en>
</user_phone1>
so you may see that i have 2 common fields for every parallel tasks : company name and phone are the same
and i have 2 unique fields user name and phone that must be unique in every parallel task
The overall progress task:
In the tree image, top right, you may see that i start a Monitor called task.
the mean of that task is to aggregate all the fields from all the parallel tasks
Please ask me other detail , maybe i forget something to say.
Sorry my poor english.
Dear Liliana, if you want to use that information in any of your resources, if you find it helpful, you are welcome to do it , also to make any spelling or contextual changes.