Search in sources :

Example 16 with SimulationEvent

use of org.activiti.crystalball.simulator.SimulationEvent in project Activiti by Activiti.

the class EventOverviewPanel method fillEventValues.

protected void fillEventValues() {
    for (SimulationEvent originalEvent : simulationEvents) {
        boolean executed = true;
        if (SimulationRunContext.getEventCalendar() != null && SimulationRunContext.getEventCalendar().getEvents() != null) {
            for (SimulationEvent event : SimulationRunContext.getEventCalendar().getEvents()) {
                if (originalEvent.equals(event)) {
                    executed = false;
                    stepButton.setEnabled(true);
                    break;
                }
            }
        }
        Object itemId = eventTable.addItem();
        eventTable.getItem(itemId).getItemProperty("type").setValue(originalEvent.getType());
        eventTable.getItem(itemId).getItemProperty("executed").setValue(executed);
    }
    if (replayHistoricInstance != null && replayHistoricInstance.getId() != null) {
        ProcessInstance testInstance = runtimeService.createProcessInstanceQuery().processInstanceId(replayHistoricInstance.getId()).singleResult();
        if (testInstance != null) {
            showProcessInstanceButton.setCaption(i18nManager.getMessage(Messages.TASK_PART_OF_PROCESS, definitionMap.get(replayHistoricInstance.getProcessDefinitionId())));
            showProcessInstanceButton.setVisible(true);
        }
    }
    eventTable.setVisible(true);
}
Also used : HistoricProcessInstance(org.activiti.engine.history.HistoricProcessInstance) ProcessInstance(org.activiti.engine.runtime.ProcessInstance) SimulationEvent(org.activiti.crystalball.simulator.SimulationEvent)

Aggregations

SimulationEvent (org.activiti.crystalball.simulator.SimulationEvent)16 HashMap (java.util.HashMap)7 Function (org.activiti.crystalball.simulator.delegate.event.Function)3 EventLogEntry (org.activiti.engine.event.EventLogEntry)3 ProcessInstance (org.activiti.engine.runtime.ProcessInstance)3 TypeReference (com.fasterxml.jackson.core.type.TypeReference)2 ObjectMapper (com.fasterxml.jackson.databind.ObjectMapper)2 IOException (java.io.IOException)2 ArrayList (java.util.ArrayList)2 CrystalballException (org.activiti.crystalball.simulator.CrystalballException)2 EventLogProcessInstanceCreateTransformer (org.activiti.crystalball.simulator.delegate.event.impl.EventLogProcessInstanceCreateTransformer)2 EventLogUserTaskCompleteTransformer (org.activiti.crystalball.simulator.delegate.event.impl.EventLogUserTaskCompleteTransformer)2 ActivitiEntityEvent (org.activiti.engine.delegate.event.ActivitiEntityEvent)2 Task (org.activiti.engine.task.Task)2 Date (java.util.Date)1 Map (java.util.Map)1 ReplaySimulationRun (org.activiti.crystalball.simulator.ReplaySimulationRun)1 SimpleEventCalendar (org.activiti.crystalball.simulator.SimpleEventCalendar)1 SimulationDebugger (org.activiti.crystalball.simulator.SimulationDebugger)1 SimulationEventComparator (org.activiti.crystalball.simulator.SimulationEventComparator)1