Questions and discussion about using ProcessMaker 2: user interface, running cases and functionality
Forum rules: Please search to see if a question has already been asked before posting. Please don't ask the same question in multiple forums.
#772344
HOW TO generate multiple subprocesses according to checkgroup selection?

in a checkgroup i make data selection from sql like : select * users
and i would wonder to be able to select the needed users and on pressing submit, to be generated multiple subprocesses(of a same type) each per selected user.

UPD: I created the full workflow perfectly, but that question makes me think on changing the engine. :(
To was able to use sql for selecting the needed group of users ([CDATA[ select CON_ID, CON_VALUE from CONTENT where CON_CATEGORY='GRP_TITLE';]).

now the only question is how to start the next step (same one) for each of the users from the group?


i'm to novice to do it myself, any help would be appreciated.

thanks
#773508
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: Image

Here is the Trigger used: Image
See here editable text version of the trigger: http://forum.processmaker.com/viewtopic ... 7&t=701898

Here is the list of forms :Image
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.
#775113
Better solution found
Here I would like to post an updated version with subprocesses.
You need now much less time to specify the variables, the subprocesses are synchronous, and only in the Out (from subprocess to main process) variables you have to make a corelation.
All subproceses are a copy from subprocess 1 done by export/import of the first subproject and renaming them.

Image

Image

Image


This solution solved one of my bigest concerns: To limit user A see other users history ( each paralel task is for different users )

At the same time, i have another issue,
and actually requesting an assistance:

Because of the specific of the synchronous subprocesses - the main process comes back only after EVERY subproces is ended i dont know:
How the Manager (user who owns the main process) can see each subprocess state ( history, dynaform, map) at the time when that proceses are not completed ....

Thanks.

Are you planning to buy the secured and advanced B[…]

The editing of sensitive information on any PDF Do[…]

Yes, musculoskeletal pain can be treated. Treatmen[…]

Hi there, I have 3.5.7, 3.8.1 and 3.8.2 ver[…]