Package org.uengine.processmanager

Examples of org.uengine.processmanager.TransactionContext$XA_Internal


      RoleMapping theMapping = humanActivity.getRole().getMapping(instance);
     
      if(theMapping !=null){
        theMapping.beforeFirst();
        do{
          TransactionContext tc;
         
          if(DW_DSN!=null){
            tc = new SimpleTransactionContext(DW_DSN);
          }else{
            tc = instance.getProcessTransactionContext();
          }
         
          ResourceDimensionDAOType resourceDimensionDAOType = ResourceDimensionDAOType.getInstance(tc);
 
          if(resourceDimensionDAOType.existAnyResourceWhereRsrc_Id(theMapping.getEndpoint())) continue;
         
          if(theMapping.getGroupName()==null)
            theMapping.fill(instance);
 
          ResourceDimensionDAO resourceDimension = resourceDimensionDAOType.createDAOForInsert();{
            resourceDimension.setRsrc_Id(theMapping.getEndpoint());
            resourceDimension.setRsrc_Name(theMapping.getResourceName());
            resourceDimension.setGender(theMapping.isMale());
            resourceDimension.setDept_Name(theMapping.getGroupName());
            resourceDimension.setDept_Id(theMapping.getGroupId());
            if(theMapping.getBirthday()!=null)
              resourceDimension.setBirthDay(new Long(1900 + theMapping.getBirthday().getYear()));
          }
          resourceDimension.insert();
         
          if(tc instanceof SimpleTransactionContext)
            tc.releaseResources();
         
        }while(theMapping.next());
       
        theMapping.beforeFirst();
      }
View Full Code Here


     
      RoleMapping theMapping = humanActivity.getRole().getMapping(instance);
 
      theMapping.beforeFirst();

      TransactionContext tc;
     
      if(DW_DSN!=null){
        tc = new SimpleTransactionContext(DW_DSN);
      }else{
        tc = instance.getProcessTransactionContext();
      }

      PerformanceFactDAOType performanceFactDAOType = PerformanceFactDAOType.getInstance(tc);
      PerformanceFactDAO performanceFact = performanceFactDAOType.createDAOForInsert();{
        performanceFact.setACT_ID(humanActivity.getTracingTag());
        performanceFact.setINST_ID(new Long(instance.getInstanceId()));
        performanceFact.setROOTINST_ID(new Long(instance.getRootProcessInstanceId()));
        performanceFact.setACT_NAME(humanActivity.getName().getText());
        performanceFact.setCOST(new Long(humanActivity.getCost()));
        performanceFact.setDEF_ID(new Long(humanActivity.getProcessDefinition().getBelongingDefinitionId()));
        performanceFact.setDEF_NAME(humanActivity.getProcessDefinition().getName().getText());
        performanceFact.setPRSNGTIME(new Long(humanActivity.getElapsedTimeAsLong(instance) / 60000));
        performanceFact.setRsrc_Id(theMapping.getEndpoint());
        performanceFact.setMODTIME(new Timestamp(GlobalContext.getNow(instance.getProcessTransactionContext()).getTimeInMillis()));
       
       
        long timeId = 0;{
          java.util.Calendar startedTime = humanActivity.getOpenTime(instance);
          if(startedTime == null) startedTime = humanActivity.getStartedTime(instance);
         
          int year = startedTime.get(Calendar.YEAR);
          int month = startedTime.get(Calendar.MONTH) + 1;
          int day = startedTime.get(Calendar.DATE);
          timeId += year * 10000;
          timeId += month * 100;
          timeId += day;
        }
       
        performanceFact.setTIME_ID(new Long(timeId));
       
        int DEADLNHT = 0;{
          java.util.Calendar startedTime = humanActivity.getEndTime(instance);
          java.util.Calendar dueDate = humanActivity.getDueDate(instance);
          if(startedTime.compareTo(dueDate) <= 0){
            DEADLNHT = 0;
          }else{
            DEADLNHT = 1;
          }
        }
   
        performanceFact.setDEADLNHT( new Integer(DEADLNHT));
      }
      performanceFact.insert();
     
      if(tc instanceof SimpleTransactionContext)
        tc.releaseResources();
    }
   
  }
View Full Code Here

          if (Activity.STATUS_RUNNING.equals(status)) {
            sb.append("<blink>"+localStatus+"</blink>");
          } else {
            if ("".equals(status) && options.containsKey("current running count")) {
              try {
                TransactionContext tc =  instance.getProcessTransactionContext();
                String defVerId = activity.getProcessDefinition().getId();
                int count = WorklistDAOType.getCurrnetRunningCount(tc, defVerId, activity.getTracingTag());
                sb.append("("+count+")");
              } catch(Exception e) { }
            } else {
View Full Code Here

TOP

Related Classes of org.uengine.processmanager.TransactionContext$XA_Internal

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.