Class SoapWorkflowClient
- java.lang.Object
-
- com.logicaldoc.webservice.soap.client.SoapClient<WorkflowService>
-
- com.logicaldoc.workflow.webservice.soap.client.SoapWorkflowClient
-
- All Implemented Interfaces:
WorkflowService
public class SoapWorkflowClient extends com.logicaldoc.webservice.soap.client.SoapClient<WorkflowService> implements WorkflowService
Simple client for the Workflow webservice- Since:
- 7.6
- Author:
- Marco Meschieri - LogicalDOC
-
-
Constructor Summary
Constructors Constructor Description SoapWorkflowClient(String endpoint)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description WSWorkflowHistoryaddNote(String sid, String taskId, String note)Adds a new notevoidappendDocuments(String sid, String taskId, Long[] docIds)Appends new documents to the workflowvoidclaim(String sid, String taskId)Claims a taskvoidcomplete(String sid, String taskId, String transition)Completes a task taking a given transitionWSWorkflowHistory[]getHistories(String sid, String instanceId, String event)Gets the histories of a workflow instanceWSWorkflowTask[]getTasksAssignedToMe(String sid)Retrieves the tasks assigned to the current userWSWorkflowTask[]getTasksICanOwn(String sid)Retrieves the tasks that can be owned by the current userString[]getWorkflows(String sid)Lists the available workflowsvoidreassign(String sid, String taskId, long userId)Reassigns a task to another userStringstartWorkflow(String sid, String workflow, String tag, long[] docIds)Launches a new workflow instancevoidunclaim(String sid, String taskId)Turns a task back to pool
-
-
-
Constructor Detail
-
SoapWorkflowClient
public SoapWorkflowClient(String endpoint)
-
-
Method Detail
-
claim
public void claim(String sid, String taskId) throws Exception
Description copied from interface:WorkflowServiceClaims a task- Specified by:
claimin interfaceWorkflowService- Parameters:
sid- identifier of the sessiontaskId- identifier of the task- Throws:
Exception- error in the server
-
complete
public void complete(String sid, String taskId, String transition) throws Exception
Description copied from interface:WorkflowServiceCompletes a task taking a given transition- Specified by:
completein interfaceWorkflowService- Parameters:
sid- identifier of the sessiontaskId- identifier of the tasktransition- name of the transition- Throws:
Exception- error in the server
-
unclaim
public void unclaim(String sid, String taskId) throws Exception
Description copied from interface:WorkflowServiceTurns a task back to pool- Specified by:
unclaimin interfaceWorkflowService- Parameters:
sid- identifier of the sessiontaskId- identifier of the task- Throws:
Exception- error in the server
-
addNote
public WSWorkflowHistory addNote(String sid, String taskId, String note) throws Exception
Description copied from interface:WorkflowServiceAdds a new note- Specified by:
addNotein interfaceWorkflowService- Parameters:
sid- identifier of the sessiontaskId- identifier of the tasknote- text of the note- Returns:
- the event created for this note
- Throws:
Exception- error in the server
-
getTasksAssignedToMe
public WSWorkflowTask[] getTasksAssignedToMe(String sid) throws Exception
Description copied from interface:WorkflowServiceRetrieves the tasks assigned to the current user- Specified by:
getTasksAssignedToMein interfaceWorkflowService- Parameters:
sid- identifier of the session- Returns:
- list of tasks
- Throws:
Exception- error in the server
-
getTasksICanOwn
public WSWorkflowTask[] getTasksICanOwn(String sid) throws Exception
Description copied from interface:WorkflowServiceRetrieves the tasks that can be owned by the current user- Specified by:
getTasksICanOwnin interfaceWorkflowService- Parameters:
sid- identifier of the session- Returns:
- list of tasks
- Throws:
Exception- error in the server
-
getHistories
public WSWorkflowHistory[] getHistories(String sid, String instanceId, String event) throws Exception
Description copied from interface:WorkflowServiceGets the histories of a workflow instance- Specified by:
getHistoriesin interfaceWorkflowService- Parameters:
sid- identifier of the sessioninstanceId- identifier of the workflow instanceevent- optional filter on a specific event type- Returns:
- the histories
- Throws:
Exception- error in the server
-
appendDocuments
public void appendDocuments(String sid, String taskId, Long[] docIds) throws Exception
Description copied from interface:WorkflowServiceAppends new documents to the workflow- Specified by:
appendDocumentsin interfaceWorkflowService- Parameters:
sid- identifier of the sessiontaskId- identifier of the taskdocIds- identifiers of the documents to append- Throws:
Exception- error in the server
-
getWorkflows
public String[] getWorkflows(String sid) throws Exception
Description copied from interface:WorkflowServiceLists the available workflows- Specified by:
getWorkflowsin interfaceWorkflowService- Parameters:
sid- identifier of the session- Returns:
- list of the workflow names
- Throws:
Exception- error in the server
-
startWorkflow
public String startWorkflow(String sid, String workflow, String tag, long[] docIds) throws Exception
Description copied from interface:WorkflowServiceLaunches a new workflow instance- Specified by:
startWorkflowin interfaceWorkflowService- Parameters:
sid- identifier of the sessionworkflow- name of the workflowtag- a tag you can assign to the new instancedocIds- identifiers of the documents to be appended to the workflow- Returns:
- identifier of the workflow instance
- Throws:
Exception- error in the server
-
reassign
public void reassign(String sid, String taskId, long userId) throws Exception
Description copied from interface:WorkflowServiceReassigns a task to another user- Specified by:
reassignin interfaceWorkflowService- Parameters:
sid- identifier of the sessiontaskId- identifier of the taskuserId- identifier of the user- Throws:
Exception- error in the server
-
-