public String getEventType() {
return eventType;
}
public EventSubscriptionEntity prepareEventSubscriptionEntity(ExecutionEntity execution) {
EventSubscriptionEntity eventSubscriptionEntity = null;
if(eventType.equals("message")) {
eventSubscriptionEntity = new MessageEventSubscriptionEntity(execution);
}else if(eventType.equals("signal")) {
eventSubscriptionEntity = new SignalEventSubscriptionEntity(execution);
}else {
throw new ActivitiException("Found event definition of unknown type: "+eventType);
}
eventSubscriptionEntity.setEventName(eventName);
if(activityId != null) {
ActivityImpl activity = execution.getProcessDefinition().findActivity(activityId);
eventSubscriptionEntity.setActivity(activity);
}
return eventSubscriptionEntity;
}