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

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


  public static void addParamMenu(InteractionEvent ie, final Modeler modeler, final SocketFigure socketFigure)
  {
    // Popup menu item group
    JaspiraAction group = null;

    NodeSocket socket = socketFigure.getNodeSocket();
    for (Iterator it = socket.getParams(); it.hasNext();)
    {
      final NodeParam param = (NodeParam) it.next();

      // Create an action that toggles the parameter visibility
      JaspiraAction action = new JaspiraAction(modeler, "modeler.edit.paramvisibility.prototype")
View Full Code Here


        }

        if (flavor [i].equals(ModelerFlavors.SOCKET_FIGURE))
        {
          final SocketFigure socketFigure = (SocketFigure) ie.getSafeTransferData(flavor [i]);
          final NodeSocket socket = socketFigure.getNodeSocket();

          // Add the 'Parameter visibility' sub menu if appropriate
          ParamVisibilityHelper.addParamMenu(ie, modeler, socketFigure);

          // 'Parameter Value Wizard' popup
          final NodeFigure nodeFigure = (NodeFigure) socketFigure.getParent();
          if (ParamValueWizard.isParameterValueWizardApplyable(modeler, nodeFigure, socket.getName()))
          {
            JaspiraAction wizardGroup = new JaspiraAction("popupwizard", null, null, null, null, 2, JaspiraAction.TYPE_GROUP);

            wizardGroup.addMenuChild(new JaspiraAction(modeler, "modeler.edit.paramvaluewizard")
            {
              public void actionPerformed(ActionEvent e)
              {
                // Display parameter value wizard if appropriate
                ParamValueWizard.displayParameterValueWizard(modeler, nodeFigure, socket.getName(), null);
              }
            });

            ie.add(wizardGroup);
          }
View Full Code Here

  /**
   * @see org.openbp.cockpit.plugins.toolbox.ToolBoxPlugin#addStandardToolBoxItems()
   */
  protected void addStandardToolBoxItems()
  {
    NodeSocket socket = new NodeSocketImpl();

    // 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

  private static NodeFigure createNodeFromSocket(SingleSocketNode node, SocketFigure patternSocketFigure, int offset)
  {
    // Create a node figure for the new node
    ProcessDrawing drawing = patternSocketFigure.getDrawing();

    NodeSocket patternSocket = patternSocketFigure.getNodeSocket();

    // Copy name and parameters from the given socket to the node
    copySocketPropertiesToNode(node, patternSocket);

    // Add the node to the process
    patternSocket.getProcess().addNode(node);

    // Create a node figure for the new node
    NodeFigure nodeFigure = drawing.createNodeFigure(node);

    // Position the new node
View Full Code Here

    node.setDescription(patternSocket.getDescription());

    // Make sure it has a name unique among all nodes of the process
    NamedObjectCollectionUtil.createUniqueName(node, process.getNodeList());

    NodeSocket socket = node.getSocket();

    // Copy the parameters of the given socket to the socket of the node
    for (Iterator it = patternSocket.getParams(); it.hasNext();)
    {
      NodeParam param = (NodeParam) it.next();

      try
      {
        param = (NodeParam) param.clone();
      }
      catch (CloneNotSupportedException e)
      {
        param = null;
      }

      if (param != null)
      {
        socket.addParam(param);
      }
    }
  }
View Full Code Here

  public InitialNodeImpl createStandardInitialNode()
  {
    InitialNodeImpl node = new InitialNodeImpl();
    node.setName(CoreConstants.DEFAULT_INITIAL_NODE_NAME);

    NodeSocket socket = createExitSocket(CoreConstants.SOCKET_OUT, true);
    socket.setGeometry(ProcessUtil.createSocketGeometry("s"));
    node.setSocket(socket);

    return node;
  }
View Full Code Here

  public FinalNodeImpl createStandardFinalNode()
  {
    FinalNodeImpl node = new FinalNodeImpl();
    node.setName(CoreConstants.DEFAULT_FINAL_NODE_NAME);

    NodeSocket socket = createEntrySocket(CoreConstants.SOCKET_IN, true);
    socket.setGeometry(ProcessUtil.createSocketGeometry("n"));
    node.setSocket(socket);

    return node;
  }
View Full Code Here

  public DecisionNodeImpl createStandardDecisionNode()
  {
    DecisionNodeImpl node = new DecisionNodeImpl();
    createStandardName(node);

    NodeSocket inSocket = createEntrySocket(CoreConstants.DEFAULT_INITIAL_NODE_NAME, true);
    NodeSocket yesSocket = createExitSocket(CoreConstants.SOCKET_YES, true);
    NodeSocket noSocket = createExitSocket(CoreConstants.SOCKET_NO, false);

    inSocket.setGeometry(ProcessUtil.createSocketGeometry("n"));
    yesSocket.setGeometry(ProcessUtil.createSocketGeometry("s"));
    noSocket.setGeometry(ProcessUtil.createSocketGeometry("e"));

    node.addSocket(inSocket);
    node.addSocket(yesSocket);
    node.addSocket(noSocket);
View Full Code Here

  public ForkNodeImpl createStandardForkNode()
  {
    ForkNodeImpl node = new ForkNodeImpl();
    createStandardName(node);

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

    createNodeParam(CoreConstants.FORK_COLLECTION_PARAM, "Collection", "If present, for each element in the collection, a separate token will be created. The element can be retrieved at the outgoing token of the fork node using the CollectionElement parameter.", SYSTEM_TYPE_OBJECT, false, true, inSocket);
    createNodeParam(CoreConstants.FORK_COLLECTION_ELEMENT_PARAM, "Collection element", "Collection element that spawned the token.\nNote that the leaving token can run in non-interactive mode only. No visuals may be displayed here.", SYSTEM_TYPE_OBJECT, false, true, outSocket);

    node.addSocket(inSocket);
View Full Code Here

  {
    WorkflowNodeImpl node = new WorkflowNodeImpl();

    createStandardName(node);

    NodeSocket inSocket = createEntrySocket(CoreConstants.DEFAULT_INITIAL_NODE_NAME, true);
    NodeSocket publishedSocket = createExitSocket(CoreConstants.SOCKET_TASK_PUBLISHED, false);
    NodeSocket acceptedSocket = createExitSocket(CoreConstants.SOCKET_TASK_ACCEPTED, true);

    // Create some (by default hidden and optional) workflow parameters at the 'In' socket
    createNodeParam("StepName", "Step name", "System name of this workflow step for dynamic assignment", SYSTEM_TYPE_STRING, false, true, inSocket);
    createNodeParam("StepDisplayName", "Step title", "Title of this workflow step for dynamic assignment", SYSTEM_TYPE_STRING, false, true, inSocket);
    createNodeParam("StepDescription", "Step description", "Detailled description of this workflow step for dynamic assignment", SYSTEM_TYPE_STRING, false, true, inSocket);
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.