Questions and discussion about developing processes and programming in PHP, JavaScript, web services & REST API.
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.
#822311
Hello!

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?

Thanks.
#822321
A subprocess can't start with a gateway, so you have to put a dummy task before a gateway in your subprocess:
subprocessWithDummyTask.png
subprocessWithDummyTask.png (20.94 KiB) Viewed 4138 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
MasterPRocessWithTwoSubprocesses.png (23.63 KiB) Viewed 4138 times
#822327
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?
Attachments
Ekran Alıntısı.PNG
Ekran Alıntısı.PNG (13 KiB) Viewed 4132 times
Ekran Alıntıs3ı.PNG
Ekran Alıntıs3ı.PNG (15.99 KiB) Viewed 4132 times
#822355
You need to create a master process like this:
ToMultipleSubprocessesInMaster.png
ToMultipleSubprocessesInMaster.png (28.75 KiB) Viewed 4124 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'
#822370
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.
#822412
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
subprocessCombiningTask4and5.png (22.23 KiB) Viewed 4068 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
passVariablesToSubprocess.png (56.48 KiB) Viewed 4071 times

4. In the Dynaforms for Task 4, add the following condition to the steps:
Code: Select all
@@whichTask == 'Task 4'
conditionDynaformStep.png
conditionDynaformStep.png (96.87 KiB) Viewed 4071 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
exclusiveRoutingForTask4and5.png (40.62 KiB) Viewed 4068 times
Want to create your own meme coin?

In the world of cryptocurrencies, a unique and exc[…]

The market for cryptocurrencies is demonstrating a[…]

What's SAP FICO?

Embarking on a dissertation can be one of the most[…]

Hello. For rental housing, there are software solu[…]