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

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


      map.put(workflowInstanceState, counter*10+((int)(Math.random()*10)));
      counter++;
    }
   
    ArrayList<WorkflowSummary> result = new ArrayList<WorkflowSummary>();
    WorkflowSummary workflowSummery = new WorkflowSummary("",10,
        new WorkflowClassMetaData("WorkflowClass1","alias",0L,+(long)(Math.random()*100),0L,""),
        new WorkflowStateSummary(map));
    result.add(workflowSummery);
   
    return result;
View Full Code Here


      ResultSet resultSet = selectStmt.executeQuery();
     
      Map<String, WorkflowSummary> classNameToSummary = new HashMap<String, WorkflowSummary>();
      while (resultSet.next()) {
        String instanceClassname=resultSet.getString(1);
        WorkflowSummary summary = classNameToSummary.get(instanceClassname);
        if (summary==null){
          summary= new WorkflowSummary();
          summary.setClassDescription(new WorkflowClassMetaData(instanceClassname, "", 1L, 1L, 1L,""));
          summary.setStateSummary(new WorkflowStateSummary(new HashMap<WorkflowInstanceState, Integer>()));
          classNameToSummary.put(instanceClassname, summary);
          for (WorkflowInstanceState s : WorkflowInstanceState.values())
            summary.getStateSummary().getNumberOfWorkflowInstancesWithState().put(s,0);
        }
        int status = resultSet.getInt(2);
        int count = resultSet.getInt(3);
       
        summary.getStateSummary().getNumberOfWorkflowInstancesWithState().put(DBProcessingStateWorkaround.fromKey(status).asWorkflowInstanceState(), count);
      }
      resultSet.close();
      return new ArrayList<WorkflowSummary>(classNameToSummary.values());
    } catch (SQLException e) {
      throw new RuntimeException(e);
View Full Code Here

TOP

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

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.