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

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


      return;

    currentModeler.startUndo("Add Process Variable");

    // Create a new parameter
    ProcessVariable param = new ProcessVariableImpl();

    // Provide the data type and ensure the type name gets updated
    param.setDataType(type);

    // Pick a unique name based on the type name
    List paramList = currentProcess.getProcessVariableList();
    if (name == null)
      name = type.getName();
    name = NamedObjectCollectionUtil.createUniqueId(paramList, name);
    param.setName(name);

    // Add the new parameter to the process
    currentProcess.addProcessVariable(param);
    param.maintainReferences(ModelObject.SYNC_GLOBAL_REFNAMES | ModelObject.SYNC_LOCAL_REFNAMES);

    // Redisplay the param list
    showParams();

    // We modified the current object by adding a parameter
View Full Code Here


   * 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

TOP

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

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.