XmlRpcWorkflowManagerClient implements WorkflowManagerClient { @Override public synchronized boolean updateWorkflowInstanceStatus( String workflowInstId, String status) throws XmlRpcException, IOException { Vector argList = new Vector(); argList.add(workflowInstId); argList.add(status); return (Boolean) client.execute( "workflowmgr.updateWorkflowInstanceStatus", argList); } XmlRpcWorkflowManagerClient(URL url); @Override boolean refreshRepository(); @Override String executeDynamicWorkflow(List<String> taskIds, Metadata metadata); List getRegisteredEvents(); WorkflowInstancePage getFirstPage(); @Override WorkflowInstancePage getNextPage(WorkflowInstancePage currentPage); @Override WorkflowInstancePage getPrevPage(WorkflowInstancePage currentPage); WorkflowInstancePage getLastPage(); @Override WorkflowInstancePage paginateWorkflowInstances(int pageNum,
            String status); @Override WorkflowInstancePage paginateWorkflowInstances(int pageNum); List getWorkflowsByEvent(String eventName); Metadata getWorkflowInstanceMetadata(String wInstId); @Override synchronized boolean setWorkflowInstanceCurrentTaskStartDateTime(
            String wInstId, String startDateTimeIsoStr); @Override double getWorkflowCurrentTaskWallClockMinutes(String workflowInstId); @Override double getWorkflowWallClockMinutes(String workflowInstId); @Override synchronized boolean stopWorkflowInstance(String workflowInstId); @Override synchronized boolean pauseWorkflowInstance(String workflowInstId); @Override synchronized boolean resumeWorkflowInstance(String workflowInstId); @Override synchronized boolean setWorkflowInstanceCurrentTaskEndDateTime(
            String wInstId, String endDateTimeIsoStr); @Override synchronized boolean updateWorkflowInstanceStatus(
            String workflowInstId, String status); @Override synchronized boolean updateWorkflowInstance(WorkflowInstance instance); @Override synchronized boolean updateMetadataForWorkflow(
            String workflowInstId, Metadata metadata); @Override boolean sendEvent(String eventName, Metadata metadata); boolean clearWorkflowInstances(); WorkflowTask getTaskById(String taskId); @Override WorkflowCondition getConditionById(String conditionId); @Override WorkflowInstance getWorkflowInstanceById(String wInstId); Workflow getWorkflowById(String workflowId); Vector getWorkflows(); int getNumWorkflowInstancesByStatus(String status); int getNumWorkflowInstances(); Vector getWorkflowInstancesByStatus(String status); Vector getWorkflowInstances(); @Override URL getWorkflowManagerUrl(); @Override void setWorkflowManagerUrl(URL workflowManagerUrl); @Override void close();  }
@Test public void testUpdateWorkflowInstanceStatus() throws XmlRpcException, IOException, RepositoryException { List<WorkflowInstance> workflowlist = null; WorkflowInstance instance = null; boolean upd = false; try{ workflowlist = wmc.getWorkflowInstances(); } catch(Exception e){ e.printStackTrace(); } assumeNotNull(workflowlist); assertThat(workflowlist, is(not(nullValue()))); assertThat(workflowlist.size(), is(not(0))); try{ instance = wmc.getWorkflowInstanceById(workflowlist.get(0).getId()); } catch(Exception e){ e.printStackTrace(); } assumeNotNull(instance); assertThat(instance, is(not(nullValue()))); try{ upd = wmc.updateWorkflowInstanceStatus(instance.getId(), "RUNNING"); } catch(Exception e){ e.printStackTrace(); } assumeTrue(upd); assertThat(upd, equalTo(true)); }