@Test public void testGetWorkflowInstances() throws IOException, XmlRpcException { List<WorkflowInstance> wfinstances = fmc.getWorkflowInstances(); assertNotNull(wfinstances); }
@Test public void testGetWorkflowCurrentTaskWallClockMinutes() throws Exception { XmlRpcWorkflowManagerClient fmc = new XmlRpcWorkflowManagerClient(new URL("http://localhost:" + WM_PORT)); List<WorkflowInstance> wfinstances = fmc.getWorkflowInstances(); assertNotNull(wfinstances); double clock = fmc.getWorkflowCurrentTaskWallClockMinutes(wfinstances.get(0).getId()); assertThat(clock, is(not(Matchers.nullValue()))); }
@Test public void testGetWorkflowInstanceById() throws XmlRpcException, IOException, RepositoryException { List<WorkflowInstance> workflowlist = fmc.getWorkflowInstances(); assertThat(workflowlist, is(not(nullValue()))); assertThat(workflowlist.size(), is(not(0))); WorkflowInstance instance = fmc.getWorkflowInstanceById(workflowlist.get(0).getId()); assertThat(instance, is(not(nullValue()))); }
@Test public void testUpdateWorkflowInstanceStatus() throws XmlRpcException, IOException, RepositoryException { List<WorkflowInstance> workflowlist = fmc.getWorkflowInstances(); assertThat(workflowlist, is(not(nullValue()))); assertThat(workflowlist.size(), is(not(0))); WorkflowInstance instance = fmc.getWorkflowInstanceById(workflowlist.get(0).getId()); assertThat(instance, is(not(nullValue()))); boolean upd = fmc.updateWorkflowInstanceStatus(instance.getId(), "RUNNING"); assertThat(upd, equalTo(true)); }