protected BusinessProcessEvent createEvent(DelegateExecution execution) {
ProcessDefinition processDefinition = Context.getExecutionContext().getProcessDefinition();
// map type
String eventName = execution.getEventName();
BusinessProcessEventType type = null;
if(ExecutionListener.EVENTNAME_START.equals(eventName)) {
type = BusinessProcessEventType.START_ACTIVITY;
} else if(ExecutionListener.EVENTNAME_END.equals(eventName)) {
type = BusinessProcessEventType.END_ACTIVITY;
} else if(ExecutionListener.EVENTNAME_TAKE.equals(eventName)) {