All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.camunda.consulting.simulator.property.Work Maven / Gradle / Ivy

Go to download

A Plugin for [Camunda BPM](http://docs.camunda.org) that simulates process execution.

There is a newer version: 1.6.0
Show newest version
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;
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy