Package com.saperion.connector.wf
Interface SaWFConnector
- All Known Implementing Classes:
SaWFConnectorImpl
public interface SaWFConnector
Workflow Connector Interface.
-
Method Summary
Modifier and TypeMethodDescriptionexecuteStartProcess
(String definition, ActorInfo nextActor, String comment, String attachmentUID) Start new process.getBoxCount
(int boxId) Reads the count (number of workflow item) of the inbox identified by the given id.Reads the box definitions.Gets the classic connector behind this connector.List<HistoryInfo[]>
getDocHistories
(String documentHdoc) Gets the document's process histories.getDocHistoriesXML
(String documentHdoc) Gets the document's process histories as XML.getDocHistoriesXML
(String documentHdoc, String language) Gets the document's process histories as XML.getDocHistoriesXML2
(String documentHdoc, String language) Gets the the second variant of document's process histories as XML.getDocHistoriesXML2
(String documentHdoc, String language, boolean isAscending) Gets the the second variant of document's process histories as XML with ascending/descending switch.getGroupbox
(int[] ids, String filter) Read the content of the group box.Read the content of the inbox.getMember
(WorkflowMember member, int depth, String filter) Reads direct workflow member tree.Reads the workflow member tree.getOrgUnitbox
(int[] ids, String filter) Read the content of the organisation unit box.boolean
Get the out of office status for the logged on user.getParentTask
(String taskId) Get parent task direct by ID.Reads all available process definitions.getProcessDefinitions
(String ddcName) Returns the process definitions that are allowed to be used for documents contained in the specified DDC.Get the substitute for the logged on user.getSubstitutebox
(int[] ids, String filter) Read the content of the substitute box.Creates a task object from the given task information.Get task direct by ID.getTaskAuditList
(int[] boxIds, String filter) Reads the task audit for this user.getTaskAuditList
(int[] boxIds, String filter, Map<String, Object> parameter) Reads the task audit for this user.getTaskList
(int[] boxIds, String filter) Reads the task for this user.getTaskList
(int[] boxIds, String filter, Map<String, Object> parameter) Reads the task for this user.int
User ID for the actual user.Gets the workflow ddc namegetXMLTaskList
(List<TaskInfo> taskList) Converts a task list to xml.boolean
logoff()
Logoff from the backend system.int
performs logon to the backend system.void
setOutOfOffice
(boolean isOutOfOffice) set the out of office status for the logged on user.void
setSubstitute
(String name) Set the substitute for the logged on user.
-
Method Details
-
logon
int logon(String username, String password, int type, String client) throws SaAuthenticationException, SaSystemException performs logon to the backend system.- Parameters:
username
- User's full namepassword
- Passwordtype
- User type that means client license type. There are possible the following integer values:- 1 = index
- 2 = query
- 3 = univeral administrator
- 4 = web query
- 7 = web index
- 12 = workflow
- 13 = scan
- 14 = highend scan
- 15 = API query
- 16 = API index
- 17 = API scan
- 20 = basic administrator
- 29 = web workflow
client
- client/mandant name, used in multi-client systems- Returns:
- User token for the current session.
- Throws:
SaAuthenticationException
- SaAuthenticationExceptionSaSystemException
- SaSystemException
-
logoff
Logoff from the backend system. This command also destroys the command thread on the java broker server.- Returns:
- boolean. True, if logoff successful.
- Throws:
SaAuthenticationException
- SaAuthenticationExceptionSaSystemException
- SaSystemException
-
getUserId
int getUserId()User ID for the actual user.- Returns:
- User id
-
getBoxDefinitions
Reads the box definitions.- Returns:
- Box definitions
- Throws:
SaAuthenticationException
- SaAuthenticationExceptionSaSystemException
- SaSystemException
-
getBoxCount
Reads the count (number of workflow item) of the inbox identified by the given id. For more options (unread-count...) use invoke method of ClassicConnector withGetBoxCount
operation.- Parameters:
boxId
- the workflow box id- Returns:
- the count of the inbox as Long.
- Throws:
SaAuthenticationException
- if an error occurs.SaSystemException
- if an error occurs.
-
getInbox
Read the content of the inbox.- Parameters:
filter
- HQL filter- Returns:
- List of TaskInfo objects
- Throws:
SaAuthenticationException
- SaAuthenticationExceptionSaSystemException
- SaSystemException
-
getGroupbox
List<TaskInfo> getGroupbox(int[] ids, String filter) throws SaAuthenticationException, SaSystemException Read the content of the group box.- Parameters:
ids
- Filter ID'sfilter
- HQL filter- Returns:
- List of TaskInfo objects
- Throws:
SaAuthenticationException
- SaAuthenticationExceptionSaSystemException
- SaSystemException
-
getSubstitutebox
List<TaskInfo> getSubstitutebox(int[] ids, String filter) throws SaAuthenticationException, SaSystemException Read the content of the substitute box.- Parameters:
ids
- Filter ID'sfilter
- HQL filter- Returns:
- List of TaskInfo objects
- Throws:
SaAuthenticationException
- SaAuthenticationExceptionSaSystemException
- SaSystemException
-
getOrgUnitbox
List<TaskInfo> getOrgUnitbox(int[] ids, String filter) throws SaAuthenticationException, SaSystemException Read the content of the organisation unit box.- Parameters:
ids
- Filter ID'sfilter
- HQL filter- Returns:
- List of TaskInfo objects
- Throws:
SaAuthenticationException
- SaAuthenticationExceptionSaSystemException
- SaSystemException
-
getTaskList
List<TaskInfo> getTaskList(int[] boxIds, String filter) throws SaAuthenticationException, SaSystemException Reads the task for this user.- Parameters:
boxIds
- BoxIdsfilter
- HQL filter. Optional WHERE condition that will be added to the original query.
In order to add the pagination functionality like setMaxResults() and/or setFirstResult(), add the following statements to the filter:
filter_stmt;MAXRESULTS=x ;FIRSTRESULT=y.
;MAXRESULTS=x - x means the limitation of the result set output.
;FIRSTRESULT=y - y means setting the result set cursor to the y-position.
Adding pagination is optional feature that can be used without filter statement as well. In other words filter might consist of ;MAXRESULTS=x ;FIRSTRESULT=y string only.
Examples:
1. LASTUSER ='Bolt';MAXRESULTS=50 ;FIRSTRESULT=1 - hql query's where condition is enhanced with restriction LASTUSER ='Bolt' and the pagination functionality setMaxResults() and setFirstResult() is used;
2. ;MAXRESULTS=50 - only setMaxResult() will be used.
using ; ist important for applying pagination.- Returns:
- List of TaskInfo objects
- Throws:
SaAuthenticationException
- SaAuthenticationExceptionSaSystemException
- SaSystemException
-
getTaskList
List<TaskInfo> getTaskList(int[] boxIds, String filter, Map<String, Object> parameter) throws SaAuthenticationException, SaSystemExceptionReads the task for this user.- Parameters:
boxIds
- BoxIdsfilter
- HQL filter. Optional WHERE condition that will be added to the original query.
In order to add the pagination functionality like setMaxResults() and/or setFirstResult(), add the following statements to the filter:
filter_stmt;MAXRESULTS=x ;FIRSTRESULT=y.
;MAXRESULTS=x - x means the limitation of the result set output.
;FIRSTRESULT=y - y means setting the result set cursor to the y-position.
Adding pagination is optional feature that can be used without filter statement as well. In other words filter might consist of ;MAXRESULTS=x ;FIRSTRESULT=y string only.
Examples:
1. LASTUSER ='Bolt';MAXRESULTS=50 ;FIRSTRESULT=1 - hql query's where condition is enhanced with restriction LASTUSER ='Bolt' and the pagination functionality setMaxResults() and setFirstResult() is used;
2. ;MAXRESULTS=50 - only setMaxResult() will be used.
using ; ist important for applying pagination.parameter
- parameters for the filter-statement, if used- Returns:
- List of TaskInfo objects
- Throws:
SaAuthenticationException
- SaAuthenticationExceptionSaSystemException
- SaSystemException
-
getTaskAuditList
List<TaskAuditInfo> getTaskAuditList(int[] boxIds, String filter) throws SaAuthenticationException, SaSystemException Reads the task audit for this user.- Parameters:
boxIds
- BoxIdsfilter
- HQL filter- Returns:
- List of
TaskAuditInfo
objects - Throws:
SaAuthenticationException
- SaAuthenticationExceptionSaSystemException
- SaSystemException
-
getTaskAuditList
List<TaskAuditInfo> getTaskAuditList(int[] boxIds, String filter, Map<String, Object> parameter) throws SaAuthenticationException, SaSystemExceptionReads the task audit for this user.- Parameters:
boxIds
- BoxIdsfilter
- HQL filterparameter
- Filter parameter- Returns:
- List of
TaskAuditInfo
objects - Throws:
SaAuthenticationException
- SaAuthenticationExceptionSaSystemException
- SaSystemException
-
getTask
SaWFTask getTask(TaskInfo taskInfo) throws SaAuthenticationException, SaSystemException, SaWorkflowException Creates a task object from the given task information.- Parameters:
taskInfo
- Task information- Returns:
- Task object
- Throws:
SaAuthenticationException
- SaAuthenticationExceptionSaSystemException
- SaSystemExceptionSaWorkflowException
- Workflow exception
-
getTask
SaWFTask getTask(String taskId) throws SaAuthenticationException, SaSystemException, SaWorkflowException Get task direct by ID.- Parameters:
taskId
- Task SysRowId- Returns:
- Task information
- Throws:
SaAuthenticationException
- SaAuthenticationExceptionSaSystemException
- SaSystemExceptionSaWorkflowException
- Workflow exception
-
getParentTask
SaWFTask getParentTask(String taskId) throws SaAuthenticationException, SaSystemException, SaWorkflowException Get parent task direct by ID.- Parameters:
taskId
- Task SysRowId- Returns:
- Task information
- Throws:
SaAuthenticationException
- SaAuthenticationExceptionSaSystemException
- SaSystemExceptionSaWorkflowException
- Workflow exception
-
getProcessDefinitions
List<String> getProcessDefinitions() throws SaAuthenticationException, SaSystemException, SaWorkflowExceptionReads all available process definitions.- Returns:
- Process definitions
- Throws:
SaAuthenticationException
- SaAuthenticationExceptionSaSystemException
- SaSystemExceptionSaWorkflowException
- Workflow exception
-
getProcessDefinitions
List<ProcessDefinitionDescriptor> getProcessDefinitions(String ddcName) throws SaAuthenticationException, SaSystemException, SaWorkflowException Returns the process definitions that are allowed to be used for documents contained in the specified DDC. If no restrictions are configured, all process definitions will be returned.- Parameters:
ddcName
- name of the DDC- Returns:
- Workflowdefinition list
- Throws:
SaAuthenticationException
- authentication error when loading definitionsSaSystemException
- system error when loading definitionsSaWorkflowException
- workflow error when loading definitions
-
executeStartProcess
TaskInfo executeStartProcess(String definition, ActorInfo nextActor, String comment, String attachmentUID) throws SaWorkflowException Start new process.- Parameters:
definition
- Process definitionnextActor
- Next actorcomment
- CommentattachmentUID
- Attachment UID (a HDOC)- Returns:
- Task info of new process
- Throws:
SaWorkflowException
- Workflow exception
-
getXMLTaskList
Converts a task list to xml.- Parameters:
taskList
- Task list- Returns:
- Task XML as String
-
getSubstitute
Get the substitute for the logged on user.- Returns:
- Substitute name
- Throws:
SaAuthenticationException
- SaAuthenticationExceptionSaSystemException
- SaSystemException
-
setSubstitute
Set the substitute for the logged on user.- Parameters:
name
- the fullname of the substitute user- Throws:
SaAuthenticationException
- SaAuthenticationExceptionSaSystemException
- SaSystemException
-
getMembers
Reads the workflow member tree.- Returns:
- Member tree
- Throws:
SaAuthenticationException
- SaAuthenticationExceptionSaSystemException
- SaSystemException
-
getMember
WorkflowMember getMember(WorkflowMember member, int depth, String filter) throws SaAuthenticationException, SaSystemException Reads direct workflow member tree.- Parameters:
member
- workflow member, which children have to be returned.depth
- of children.filter
- filter string- Returns:
- Member tree
- Throws:
SaAuthenticationException
- SaAuthenticationExceptionSaSystemException
- SaSystemException
-
getOutOfOffice
Get the out of office status for the logged on user.- Returns:
- is OutOfOffice
- Throws:
SaAuthenticationException
- SaAuthenticationExceptionSaSystemException
- SaSystemException
-
setOutOfOffice
set the out of office status for the logged on user.- Parameters:
isOutOfOffice
- True, if is OutOfOffice- Throws:
SaAuthenticationException
- SaAuthenticationExceptionSaSystemException
- SaSystemException
-
getDocHistories
Gets the document's process histories.- Parameters:
documentHdoc
- Document's HDoc- Returns:
- List of arrays of history objects
- Throws:
SaWorkflowException
- Workflow exception
-
getDocHistoriesXML
Gets the document's process histories as XML.- Parameters:
documentHdoc
- Document's UID- Returns:
- List of XML strings of history objects
- Throws:
SaWorkflowException
- Workflow exception
-
getDocHistoriesXML
Gets the document's process histories as XML.- Parameters:
documentHdoc
- Document's UIDlanguage
- Language- Returns:
- List of XML strings of history objects
- Throws:
SaWorkflowException
- Workflow exception
-
getDocHistoriesXML2
Gets the the second variant of document's process histories as XML.- Parameters:
documentHdoc
- Document's UIDlanguage
- Language- Returns:
- List of XML strings of history objects
- Throws:
SaWorkflowException
- Workflow exception
-
getDocHistoriesXML2
List<String> getDocHistoriesXML2(String documentHdoc, String language, boolean isAscending) throws SaWorkflowException Gets the the second variant of document's process histories as XML with ascending/descending switch.- Parameters:
documentHdoc
- Document's UIDlanguage
- LanguageisAscending
- Is ascending- Returns:
- List of XML strings of history objects
- Throws:
SaWorkflowException
- Workflow exception
-
getClassicConnector
SaClassicConnector getClassicConnector()Gets the classic connector behind this connector. ;- Returns:
- Classic connector behind this connector
-
getWorkflowDdcName
Gets the workflow ddc name- Returns:
- the name of the workflow ddc
- Throws:
SaSystemException
-