Problem Statement:
Release : 15.9.1, 15.9.2
Component : CLARITY PROCESS MANAGEMENT
Within the Gel Script the below code was invoked to automate "Run-Event-Waiting Steps”
<core:new className="com.niku.bpm.engine.ui.ProcessEngineHandler" var="pe"/>
<core:invoke method="broadcast" on="${pe}">
<core:arg value="EXCEPTION_RETRY"/>
</core:invoke>
The below piece of code is never intended for partners/customers to use. This is not a documented API and the only reason this broadcast capability is present in ProcessEngineHandler. It's a bad practice to invoke EXCEPTION_RETRY since the requirement is actually to notify the Process Engine that certain updates on an object instance (action item in this sample case) happened and process needs to proceed for next step.
<core:new className="com.niku.bpm.engine.ui.ProcessEngineHandler" var="pe"/>
<core:invoke method="broadcast" on="${pe}">
<core:arg value="EXCEPTION_RETRY"/>
</core:invoke>
Using the below code can be used to raise event for process engine to act for next steps.
<core:new className="com.niku.bpm.utilities.BusinessProcessUtilsImpl" var="bpmUtils"/>
<core:invokeStatic className="com.niku.union.security.UserSessionControllerFactory" method="getInstance" var="sessionController"/>
<core:invoke method="init" on="${sessionController}" var="secId">
<core:arg type="java.lang.Integer" value="${gel_processInitiator}"/>
</core:invoke>
<core:invoke method="raiseEvent" on="${bpmUtils}">
<core:arg type="java.lang.String" value="actionitem"/>
<core:arg type="java.lang.Long" value="${param_actionitem_id}"/>
<core:arg type="java.lang.String" value="update"/>
<core:arg type="com.niku.union.security.SecurityIdentifier" value="${context.getSecurityIdentifier()}"/>
<core:arg type="java.sql.Connection" value="${context.getConnection()}"/>
</core:invoke>