jBPM process after workflow node using ActionHandler
Simple article to show how to do processing after each workflow node and also send values from workflow to ActionHandler
<node name="Process Node">
<action class="org.jboss.soa.esb.services.jbpm.actionhandlers.EsbActionHandler">
<esbCategoryName>
ESB_PROCESSOR_QUOTE
</esbCategoryName>
</action>
<event type="node-leave">
<action class="event.CustomNodeComplete">
<actionName>Quote Successful</actionName>
</action>
</event>
<transition to="Complete"></transition>
</node>
Workflow ProcessDefinition
actionName is passed to the ActionHandler and execute method will be called if workflow node completes successfully
ActionHandler
public class CustomNodeComplete implements ActionHandler {
private static final long serialVersionUID = -6446921306976005512L;
String actionName;
@Override
public void execute(ExecutionContext execContext) throws Exception {
//actionName from workflow available
// send notification
}
No comments:
Post a Comment