Package org.uengine.kernel

Examples of org.uengine.kernel.ProcessDefinition


      try{pm.removeProcessDefinition("ADHOC_" + instName);}catch(Exception e){}
    }*/
  }
 
  public ProcessDefinition createProcessDefinition(){
    ProcessDefinition def = new ProcessDefinition();
   
    def.setRoles(new Role[]{
      new Role("referencer"),
      new Role("drafter"),
      new Role("approver")
    });
       
    ProcessVariable pv;{
      pv = new ProcessVariable();
      pv.setName("var1");
      pv.setType(Integer.class);       
      def.setProcessVariables(new ProcessVariable[]{pv});
    }
     
    Activity childActivity = new DefaultActivity("test");     
    def.setAdhoc(true);   
    def.setChildActivities(new Activity[]{childActivity});
   
    return def;
  }
View Full Code Here


  }

  public Instance getInstance() {

    Instance oldValue = getSourceInstance();
    ProcessDefinition oldDefinition = null;
    if(oldValue!=null){
      ActivityRecord oldActivityRecord  = (ActivityRecord)oldValue;
      oldDefinition = (ProcessDefinition) oldActivityRecord.getActivity().getProcessDefinition().clone();
    }

    Instance newValue = super.getInstance();

    ActivityRecord newActivityRecord  = (ActivityRecord)newValue;
    ProcessDefinition newDefinition = newActivityRecord.getActivity().getProcessDefinition();
   
    newDefinition.firePropertyChangeEvent(new PropertyChangeEvent(newDefinition, "", oldDefinition, newDefinition));
   
    return newValue;

  }
View Full Code Here

  protected void setUp() throws Exception {
    definition = createProcessDefinition();
  }
 
  public void testMain() throws Exception{
    ProcessDefinition clone1 = (ProcessDefinition)definition.clone();
    System.out.println(clone1);
  }
View Full Code Here

    ProcessDefinition clone1 = (ProcessDefinition)definition.clone();
    System.out.println(clone1);
  }
 
  public ProcessDefinition createProcessDefinition(){
    ProcessDefinition def = new ProcessDefinition();
   
    def.setRoles(new Role[]{
      new Role("referencer"),
      new Role("drafter"),
      new Role("approver")
    });
       
    ProcessVariable pv1;{
      pv1 = new ProcessVariable();
      pv1.setName("varString");
      pv1.setType(String.class);       
    }
    ProcessVariable pv2;{
      pv2 = new ProcessVariable();
      pv2.setName("varInteger");
      pv2.setType(Integer.class);       
    }
    ProcessVariable pv3;{
      pv3 = new ProcessVariable();
      pv3.setName("varLong");
      pv3.setType(Long.class);       
    }
    ProcessVariable pv4;{
      pv4 = new ProcessVariable();
      pv4.setName("varBoolean");
      pv4.setType(Boolean.class);       
    }
    ProcessVariable pv5;{
      pv5 = new ProcessVariable();
      pv5.setName("varCalendar");
      pv5.setType(Calendar.class);       
    }
    ProcessVariable pv6;{
      pv6 = new ProcessVariable();
      pv6.setName("varDate");
      pv6.setType(Date.class);       
    }
    ProcessVariable pv7;{
      pv7 = new ProcessVariable();
      pv7.setName("varAny");
    }

    def.setProcessVariables(new ProcessVariable[]{pv1, pv2, pv3, pv4, pv5, pv6, pv7});

     
    Activity childActivity = new DefaultActivity("test");     
    def.setChildActivities(new Activity[]{childActivity});
   
    return def;
  }
View Full Code Here

    return ((Role)value).getName();
  }*/
 
  public void onEdit(){
    try{
      ProcessDefinition procDef = (ProcessDefinition)ProcessDesigner.getInstance().getProcessDefinitionDesigner().getActivity();
       
      if(procDef!=null){
        serviceTypeInputter.setSelectionsWithNull(procDef.getServiceDefinitions());

        //review:
        Type table = getApplication().getType();
        FieldDescriptor fd;
        fd = table.getFieldDescriptor("Identifier");
View Full Code Here

    Date date = new Date();
    date.setTime(1109071780716l);
  }
 
  public ProcessDefinition createProcessDefinition(){
    ProcessDefinition def = new ProcessDefinition();
   
    def.setRoles(new Role[]{
      new Role("referencer"),
      new Role("drafter"),
      new Role("approver")
    });
       
    ProcessVariable pv1;{
      pv1 = new ProcessVariable();
      pv1.setName("varString");
      pv1.setType(String.class);       
    }
    ProcessVariable pv2;{
      pv2 = new ProcessVariable();
      pv2.setName("varInteger");
      pv2.setType(Integer.class);       
    }
    ProcessVariable pv3;{
      pv3 = new ProcessVariable();
      pv3.setName("varLong");
      pv3.setType(Long.class);       
    }
    ProcessVariable pv4;{
      pv4 = new ProcessVariable();
      pv4.setName("varBoolean");
      pv4.setType(Boolean.class);       
    }
    ProcessVariable pv5;{
      pv5 = new ProcessVariable();
      pv5.setName("varCalendar");
      pv5.setType(Calendar.class);       
    }
    ProcessVariable pv6;{
      pv6 = new ProcessVariable();
      pv6.setName("varDate");
      pv6.setType(Date.class);       
    }
    ProcessVariable pv7;{
      pv7 = new ProcessVariable();
      pv7.setName("varAny");
    }

    def.setProcessVariables(new ProcessVariable[]{pv1, pv2, pv3, pv4, pv5, pv6, pv7});

     
    Activity childActivity = new DefaultActivity("test");     
    def.setChildActivities(new Activity[]{childActivity});
   
    return def;
  }
View Full Code Here

   
    command.store(new FileOutputStream(COMMAND_FILE), "");
  }
 
  public static void main(String[] args) throws Exception{
    ProcessDefinition definition = ProcessDefinitionFactory.loadDefinitionFromFile(args[0]);
    generateStubCommand(definition);
  }
View Full Code Here

    return value.toString();
  }*/

  public void onEdit(){
    try{
      ProcessDefinition procDef = (ProcessDefinition)ProcessDesigner.getInstance().getProcessDefinitionDesigner().getActivity();
       
      if(procDef!=null){
        typeInputter.setSelectionsWithNull(procDef.getReservedXmlTypes());
      }
    }catch(Exception e){
    }   
  }
View Full Code Here

        HumanActivity humanActivity = (HumanActivity)getActivity();
        Role role;
        if(humanActivity.getRole()!=null){
          role = humanActivity.getRole();
        } else {
          ProcessDefinition editingDefinition = humanActivity.getProcessDefinition();
          role = new Role();
          role.setName(getNewRoleName(editingDefinition.getRoles()));
          editingDefinition.addRole(role);
          ProcessDesigner.getInstance().getProcessDefinitionDesigner().refreshActivity();
        }
       
        if(UEngineUtil.isNotEmpty(context.getDisplayName())){
          String roleDisplayName = role.getDisplayName().getText();
View Full Code Here

  }
 
  public void onEdit(){
    try{
      //review: TO-DO
      ProcessDefinition procDef = (ProcessDefinition)ProcessDesigner.getInstance().getProcessDefinitionDesigner().getActivity();
     
    }catch(Exception e){
    }
  }
View Full Code Here

TOP

Related Classes of org.uengine.kernel.ProcessDefinition

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.