Examples of ProcessVariable


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

  public static void setParamValue(TokenContext token, Param param, Object value)
  {
    if (param instanceof ProcessVariable)
    {
      TokenContext context = token;
      ProcessVariable pv = (ProcessVariable) param;
      if (pv.isRootContextVariable())
      {
        context = TokenContextUtil.getRootContext(token);
      }
      context.setProcessVariableValue(param.getName(), value);
    }
View Full Code Here

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

    ProcessItem process = param.getProcess();

    for (Iterator itVar = process.getProcessVariables(); itVar.hasNext();)
    {
      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;
        }
      }
    }

    if (! foundLink)
    {
      // Try process variable auto-assignment
      ProcessVariable var = process.getProcessVariableByName(param.getName());
      if (var != null)
      {
        if (var.isAutoAssign())
        {
          Object value = context.getProcessVariableValue(param.getName());
          TokenContextUtil.setParamValue(context, param, value);
        }
      }
View Full Code Here

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

    }

    if (! foundDataLink)
    {
      // Try process variable auto-assignment
      ProcessVariable var = sourceParam.getProcess().getProcessVariableByName(sourceParam.getName());
      if (var != null)
      {
        if (var.isAutoAssign())
        {
          Object value = TokenContextUtil.getParamValue(context, sourceParam);
          context.setProcessVariableValue(sourceParam.getName(), value);
        }
      }
View Full Code Here

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

    for (int i = stackItems.size() - 1; i >= 0; --i)
    {
      StackItem stackItem = (StackItem) stackItems.get(i);

      ProcessItem process = stackItem.getNodeSocket().getProcess();
      ProcessVariable var = process.getProcessVariableByName(name);
      if (var != null)
        return var;
    }

    return null;
View Full Code Here

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

   * Creates a process variable and assigns a unique name to it to.
   * @return The new process variable
   */
  public ProcessVariable createProcessVariableListElement()
  {
    ProcessVariable param = new ProcessVariableImpl();

    // Create a unique id and attach the global to the process
    String name = NamedObjectCollectionUtil.createUniqueId(processVariableList, "ProcessVariable");
    param.setName(name);
    param.setProcess(process);

    // Assign it the Object type
    try
    {
      DataTypeItem type = (DataTypeItem) ModelConnector.getInstance().getModelByQualifier(CoreConstants.SYSTEM_MODEL_QUALIFIER).getItem("Object", ItemTypes.TYPE, false);
      param.setDataType(type);
      param.setTypeName("Object");
    }
    catch (ModelException e)
    {
      // Never happens
    }
View Full Code Here

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

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

          int flags = DataLink.LINK_AUTOCONVERSION;
          if (mouseEvent != null && mouseEvent.isShiftDown())
          {
            flags = DataLink.LINK_OMIT_TYPE_CHECK;
View Full Code Here

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

    try
    {
      if (data.isDataFlavorSupported(ClientFlavors.PROCESS_VARIABLE))
      {
        // 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();
View Full Code Here

Examples of org.uengine.kernel.ProcessVariable

    }
   
    for(int i=0; i<mappingContext.getMappingElements().length; i++){
      ParameterContext paramContext = mappingContext.getMappingElements()[i];
      String tableAndFieldName = paramContext.getArgument().getText();
      ProcessVariable variable = paramContext.getVariable();
      boolean isKey = ((MappingElement)paramContext).isKey();
 
      tableAndFieldName = tableAndFieldName.replace('.','@');
      String[] tableAndFieldNames = tableAndFieldName.split("@");
      String tableName = tableAndFieldNames[0];
View Full Code Here

Examples of org.uengine.kernel.ProcessVariable

     
      processVariableMap = new HashMap();
     
      if (processVariables != null) {
        for (int i = 0; i < processVariables.length; i++) {
          ProcessVariable processVariable = processVariables[i];
          String key = processVariable.getName();
          Object value = processVariable.get(instance, "", key);
          if (value instanceof String) {
            processVariableMap.put(key, value != null ? (String) value : null);
          } else if (value instanceof ProcessVariableValue) {
            processVariableMap.put(key, value != null ? (ProcessVariableValue) value : null);
          } else {
View Full Code Here

Examples of org.uengine.kernel.ProcessVariable

      public void onValueChanged(){
//System.out.println("AssignActivityDescriptor::in onValueChanged (35) getValue().class = " + getValue().getClass());
//System.out.println("AssignActivityDescriptor::in onValueChanged (36) getValue() = " + getValue());
       
        try{
          ProcessVariable var = (ProcessVariable)getValue();
       
          String clsName = var.getType().getName();
          if(clsName==null){
            clsName = var.getXmlBindingClassName();
          }
 
          StringBuffer sb = new StringBuffer();
         
          if(clsName!=null){
            sb.append("importPackage(Packages.java.lang);\n");
            sb.append("value = Class.forName(\"");
            sb.append(clsName);
            sb.append("\").newInstance();\n");
          }
         
          if(var.getType()!=null){
            try{
              Type descriptor = new ObjectType(var.getType());
              FieldDescriptor [] fds = descriptor.getFieldDescriptors();
             
              int stringType = FieldDescriptor.getMappingTypeOfClass(String.class);
              for(int i=0; i<fds.length; i++){
                sb.append("value.set");
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.