Package org.uengine.kernel

Examples of org.uengine.kernel.ProcessInstance


    pm.delegateWorkitem(instance.getInstanceId(), wiaMsg.getTracingTag(), rm);
  }
 
  public void delegateWorkItem(DelegateWorkItemMsg dwMsg) throws Exception {
    ProcessInstance instance = pm.getProcessInstance(dwMsg.getInstanceId());
    this.bindProcessInfo(instance, dwMsg);
   
    RoleMapping rm = RoleMapping.create();
    if (dwMsg.getEndpoints().size() > 0) {
      for (String endpoint : dwMsg.getEndpoints()) {
View Full Code Here


  }
 
  public String processCompensate() throws Exception {
    String instanceId = (String)sr.getParameter(WorkflowHandler.ARGS_INSTANCEID);
    String tracingTag = (String)sr.getParameter(WorkflowHandler.ARGS_TRACINGTAG);
    ProcessInstance instance = pm.getProcessInstance(instanceId);
    Activity act = instance.getProcessDefinition().getActivity(tracingTag);
    Activity parentAct = act.getParentActivity();
   
    Vector child = ((ScopeActivity)parentAct).getChildActivities();
   
    String targetActTT = "";
View Full Code Here

    return instanceId;
  }
 
  public String setVariables() throws Exception {
    String instanceId = (String)sr.getParameter(WorkflowHandler.ARGS_INSTANCEID);
    ProcessInstance instance = pm.getProcessInstance(instanceId);
    setVariableValue(instance);
    return instanceId;
  }
View Full Code Here

      loggedRoleMapping.setName("Initiator");
      loggedRoleMapping.setEndpoint(initiator);
 
      String defVerId = pm.getProcessDefinitionProductionVersionByAlias(alias);
      instanceId = pm.initializeProcess(defVerId);
      ProcessInstance instance = pm.getProcessInstance(instanceId);
     
      setVariableValue(instance);
      pm.putRoleMapping(instanceId, loggedRoleMapping);
      pm.executeProcessByWorkitem(instanceId,new org.uengine.kernel.ResultPayload());
    }else{
      instanceId = (String)sr.getParameter(WorkflowHandler.ARGS_INSTANCEID);
      String tracingTag = (String)sr.getParameter(WorkflowHandler.ARGS_TRACINGTAG);
      String taskId = (String)sr.getParameter(WorkflowHandler.ARGS_TASKID);
     
      ProcessInstance instance = pm.getProcessInstance(instanceId);
     
      setVariableValue(instance);
      pm.completeWorkitem(instanceId, tracingTag, taskId, new org.uengine.kernel.ResultPayload());
    }
   
View Full Code Here

      for(int i=0; i<variables.length; i++){
        if(variables[i].getName().equals(fd.getName()))
            defaultFileContext = (FileContext)variables[i].getDefaultValue();
      }
     
      ProcessInstance instance = (ProcessInstance)options.get("instance");
     
      if(defaultFileContext.isFtpFile()){
        StringBuffer inputterHTML = new StringBuffer();

        String defaultPath = defaultFileContext.getPath();
View Full Code Here

    String inputName = "_" + section + "_" + fd.getName();
    String instanceIdInputName = inputName + "_instanceId";
    String tracingTagInputName = inputName + "_tracingTag";
   
    ActivitySelectionContext defaultASC = (ActivitySelectionContext)defaultValue;
    ProcessInstance instance = (ProcessInstance)options.get("instance");
 
    if(defaultASC==null)
      defaultASC = new ActivitySelectionContext();
   
    StringBuffer html = new StringBuffer();
    html
      .append("<input type=hidden name='" + instanceIdInputName + "'"+ HTML.getAttrHTML("value", defaultASC.getInstanceId()) +">")
      .append("<input type=hidden name='" + tracingTagInputName + "'"+ HTML.getAttrHTML("value", defaultASC.getTracingTag()) +">")
      .append("<input type=button name='" + inputName + "_display' value='Select Step' onclick=\"openActivityPicker('"+ inputName +"', '"+ instance.getRootProcessInstanceId() +"')\">")
    ;
     
    return html.toString();
  }
View Full Code Here

   
    scripts.put("onActivitySelected", onActivitySelected)
  }

  public String getViewerHTML(String section, FieldDescriptor fd, Object defaultValue, Map options) {
    ProcessInstance instance = (ProcessInstance)options.get("instance");
   
    ActivitySelectionContext asc = (ActivitySelectionContext)defaultValue;
   
    if(asc==null || asc.getInstanceId()==null || asc.getTracingTag()==null) return "-";
    try {
      HashMap param = new HashMap();
      param.put("ptc", instance.getProcessTransactionContext());
      ProcessInstance theInstance = ProcessInstance.create().getInstance(asc.getInstanceId(), param);
      Activity theActivity = theInstance.getProcessDefinition().getActivity(asc.getTracingTag());
     
      return theActivity.toString();
    } catch (Exception e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
View Full Code Here

TOP

Related Classes of org.uengine.kernel.ProcessInstance

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.