Package de.scoopgmbh.copper.monitoring.core.model

Examples of de.scoopgmbh.copper.monitoring.core.model.WorkflowInstanceInfo


  @Override
  public List<WorkflowInstanceInfo> getWorkflowInstanceList(String poolid, String classname,
      WorkflowInstanceState state, Integer priority, Date form, Date to, long resultRowLimit) throws RemoteException {
    ArrayList<WorkflowInstanceInfo> result = new ArrayList<WorkflowInstanceInfo>();
    WorkflowInstanceInfo workflowInfo = new WorkflowInstanceInfo();
    workflowInfo.setId("1");
    result.add(workflowInfo);
    workflowInfo = new WorkflowInstanceInfo();
    workflowInfo.setId("2");
    result.add(workflowInfo);
    workflowInfo = new WorkflowInstanceInfo();
    workflowInfo.setId("3");
    workflowInfo.setTimeout(new Date());
    result.add(workflowInfo);
   
    return result;
  }
View Full Code Here


  }
 
  WorkflowInstanceInfo lastWorkflow;
  @Override
  public void inject(Workflow<?> workflow) {
    lastWorkflow = new WorkflowInstanceInfo();
    lastWorkflow.setId(workflow.getId());
    lastWorkflow.setClassname(workflow.getClass().getName());
    super.inject(workflow);
  }
View Full Code Here

     
      ArrayList<WorkflowInstanceInfo> instances = new ArrayList<WorkflowInstanceInfo>();
      java.sql.ResultSetMetaData rsmd = resultSet.getMetaData();
      boolean exceptionIsClob = rsmd.getColumnType(8) == Types.CLOB;
      while (resultSet.next()) {
        WorkflowInstanceInfo workflowInstanceInfo = new WorkflowInstanceInfo();
        workflowInstanceInfo.setId(resultSet.getString(1));
        workflowInstanceInfo.setState(DBProcessingStateWorkaround.fromKey(resultSet.getInt(2)).asWorkflowInstanceState() );
        workflowInstanceInfo.setPriority(resultSet.getInt(3));
        workflowInstanceInfo.setLastActivityTimestamp(new Date(resultSet.getTimestamp(4).getTime()));
        workflowInstanceInfo.setProcessorPoolId(resultSet.getString(5));
        workflowInstanceInfo.setTimeout(resultSet.getTimestamp(6)!=null?new Date(resultSet.getTimestamp(6).getTime()):null);
        workflowInstanceInfo.setStartTime(new Date(resultSet.getTimestamp(7).getTime()));
        if (exceptionIsClob) {
          Clob errorinfo =  resultSet.getClob(8);
          if (errorinfo!=null){
            workflowInstanceInfo.setErrorInfos(errorinfo.getSubString(1, (int)errorinfo.length()));
          }
        } else {
          workflowInstanceInfo.setErrorInfos(resultSet.getString(8));
        }
        workflowInstanceInfo.setLastErrorTime(resultSet.getTimestamp(9)!=null?new Date(resultSet.getTimestamp(9).getTime()):null);
        Date lastMod = resultSet.getTimestamp(10)!=null?new Date(resultSet.getTimestamp(10).getTime()):null;
        if (workflowInstanceInfo.getState() == WorkflowInstanceState.FINISHED){
          workflowInstanceInfo.setFinishTime(lastMod);
        }
        workflowInstanceInfo.setOverallLifetimeInMs(System.currentTimeMillis()-workflowInstanceInfo.getStartTime().getTime());
        workflowInstanceInfo.setClassname(resultSet.getString(11));
       
        instances.add(workflowInstanceInfo);
      }
      resultSet.close();
      return instances;
View Full Code Here

TOP

Related Classes of de.scoopgmbh.copper.monitoring.core.model.WorkflowInstanceInfo

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.