Search in sources :

Example 16 with NoExecutionVariableScope

use of org.activiti.engine.impl.el.NoExecutionVariableScope in project Activiti by Activiti.

the class DelegateExpressionTransactionDependentExecutionListener method notify.

@Override
public void notify(String processInstanceId, String executionId, FlowElement flowElement, Map<String, Object> executionVariables, Map<String, Object> customPropertiesMap) {
    NoExecutionVariableScope scope = new NoExecutionVariableScope();
    Object delegate = expression.getValue(scope);
    if (delegate instanceof TransactionDependentExecutionListener) {
        ((TransactionDependentExecutionListener) delegate).notify(processInstanceId, executionId, flowElement, executionVariables, customPropertiesMap);
    } else {
        throw new ActivitiIllegalArgumentException("Delegate expression " + expression + " did not resolve to an implementation of " + TransactionDependentExecutionListener.class);
    }
}
Also used : ActivitiIllegalArgumentException(org.activiti.engine.ActivitiIllegalArgumentException) NoExecutionVariableScope(org.activiti.engine.impl.el.NoExecutionVariableScope) TransactionDependentExecutionListener(org.activiti.engine.delegate.TransactionDependentExecutionListener)

Aggregations

NoExecutionVariableScope (org.activiti.engine.impl.el.NoExecutionVariableScope)16 Test (org.junit.Test)9 ActivitiIllegalArgumentException (org.activiti.engine.ActivitiIllegalArgumentException)4 ProcessEngineImpl (org.activiti.engine.impl.ProcessEngineImpl)4 ReplaySimulationRun (org.activiti.crystalball.simulator.ReplaySimulationRun)3 ProcessInstance (org.activiti.engine.runtime.ProcessInstance)3 Date (java.util.Date)2 SimpleEventCalendar (org.activiti.crystalball.simulator.SimpleEventCalendar)2 SimulationDebugger (org.activiti.crystalball.simulator.SimulationDebugger)2 SimulationEventComparator (org.activiti.crystalball.simulator.SimulationEventComparator)2 EventLogTransformer (org.activiti.crystalball.simulator.delegate.event.impl.EventLogTransformer)2 DefaultClockFactory (org.activiti.crystalball.simulator.impl.clock.DefaultClockFactory)2 ThreadLocalClock (org.activiti.crystalball.simulator.impl.clock.ThreadLocalClock)2 ActivitiException (org.activiti.engine.ActivitiException)2 RuntimeService (org.activiti.engine.RuntimeService)2 TaskService (org.activiti.engine.TaskService)2 VariableScope (org.activiti.engine.delegate.VariableScope)2 ProcessEngineConfigurationImpl (org.activiti.engine.impl.cfg.ProcessEngineConfigurationImpl)2 Clock (org.activiti.engine.runtime.Clock)2 Task (org.activiti.engine.task.Task)2