Examples of SequenceFlow


Examples of org.eclipse.bpmn2.SequenceFlow

    Process process = getOrCreateProcess(getInternalParticipant());
    process.getLaneSets().add(laneSet);
  }

  public SequenceFlow createSequenceFlow(FlowNode source, FlowNode target) {
    SequenceFlow sequenceFlow = FACTORY.createSequenceFlow();
//    sequenceFlow.setId(EcoreUtil.generateUUID());
    ModelUtil.setID(sequenceFlow,resource);

    addFlowElement(source, sequenceFlow);
    sequenceFlow.setSourceRef(source);
    sequenceFlow.setTargetRef(target);
    return sequenceFlow;
  }
View Full Code Here

Examples of org.eclipse.bpmn2.SequenceFlow

    return Graphiti.getGaService().manageColor(diagram, colorConstant);
  }
 
  private static void setDefaultSequenceFlow(Connection connection) {
    IPeService peService = Graphiti.getPeService();
    SequenceFlow flow = BusinessObjectUtil.getFirstElementOfType(connection, SequenceFlow.class);
    SequenceFlow defaultFlow = getDefaultFlow(flow.getSourceRef());
    boolean isDefault = defaultFlow == null ? false : defaultFlow.equals(flow);

    Tuple<ConnectionDecorator, ConnectionDecorator> decorators = getConnectionDecorators(connection);
    ConnectionDecorator def = decorators.getFirst();
    ConnectionDecorator cond = decorators.getSecond();
View Full Code Here

Examples of org.eclipse.bpmn2.SequenceFlow

    }
  }

  private static void setConditionalSequenceFlow(Connection connection) {
    IPeService peService = Graphiti.getPeService();
    SequenceFlow flow = BusinessObjectUtil.getFirstElementOfType(connection, SequenceFlow.class);

    Tuple<ConnectionDecorator, ConnectionDecorator> decorators = getConnectionDecorators(connection);
    ConnectionDecorator def = decorators.getFirst();
    ConnectionDecorator cond = decorators.getSecond();

    if (flow.getConditionExpression() != null && flow.getSourceRef() instanceof Activity && def == null) {
      ConnectionDecorator decorator = createConditionalConnectionDecorator(connection);
      GraphicsAlgorithm ga = decorator.getGraphicsAlgorithm();
      ga.setFilled(true);
      ga.setForeground(manageColor(connection, StyleUtil.CLASS_FOREGROUND));
      ga.setBackground(manageColor(connection, IColorConstant.WHITE));
    } else if (cond != null) {
      peService.deletePictogramElement(cond);
    }

    peService.setPropertyValue(connection, IS_CONDITIONAL_FLOW_PROPERTY,
        Boolean.toString(flow.getConditionExpression() != null));
  }
View Full Code Here

Examples of org.eclipse.bpmn2.SequenceFlow

      return ImageProvider.IMG_16_SEQUENCE_FLOW;
    }

    @Override
    protected BaseElement createFlow(ModelHandler mh, FlowNode source, FlowNode target) {
      SequenceFlow flow = mh.createSequenceFlow(source, target);
      flow.setName("");
      return flow;
    }
View Full Code Here

Examples of org.eclipse.bpmn2.SequenceFlow

      super(fp);
    }

    @Override
    public boolean canUpdate(IUpdateContext context) {
      SequenceFlow flow = BusinessObjectUtil.getFirstElementOfType(context.getPictogramElement(),
          SequenceFlow.class);
      boolean canUpdate = flow != null && isDefaultAttributeSupported(flow.getSourceRef());
      return canUpdate;
    }
View Full Code Here

Examples of org.eclipse.bpmn2.SequenceFlow

      IPeService peService = Graphiti.getPeService();
      String property = peService.getPropertyValue(context.getPictogramElement(), IS_DEFAULT_FLOW_PROPERTY);
      if (property == null || !canUpdate(context)) {
        return Reason.createFalseReason();
      }
      SequenceFlow flow = BusinessObjectUtil.getFirstElementOfType(context.getPictogramElement(),
          SequenceFlow.class);
      SequenceFlow defaultFlow = getDefaultFlow(flow.getSourceRef());
      boolean isDefault = defaultFlow == null ? false : defaultFlow.equals(flow);
      boolean changed = isDefault != new Boolean(property);
      return changed ? Reason.createTrueReason() : Reason.createFalseReason();
    }
View Full Code Here

Examples of org.eclipse.bpmn2.SequenceFlow

      super(fp);
    }

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

Examples of org.eclipse.bpmn2.SequenceFlow

      // framework, the connection line will be drawn as a red dotted line, so make sure
      // all properties have been correctly set to their initial values in the AddFeature!
      // see https://issues.jboss.org/browse/JBPM-3102
      IPeService peService = Graphiti.getPeService();
      Connection connection = (Connection) context.getPictogramElement();
      SequenceFlow flow = BusinessObjectUtil.getFirstElementOfType(connection, SequenceFlow.class);
      String property = peService.getPropertyValue(connection, IS_CONDITIONAL_FLOW_PROPERTY);
      if (property == null || !canUpdate(context)) {
        return Reason.createFalseReason();
      }
      boolean changed = flow.getConditionExpression() != null != new Boolean(property);
      return changed ? Reason.createTrueReason() : Reason.createFalseReason();
    }
View Full Code Here

Examples of org.eclipse.bpmn2.SequenceFlow

        assertTrue(process.getFlowElements().get(0) instanceof Task);
        Task task = (Task) process.getFlowElements().get(0);
        assertEquals("task1", task.getName());
        Task task2 = (Task) process.getFlowElements().get(1);
        assertEquals("task2", task2.getName());
        SequenceFlow flow = (SequenceFlow) process.getFlowElements().get(2);
        assertEquals("seqFlow", flow.getName());
        assertEquals(task, flow.getSourceRef());
        assertEquals(task2, flow.getTargetRef());
        definitions.eResource().save(System.out, Collections.emptyMap());
    }
View Full Code Here

Examples of org.jbpm.bpmn2.core.SequenceFlow

      if (connections == null) {
        connections = new ArrayList<SequenceFlow>();
        ((CompositeNode) nodeContainer).setMetaData(ProcessHandler.CONNECTIONS, connections);
      }
    }
    SequenceFlow connection = new SequenceFlow(id, sourceRef, targetRef);
    connection.setBendpoints(bendpoints);
    connection.setName(name);
    if (priority != null) {
      connection.setPriority(Integer.parseInt(priority));
    }
   
    connections.add(connection);

    return connection;
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.