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['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
Now the title of the subprocess case should be set to the number of the parent case.
Amos B. Batto ♦ ProcessMaker Technical Documentation Writer & Forum Manager ♦ Cofounder of ILLA (http://www.illa-a.org)