Package org.camunda.bpm.engine.impl.cmd

Examples of org.camunda.bpm.engine.impl.cmd.ActivateJobDefinitionCmd


  public void execute(String configuration, ExecutionEntity execution, CommandContext commandContext) {
    JSONObject config = new JSONObject(configuration);

    boolean activateJobs = getIncludeJobs(config);

    ActivateJobDefinitionCmd cmd = null;

    String by = getBy(config);

    if (by.equals(JOB_HANDLER_CFG_JOB_DEFINITION_ID)) {
      String jobDefinitionId = getJobDefinitionId(config);
      cmd = new ActivateJobDefinitionCmd(jobDefinitionId, null, null, activateJobs, null);
    } else

    if (by.equals(JOB_HANDLER_CFG_PROCESS_DEFINITION_ID)) {
      String processDefinitionId = getProcessDefinitionId(config);
      cmd = new ActivateJobDefinitionCmd(null, processDefinitionId, null, activateJobs, null);
    } else

    if (by.equals(JOB_HANDLER_CFG_PROCESS_DEFINITION_KEY)) {
      String processDefinitionKey = getProcessDefinitionKey(config);
      cmd = new ActivateJobDefinitionCmd(null, null, processDefinitionKey, activateJobs, null);
    }

    cmd.execute(commandContext);
  }
View Full Code Here

TOP

Related Classes of org.camunda.bpm.engine.impl.cmd.ActivateJobDefinitionCmd

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.