Package org.imixs.melman
Class WorkflowClient
- java.lang.Object
-
- org.imixs.melman.AbstractClient
-
- org.imixs.melman.DocumentClient
-
- org.imixs.melman.WorkflowClient
-
public class WorkflowClient extends DocumentClient
This ServiceClient is a WebService REST Client which encapsulate the communication with a REST web serice based on the Imixs Workflow REST API. The Implementation is based on the JAXB API 2.0.- Author:
- Ralph Soika
-
-
Field Summary
-
Fields inherited from class org.imixs.melman.DocumentClient
DEFAULT_PAGE_SIZE, DEFAULT_TYPE, ITEM_ERROR_CODE, ITEM_ERROR_MESSAGE, items, pageIndex, pageSize, sortBy, sortReverse, type
-
Fields inherited from class org.imixs.melman.AbstractClient
baseURI, requestFilterList, sslContext
-
-
Constructor Summary
Constructors Constructor Description WorkflowClient(String base_uri)Initialize the client by a BASE_URL.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddeleteWorkitem(String uniqueid)Deletes a single workItem instance by UniqueID.List<org.imixs.workflow.ItemCollection>getTaskListByCreator(String userid)Returns the current task list by creatorList<org.imixs.workflow.ItemCollection>getTaskListByOwner(String userid)Returns the current task list by ownerList<org.imixs.workflow.ItemCollection>getWorkflowEventsByWorkitem(org.imixs.workflow.ItemCollection workitem)Returns the current task list by ownerorg.imixs.workflow.ItemCollectiongetWorkitem(String uniqueid)Returns a single workItem instance by UniqueID.org.imixs.workflow.ItemCollectionprocessWorkitem(org.imixs.workflow.ItemCollection workitem)Process a single workitem instance.-
Methods inherited from class org.imixs.melman.DocumentClient
countDocuments, createAdminPJob, deleteDocument, getDocument, getItems, getPageIndex, getPageSize, getSortBy, getType, isSortReverse, postXMLDataCollection, postXMLDocument, saveDocument, searchDocuments, setItems, setPageIndex, setPageSize, setSortBy, setSortOrder, setSortReverse, setType
-
Methods inherited from class org.imixs.melman.AbstractClient
getBaseURI, getCustomResource, getCustomResourceXML, getRequestFilterList, getSslContext, getWebTarget, logout, newClient, registerClientRequestFilter, setBaseURI, setSslContext
-
-
-
-
Constructor Detail
-
WorkflowClient
public WorkflowClient(String base_uri)
Initialize the client by a BASE_URL.- Parameters:
base_uri-
-
-
Method Detail
-
processWorkitem
public org.imixs.workflow.ItemCollection processWorkitem(org.imixs.workflow.ItemCollection workitem) throws RestAPIExceptionProcess a single workitem instance. If the workitem is not yet managed by the workflow manger a new instance will be created.- Parameters:
workitem- - a ItemCollection representing the workitem.- Returns:
- updated workitem instance
- Throws:
RestAPIException
-
getWorkitem
public org.imixs.workflow.ItemCollection getWorkitem(String uniqueid) throws RestAPIException
Returns a single workItem instance by UniqueID.The method calls the workflow rest interface instead of the document rest interface to ensure the corresponding backend method is accessed.
- Parameters:
uniqueid-items-- Returns:
- workitem
- Throws:
RestAPIException
-
deleteWorkitem
public void deleteWorkitem(String uniqueid) throws RestAPIException
Deletes a single workItem instance by UniqueID.- Parameters:
userid-items-- Throws:
RestAPIException
-
getTaskListByCreator
public List<org.imixs.workflow.ItemCollection> getTaskListByCreator(String userid) throws RestAPIException
Returns the current task list by creator- Parameters:
userid-- Throws:
RestAPIException
-
getTaskListByOwner
public List<org.imixs.workflow.ItemCollection> getTaskListByOwner(String userid) throws RestAPIException
Returns the current task list by owner- Parameters:
userid-items-- Returns:
- task list for given user
- Throws:
RestAPIException
-
getWorkflowEventsByWorkitem
public List<org.imixs.workflow.ItemCollection> getWorkflowEventsByWorkitem(org.imixs.workflow.ItemCollection workitem) throws RestAPIException
Returns the current task list by owner- Parameters:
userid-items-- Returns:
- task list for given user
- Throws:
RestAPIException
-
-