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

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


      CallStackInfo stackInfo = new CallStackInfo();

      stackInfo.setType(stackItem.getType());

      // TODO Fix 5 No difference between current pos. and saved pos. of call stack info
      NodeSocket nodeSocket = stackItem.getNodeSocket();
      stackInfo.setCurrentPosition(nodeSocket.getQualifier());
      stackInfo.setSavedPosition(nodeSocket.getQualifier());

      elements.add(stackInfo);
    }

    return elements;
View Full Code Here


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

    NodeSocket nextSocket = null;

    TokenContext parentContext = context.getParentContext();
    if (parentContext != null)
    {
      // Our token ends here
      context.setLifecycleRequest(LifecycleRequest.STOP);

      NodeSocket parentNextSocket = null;
      if (parentContext.hasChildContext())
      {
        parentNextSocket = getEngine().resolveSocketRef(CoreConstants.INCOMPLETE_SOCKET_NAME, entrySocket, parentContext, false);
      }
      else
View Full Code Here

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

    // If we do not have a sub process, simply continue with the default exit socket
    NodeSocket nextSocket = node.getDefaultExitSocket();

    ProcessItem subprocess = node.getSubprocess();

    // Dynamic sub processes:
    // If we have a Process Name parameter and its value is a string...
View Full Code Here

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

    NodeSocket nextSocket = node.getDefaultExitSocket();
    if (nextSocket == null)
    {
      String msg = LogUtil.error(getClass(), "No default exit socket present for placeholder node $0. [{1}]", node.getQualifier(), context);
      throw new EngineException("NoDefaultExitSocket", msg);
    }
View Full Code Here

   * @param inputParamValues A map of parameter name/parameter value pairs that will be assigned to the
   * parameters of the target socket or null
   */
  public void setInitialPosition(TokenContext context, String startRef, Map inputParamValues)
  {
    NodeSocket startSocket = getEngine().resolveSocketRef(startRef, context.getCurrentSocket(), context, true);

    InitialNode initialNode = (InitialNode) startSocket.getNode();
    if (initialNode.getEntryScope() != InitialNode.SCOPE_PUBLIC)
    {
      String msg = LogUtil.error(getClass(), "Node $0 is not a public initial node (start node reference: $1). [{2}]", initialNode.getQualifier(), startRef, context);
      throw new ModelException("NoPublicInitialNode", msg);
    }
    context.setCurrentSocket(startSocket);

    if (context.getExecutingModel() == null)
    {
      context.setExecutingModel(startSocket.getProcess().getModel());
    }

    bindInputParameters(context, startSocket, inputParamValues);
  }
View Full Code Here

   * @param inputParamValues A map of parameter name/parameter value pairs that will be assigned to the
   * parameters of the target socket or null
   */
  public void setResumptionPosition(TokenContext context, String resumptionRef, Map inputParamValues)
  {
    NodeSocket startSocket = getEngine().resolveSocketRef(resumptionRef, context.getCurrentSocket(), context, true);
    context.setCurrentSocket(startSocket);

    bindInputParameters(context, startSocket, inputParamValues);
  }
View Full Code Here

   * @param outputParamValues Map to fill
   */
  public void retrieveOutputParameters(TokenContext context, Map outputParamValues)
  {
    // Copy parameters of exit socket
    NodeSocket socket = context.getCurrentSocket();
    if (socket == null)
      return;

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

      Object value = TokenContextUtil.getParamValue(context, param);
      outputParamValues.put(param.getName(), value);
View Full Code Here

    int dflt = 0;

    int i = 1;
    for (Iterator it = node.getSockets(); it.hasNext();)
    {
      NodeSocket socket = (NodeSocket) it.next();

      if (socket.isExitSocket())
      {
        String flag = " ";
        if (socket.isDefaultSocket())
        {
          dflt = i;
          flag = "*";
        }

        options.put(new Integer(i), "." + socket.getName());
        System.out.println("" + i + flag + ": " + socket.getDisplayText());

        ++i;
      }
    }

View Full Code Here

    {
      if (data.isDataFlavorSupported(ClientFlavors.NODE_SOCKET))
      {
        getDrawing().getEditor().startUndo("Add Socket");

        NodeSocket other = (NodeSocket) data.getTransferData(ClientFlavors.NODE_SOCKET);

        String name = other.isEntrySocket() ? CoreConstants.SOCKET_IN : CoreConstants.SOCKET_OUT;
        NodeSocket toAdd = msNode.createSocket(name);

        // Make sure there is a workflow task parameter
        if (msNode instanceof WorkflowNode)
        {
          ProcessElementFactory.getInstance().ensureWorkflowTaskParameter(toAdd);
        }

        toAdd.setEntrySocket(other.isEntrySocket());
        boolean hasDefault = msNode.getDefaultSocket(other.isEntrySocket()) != null;
        if (! hasDefault)
          toAdd.setDefaultSocket(true);

        // add the socket to the node
        msNode.addSocket(toAdd);

        // Add a new socketFigure to the node.
View Full Code Here

  {
    TokenContext context = workflowTask.getTokenContext();

    context = workflowTask.getTokenContext();

    NodeSocket workflowEntrySocket = context.getCurrentSocket();
    WorkflowNode workflowNode = (WorkflowNode) workflowEntrySocket.getNode();

    NodeSocket nextSocket = resolveSocketRef(socketName, workflowEntrySocket, context, true);
    context.setCurrentSocket(nextSocket);
    context.setLifecycleRequest(LifecycleRequest.RESUME);
    tokenContextService.saveContext(context);

    if (workflowNode != null)
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.