You can skip a task by right clicking on it and selecting
Task Type > Script Task in the context menu. Then, ProcessMaker will automatically skip the task.
automaticallySkiTask.png (14.04 KiB) Viewed 2842 times
If you don't want to use a script task, then you can skip the next task in the process by creating the following trigger:
Code: Select all$caseId = @@APPLICATION;
$sql = "SELECT * FROM APP_DELEGATION WHERE APP_UID='$caseId' ORDER BY DEL_INDEX DESC";
$aTasks = executeQuery($sql);
$g = new G();
$g->sessionVarSave();
PMFDerivateCase(@@APPLICATION, $aTasks[1]['DEL_INDEX'], false, $aTasks[1]['USR_UID']);
$g->sessionVarRestore();
//redirect back to the cases list:
header("location: casesListExtJsRedirector");
die();
Set this trigger to fire
After Routing in the previous task (which in this example is "Task 1").
See:
viewtopic.php?f=47&t=713218