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.
execution.getEngineServices().getRuntimeService().suspendProcessInstanceById(execution.getProcessInstanceId());
public class Activity1 implements JavaDelegate{ @Override public void execute(DelegateExecution execution) throws Exception { System.out.println(execution.getProcessInstanceId()); execution.getEngineServices().getRuntimeService().suspendProcessInstanceById(execution.getProcessInstanceId()); System.out.println("Activity 1"); } } public class Activity2 implements JavaDelegate{ @Override public void execute(DelegateExecution execution) throws Exception { System.out.println("Activity2"); } } public class Activity3 implements JavaDelegate{ @Override public void execute(DelegateExecution execution) throws Exception { System.out.println("Activity3"); } }