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

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


  public void executeModelObject(ModelObject mo, EngineExecutor ee)
  {
    TokenContext context = ee.getTokenContext();
    JavaActivityItem activity = (JavaActivityItem) mo;

    NodeSocket nextSocket = null;

    TokenContext oldContext = context;
    HandlerContext hc = getEngine().executeHandler(activity.getHandlerDefinition(), HandlerTypes.ACTIVITY, context, context.getCurrentSocket(), nextSocket);
    if (hc != null)
    {
View Full Code Here


   * @param param Parameter to access
   * @return The parameter's context name ("node.socket.param")
   */
  public static String constructContextName(NodeParam param)
  {
    NodeSocket socket = param.getSocket();
    return constructContextName(socket.getNode(), socket.getName(), param.getName());
  }
View Full Code Here

   *
   * @param hc Handler context
   */
  public void prepareHandlerExecution(HandlerContext hc)
  {
    NodeSocket socket = hc.getCurrentSocket();
    if (Interpreter.TRACE)
    {
      LogUtil.trace(getClass(), "Executing script of node $0.", socket.getNode().getQualifier());
    }

    prepareNodeSocketExecution(socket);

    // Provide the entry name
    setScriptVariable(ENTRY, socket.getName());

    // Default the exit name to null; need this to have it in global scope
    setScriptVariable(EXIT, null);
  }
View Full Code Here

     */

    // Add text element template
    addToolBoxItem(new TextElementImpl(), "toolboxitem.textelement.tooltip");

    NodeSocket socket;

    // Add entry socket
    socket = new NodeSocketImpl();
    socket.setEntrySocket(true);
    addToolBoxItem(socket, "toolboxitem.socketentry.tooltip");

    // Add exit socket
    socket = new NodeSocketImpl();
    socket.setEntrySocket(false);
    addToolBoxItem(socket, "toolboxitem.socketexit.tooltip");
  }
View Full Code Here

   * @param context Token context
   * @param expectedCurrentNode Unqualified name of the expected current node
   */
  public void assertCurrentNode(TokenContext context, String expectedCurrentNode)
  {
    NodeSocket socket = context.getCurrentSocket();
    if (socket == null)
    {
      fail("Current socket is null.");
    }
    else
    {
      String name = socket.getNode().getName();
      if (! expectedCurrentNode.equals(name))
      {
        fail("Current node = '" + name + "', should be '" + expectedCurrentNode + "'.");
      }
    }
View Full Code Here

    else
      itSockets = node.getSockets();

    while (itSockets.hasNext())
    {
      NodeSocket socket = (NodeSocket) itSockets.next();

      SocketDescriptor desc = new SocketDescriptor();
      desc.setName(socket.getName());
      desc.setDisplayName(socket.getDisplayText());
      desc.setDescription(socket.getDescription());
      desc.setExitSocket(socket.isExitSocket());
      desc.setDefaultSocket(socket.isDefaultSocket());
      desc.setRole(socket.getRole());

      desc.setSequenceId(socket.getSequenceId());

      ret.add(desc);
    }

    return ret;
View Full Code Here

        break;
      }
      visitedNodes.add(node);

      // Advance to next node
      NodeSocket socket = node.getDefaultExitSocket();
      if (socket == null)
        break;

      if (! socket.hasControlLinks())
        break;

      // Follow the first control link to the next node
      ControlLink link = (ControlLink) socket.getControlLinks().next();
      socket = link.getTargetSocket();
      node = socket.getNode();
    }

    return null;
  }
View Full Code Here

    if (!super.validateObject(editedObject, pb))
    {
      return false;
    }

    NodeSocket editedSocket = (NodeSocket) editedObject;
    if (editedSocket.isDefaultSocket())
    {
      boolean isEntry = editedSocket.isEntrySocket();

      Node node = editedSocket.getNode();
      for (Iterator it = node.getSockets(); it.hasNext();)
      {
        NodeSocket socket = (NodeSocket) it.next();
        if (socket.isEntrySocket() != isEntry)
        {
          // Socket type does not match
          continue;
        }

        if (socket.isDefaultSocket())
        {
          // Clear the default socket flag if we are not iterating the edited socket
          // (note that we also have to check the original object because the property browser
          // clones the object)
          if (socket != editedSocket && socket != pb.getObject() && socket != pb.getOriginalObject())
          {
            socket.setDefaultSocket(false);
          }
        }
      }
    }
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.