Package org.openbp.core.model.item.process

Examples of org.openbp.core.model.item.process.NodeSocket


  {
    WorkflowEndNodeImpl node = new WorkflowEndNodeImpl();

    createStandardName(node);

    NodeSocket inSocket = createEntrySocket(CoreConstants.DEFAULT_INITIAL_NODE_NAME, true);

    // Create the hidden and optional WorkflowTask parameter
    createNodeParam("WorkflowTask", "Workflow task", "Workflow task that identifies the current workflow group or null to end all workflows that run in the current workflow group", SYSTEM_TYPE_WORKFLOWTASK, false, true, inSocket);

    node.addSocket(inSocket);
View Full Code Here


  public MergeNodeImpl createStandardMergeNode()
  {
    MergeNodeImpl node = new MergeNodeImpl();
    createStandardName(node);

    NodeSocket inSocket1 = createEntrySocket(CoreConstants.DEFAULT_INITIAL_NODE_NAME + "1", true);
    NodeSocket inSocket2 = createEntrySocket(CoreConstants.DEFAULT_INITIAL_NODE_NAME + "2", false);
    NodeSocket outSocket = createExitSocket(CoreConstants.DEFAULT_FINAL_NODE_NAME, true);

    inSocket1.setGeometry(ProcessUtil.createSocketGeometry("n"));
    inSocket2.setGeometry(ProcessUtil.createSocketGeometry("e"));
    outSocket.setGeometry(ProcessUtil.createSocketGeometry("s"));

    node.addSocket(inSocket1);
    node.addSocket(inSocket2);
    node.addSocket(outSocket);
View Full Code Here

   * @param isDefault true for a default socket
   * @return The new socket
   */
  public NodeSocket createEntrySocket(String name, boolean isDefault)
  {
    NodeSocket socket = new NodeSocketImpl();
    socket.setName(name);

    socket.setEntrySocket(true);
    socket.setDefaultSocket(isDefault);
    return socket;
  }
View Full Code Here

   * @param isDefault true for a default socket
   * @return The new socket
   */
  public NodeSocket createExitSocket(String name, boolean isDefault)
  {
    NodeSocket socket = new NodeSocketImpl();
    socket.setName(name);

    socket.setEntrySocket(false);
    socket.setDefaultSocket(isDefault);
    return socket;
  }
View Full Code Here

   */
  public static boolean isParameterValueWizardApplyable(Modeler modeler, NodeFigure nodeFigure, String socketName)
  {
    Node node = nodeFigure.getNode();

    NodeSocket socket = null;
    if (socketName != null)
    {
      socket = node.getSocketByName(socketName);
    }
    else
    {
      socket = node.getDefaultEntrySocket();
    }

    if (socket == null)
      return false;

    // Check if there are parameters we might assign a value
    for (Iterator it = socket.getParams(); it.hasNext();)
    {
      NodeParam param = (NodeParam) it.next();

      if (param.getParamValueWizard() != null)
        return true;
View Full Code Here

   */
  public static void displayParameterValueWizard(Modeler modeler, NodeFigure nodeFigure, String socketName, String paramName)
  {
    Node node = nodeFigure.getNode();

    NodeSocket socket = null;
    if (socketName != null)
    {
      socket = node.getSocketByName(socketName);
    }
    else
    {
      socket = node.getDefaultEntrySocket();
    }

    // Check if there are parameters we might assign a value
    List valueParams = null;

    if (socket != null)
    {
      for (Iterator it = socket.getParams(); it.hasNext();)
      {
        NodeParam param = (NodeParam) it.next();

        if (param.getParamValueWizard() != null)
        {
View Full Code Here

  private void configureStandardNode(MultiSocketNode node)
  {
    createStandardName(node);

    NodeSocket inSocket = createEntrySocket(CoreConstants.DEFAULT_INITIAL_NODE_NAME, true);
    NodeSocket outSocket = createExitSocket(CoreConstants.DEFAULT_FINAL_NODE_NAME, true);

    node.addSocket(inSocket);
    node.addSocket(outSocket);
  }
View Full Code Here

   * @param link The control link
   * @return The new figure or null on error
   */
  public FlowConnection createFlowConnection(ControlLink link)
  {
    NodeSocket source = link.getSourceSocket();
    NodeSocket target = link.getTargetSocket();

    if (source == null)
    {
      System.err.println("Missing source socket for control link '" + link.getQualifier() + "'");
      return null;
    }
    if (target == null)
    {
      System.err.println("Missing target socket for control link '" + link.getQualifier() + "'");
      return null;
    }

    SocketFigure sourceFigure = (SocketFigure) source.getRepresentation();
    if (sourceFigure == null)
    {
      System.err.println("Control link source socket '" + source.getQualifier() + "' has no figure representation.");
      return null;
    }

    SocketFigure targetFigure = (SocketFigure) target.getRepresentation();
    if (targetFigure == null)
    {
      System.err.println("Control link target socket '" + target.getQualifier() + "' has no figure representation.");
      return null;
    }

    Connector start = sourceFigure.connectorAt(0, 0);
    Connector end = targetFigure.connectorAt(0, 0);
View Full Code Here

   * @throws OpenBPException On error
   */
  public void executeModelObject(ModelObject mo, EngineExecutor ee)
  {
    TokenContext context = ee.getTokenContext();
    NodeSocket entrySocket = context.getCurrentSocket();

    WorkflowTask workflowTask = createWorkflowTask(entrySocket, context);

    // Continue with the 'TaskPublished' socket
    NodeSocket nextSocket = getEngine().resolveSocketRef(CoreConstants.SOCKET_TASK_PUBLISHED, entrySocket, context, false);

    if (nextSocket != null)
    {
      Param workflowTaskParam = nextSocket.getParamByName(CoreConstants.WORKFLOWTASK_PARAM_NAME);
      if (workflowTaskParam != null)
      {
        // If the exit socket contains a 'WorkflowTask' parameter, set it
        TokenContextUtil.setParamValue(context, workflowTaskParam, workflowTask);
      }
View Full Code Here

   * @throws OpenBPException On error
   */
  public void executeModelObject(ModelObject mo, EngineExecutor ee)
  {
    TokenContext context = ee.getTokenContext();
    NodeSocket entrySocket = context.getCurrentSocket();
    VisualNode node = (VisualNode) entrySocket.getNode();

    // A visual node might be a persisting node, so make the engine persist the process state.
    if (node.isWaitStateNode())
    {
      context.setLifecycleRequest(LifecycleRequest.SUSPEND_IMMEDIATE);
View Full Code Here

TOP

Related Classes of org.openbp.core.model.item.process.NodeSocket

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.