Last Modified: 12.02.2021
Some activities may suspend the execution of a business process pending user’s response.
For such activities, there is an option to perform tasks instead of the user through API. To do so, send an external event to the business process as follows:
CBPDocument::SendExternalEvent($workflowId, $activityName, $arEventParameters);
Example for the Activity "Document Approval":
"5046fe0fbf1888.64722245" - the identifier of a business process instance;
"Approve1" - name for the approval activity;
"USER_ID"=>1 - identifier for the approving user;
"APPROVE"=>true - the approval result (if declined - false).