Ejemplo n.º 1
0
  /*
   * (non-Javadoc)
   *
   * @seede.hpi.bpmn2_0.factory.AbstractBpmnFactory#createProcessElement(org.
   * oryxeditor.server.diagram.Shape)
   */
  @Override
  protected BaseElement createProcessElement(Shape shape) {
    SequenceFlow seqFlow = new SequenceFlow();
    this.setCommonAttributes(seqFlow, shape);
    seqFlow.setId(shape.getResourceId());
    seqFlow.setName(shape.getProperty("name"));

    String conditionType = shape.getProperty("conditiontype");
    String conditionExpression = shape.getProperty("conditionexpression");

    if (!(conditionType == null || conditionType.equals("Default"))
        && !(conditionExpression == null || conditionExpression.isEmpty())) {
      seqFlow.setConditionExpression(new FormalExpression(conditionExpression));
    }

    if (conditionType != null && conditionType.equals("Default")) {
      seqFlow.setDefaultSequenceFlow(true);
    }

    /* IsImmediate Property */
    String isImmediate = shape.getProperty("isimmediate");
    if (isImmediate != null) {
      if (isImmediate.equalsIgnoreCase("false")) seqFlow.setIsImmediate(false);
      else if (isImmediate.equalsIgnoreCase("true")) seqFlow.setIsImmediate(true);
    }

    return seqFlow;
  }
Ejemplo n.º 2
0
  /*
   * (non-Javadoc)
   *
   * @see
   * de.hpi.bpmn2_0.factory.AbstractBpmnFactory#createBpmnElement(org.oryxeditor
   * .server.diagram.Shape)
   */
  @Override
  public BPMNElement createBpmnElement(Shape shape, BPMNElement parent) {
    SequenceFlowConnector seqConnector = (SequenceFlowConnector) this.createDiagramElement(shape);
    SequenceFlow seqFlow = (SequenceFlow) this.createProcessElement(shape);

    seqConnector.setSequenceFlowRef(seqFlow);

    return new BPMNElement(seqConnector, seqFlow, shape.getResourceId());
  }
Ejemplo n.º 3
0
 /* (non-Javadoc)
  * @see de.hpi.bpmn2_0.factory.AbstractBpmnFactory#createProcessElement(org.oryxeditor.server.diagram.Shape)
  */
 @Override
 protected Message createProcessElement(Shape shape) throws BpmnConverterException {
   Message msg = new Message();
   this.setCommonAttributes(msg, shape);
   msg.setId(shape.getResourceId());
   msg.setName(shape.getProperty("name"));
   msg.setInitiating(shape.getProperty("initiating").equalsIgnoreCase("true"));
   return msg;
 }
Ejemplo n.º 4
0
  /* (non-Javadoc)
   * @see de.hpi.bpmn2_0.factory.AbstractBpmnFactory#createBpmnElement(org.oryxeditor.server.diagram.Shape, de.hpi.bpmn2_0.factory.BPMNElement)
   */
  @Override
  public BPMNElement createBpmnElement(Shape shape, BPMNElement parent)
      throws BpmnConverterException {
    Message msg = this.createProcessElement(shape);
    MessageShape msgShape = this.createDiagramElement(shape);
    msgShape.setMessageRef(msg);

    return new BPMNElement(msgShape, msg, shape.getResourceId());
  }
  /* (non-Javadoc)
   * @see de.hpi.bpmn2_0.factory.AbstractBpmnFactory#createProcessElement(org.oryxeditor.server.diagram.Shape)
   */
  @Override
  protected ConversationLink createProcessElement(Shape shape) throws BpmnConverterException {
    ConversationLink link = new ConversationLink();
    this.setCommonAttributes(link, shape);
    link.setId(shape.getResourceId());
    link.setName(shape.getProperty("name"));

    return link;
  }
  /* (non-Javadoc)
   * @see de.hpi.bpmn2_0.factory.AbstractBpmnFactory#createBpmnElement(org.oryxeditor.server.diagram.Shape, de.hpi.bpmn2_0.factory.BPMNElement)
   */
  @Override
  public BPMNElement createBpmnElement(Shape shape, BPMNElement parent)
      throws BpmnConverterException {
    ConversationLink link = this.createProcessElement(shape);
    ConversationLinkConnector conLink = this.createDiagramElement(shape);
    conLink.setConversationLinkRef(link);

    return new BPMNElement(conLink, link, shape.getResourceId());
  }
Ejemplo n.º 7
0
  /*
   * (non-Javadoc)
   *
   * @seede.hpi.bpmn2_0.factory.AbstractBpmnFactory#createDiagramElement(org.
   * oryxeditor.server.diagram.Shape)
   */
  @Override
  protected Object createDiagramElement(Shape shape) {
    SequenceFlowConnector sequenceFlowConnector = new SequenceFlowConnector();
    sequenceFlowConnector.setId(shape.getResourceId() + "_gui");

    // TODO: Gedanken machen zu Label-Positioning
    sequenceFlowConnector.setLabel(shape.getProperty("name"));

    this.setBendpoints(sequenceFlowConnector, shape);

    return sequenceFlowConnector;
  }
  /* (non-Javadoc)
   * @see de.hpi.bpmn2_0.factory.AbstractBpmnFactory#createDiagramElement(org.oryxeditor.server.diagram.Shape)
   */
  @Override
  protected ConversationLinkConnector createDiagramElement(Shape shape) {
    ConversationLinkConnector conLink = new ConversationLinkConnector();
    conLink.setId(shape.getResourceId() + "_gui");

    conLink.setLabel(shape.getProperty("name"));
    // TODO: Label position

    this.setBendpoints(conLink, shape);

    return conLink;
  }