Package org.eclipse.bpmn2

Examples of org.eclipse.bpmn2.CallActivity


        assertTrue(definitions.getRootElements().size() == 1);
        Process process = getRootProcess(definitions);
        Task g = (Task) process.getFlowElements().get(0);
        assertEquals("task", g.getName());
        TextAnnotation textA = (TextAnnotation) process.getArtifacts().get(0);
        Association association = (Association) process.getArtifacts().get(1);
        assertEquals(g, association.getSourceRef());
        assertEquals(textA, association.getTargetRef());
        assertEquals(AssociationDirection.NONE, association.getAssociationDirection());
        definitions.eResource().save(System.out, Collections.emptyMap());
    }
View Full Code Here


        Definitions definitions = ((Definitions) unmarshaller.unmarshall(getTestJsonFile("associationOne.json"), "").getContents().get(0));
        Process process = getRootProcess(definitions);
        Task g = (Task) process.getFlowElements().get(0);
        assertEquals("task", g.getName());
        TextAnnotation textA = (TextAnnotation) process.getArtifacts().get(0);
        Association association = (Association) process.getArtifacts().get(1);
        assertEquals(g, association.getSourceRef());
        assertEquals(textA, association.getTargetRef());
        assertEquals(AssociationDirection.ONE, association.getAssociationDirection());
        definitions.eResource().save(System.out, Collections.emptyMap());
    }
View Full Code Here

        Definitions definitions = ((Definitions) unmarshaller.unmarshall(getTestJsonFile("associationBoth.json"), "").getContents().get(0));
        Process process = getRootProcess(definitions);
        Task g = (Task) process.getFlowElements().get(0);
        assertEquals("task", g.getName());
        TextAnnotation textA = (TextAnnotation) process.getArtifacts().get(0);
        Association association = (Association) process.getArtifacts().get(1);
        assertEquals(g, association.getSourceRef());
        assertEquals(textA, association.getTargetRef());
        assertEquals(AssociationDirection.BOTH, association.getAssociationDirection());
        definitions.eResource().save(System.out, Collections.emptyMap());
    }
View Full Code Here

            if (result == null)
                result = defaultCase(theEObject);
            return result;
        }
        case Bpmn2Package.CALL_ACTIVITY: {
            CallActivity callActivity = (CallActivity) theEObject;
            T result = caseCallActivity(callActivity);
            if (result == null)
                result = caseActivity(callActivity);
            if (result == null)
                result = caseFlowNode(callActivity);
View Full Code Here

    }
   
    svgCallActivityTo.setHeight(height);
    svgCallActivityTo.setWidth(width);
    svgCallActivityTo.setId(id);
    CallActivity callActivity=(CallActivity)getBaseElement(bpmnShape.getBpmnElement());
    if(callActivity.getLoopCharacteristics() instanceof MultiInstanceLoopCharacteristics ){
      svgCallActivityTo.setLoopType(LoopType.MultiInstanceLoopParallel);
    }
   
    svgCallActivityTo.setLabel(label);
   
View Full Code Here

        propertiesNode.put(PROPERTY_CALLACTIVITY_SUBPROCESSTODATASOURCE, datavariableNode);
    }
  }
 
  protected FlowElement convertJsonToElement(JsonNode elementNode, JsonNode modelNode, Map<String, JsonNode> shapeMap) {
    CallActivity callActivity = Bpmn2Factory.eINSTANCE.createCallActivity();
    if(StringUtils.isNotEmpty(getPropertyValueAsString(PROPERTY_CALLACTIVITY_CALLEDELEMENT, elementNode))){
      BpmnModelUtil.addExtensionAttribute(callActivity, FixFlowPackage.Literals.DOCUMENT_ROOT__CALLABLE_ELEMENT_ID, getPropertyValueAsString(PROPERTY_CALLACTIVITY_CALLEDELEMENT, elementNode));
      BpmnModelUtil.addExtensionAttribute(callActivity, FixFlowPackage.Literals.DOCUMENT_ROOT__CALLABLE_ELEMENT_NAME, getPropertyValueAsString(PROPERTY_CALLACTIVITY_CALLEDELEMENT, elementNode));
    }
    String callElementVersion = getPropertyValueAsString(PROPERTY_CALLACTIVITY_ELEMENTVERSION, elementNode);
View Full Code Here

  public IAddFeature getAddFeature(IFeatureProvider fp) {
    return new AddExpandedSubProcessFeature(fp) {
      @Override
      protected void hook(Activity activity, ContainerShape container, IAddContext context, int width, int height) {
        super.hook(activity, container, context, width, height);
        CallActivity callActivity = (CallActivity) activity;
        Graphiti.getPeService().setPropertyValue(container, CALL_ACTIITY_REF_PROPERTY,
            getCallableElementStringValue(callActivity.getCalledElementRef()));
      }

      @Override
      protected void decorateActivityRectangle(RoundedRectangle rect) {
        rect.setLineWidth(4);
View Full Code Here

          "Identifies a point in the Process where a global Process or a Global Task is used");
    }

    @Override
    protected CallActivity createFlowElement(ICreateContext context) {
      CallActivity callActivity = ModelHandler.FACTORY.createCallActivity();
      callActivity.setName("Call Activity");
      return callActivity;
    }
View Full Code Here

      super(fp);
    }

    @Override
    public boolean canUpdate(IUpdateContext context) {
      CallActivity callActivity = BusinessObjectUtil.getFirstElementOfType(context.getPictogramElement(),
          CallActivity.class);
      return callActivity != null && context.getPictogramElement() instanceof ContainerShape;
    }
View Full Code Here

      PictogramElement element = context.getPictogramElement();
      String property = peService.getPropertyValue(element, CALL_ACTIITY_REF_PROPERTY);
      if (property == null) {
        return Reason.createFalseReason();
      }
      CallActivity callActivity = BusinessObjectUtil.getFirstElementOfType(context.getPictogramElement(),
          CallActivity.class);
      String value = getCallableElementStringValue(callActivity.getCalledElementRef());
      boolean changed = !value.equals(property);
      return changed ? Reason.createTrueReason() : Reason.createFalseReason();
    }
View Full Code Here

TOP

Related Classes of org.eclipse.bpmn2.CallActivity

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.