com.camunda.consulting.simulator.property.Work Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of camunda-bpm-simulator Show documentation
Show all versions of camunda-bpm-simulator Show documentation
A Plugin for [Camunda BPM](http://docs.camunda.org) that simulates process execution.
package com.camunda.consulting.simulator.property;
import org.camunda.bpm.engine.impl.el.Expression;
import com.camunda.consulting.simulator.SimulatorPlugin;
public class Work {
Expression variableExpression;
Expression valueExpression;
public Work(String setVariableValue) {
String[] split = setVariableValue.split("=", 2);
if (split.length != 2) {
throw new RuntimeException("Expression does not evaluate to proper simulateSetVariable command: " + setVariableValue);
}
variableExpression = SimulatorPlugin.getProcessEngineConfiguration().getExpressionManager().createExpression(split[0]);
valueExpression = SimulatorPlugin.getProcessEngineConfiguration().getExpressionManager().createExpression(split[1]);
}
public Expression getVariableExpression() {
return variableExpression;
}
public Expression getValueExpression() {
return valueExpression;
}
}