Search in sources :

Example 1 with SuspendProcessDefinitionCmd

use of org.activiti.engine.impl.cmd.SuspendProcessDefinitionCmd in project Activiti by Activiti.

the class TimerSuspendProcessDefinitionHandler method execute.

public void execute(JobEntity job, String configuration, ExecutionEntity execution, CommandContext commandContext) {
    JSONObject cfgJson = new JSONObject(configuration);
    String processDefinitionId = job.getProcessDefinitionId();
    boolean suspendProcessInstances = getIncludeProcessInstances(cfgJson);
    SuspendProcessDefinitionCmd suspendProcessDefinitionCmd = new SuspendProcessDefinitionCmd(processDefinitionId, null, suspendProcessInstances, null, job.getTenantId());
    suspendProcessDefinitionCmd.execute(commandContext);
}
Also used : JSONObject(org.activiti.engine.impl.util.json.JSONObject) SuspendProcessDefinitionCmd(org.activiti.engine.impl.cmd.SuspendProcessDefinitionCmd)

Aggregations

SuspendProcessDefinitionCmd (org.activiti.engine.impl.cmd.SuspendProcessDefinitionCmd)1 JSONObject (org.activiti.engine.impl.util.json.JSONObject)1