将流程进行挂起和激活操作,
public ResultBean setSuspensionState(String state, String processInstanceId) {
if (state.equals("active")) {
runtimeService.activateProcessInstanceById(processInstanceId);
return new ResultBean(true, "已激活ID为[" + processInstanceId + "]的流程实例。");
} else if (state.equals("suspend")) {
runtimeService.suspendProcessInstanceById(processInstanceId);
return new ResultBean(true, "已挂起ID为[" + processInstanceId + "]的流程实例。");
}
return new ResultBean(false,"状态异常");
}