Search in sources :

Example 16 with EndEvent

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

the class EndEventJsonConverter method convertJsonToElement.

protected FlowElement convertJsonToElement(JsonNode elementNode, JsonNode modelNode, Map<String, JsonNode> shapeMap) {
    EndEvent endEvent = new EndEvent();
    String stencilId = BpmnJsonConverterUtil.getStencilId(elementNode);
    if (STENCIL_EVENT_END_ERROR.equals(stencilId)) {
        convertJsonToErrorDefinition(elementNode, endEvent);
    } else if (STENCIL_EVENT_END_CANCEL.equals(stencilId)) {
        CancelEventDefinition eventDefinition = new CancelEventDefinition();
        endEvent.getEventDefinitions().add(eventDefinition);
    } else if (STENCIL_EVENT_END_TERMINATE.equals(stencilId)) {
        TerminateEventDefinition eventDefinition = new TerminateEventDefinition();
        String terminateAllStringValue = getPropertyValueAsString(PROPERTY_TERMINATE_ALL, elementNode);
        if (StringUtils.isNotEmpty(terminateAllStringValue)) {
            eventDefinition.setTerminateAll("true".equals(terminateAllStringValue));
        }
        endEvent.getEventDefinitions().add(eventDefinition);
    }
    return endEvent;
}
Also used : EndEvent(org.activiti.bpmn.model.EndEvent) CancelEventDefinition(org.activiti.bpmn.model.CancelEventDefinition) TerminateEventDefinition(org.activiti.bpmn.model.TerminateEventDefinition)

Aggregations

EndEvent (org.activiti.bpmn.model.EndEvent)16 SequenceFlow (org.activiti.bpmn.model.SequenceFlow)7 StartEvent (org.activiti.bpmn.model.StartEvent)6 UserTask (org.activiti.bpmn.model.UserTask)6 BpmnModel (org.activiti.bpmn.model.BpmnModel)5 TerminateEventDefinition (org.activiti.bpmn.model.TerminateEventDefinition)3 ActivitiListener (org.activiti.bpmn.model.ActivitiListener)2 CancelEventDefinition (org.activiti.bpmn.model.CancelEventDefinition)2 FlowElement (org.activiti.bpmn.model.FlowElement)2 Process (org.activiti.bpmn.model.Process)2 ByteArrayInputStream (java.io.ByteArrayInputStream)1 ArrayList (java.util.ArrayList)1 BpmnXMLConverter (org.activiti.bpmn.converter.BpmnXMLConverter)1 ErrorEventDefinition (org.activiti.bpmn.model.ErrorEventDefinition)1 EventDefinition (org.activiti.bpmn.model.EventDefinition)1 ExclusiveGateway (org.activiti.bpmn.model.ExclusiveGateway)1 FlowNode (org.activiti.bpmn.model.FlowNode)1 ParallelGateway (org.activiti.bpmn.model.ParallelGateway)1 TimerEventDefinition (org.activiti.bpmn.model.TimerEventDefinition)1 InputStreamSource (org.activiti.engine.impl.util.io.InputStreamSource)1