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.
By twforumguy
#815624
Hi there,
We have developed a main process with some sub processes in it. All tasks have a "self service"-assignment rule. Now whenever somebody grabs an unassigned task which is the first task of a sub process, the task has a new case-number.
Is there any possibility to use the case-number from the main process throughout the hole case including all sub-tasks?

Thanks in advance.
Markus
User avatar
By amosbatto
#815631
Subprocess cases must have their own unique case number.

What you can do is set the case title, to the case number of the parent case.
In the subprocess, add this trigger:
Code: Select all
$caseId = @@APPLICATION;
$sql = "SELECT A.APP_NUMBER FROM SUB_APPLICATION SA, APPLICATION A 
    WHERE SA.APP_UID='$caseId' AND SA.APP_PARENT=A.APP_UID";
$result = executeQuery($sql);
@@parentCaseNo = $result[1]['APP_NUMBER'] ;
Set this trigger to fire when the case is created in the properties of the process or before the first step in the first task if using an older version of PM.
Then, right click on the first task in the subprocess, and select Properties in the context menu. In the Activity Properties dialog that opens, go to Case Labels > Title and set it to: #@#parentCaseNo
setCaseTitle.png
setCaseTitle.png (41.93 KiB) Viewed 2922 times
Now the title of the subprocess case should be set to the number of the parent case.

Web3 development encompasses creating decentralize[…]

The Upland Clone Script, offered by Dappsfirm, rep[…]

Dappsfirm offers a bet365 clone script that mirror[…]

🚀 Tauchen Sie mit Immediate Alora AI in die Welt d[…]