Search in sources :

Example 11 with ThrowEvent

use of org.activiti.bpmn.model.ThrowEvent in project Activiti by Activiti.

the class ThrowEventJsonConverter method getStencilId.

protected String getStencilId(BaseElement baseElement) {
    ThrowEvent throwEvent = (ThrowEvent) baseElement;
    List<EventDefinition> eventDefinitions = throwEvent.getEventDefinitions();
    if (eventDefinitions.size() != 1) {
        // return none event as default;
        return STENCIL_EVENT_THROW_NONE;
    }
    EventDefinition eventDefinition = eventDefinitions.get(0);
    if (eventDefinition instanceof SignalEventDefinition) {
        return STENCIL_EVENT_THROW_SIGNAL;
    } else {
        return STENCIL_EVENT_THROW_NONE;
    }
}
Also used : ThrowEvent(org.activiti.bpmn.model.ThrowEvent) SignalEventDefinition(org.activiti.bpmn.model.SignalEventDefinition) SignalEventDefinition(org.activiti.bpmn.model.SignalEventDefinition) EventDefinition(org.activiti.bpmn.model.EventDefinition)

Aggregations

ThrowEvent (org.activiti.bpmn.model.ThrowEvent)11 SignalEventDefinition (org.activiti.bpmn.model.SignalEventDefinition)3 ArrayList (java.util.ArrayList)2 BoundaryEvent (org.activiti.bpmn.model.BoundaryEvent)2 EventDefinition (org.activiti.bpmn.model.EventDefinition)2 FlowElement (org.activiti.bpmn.model.FlowElement)2 HashMap (java.util.HashMap)1 Activity (org.activiti.bpmn.model.Activity)1 BaseElement (org.activiti.bpmn.model.BaseElement)1 ExclusiveGateway (org.activiti.bpmn.model.ExclusiveGateway)1 FlowElementsContainer (org.activiti.bpmn.model.FlowElementsContainer)1 ParallelGateway (org.activiti.bpmn.model.ParallelGateway)1 Process (org.activiti.bpmn.model.Process)1 Signal (org.activiti.bpmn.model.Signal)1 UserTask (org.activiti.bpmn.model.UserTask)1 CommandContext (org.activiti.engine.impl.interceptor.CommandContext)1 CompensateEventSubscriptionEntity (org.activiti.engine.impl.persistence.entity.CompensateEventSubscriptionEntity)1 EventSubscriptionEntityManager (org.activiti.engine.impl.persistence.entity.EventSubscriptionEntityManager)1