Examples of CallActivity


Examples of org.eclipse.bpmn2.CallActivity

            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

Examples of org.eclipse.bpmn2.CallActivity

    }
   
    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

Examples of org.eclipse.bpmn2.CallActivity

        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

Examples of org.eclipse.bpmn2.CallActivity

  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

Examples of org.eclipse.bpmn2.CallActivity

          "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

Examples of org.eclipse.bpmn2.CallActivity

      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

Examples of org.eclipse.bpmn2.CallActivity

      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

Examples of org.eclipse.bpmn2.CallActivity

    public boolean update(IUpdateContext context) {
      IPeService peService = Graphiti.getPeService();
      IGaService gaService = Graphiti.getGaService();

      ContainerShape container = (ContainerShape) context.getPictogramElement();
      CallActivity callActivity = BusinessObjectUtil.getFirstElementOfType(context.getPictogramElement(),
          CallActivity.class);

      ContainerShape markerContainer = (ContainerShape) getShape(container,
          GraphicsUtil.ACTIVITY_MARKER_CONTAINER);
      Shape globalTaskShape = getShape(container, GLOBAL_TASK_SHAPE_PROPERTY);

      if (callActivity.getCalledElementRef() == null) {
        GraphicsUtil.clearActivityMarker(markerContainer, GraphicsUtil.ACTIVITY_MARKER_EXPAND);
        if (globalTaskShape != null) {
          peService.deletePictogramElement(globalTaskShape);
        }
      }

      else if (callActivity.getCalledElementRef() instanceof GlobalTask) {
        GraphicsUtil.clearActivityMarker(markerContainer, GraphicsUtil.ACTIVITY_MARKER_EXPAND);
        GlobalTask t = (GlobalTask) callActivity.getCalledElementRef();
        if (globalTaskShape == null) {
          globalTaskShape = peService.createShape(container, false);
          peService.setPropertyValue(globalTaskShape, GLOBAL_TASK_SHAPE_PROPERTY, Boolean.toString(true));
        }
        String imageId = getImageId(t);
        if (imageId != null) {
          Image image = gaService.createImage(globalTaskShape, imageId);
          gaService.setLocationAndSize(image, MARKER_OFFSET + 2, MARKER_OFFSET + 2, 16, 16);
        }
      }

      else if (callActivity.getCalledElementRef() instanceof Process) {
        if (globalTaskShape != null) {
          peService.deletePictogramElement(globalTaskShape);
        }
        Expand expand = GraphicsUtil.createActivityMarkerExpand(markerContainer);
        expand.rect.setForeground(manageColor(StyleUtil.CLASS_FOREGROUND));
        expand.horizontal.setForeground(manageColor(StyleUtil.CLASS_FOREGROUND));
        expand.vertical.setForeground(manageColor(StyleUtil.CLASS_FOREGROUND));
      }

      peService.setPropertyValue(container, CALL_ACTIITY_REF_PROPERTY,
          getCallableElementStringValue(callActivity.getCalledElementRef()));
      return true;
    }
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.