Package org.camunda.automator
Class AutomatorAPI
java.lang.Object
org.camunda.automator.AutomatorAPI
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionCreate an empty scenario.deployProcess(BpmnEngine bpmnEngine, RunParameters runParameters, Scenario scenario) Deploy a process, bpmEngine is given by the callerexecuteScenario(BpmnEngine bpmnEngine, RunParameters runParameters, Scenario scenario) Execute a scenariogetBpmnEngine(ConfigurationBpmEngine engineConfiguration, ConfigurationBpmEngine.BpmnServerDefinition serverDefinition) getBpmnEngineFromScenario(Scenario scenario, ConfigurationBpmEngine engineConfiguration) Search the engine from the scenarioloadFromFile(File scenarioFile) Load the scenario from a fileloadFromInputStream(InputStream scenarioInputStream, String origin) Create from an input Stream.
-
Constructor Details
-
AutomatorAPI
public AutomatorAPI()
-
-
Method Details
-
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
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- inputStreamorigin- 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- scenarioengineConfiguration- 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 usedrunParameters- parameters use to run the scenarioscenario- 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 deployrunParameters- parameters used to deploy the versionscenario- scenario- Returns:
- the result object
-