Package org.activiti.bpmn.model

Examples of org.activiti.bpmn.model.EventSubProcess


        graphicInfo.getX() + subProcessX, graphicInfo.getY() + subProcessY);
    flowElementNode.put("childShapes", subProcessShapesArrayNode);
  }
 
  protected FlowElement convertJsonToElement(JsonNode elementNode, JsonNode modelNode, Map<String, JsonNode> shapeMap) {
    EventSubProcess subProcess = new EventSubProcess();
    JsonNode childShapesArray = elementNode.get(EDITOR_CHILD_SHAPES);
    processor.processJsonElements(childShapesArray, modelNode, subProcess, shapeMap);
    return subProcess;
  }
View Full Code Here


  public void parse(XMLStreamReader xtr, List<SubProcess> activeSubProcessList, Process activeProcess) {
    SubProcess subProcess = null;
    if (ELEMENT_TRANSACTION.equalsIgnoreCase(xtr.getLocalName())) {
      subProcess = new Transaction();
    } else if (ATTRIBUTE_VALUE_TRUE.equalsIgnoreCase(xtr.getAttributeValue(null, ATTRIBUTE_TRIGGERED_BY))) {
      subProcess = new EventSubProcess();
    } else {
      subProcess = new SubProcess();
    }
    BpmnXMLUtil.addXMLLocation(subProcess, xtr);
    activeSubProcessList.add(subProcess);
View Full Code Here

  }

  @Override
  public PictogramElement add(IAddContext context) {

    final EventSubProcess addedSubProcess = (EventSubProcess) context.getNewObject();
    final ContainerShape parent = context.getTargetContainer();

    // CONTAINER SHAPE WITH ROUNDED RECTANGLE
    final IPeCreateService peCreateService = Graphiti.getPeCreateService();
    final ContainerShape containerShape = peCreateService.createContainerShape(parent, true);

    // EList<Property> props = containerShape.getProperties();

    // check whether the context has a size (e.g. from a create feature)
    // otherwise define a default size for the shape
    final int width = context.getWidth() <= 0 ? 205 : context.getWidth();
    final int height = context.getHeight() <= 0 ? 205 : context.getHeight();

    final IGaService gaService = Graphiti.getGaService();
    RoundedRectangle roundedRectangle; // need to access it later
    {
      // create invisible outer rectangle expanded by
      // the width needed for the anchor
      final Rectangle invisibleRectangle = gaService.createInvisibleRectangle(containerShape);
      gaService.setLocationAndSize(invisibleRectangle, context.getX(), context.getY(), width, height);

      // create and set visible rectangle inside invisible rectangle
      roundedRectangle = gaService.createRoundedRectangle(invisibleRectangle, 5, 5);
      roundedRectangle.setParentGraphicsAlgorithm(invisibleRectangle);
      roundedRectangle.setBackground(gaService.manageColor(getDiagram(), IColorConstant.WHITE));
      roundedRectangle.setLineStyle(LineStyle.DOT);
      gaService.setLocationAndSize(roundedRectangle, 0, 0, width, height);

      // create link and wire it
      link(containerShape, addedSubProcess);
    }

    // SHAPE WITH TEXT
    {
      // create shape for text
      final Shape shape = peCreateService.createShape(containerShape, false);

      // create and set text graphics algorithm
      final Text text = gaService.createDefaultText(getDiagram(), shape, addedSubProcess.getName());
      text.setStyle(StyleUtil.getStyleForEvent(getDiagram()));
      text.setHorizontalAlignment(Orientation.ALIGNMENT_CENTER);
      text.setVerticalAlignment(Orientation.ALIGNMENT_CENTER);
      Font font = null;
      if (OSUtil.getOperatingSystem() == OSEnum.Mac) {
View Full Code Here

            parentObject instanceof SubProcess || parentObject instanceof Lane);
  }

  @Override
  public Object[] create(ICreateContext context) {
    EventSubProcess newSubProcess = new EventSubProcess();
    addObjectToContainer(context, newSubProcess, "Event sub Process");

    // return newly created business object(s)
    return new Object[] { newSubProcess };
  }
View Full Code Here

 
  public void parse(XMLStreamReader xtr, List<SubProcess> activeSubProcessList, Process activeProcess) {
    SubProcess subProcess = null;
    if (ATTRIBUTE_VALUE_TRUE.equalsIgnoreCase(xtr.getAttributeValue(null, ATTRIBUTE_TRIGGERED_BY))) {
     
      subProcess = new EventSubProcess();
    } else {
      subProcess = new SubProcess();
    }
    activeSubProcessList.add(subProcess);
   
View Full Code Here

        graphicInfo.x + subProcessX, graphicInfo.y + subProcessY);
    flowElementNode.put("childShapes", subProcessShapesArrayNode);
  }
 
  protected FlowElement convertJsonToElement(JsonNode elementNode, JsonNode modelNode, Map<String, JsonNode> shapeMap) {
    EventSubProcess subProcess = new EventSubProcess();
    JsonNode childShapesArray = elementNode.get(EDITOR_CHILD_SHAPES);
    processor.processJsonElements(childShapesArray, modelNode, subProcess, shapeMap);
    return subProcess;
  }
View Full Code Here

TOP

Related Classes of org.activiti.bpmn.model.EventSubProcess

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.