Examples of EventBasedGateway


Examples of org.eclipse.bpmn2.EventBasedGateway

    public void testEventBasedGatewayUnmarshalling() throws Exception {
        Bpmn2JsonUnmarshaller unmarshaller = new Bpmn2JsonUnmarshaller();
        Definitions definitions = ((Definitions) unmarshaller.unmarshall(getTestJsonFile("eventBasedGateway.json"), "").getContents().get(0));
        assertTrue(definitions.getRootElements().size() == 1);
        Process process = getRootProcess(definitions);
        EventBasedGateway g = (EventBasedGateway) process.getFlowElements().get(0);
        assertEquals("event-based gateway", g.getName());
        definitions.eResource().save(System.out, Collections.emptyMap());
    }
View Full Code Here

Examples of org.eclipse.bpmn2.EventBasedGateway

            if (result == null)
                result = defaultCase(theEObject);
            return result;
        }
        case Bpmn2Package.EVENT_BASED_GATEWAY: {
            EventBasedGateway eventBasedGateway = (EventBasedGateway) theEObject;
            T result = caseEventBasedGateway(eventBasedGateway);
            if (result == null)
                result = caseGateway(eventBasedGateway);
            if (result == null)
                result = caseFlowNode(eventBasedGateway);
View Full Code Here

Examples of org.eclipse.bpmn2.EventBasedGateway

 
  protected void convertElementToJson(ObjectNode propertiesNode, FlowElement flowElement) {
  }
 
  protected FlowElement convertJsonToElement(JsonNode elementNode, JsonNode modelNode, Map<String, JsonNode> shapeMap) {
    EventBasedGateway gateway = Bpmn2Factory.eINSTANCE.createEventBasedGateway();// EventGateway();
    return gateway;
  }
View Full Code Here

Examples of org.eclipse.bpmn2.EventBasedGateway

      super(fp, "Event-Based Gateway", "Represents a branching point in the process");
    }

    @Override
    protected Gateway createFlowElement(ICreateContext context) {
      EventBasedGateway gateway = ModelHandler.FACTORY.createEventBasedGateway();
      gateway.setInstantiate(false);
      gateway.setEventGatewayType(EventBasedGatewayType.EXCLUSIVE);
      return gateway;
    }
View Full Code Here

Examples of org.eclipse.bpmn2.EventBasedGateway

    boolean instantiate = Boolean.parseBoolean(service.getPropertyValue(context.getPictogramElement(),
            EventBasedGatewayFeatureContainer.INSTANTIATE_PROPERTY));
    EventBasedGatewayType gatewayType = EventBasedGatewayType.getByName(service.getPropertyValue(
            context.getPictogramElement(), EventBasedGatewayFeatureContainer.EVENT_GATEWAY_TYPE_PROPERTY));

    EventBasedGateway gateway = (EventBasedGateway) getBusinessObjectForPictogramElement(context
            .getPictogramElement());

    boolean changed = instantiate != gateway.isInstantiate() || gatewayType != gateway.getEventGatewayType();
    return changed ? Reason.createTrueReason() : Reason.createFalseReason();
  }
View Full Code Here

Examples of org.eclipse.bpmn2.EventBasedGateway

  @Override
  public boolean update(IUpdateContext context) {
    IPeService service = Graphiti.getPeService();

    EventBasedGateway gateway = (EventBasedGateway) getBusinessObjectForPictogramElement(context
            .getPictogramElement());

    clearGateway(context.getPictogramElement());

    if (gateway.isInstantiate()) {
      if (gateway.getEventGatewayType() == EventBasedGatewayType.PARALLEL) {
        drawParallelMultipleEventBased((ContainerShape) context.getPictogramElement());
      } else {
        drawExclusiveEventBased((ContainerShape) context.getPictogramElement());
      }
    } else {
      drawEventBased((ContainerShape) context.getPictogramElement());
    }

    service.setPropertyValue(context.getPictogramElement(), EventBasedGatewayFeatureContainer.INSTANTIATE_PROPERTY,
            Boolean.toString(gateway.isInstantiate()));
    service.setPropertyValue(context.getPictogramElement(),
            EventBasedGatewayFeatureContainer.EVENT_GATEWAY_TYPE_PROPERTY, gateway.getEventGatewayType().getName());
    return true;
  }
View Full Code Here

Examples of org.eclipse.bpmn2.EventBasedGateway

    public void testEventBasedGatewayUnmarshalling() throws Exception {
        Bpmn2JsonUnmarshaller unmarshaller = new Bpmn2JsonUnmarshaller();
        Definitions definitions = unmarshaller.unmarshall(getTestJsonFile("eventBasedGateway.json"));
        assertTrue(definitions.getRootElements().size() == 1);
        Process process = (Process) definitions.getRootElements().get(0);
        EventBasedGateway g = (EventBasedGateway) process.getFlowElements().get(0);
        assertEquals("event-based gateway", g.getName());
        definitions.eResource().save(System.out, Collections.emptyMap());
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.