Search in sources :

Example 6 with ActivitiActivityEvent

use of org.activiti.engine.delegate.event.ActivitiActivityEvent in project Activiti by Activiti.

the class ActivityStartedEventHandler method generateEventLogEntry.

@Override
public EventLogEntryEntity generateEventLogEntry(CommandContext commandContext) {
    ActivitiActivityEvent activityEvent = (ActivitiActivityEvent) event;
    Map<String, Object> data = new HashMap<String, Object>();
    putInMapIfNotNull(data, Fields.ACTIVITY_ID, activityEvent.getActivityId());
    putInMapIfNotNull(data, Fields.ACTIVITY_NAME, activityEvent.getActivityName());
    putInMapIfNotNull(data, Fields.PROCESS_DEFINITION_ID, activityEvent.getProcessDefinitionId());
    putInMapIfNotNull(data, Fields.PROCESS_INSTANCE_ID, activityEvent.getProcessInstanceId());
    putInMapIfNotNull(data, Fields.EXECUTION_ID, activityEvent.getExecutionId());
    putInMapIfNotNull(data, Fields.ACTIVITY_TYPE, activityEvent.getActivityType());
    putInMapIfNotNull(data, Fields.BEHAVIOR_CLASS, activityEvent.getBehaviorClass());
    return createEventLogEntry(activityEvent.getProcessDefinitionId(), activityEvent.getProcessInstanceId(), activityEvent.getExecutionId(), null, data);
}
Also used : ActivitiActivityEvent(org.activiti.engine.delegate.event.ActivitiActivityEvent) HashMap(java.util.HashMap)

Aggregations

ActivitiActivityEvent (org.activiti.engine.delegate.event.ActivitiActivityEvent)6 HashMap (java.util.HashMap)4 ProcessInstance (org.activiti.engine.runtime.ProcessInstance)2 Task (org.activiti.engine.task.Task)2 Deployment (org.activiti.engine.test.Deployment)2 ActivitiSignalEvent (org.activiti.engine.delegate.event.ActivitiSignalEvent)1 Execution (org.activiti.engine.runtime.Execution)1