private void ajaxFetchExecutableFlow(final HttpServletRequest req, final HttpServletResponse resp, final HashMap<String, Object> ret, final User user, final ExecutableFlow exFlow) throws ServletException { logger.info("Fetching " + exFlow.getExecutionId()); final Project project = getProjectAjaxByPermission(ret, exFlow.getProjectId(), user, Type.READ); if (project == null) { return; } ret.put("submitTime", exFlow.getSubmitTime()); ret.put("submitUser", exFlow.getSubmitUser()); ret.put("execid", exFlow.getExecutionId()); ret.put("projectId", exFlow.getProjectId()); ret.put("project", project.getName()); final Map<String, Object> flowObj = getExecutableNodeInfo(exFlow); ret.putAll(flowObj); }
flowInfo.put("projectId", flow.getProjectId()); flowInfo.put("status", flow.getStatus().toString()); flowInfo.put("submitTime", flow.getSubmitTime()); flowInfo.put("startTime", flow.getStartTime()); flowInfo.put("endTime", flow.getEndTime());
ret.put("submitTime", exFlow.getSubmitTime()); ret.put("submitUser", exFlow.getSubmitUser()); ret.put("execid", exFlow.getExecutionId());
private void assertTwoFlowSame(final ExecutableFlow flow1, final ExecutableFlow flow2, final boolean compareFlowData) { assertThat(flow1.getExecutionId()).isEqualTo(flow2.getExecutionId()); assertThat(flow1.getStatus()).isEqualTo(flow2.getStatus()); assertThat(flow1.getEndTime()).isEqualTo(flow2.getEndTime()); assertThat(flow1.getStartTime()).isEqualTo(flow2.getStartTime()); assertThat(flow1.getSubmitTime()).isEqualTo(flow2.getSubmitTime()); assertThat(flow1.getFlowId()).isEqualTo(flow2.getFlowId()); assertThat(flow1.getProjectId()).isEqualTo(flow2.getProjectId()); assertThat(flow1.getVersion()).isEqualTo(flow2.getVersion()); assertThat(flow1.getSubmitUser()).isEqualTo(flow2.getSubmitUser()); if (compareFlowData) { assertThat(flow1.getExecutionOptions().getFailureAction()) .isEqualTo(flow2.getExecutionOptions().getFailureAction()); assertThat(new HashSet<>(flow1.getEndNodes())).isEqualTo(new HashSet<>(flow2.getEndNodes())); } }
private ExecutableFlow getExecutableFlowMetadata( ExecutableFlow fullExFlow) { final Flow flow = new Flow(fullExFlow.getId()); final Project project = new Project(fullExFlow.getProjectId(), null); project.setVersion(fullExFlow.getVersion()); flow.setVersion(fullExFlow.getVersion()); final ExecutableFlow metadata = new ExecutableFlow(project, flow); metadata.setExecutionId(fullExFlow.getExecutionId()); metadata.setStatus(fullExFlow.getStatus()); metadata.setSubmitTime(fullExFlow.getSubmitTime()); metadata.setStartTime(fullExFlow.getStartTime()); metadata.setEndTime(fullExFlow.getEndTime()); metadata.setSubmitUser(fullExFlow.getSubmitUser()); return metadata; }
Assert.assertEquals(exA.getProjectId(), exB.getProjectId()); Assert.assertEquals(exA.getVersion(), exB.getVersion()); Assert.assertEquals(exA.getSubmitTime(), exB.getSubmitTime()); Assert.assertEquals(exA.getSubmitUser(), exB.getSubmitUser()); Assert.assertEquals(exA.getExecutionPath(), exB.getExecutionPath());
private void ajaxFetchExecutableFlow( HttpServletRequest req, HttpServletResponse resp, HashMap<String, Object> ret, User user, ExecutableFlow exFlow) throws ServletException { System.out.println("Fetching " + exFlow.getExecutionId()); Project project = getProjectAjaxByPermission(ret, exFlow.getProjectId(), user, Type.READ); if (project == null) { return; } ret.put("submitTime", exFlow.getSubmitTime()); ret.put("submitUser", exFlow.getSubmitUser()); ret.put("execid", exFlow.getExecutionId()); ret.put("projectId", exFlow.getProjectId()); ret.put("project", project.getName()); Map<String,Object> flowObj = getExecutableNodeInfo(exFlow); ret.putAll(flowObj); }
flowInfo.put("projectId", flow.getProjectId()); flowInfo.put("status", flow.getStatus().toString()); flowInfo.put("submitTime", flow.getSubmitTime()); flowInfo.put("startTime", flow.getStartTime()); flowInfo.put("endTime", flow.getEndTime());