Package com.openkm.sdk4j.impl
Class WorkflowImpl
- java.lang.Object
-
- com.openkm.sdk4j.impl.ClientImpl
-
- com.openkm.sdk4j.impl.WorkflowImpl
-
- All Implemented Interfaces:
BaseWorkflow,Serializable
public class WorkflowImpl extends ClientImpl implements BaseWorkflow, Serializable
WorkflowImpl- Author:
- sochoa
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description WorkflowImpl(String host)WorkflowImpl
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddeleteProcessDefinition(long pdId)Delete process definition.voidendTaskInstance(long tiId, String transName)End task instance.List<ProcessDefinition>findAllProcessDefinitions()Find all process definitions list.ProcessDefinitionfindLastProcessDefinition(String name)Find last process definition process definition.List<ProcessDefinition>findLatestProcessDefinitions()Find latest process definitions list.TaskInstanceResultSetfindPooledTaskInstances(int offset, int limit)Find pooled task instances task instance result set.List<ProcessInstance>findProcessInstances(long pdId)Find process instances list.List<ProcessInstance>findProcessInstancesByNode(String uuid)Find process instances list by nodeList<TaskInstance>findTaskInstances(long piId)Find task instances list.TaskInstanceResultSetfindUserTaskInstances(int offset, int limit)Find user task instances task instance result set.ProcessDefinitiongetProcessDefinition(long pdId)Gets process definition.Map<String,List<FormElement>>getProcessDefinitionForms(long pdId)Gets process definition forms.StringgetProcessDefinitionImage(long pdId, String uuid)Gets process definition image.ProcessInstancegetProcessInstance(long piId)Gets process instance.StringgetSuggestBoxKeyValue(long pdId, String uuid, String taskName, String propertyName, String key)Gets suggest box key value.Map<String,String>getSuggestBoxKeyValuesFiltered(long pdId, String uuid, String taskName, String propertyName, String filter)Gets suggest box key values filtered.TaskInstancegetTaskInstance(long tiId)Gets task instance.voidregisterProcessDefinition(InputStream is)Register process definition.ProcessInstancerunProcessDefinition(long pdId, String uuid, Map<String,String> propertiesMap)Run process definition process instance.ProcessInstancerunProcessDefinition(long pdId, Map<String,String> propertiesMap)Run process definition without a node process instance.ProcessInstanceResultSetsearchAssignedTasks(Calendar start, Calendar end, String status, Long procDefId, int offset, int limit)Search assigned tasks.ProcessInstanceResultSetsearchOverview(Calendar start, Calendar end, String status, Long procDefId, String initiator, String taskUser, int offset, int limit)Search overview.ProcessInstanceResultSetsearchStartedByMe(Calendar start, Calendar end, String status, Long procDefId, int offset, int limit)Search started by me.protected voidsetAuthorizationToken(String authorizationToken)setAuthenticationTokenvoidsetTaskInstanceActorId(long tiId, String actorId)Sets task instance actor id.voidsetTaskInstanceValues(long pdId, long tiId, String tiName, String transName, Map<String,String> properties)Sets task instance values.voidstartTaskInstance(long tiId)Start task instance.-
Methods inherited from class com.openkm.sdk4j.impl.ClientImpl
getClient, getWebTarget, setAuthorizationHeader, setJsessionIdHeader
-
-
-
-
Constructor Detail
-
WorkflowImpl
public WorkflowImpl(String host)
WorkflowImpl
-
-
Method Detail
-
setAuthorizationToken
protected void setAuthorizationToken(String authorizationToken)
setAuthenticationToken
-
registerProcessDefinition
public void registerProcessDefinition(InputStream is) throws AccessDeniedException, ParseException, RepositoryException, DatabaseException, WorkflowException, UnknownException, WebserviceException
Description copied from interface:BaseWorkflowRegister process definition.- Specified by:
registerProcessDefinitionin interfaceBaseWorkflow- Parameters:
is- the is- Throws:
AccessDeniedException- the access denied exceptionParseException- the parse exceptionRepositoryException- the repository exceptionDatabaseException- the database exceptionWorkflowException- the workflow exceptionUnknownException- the unknown exceptionWebserviceException- the webservice exception
-
deleteProcessDefinition
public void deleteProcessDefinition(long pdId) throws AccessDeniedException, RepositoryException, DatabaseException, WorkflowException, UnknownException, WebserviceExceptionDescription copied from interface:BaseWorkflowDelete process definition.- Specified by:
deleteProcessDefinitionin interfaceBaseWorkflow- Parameters:
pdId- the pd id- Throws:
AccessDeniedException- the access denied exceptionRepositoryException- the repository exceptionDatabaseException- the database exceptionWorkflowException- the workflow exceptionUnknownException- the unknown exceptionWebserviceException- the webservice exception
-
getProcessDefinition
public ProcessDefinition getProcessDefinition(long pdId) throws AccessDeniedException, RepositoryException, DatabaseException, WorkflowException, UnknownException, WebserviceException
Description copied from interface:BaseWorkflowGets process definition.- Specified by:
getProcessDefinitionin interfaceBaseWorkflow- Parameters:
pdId- the pd id- Returns:
- the process definition
- Throws:
AccessDeniedException- the access denied exceptionRepositoryException- the repository exceptionDatabaseException- the database exceptionWorkflowException- the workflow exceptionUnknownException- the unknown exceptionWebserviceException- the webservice exception
-
getProcessDefinitionImage
public String getProcessDefinitionImage(long pdId, String uuid) throws PathNotFoundException, AccessDeniedException, ConversionException, AutomationException, RepositoryException, DatabaseException, UnknownException, WebserviceException
Description copied from interface:BaseWorkflowGets process definition image.- Specified by:
getProcessDefinitionImagein interfaceBaseWorkflow- Parameters:
pdId- the pd iduuid- the uuid- Returns:
- the process definition image
- Throws:
PathNotFoundException- the path not found exceptionAccessDeniedException- the access denied exceptionConversionException- the conversion exceptionAutomationException- the automation exceptionRepositoryException- the repository exceptionDatabaseException- the database exceptionUnknownException- the unknown exceptionWebserviceException- the webservice exception
-
runProcessDefinition
public ProcessInstance runProcessDefinition(long pdId, String uuid, Map<String,String> propertiesMap) throws WorkflowException, AccessDeniedException, RepositoryException, DatabaseException, UnknownException, WebserviceException
Description copied from interface:BaseWorkflowRun process definition process instance.- Specified by:
runProcessDefinitionin interfaceBaseWorkflow- Parameters:
pdId- the pd iduuid- the uuidpropertiesMap- the properties map- Returns:
- the process instance
- Throws:
WorkflowException- the workflow exceptionAccessDeniedException- the access denied exceptionRepositoryException- the repository exceptionDatabaseException- the database exceptionUnknownException- the unknown exceptionWebserviceException- the webservice exception
-
runProcessDefinition
public ProcessInstance runProcessDefinition(long pdId, Map<String,String> propertiesMap) throws WorkflowException, AccessDeniedException, DatabaseException, UnknownException, WebserviceException
Description copied from interface:BaseWorkflowRun process definition without a node process instance.- Specified by:
runProcessDefinitionin interfaceBaseWorkflow- Parameters:
pdId- the pd idpropertiesMap- the properties map- Returns:
- the process instance
- Throws:
WorkflowException- the workflow exceptionAccessDeniedException- the access denied exceptionDatabaseException- the database exceptionUnknownException- the unknown exceptionWebserviceException- the webservice exception
-
findProcessInstances
public List<ProcessInstance> findProcessInstances(long pdId) throws AccessDeniedException, RepositoryException, DatabaseException, WorkflowException, UnknownException, WebserviceException
Description copied from interface:BaseWorkflowFind process instances list.- Specified by:
findProcessInstancesin interfaceBaseWorkflow- Parameters:
pdId- the pd id- Returns:
- the list
- Throws:
AccessDeniedException- the access denied exceptionRepositoryException- the repository exceptionDatabaseException- the database exceptionWorkflowException- the workflow exceptionUnknownException- the unknown exceptionWebserviceException- the webservice exception
-
findAllProcessDefinitions
public List<ProcessDefinition> findAllProcessDefinitions() throws AccessDeniedException, RepositoryException, DatabaseException, WorkflowException, UnknownException, WebserviceException
Description copied from interface:BaseWorkflowFind all process definitions list.- Specified by:
findAllProcessDefinitionsin interfaceBaseWorkflow- Returns:
- the list
- Throws:
AccessDeniedException- the access denied exceptionRepositoryException- the repository exceptionDatabaseException- the database exceptionWorkflowException- the workflow exceptionUnknownException- the unknown exceptionWebserviceException- the webservice exception
-
findLatestProcessDefinitions
public List<ProcessDefinition> findLatestProcessDefinitions() throws AccessDeniedException, RepositoryException, DatabaseException, WorkflowException, UnknownException, WebserviceException
Description copied from interface:BaseWorkflowFind latest process definitions list.- Specified by:
findLatestProcessDefinitionsin interfaceBaseWorkflow- Returns:
- the list
- Throws:
AccessDeniedException- the access denied exceptionRepositoryException- the repository exceptionDatabaseException- the database exceptionWorkflowException- the workflow exceptionUnknownException- the unknown exceptionWebserviceException- the webservice exception
-
findLastProcessDefinition
public ProcessDefinition findLastProcessDefinition(String name) throws AccessDeniedException, RepositoryException, DatabaseException, WorkflowException, UnknownException, WebserviceException
Description copied from interface:BaseWorkflowFind last process definition process definition.- Specified by:
findLastProcessDefinitionin interfaceBaseWorkflow- Parameters:
name- the name- Returns:
- the process definition
- Throws:
AccessDeniedException- the access denied exceptionRepositoryException- the repository exceptionDatabaseException- the database exceptionWorkflowException- the workflow exceptionUnknownException- the unknown exceptionWebserviceException- the webservice exception
-
getProcessInstance
public ProcessInstance getProcessInstance(long piId) throws AccessDeniedException, RepositoryException, DatabaseException, WorkflowException, UnknownException, WebserviceException
Description copied from interface:BaseWorkflowGets process instance.- Specified by:
getProcessInstancein interfaceBaseWorkflow- Parameters:
piId- the pi id- Returns:
- the process instance
- Throws:
AccessDeniedException- the access denied exceptionRepositoryException- the repository exceptionDatabaseException- the database exceptionWorkflowException- the workflow exceptionUnknownException- the unknown exceptionWebserviceException- the webservice exception
-
findUserTaskInstances
public TaskInstanceResultSet findUserTaskInstances(int offset, int limit) throws AccessDeniedException, RepositoryException, DatabaseException, WorkflowException, UnknownException, WebserviceException
Description copied from interface:BaseWorkflowFind user task instances task instance result set.- Specified by:
findUserTaskInstancesin interfaceBaseWorkflow- Parameters:
offset- the offsetlimit- the limit- Returns:
- the task instance result set
- Throws:
AccessDeniedException- the access denied exceptionRepositoryException- the repository exceptionDatabaseException- the database exceptionWorkflowException- the workflow exceptionUnknownException- the unknown exceptionWebserviceException- the webservice exception
-
findTaskInstances
public List<TaskInstance> findTaskInstances(long piId) throws AccessDeniedException, RepositoryException, DatabaseException, WorkflowException, UnknownException, WebserviceException
Description copied from interface:BaseWorkflowFind task instances list.- Specified by:
findTaskInstancesin interfaceBaseWorkflow- Parameters:
piId- the pi id- Returns:
- the list
- Throws:
AccessDeniedException- the access denied exceptionRepositoryException- the repository exceptionDatabaseException- the database exceptionWorkflowException- the workflow exceptionUnknownException- the unknown exceptionWebserviceException- the webservice exception
-
setTaskInstanceValues
public void setTaskInstanceValues(long pdId, long tiId, String tiName, String transName, Map<String,String> properties) throws AccessDeniedException, RepositoryException, DatabaseException, WorkflowException, UnknownException, WebserviceExceptionDescription copied from interface:BaseWorkflowSets task instance values.- Specified by:
setTaskInstanceValuesin interfaceBaseWorkflow- Parameters:
pdId- the pd idtiId- the ti idtiName- the ti nametransName- the trans nameproperties- the properties- Throws:
AccessDeniedException- the access denied exceptionRepositoryException- the repository exceptionDatabaseException- the database exceptionWorkflowException- the workflow exceptionUnknownException- the unknown exceptionWebserviceException- the webservice exception
-
getTaskInstance
public TaskInstance getTaskInstance(long tiId) throws AccessDeniedException, RepositoryException, DatabaseException, WorkflowException, UnknownException, WebserviceException
Description copied from interface:BaseWorkflowGets task instance.- Specified by:
getTaskInstancein interfaceBaseWorkflow- Parameters:
tiId- the ti id- Returns:
- the task instance
- Throws:
AccessDeniedException- the access denied exceptionRepositoryException- the repository exceptionDatabaseException- the database exceptionWorkflowException- the workflow exceptionUnknownException- the unknown exceptionWebserviceException- the webservice exception
-
setTaskInstanceActorId
public void setTaskInstanceActorId(long tiId, String actorId) throws AccessDeniedException, RepositoryException, DatabaseException, WorkflowException, UnknownException, WebserviceExceptionDescription copied from interface:BaseWorkflowSets task instance actor id.- Specified by:
setTaskInstanceActorIdin interfaceBaseWorkflow- Parameters:
tiId- the ti idactorId- the actor id- Throws:
AccessDeniedException- the access denied exceptionRepositoryException- the repository exceptionDatabaseException- the database exceptionWorkflowException- the workflow exceptionUnknownException- the unknown exceptionWebserviceException- the webservice exception
-
startTaskInstance
public void startTaskInstance(long tiId) throws AccessDeniedException, RepositoryException, DatabaseException, WorkflowException, UnknownException, WebserviceExceptionDescription copied from interface:BaseWorkflowStart task instance.- Specified by:
startTaskInstancein interfaceBaseWorkflow- Parameters:
tiId- the ti id- Throws:
AccessDeniedException- the access denied exceptionRepositoryException- the repository exceptionDatabaseException- the database exceptionWorkflowException- the workflow exceptionUnknownException- the unknown exceptionWebserviceException- the webservice exception
-
endTaskInstance
public void endTaskInstance(long tiId, String transName) throws AccessDeniedException, RepositoryException, DatabaseException, WorkflowException, UnknownException, WebserviceExceptionDescription copied from interface:BaseWorkflowEnd task instance.- Specified by:
endTaskInstancein interfaceBaseWorkflow- Parameters:
tiId- the ti idtransName- the trans name- Throws:
AccessDeniedException- the access denied exceptionRepositoryException- the repository exceptionDatabaseException- the database exceptionWorkflowException- the workflow exceptionUnknownException- the unknown exceptionWebserviceException- the webservice exception
-
getProcessDefinitionForms
public Map<String,List<FormElement>> getProcessDefinitionForms(long pdId) throws ParseException, AccessDeniedException, RepositoryException, DatabaseException, WorkflowException, UnknownException, WebserviceException
Description copied from interface:BaseWorkflowGets process definition forms.- Specified by:
getProcessDefinitionFormsin interfaceBaseWorkflow- Parameters:
pdId- the pd id- Returns:
- the process definition forms
- Throws:
ParseException- the parse exceptionAccessDeniedException- the access denied exceptionRepositoryException- the repository exceptionDatabaseException- the database exceptionWorkflowException- the workflow exceptionUnknownException- the unknown exceptionWebserviceException- the webservice exception
-
getSuggestBoxKeyValuesFiltered
public Map<String,String> getSuggestBoxKeyValuesFiltered(long pdId, String uuid, String taskName, String propertyName, String filter) throws ParseException, AccessDeniedException, DatabaseException, PluginNotFoundException, UnknownException, WebserviceException
Description copied from interface:BaseWorkflowGets suggest box key values filtered.- Specified by:
getSuggestBoxKeyValuesFilteredin interfaceBaseWorkflow- Parameters:
pdId- the pd iduuid- the uuidtaskName- the task namepropertyName- the property namefilter- the filter- Returns:
- the suggest box key values filtered
- Throws:
ParseException- the parse exceptionAccessDeniedException- the access denied exceptionDatabaseException- the database exceptionPluginNotFoundException- the plugin not found exceptionUnknownException- the unknown exceptionWebserviceException- the webservice exception
-
getSuggestBoxKeyValue
public String getSuggestBoxKeyValue(long pdId, String uuid, String taskName, String propertyName, String key) throws ParseException, AccessDeniedException, DatabaseException, PluginNotFoundException, UnknownException, WebserviceException
Description copied from interface:BaseWorkflowGets suggest box key value.- Specified by:
getSuggestBoxKeyValuein interfaceBaseWorkflow- Parameters:
pdId- the pd iduuid- the uuidtaskName- the task namepropertyName- the property namekey- the key- Returns:
- the suggest box key value
- Throws:
ParseException- the parse exceptionAccessDeniedException- the access denied exceptionDatabaseException- the database exceptionPluginNotFoundException- the plugin not found exceptionUnknownException- the unknown exceptionWebserviceException- the webservice exception
-
findPooledTaskInstances
public TaskInstanceResultSet findPooledTaskInstances(int offset, int limit) throws AccessDeniedException, RepositoryException, DatabaseException, WorkflowException, UnknownException, WebserviceException
Description copied from interface:BaseWorkflowFind pooled task instances task instance result set.- Specified by:
findPooledTaskInstancesin interfaceBaseWorkflow- Parameters:
offset- the offsetlimit- the limit- Returns:
- the task instance result set
- Throws:
AccessDeniedException- the access denied exceptionRepositoryException- the repository exceptionDatabaseException- the database exceptionWorkflowException- the workflow exceptionUnknownException- the unknown exceptionWebserviceException- the webservice exception
-
findProcessInstancesByNode
public List<ProcessInstance> findProcessInstancesByNode(String uuid) throws AccessDeniedException, RepositoryException, DatabaseException, WorkflowException, UnknownException, WebserviceException
Description copied from interface:BaseWorkflowFind process instances list by node- Specified by:
findProcessInstancesByNodein interfaceBaseWorkflow- Parameters:
uuid- the uuid- Returns:
- the list
- Throws:
AccessDeniedException- the access denied exceptionRepositoryException- the repository exceptionDatabaseException- the database exceptionWorkflowException- the workflow exceptionUnknownException- the unknown exceptionWebserviceException- the webservice exception
-
searchAssignedTasks
public ProcessInstanceResultSet searchAssignedTasks(Calendar start, Calendar end, String status, Long procDefId, int offset, int limit) throws AccessDeniedException, RepositoryException, DatabaseException, WorkflowException, UnknownException, WebserviceException
Description copied from interface:BaseWorkflowSearch assigned tasks.- Specified by:
searchAssignedTasksin interfaceBaseWorkflow- Parameters:
start- the start dateend- the end datestatus- the statusprocDefId- the process definition idoffset- the offsetlimit- the limit- Returns:
- the process instance result set
- Throws:
AccessDeniedException- the access denied exceptionRepositoryException- the repository exceptionDatabaseException- the database exceptionWorkflowException- the workflow exceptionUnknownException- the unknown exceptionWebserviceException- the webservice exception
-
searchStartedByMe
public ProcessInstanceResultSet searchStartedByMe(Calendar start, Calendar end, String status, Long procDefId, int offset, int limit) throws AccessDeniedException, RepositoryException, DatabaseException, WorkflowException, UnknownException, WebserviceException
Description copied from interface:BaseWorkflowSearch started by me.- Specified by:
searchStartedByMein interfaceBaseWorkflow- Parameters:
start- the start dateend- the end datestatus- the statusprocDefId- the process definition idoffset- the offsetlimit- the limit- Returns:
- the process instance result set
- Throws:
AccessDeniedException- the access denied exceptionRepositoryException- the repository exceptionDatabaseException- the database exceptionWorkflowException- the workflow exceptionUnknownException- the unknown exceptionWebserviceException- the webservice exception
-
searchOverview
public ProcessInstanceResultSet searchOverview(Calendar start, Calendar end, String status, Long procDefId, String initiator, String taskUser, int offset, int limit) throws AccessDeniedException, RepositoryException, DatabaseException, WorkflowException, UnknownException, WebserviceException
Description copied from interface:BaseWorkflowSearch overview.- Specified by:
searchOverviewin interfaceBaseWorkflow- Parameters:
start- the start dateend- the end datestatus- the statusprocDefId- the process definition idinitiator- the initiatortaskUser- the task useroffset- the offsetlimit- the limit- Returns:
- the process instance result set
- Throws:
AccessDeniedException- the access denied exceptionRepositoryException- the repository exceptionDatabaseException- the database exceptionWorkflowException- the workflow exceptionUnknownException- the unknown exceptionWebserviceException- the webservice exception
-
-