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

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


        {
          ParamConnection paramConnection = (ParamConnection) next;

          DataLink link = paramConnection.getDataLink();

          Param sourceParam = link.getSourceParam();
          Param targetParam = link.getTargetParam();

          if (sourceParam instanceof NodeParam)
          {
            if (! copiedSourceNodes.contains(((NodeParam) sourceParam).getSocket().getNode()))
            {
View Full Code Here


        DataLink link = (DataLink) itLink.next();

        String sourceName = makeVariableName(param);
        String targetName;

        Param targetParam = link.getTargetParam();
        if (targetParam instanceof ProcessVariable)
        {
          // Use the name of the process variable as parameter substitution value
          targetName = makeVariableName(targetParam);
        }
View Full Code Here

    if (it.hasNext())
    {
      errMsg("Warning: Only a single data link allowed to parameter '" + param.getQualifier() + "'.");
    }

    Param sourceParam = link.getSourceParam();
    if (sourceParam instanceof ProcessVariable)
      // Use the name of the process variable as parameter substitution value
      return makeVariableName(sourceParam);

    // Use the name of the data link as parameter substitution value (is used as temporary variable)
View Full Code Here

   * @param link The data link
   * @return The new figure or null on error
   */
  public ParamConnection createParamConnection(DataLink link)
  {
    Param source = link.getSourceParam();
    Param target = link.getTargetParam();

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

    ParamFigure sourceFigure = null;
    ParamFigure targetFigure = null;

    if (source instanceof NodeParam)
    {
      sourceFigure = (ParamFigure) source.getRepresentation();

      if (sourceFigure == null)
      {
        System.err.println("Data link source parameter '" + source.getQualifier() + "' has no figure representation.");
        return null;
      }
    }
    if (target instanceof NodeParam)
    {
      targetFigure = (ParamFigure) target.getRepresentation();

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

    if (source instanceof ProcessVariable && targetFigure != null)
View Full Code Here

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

        if (params != null)
        {
          int n = params.size();
          for (int i = 0; i < n; ++i)
          {
            Param param = (Param) params.get(i);
            String name = param.getName();

            Object value = TokenContextUtil.getParamValue(context, entrySocket, name);
            if (value != null)
            {
              try
View Full Code Here

  protected void handleConnect(Figure startFigure, Figure endFigure)
  {
    ParamFigure startParamFigure = (ParamFigure) startFigure;
    ParamFigure endParamFigure = (ParamFigure) endFigure;

    Param startParam = startParamFigure.getNodeParam();
    Param endParam = endParamFigure.getNodeParam();

    // Link the parameters
    dataLink.link(startParam, endParam);

    startParamFigure.addParamConnection(this);
View Full Code Here

        {
          // Link the process variable to the new parameter
          DataLink dataLink = getDrawing().getProcess().createDataLink();

          // Determine source and target parameter depending if we have an in- our outgoing global link
          Param sourceParam;
          Param targetParam;

          if (socket.isEntrySocket())
          {
            sourceParam = processVariable;
            targetParam = param;
View Full Code Here

    Node node = sourceSocket.getNode();

    // Iterate all parameters of the exit socket
    for (Iterator itParam = sourceSocket.getParams(); itParam.hasNext();)
    {
      Param sourceParam = (Param) itParam.next();
      String paramName = sourceParam.getName();

      if (targetSocket != null)
      {
        Param targetParam = targetSocket.getParamByName(paramName);
        if (targetParam == null)
          continue;

        Object value = TokenContextUtil.getParamValue(context, sourceParam);
        TokenContextUtil.setParamValue(context, targetParam, value);
      }
      else
      {
        boolean haveValue = false;
        Object value = null;

        for (Iterator itSocket = node.getSockets(); itSocket.hasNext();)
        {
          NodeSocket socket = (NodeSocket) itSocket.next();

          if (! socket.isExitSocket())
            continue;

          Param targetParam = socket.getParamByName(paramName);
          if (targetParam == null)
            continue;

          // We found a parameter of the same name
          if (! haveValue)
View Full Code Here

      return;

    // Iterate all parameters of the entry socket
    for (Iterator it = socket.getParams(); it.hasNext();)
    {
      Param param = (Param) it.next();

      TokenContextUtil.removeParamValue(context, param);
    }
  }
View Full Code Here

TOP

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

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.