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

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


    if (!(other instanceof ParamConnection))
    {
      return false;
    }

    DataLink otherLink = ((ParamConnection) other).getDataLink();

    return dataLink.getSourceParamName().equals(otherLink.getSourceParamName()) && dataLink.getTargetParamName().equals(otherLink.getTargetParamName());
  }
View Full Code Here


        ((WorkspaceDrawingView) getDrawing().getEditor().view()).singleSelect(paramFigure);

        if (processVariable != null)
        {
          // 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;
          }
          else
          {
            sourceParam = param;
            targetParam = processVariable;
          }

          // Link the global to the node parameter
          dataLink.link(sourceParam, targetParam);

          getDrawing().getProcess().addDataLink(dataLink);
          paramFigure.setProcessVariableConnection(processVariable, dataLink);
        }
View Full Code Here

    connect(target);

    if (connectionFigure instanceof ParamConnection)
    {
      ParamConnection paramConnection = (ParamConnection) connectionFigure;
      DataLink dataLink = paramConnection.getDataLink();

      String newSourceMemberPath = DataLinkImpl.checkAutoConversion(dataLink.getSourceParam(), dataLink.getSourceMemberPath(), dataLink.getTargetParam(), dataLink.getTargetMemberPath());
      if (newSourceMemberPath != null)
      {
        dataLink.setSourceMemberPath(newSourceMemberPath);
      }
    }

    // connectionFigure.updateConnection ();
    connectionFigure.layoutAndAdjustConnection();
View Full Code Here

    {
      ProcessVariable global = (ProcessVariable) itVar.next();

      for (Iterator itLink = global.getDataLinks(); itLink.hasNext();)
      {
        DataLink link = (DataLink) itLink.next();

        Param targetParam = link.getTargetParam();
        if (targetParam == param)
        {
          // We found a global that is connected to this parameter, execute the link
          executeDataLink(link);
          foundLink = true;
View Full Code Here

  {
    // Iterate all data links of the exit parameter
    boolean foundDataLink = false;
    for (Iterator it = sourceParam.getDataLinks(); it.hasNext();)
    {
      DataLink link = (DataLink) it.next();

      executeDataLink(link);
      foundDataLink = true;
    }
View Full Code Here

        // Drag of process variables onto a node param will create a process variable link
        ProcessVariable processVariable = (ProcessVariable) data.getTransferData(ClientFlavors.PROCESS_VARIABLE);

        getDrawing().getEditor().startUndo("Add Global Link");

        DataLink dataLink = getDrawing().getProcess().createDataLink();

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

        SocketFigure socketFigure = (SocketFigure) getParent();
        if (socketFigure.isEntrySocket())
        {
          sourceParam = processVariable;
          targetParam = nodeParam;
        }
        else
        {
          sourceParam = nodeParam;
          targetParam = processVariable;
        }

        // Link the global to the node parameter
        dataLink.link(sourceParam, targetParam);

        // Apply auto-conversions if necessary
        String sourceMemberPath = AutoConnector.checkAutoConversion(sourceParam, null, targetParam, null);
        dataLink.setSourceMemberPath(sourceMemberPath);

        getDrawing().getProcess().addDataLink(dataLink);

        ((WorkspaceDrawingView) getDrawing().getEditor().view()).singleSelect(setProcessVariableConnection(processVariable, dataLink));
View Full Code Here

TOP

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

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.