Questions and discussion about developing processes and programming in PHP, JavaScript, web services & REST API.

Moderator: amosbatto

Forum rules: Please search to see if a question has already asked before creating a new topic. Please don't post the same question in multiple forums.

In my process, there is a sub process and I want to start from different task in this sub process.

Can I assaign veriable to starting activity in Sub-Process Properties for conducting like gateway.

Or are there any ways to do this?

A subprocess can't start with a gateway, so you have to put a dummy task before a gateway in your subprocess:
subprocessWithDummyTask.png (20.94 KiB) Viewed 477 times
It is possible to use PMFDerivateCase() and header("Location:X") in a trigger in the dummy task to skip it and go directly to "Starting task 1" or Starting task 2", but the user will still see the title of the dummy task, when opening the subprocess, so I don't recommend using a dummy task.

The best solution is to create two subprocesses and use a gateway in the master process to select which subprocess to use:
MasterPRocessWithTwoSubprocesses.png (23.63 KiB) Viewed 477 times
Hi Amos!

My main process is like first picture. Second picture is my sub-rocess. When I send task to sub-process from Task 1 in main process, I want to send task both Task 4 and Task 5 in sub-process.

So my main problem is this. Can you help me about it?
Ekran Alıntısı.PNG
Ekran Alıntısı.PNG (13 KiB) Viewed 471 times
Ekran Alıntıs3ı.PNG
Ekran Alıntıs3ı.PNG (15.99 KiB) Viewed 471 times
You need to create a master process like this:
ToMultipleSubprocessesInMaster.png (28.75 KiB) Viewed 463 times
You can use conditions to choose which path to take. For example, if you have a dropdown associated with the variable "whichPath" where the user can select "Task 4" or "Task 5", then your conditions in the exclusive gateway would be:
@@whichPath == 'Task 4'

@@whichPath == 'Task 5'
processmakerlover wrote: Fri Jan 11, 2019 5:19 am I already know these. But I want to make it with only one subprocess which includes two start cases. And I want to send task both of two start cases in subprocess. I want to make it because of visuality.
You can place all the steps (Dynaforms, Input Docs and Output Docs) from Task 4 and Task 5 in one task and then use conditions to display or hide the task's steps. You can pass a variable from the master process to the subprocess which is used in the conditions. That way only the steps from Task 4 are displayed or only the steps from Task 5 are displayed.
1. Your subprocess combines Task 4 and Task 5 into one task. It has all the Dynaforms and Input and Output Documents from Task 4 and Task 5 in that one task.
subprocessCombiningTask4and5.png (22.23 KiB) Viewed 407 times
2. In your master process, you have a trigger to decide whether to show Task 4 or Task 5. Something like this:
Code: Select all
if (@@someVariable == 'X') {
    @@whichTask = 'Task 4';
else {
    @@whichTask = 'Task 5';
Set this trigger to fire at some point before the subprocess.

3. In the properties of your subprocess, pass the variable @@whichTask from the master process to the subprocess.
passVariablesToSubprocess.png (56.48 KiB) Viewed 410 times

4. In the Dynaforms for Task 4, add the following condition to the steps:
Code: Select all
@@whichTask == 'Task 4'
conditionDynaformStep.png (96.87 KiB) Viewed 410 times

5. In the Dynaforms for Task 5, add the following condition to the steps:
Code: Select all
@@whichTask == 'Task 5'
6. In the exclusive gateway in the subprocess, set the following conditions:
exclusiveRoutingForTask4and5.png (40.62 KiB) Viewed 407 times
ProfErsin2 wrote:Is there anyone who has examples about them? They are intermediate email event, intermediate timer event, start timer event.
I don't have any prepared examples. Do you have a specific question?

Primero, tus comillas estan mal y olvidaste termin[…]

First of all, you are using JavaScript, not Java. […]

Stop submit from javacript

Do it this way: form = $("#637207031573dcea[…]

I can't find the database table where this informa[…]