Class AutomatorAPI

java.lang.Object
org.camunda.automator.AutomatorAPI

@Component public class AutomatorAPI extends Object
  • Constructor Details

    • AutomatorAPI

      public AutomatorAPI()
  • Method Details

    • createScenario

      public Scenario createScenario()
      Create an empty scenario. The scenario can be created from scratch by the caller
      Returns:
      the scenario see scenario class to create from scratch a scenario
    • loadFromFile

      public Scenario loadFromFile(File scenarioFile) throws AutomatorException
      Load the scenario from a file
      Parameters:
      scenarioFile - file to read the scenario
      Returns:
      the scenario
      Throws:
      AutomatorException - if scenario can't be read
    • loadFromInputStream

      public Scenario loadFromInputStream(InputStream scenarioInputStream, String origin) throws AutomatorException
      Create from an input Stream.
      Parameters:
      scenarioInputStream - inputStream
      origin - origin of inputStream
      Returns:
      scenario
      Throws:
      AutomatorException - if scenario can't be read
    • getBpmnEngineFromScenario

      public BpmnEngine getBpmnEngineFromScenario(Scenario scenario, ConfigurationBpmEngine engineConfiguration) throws AutomatorException
      Search the engine from the scenario
      Parameters:
      scenario - scenario
      engineConfiguration - different engine configuration
      Returns:
      the engine, null if no engine exist, an exception if the connection is not possible
      Throws:
      AutomatorException
    • executeScenario

      public RunResult executeScenario(BpmnEngine bpmnEngine, RunParameters runParameters, Scenario scenario)
      Execute a scenario
      Parameters:
      bpmnEngine - Access the Camunda engine. if null, then the value in the scenario are used
      runParameters - parameters use to run the scenario
      scenario - the scenario to execute
    • getBpmnEngine

      public BpmnEngine getBpmnEngine(ConfigurationBpmEngine engineConfiguration, ConfigurationBpmEngine.BpmnServerDefinition serverDefinition) throws AutomatorException
      Throws:
      AutomatorException
    • deployProcess

      public RunResult deployProcess(BpmnEngine bpmnEngine, RunParameters runParameters, Scenario scenario)
      Deploy a process, bpmEngine is given by the caller
      Parameters:
      bpmnEngine - Engine to deploy
      runParameters - parameters used to deploy the version
      scenario - scenario
      Returns:
      the result object