As we transition to the new Hyland Community, some post links may be temporarily disrupted as we finalize redirects. We apologize for the inconvenience and are working to resolve this as quickly as possible. Details.
public class JavaTask extends TaskActivityBehavior { private static final Logger LOGGER = LoggerFactory.getLogger(JavaTask.class); @Override public void execute(ActivityExecution execution) throws Exception { LOGGER.info("Execution: " + execution.getId()); } @Override public void signal(ActivityExecution execution, String signalName, Object signalData) throws Exception { if ("notOk".equals(execution.getVariables().get("status"))) { LOGGER.info("Suspend process: " + execution.getProcessInstanceId()); PvmTransition pvmTransition = execution.getActivity().getIncomingTransitions().get(0); execution.take(pvmTransition); execution.getEngineServices().getRuntimeService().suspendProcessInstanceById(execution.getProcessInstanceId()); } else { leave(execution); } } }