Package org.activiti.engine.impl.persistence.entity

Examples of org.activiti.engine.impl.persistence.entity.EventSubscriptionEntity


    if(eventSubscriptions.isEmpty()) {
      throw new ActivitiException("Execution with id '"+executionId+"' does not have a subscription to a message event with name '"+messageName+"'");
    }
   
    // there can be only one:
    EventSubscriptionEntity eventSubscriptionEntity = eventSubscriptions.get(0);
   
    HashMap<String, Object> payload = null;
    if(processVariables != null) {
      payload = new HashMap<String, Object>(processVariables);
    }
   
    eventSubscriptionEntity.eventReceived(payload, false);
   
    return null;
  }
View Full Code Here


  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;
  }
View Full Code Here

TOP

Related Classes of org.activiti.engine.impl.persistence.entity.EventSubscriptionEntity

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.