Package org.uengine.processmanager

Examples of org.uengine.processmanager.ProcessTransactionContext


      }
     
      return tempInst;
*/    }
   
    ProcessTransactionContext ptc = getProcessTransactionContext();
    if (options != null && options.containsKey("ptc")) {
      ptc = (ProcessTransactionContext)options.get("ptc");
    }
   
    if(ptc==null)
      throw new UEngineException("TransactionContext should be provided.");
   
    setProcessTransactionContext(ptc);

    if(isCaching()){
      ProcessInstance instance = ptc.getProcessInstanceInTransaction(instanceId);
      if(instance!=null)
        return instance;
    }
   
    try{
addDebugInfo("EJBProcessInstance: instanceId is set by " + instanceId);


      setInstanceId(instanceId);
      boolean isArchive = getProcessInstanceDAO().getIsArchive();
     
      if(GlobalContext.logLevelIsDebug){
        addDebugInfo("Definition administration url",GlobalContext.WEB_CONTEXT_ROOT + "/processmanager/viewProcessFlowChart.jsp?processDefinition=" + getProcessInstanceDAO().getDefId() + "&processDefinitionVersionID=" + getProcessInstanceDAO().getDefVerId());
        addDebugInfo("Process Designer launch url",GlobalContext.WEB_CONTEXT_ROOT + "/processmanager/ProcessDesigner.jnlp?defVerId=" + getProcessInstanceDAO().getDefVerId() + "&defId=" + getProcessInstanceDAO().getDefId());
        addDebugInfo("Instance administration url", GlobalContext.WEB_CONTEXT_ROOT + "/processmanager/viewProcessInformation.jsp?instanceId=" + getInstanceId());
      }
     
     
      //if the instance is archived, the instance would be loaded from a serialized XML file.
      if(isArchive){
        return FileProcessArchive.load(instanceId, ptc);
      }
//      ProcessInstance inst = create();
//      inst.setInstanceId(instanceId);
//   
//      return inst;
      getProcessTransactionContext().addTransactionListener(this);
      ptc.registerProcessInstance(this);
     
      //if the instance has been retreived by instanceId, it tells us it is not newly initiated status.
      isNew = false;
     
      return this;
View Full Code Here


//    }
  }

  public void afterExecute(Activity activity, ProcessInstance instance) throws Exception {
    if(instance.isNew() && activity instanceof ProcessDefinition){
      ProcessTransactionContext ptc = instance.getProcessTransactionContext();
      Map requestMap = ptc.getProcessManager().getGenericContext();
      if(requestMap !=null && !"addStrategy".equals(instance.getProcessDefinition().getAlias()) ){
       
        HttpServletRequest req =(HttpServletRequest)requestMap.get("request");
       
        if(req !=null){
View Full Code Here

TOP

Related Classes of org.uengine.processmanager.ProcessTransactionContext

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.