Package com.saperion.ngc.model.workflow
Class WorkflowConnectorService
java.lang.Object
com.saperion.ngc.model.ClassicConnectorService
com.saperion.ngc.model.workflow.WorkflowConnectorService
- All Implemented Interfaces:
Service
,WorkflowService
Service layer for all workflow-related functions.
-
Field Summary
Fields inherited from class com.saperion.ngc.model.ClassicConnectorService
ddcCache
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncom.saperion.connector.wf.WorkflowResult
addComment
(String taskId, String comment) Execute add comment.com.saperion.connector.wf.WorkflowResult
addHistory
(String taskId, String description) Execute set history.com.saperion.connector.wf.WorkflowResult
executeActivate
(String taskId) Execute activate.com.saperion.connector.wf.WorkflowResult
executeApprove
(String taskId, String nextUser) Execute delegate.com.saperion.connector.wf.WorkflowResult
executeAssignToMe
(String taskId) Execute AssignToMe.com.saperion.connector.wf.WorkflowResult
executeChangeOwner
(String taskId, String newOwner) Execute change owner.com.saperion.connector.wf.WorkflowResult
executeCommand
(WorkflowActionBean workflowAction) Execute the given command.com.saperion.connector.wf.WorkflowResult
executeDelegate
(String taskId, String delegatee) Execute delegate.com.saperion.connector.wf.WorkflowResult
executeEscalation
(String taskId, Date date) Execute escalate.com.saperion.connector.wf.WorkflowResult
executeForward
(String taskId, String nextUser, int transition) Execute forward.com.saperion.connector.wf.WorkflowResult
executeHold
(String taskId, Date date) Execute hold.com.saperion.connector.wf.WorkflowResult
executeInactivate
(String taskId) Execute inactivate.com.saperion.connector.wf.WorkflowResult
executeNotResponsible
(String taskId, String comment) Execute not responsible.com.saperion.connector.wf.WorkflowResult
executePutBack
(String taskId) Execute putback.com.saperion.connector.wf.WorkflowResult
executeReassign
(String taskId) Execute reassign.com.saperion.connector.wf.WorkflowResult
executeReject
(String taskId, String nextUser) Execute reject.com.saperion.connector.wf.WorkflowResult
executeRemove
(String taskId, String comment) Execute remove.com.saperion.connector.wf.WorkflowResult
executeRemoveNotice
(String taskId) Execute remove notice.com.saperion.connector.wf.WorkflowResult
executeResetHold
(String taskId) Execute reset hold.com.saperion.connector.wf.WorkflowResult
executeRework
(String taskId, String nextUser) Execute rework.com.saperion.connector.wf.WorkflowResult
executeSetActivity
(String taskId, int activity) Execute set activity.com.saperion.connector.wf.WorkflowResult
executeTake
(String taskId) Execute take.com.saperion.connector.wf.WorkflowResult
executeTerminate
(String taskId) Execute terminate.List<com.saperion.intf.wf.CommentInfo>
getComments
(com.saperion.intf.wf.TaskInfo taskInfo) Retrieves the comments for the specified task.Reads the available workflow definitions.List<com.saperion.wf.ProcessDefinitionDescriptor>
getDefinitions
(String ddcName) Reads the available workflow definitions for the specified DDC.List<com.saperion.intf.wf.HistoryInfo[]>
getDocHistories
(String docHdoc) Reads history information for a given document.com.saperion.intf.wf.BoxDefinition
Retrieves the definition of the current user's inbox.com.saperion.intf.wf.WorkflowMember
Reads direct workflow member.com.saperion.intf.wf.WorkflowMember
Reads workflow member.Gets the fullname of the substitute for workflows of the current user.com.saperion.jcs.modules.users.api.User
Gets the substitute-user for the current user.com.saperion.connector.wf.SaWFTask
Load the task object.getWfDisplayName
(com.saperion.intf.wf.WorkflowMember member) Retrieves the comments for the specified task.boolean
Checks if the workflow-feature is enabled.com.saperion.connector.wf.WorkflowResult
setComment
(String taskId, String comment) Execute set comment.void
setSubstitute
(String substituteFullname) Sets the substitute for workflows.com.saperion.connector.wf.WorkflowResult
startWorkflow
(String definition, String actor, String comment, String attachmentUID) Execute start workflow.Methods inherited from class com.saperion.ngc.model.ClassicConnectorService
convertAuthenticationException, getCachedDDC, getConnectionProvider, getCurrentUserFromSession, getSession, getWfConnectionProvider, isActive
-
Constructor Details
-
WorkflowConnectorService
public WorkflowConnectorService() -
WorkflowConnectorService
public WorkflowConnectorService(jakarta.servlet.http.HttpSession session) - Parameters:
session
- HTTP session
-
-
Method Details
-
getDefinitions
public List<String> getDefinitions() throws AuthenticationException, SystemException, WorkflowExceptionReads the available workflow definitions.- Specified by:
getDefinitions
in interfaceWorkflowService
- Returns:
- Workflow definitions
- Throws:
AuthenticationException
- authentication exceptionSystemException
- system exceptionWorkflowException
- workflow exception- See Also:
-
getDefinitions
public List<com.saperion.wf.ProcessDefinitionDescriptor> getDefinitions(String ddcName) throws AuthenticationException, SystemException, WorkflowException Reads the available workflow definitions for the specified DDC. If the usage of workflow definitions is not restricted, all definitions will be returned.- Specified by:
getDefinitions
in interfaceWorkflowService
- Parameters:
ddcName
- name of the DDC- Returns:
- Workflow definitions
- Throws:
AuthenticationException
- authentication exceptionSystemException
- system exceptionWorkflowException
- workflow exception- See Also:
-
getTask
public com.saperion.connector.wf.SaWFTask getTask(String taskId) throws AuthenticationException, SystemException, WorkflowException Load the task object.- Specified by:
getTask
in interfaceWorkflowService
- Parameters:
taskId
- task id- Returns:
- task
- Throws:
AuthenticationException
- authentication exceptionSystemException
- system exceptionWorkflowException
- workflow exception- See Also:
-
executeCommand
public com.saperion.connector.wf.WorkflowResult executeCommand(WorkflowActionBean workflowAction) throws WorkflowException Execute the given command. The parameters must fit to the given command. Unneeded parameters can be set to null.- Specified by:
executeCommand
in interfaceWorkflowService
- Parameters:
workflowAction
- Information needed for executing workflow command- Returns:
- Workflow result
- Throws:
WorkflowException
- workflow exception- See Also:
-
executeApprove
public com.saperion.connector.wf.WorkflowResult executeApprove(String taskId, String nextUser) throws WorkflowException Execute delegate.- Specified by:
executeApprove
in interfaceWorkflowService
- Parameters:
taskId
- Task IDnextUser
- Next user- Returns:
- Workflow result
- Throws:
WorkflowException
- workflow exception- See Also:
-
executeForward
public com.saperion.connector.wf.WorkflowResult executeForward(String taskId, String nextUser, int transition) throws WorkflowException Execute forward.- Specified by:
executeForward
in interfaceWorkflowService
- Parameters:
taskId
- Task IDnextUser
- Next usertransition
- Transition- Returns:
- Workflow result
- Throws:
WorkflowException
- workflow exception- See Also:
-
executeReject
public com.saperion.connector.wf.WorkflowResult executeReject(String taskId, String nextUser) throws WorkflowException Execute reject.- Specified by:
executeReject
in interfaceWorkflowService
- Parameters:
taskId
- Task IDnextUser
- Next user- Returns:
- Workflow result
- Throws:
WorkflowException
- workflow exception- See Also:
-
executeRework
public com.saperion.connector.wf.WorkflowResult executeRework(String taskId, String nextUser) throws WorkflowException Execute rework.- Specified by:
executeRework
in interfaceWorkflowService
- Parameters:
taskId
- Task IDnextUser
- Next user- Returns:
- Workflow result
- Throws:
WorkflowException
- workflow exception- See Also:
-
executeNotResponsible
public com.saperion.connector.wf.WorkflowResult executeNotResponsible(String taskId, String comment) throws WorkflowException Execute not responsible.- Specified by:
executeNotResponsible
in interfaceWorkflowService
- Parameters:
taskId
- Task IDcomment
- Comment- Returns:
- Workflow result
- Throws:
WorkflowException
- workflow exception- See Also:
-
executeTake
Execute take.- Specified by:
executeTake
in interfaceWorkflowService
- Parameters:
taskId
- Task ID- Returns:
- Workflow result
- Throws:
WorkflowException
- workflow exception- See Also:
-
executeRemove
public com.saperion.connector.wf.WorkflowResult executeRemove(String taskId, String comment) throws WorkflowException Execute remove.- Specified by:
executeRemove
in interfaceWorkflowService
- Parameters:
taskId
- Task IDcomment
- Comment- Returns:
- Workflow result
- Throws:
WorkflowException
- workflow exception- See Also:
-
executeRemoveNotice
public com.saperion.connector.wf.WorkflowResult executeRemoveNotice(String taskId) throws WorkflowException Execute remove notice.- Specified by:
executeRemoveNotice
in interfaceWorkflowService
- Parameters:
taskId
- Task ID- Returns:
- Workflow result
- Throws:
WorkflowException
- workflow exception- See Also:
-
executeHold
public com.saperion.connector.wf.WorkflowResult executeHold(String taskId, Date date) throws WorkflowException Execute hold.- Specified by:
executeHold
in interfaceWorkflowService
- Parameters:
taskId
- Task IDdate
- Hold date- Returns:
- Workflow result
- Throws:
WorkflowException
- workflow exception- See Also:
-
executeResetHold
public com.saperion.connector.wf.WorkflowResult executeResetHold(String taskId) throws WorkflowException Execute reset hold.- Specified by:
executeResetHold
in interfaceWorkflowService
- Parameters:
taskId
- Task ID- Returns:
- Workflow result
- Throws:
WorkflowException
- workflow exception- See Also:
-
executeEscalation
public com.saperion.connector.wf.WorkflowResult executeEscalation(String taskId, Date date) throws WorkflowException Execute escalate.- Specified by:
executeEscalation
in interfaceWorkflowService
- Parameters:
taskId
- Task IDdate
- Escalation date- Returns:
- Workflow result
- Throws:
WorkflowException
- workflow exception- See Also:
-
executeInactivate
public com.saperion.connector.wf.WorkflowResult executeInactivate(String taskId) throws WorkflowException Execute inactivate.- Specified by:
executeInactivate
in interfaceWorkflowService
- Parameters:
taskId
- Task ID- Returns:
- Workflow result
- Throws:
WorkflowException
- workflow exception- See Also:
-
executeActivate
public com.saperion.connector.wf.WorkflowResult executeActivate(String taskId) throws WorkflowException Execute activate.- Specified by:
executeActivate
in interfaceWorkflowService
- Parameters:
taskId
- Task ID- Returns:
- Workflow result
- Throws:
WorkflowException
- workflow exception- See Also:
-
executeTerminate
public com.saperion.connector.wf.WorkflowResult executeTerminate(String taskId) throws WorkflowException Execute terminate.- Specified by:
executeTerminate
in interfaceWorkflowService
- Parameters:
taskId
- Task ID- Returns:
- Workflow result
- Throws:
WorkflowException
- workflow exception- See Also:
-
executeChangeOwner
public com.saperion.connector.wf.WorkflowResult executeChangeOwner(String taskId, String newOwner) throws WorkflowException Execute change owner.- Specified by:
executeChangeOwner
in interfaceWorkflowService
- Parameters:
taskId
- Task IDnewOwner
- New owner- Returns:
- Workflow result
- Throws:
WorkflowException
- workflow exception- See Also:
-
executeSetActivity
public com.saperion.connector.wf.WorkflowResult executeSetActivity(String taskId, int activity) throws WorkflowException Execute set activity.- Specified by:
executeSetActivity
in interfaceWorkflowService
- Parameters:
taskId
- Task IDactivity
- Activity- Returns:
- Workflow result
- Throws:
WorkflowException
- workflow exception- See Also:
-
executeDelegate
public com.saperion.connector.wf.WorkflowResult executeDelegate(String taskId, String delegatee) throws WorkflowException Execute delegate.- Specified by:
executeDelegate
in interfaceWorkflowService
- Parameters:
taskId
- Task IDdelegatee
- Delegatee- Returns:
- Workflow result
- Throws:
WorkflowException
- workflow exception- See Also:
-
executeReassign
public com.saperion.connector.wf.WorkflowResult executeReassign(String taskId) throws WorkflowException Execute reassign.- Specified by:
executeReassign
in interfaceWorkflowService
- Parameters:
taskId
- Task ID- Returns:
- Workflow result
- Throws:
WorkflowException
- workflow exception- See Also:
-
executeAssignToMe
public com.saperion.connector.wf.WorkflowResult executeAssignToMe(String taskId) throws WorkflowException Execute AssignToMe.- Specified by:
executeAssignToMe
in interfaceWorkflowService
- Parameters:
taskId
- Task ID- Returns:
- Workflow result
- Throws:
WorkflowException
- workflow exception- See Also:
-
executePutBack
public com.saperion.connector.wf.WorkflowResult executePutBack(String taskId) throws WorkflowException Execute putback.- Specified by:
executePutBack
in interfaceWorkflowService
- Parameters:
taskId
- Task ID- Returns:
- Workflow result
- Throws:
WorkflowException
- workflow exception- See Also:
-
setComment
public com.saperion.connector.wf.WorkflowResult setComment(String taskId, String comment) throws WorkflowException Execute set comment.- Specified by:
setComment
in interfaceWorkflowService
- Parameters:
taskId
- Task IDcomment
- Comment- Returns:
- Workflow result
- Throws:
WorkflowException
- workflow exception- See Also:
-
addComment
public com.saperion.connector.wf.WorkflowResult addComment(String taskId, String comment) throws WorkflowException Execute add comment.- Specified by:
addComment
in interfaceWorkflowService
- Parameters:
taskId
- Task IDcomment
- Comment- Returns:
- Workflow result
- Throws:
WorkflowException
- workflow exception- See Also:
-
addHistory
public com.saperion.connector.wf.WorkflowResult addHistory(String taskId, String description) throws WorkflowException, SystemException, AuthenticationException Execute set history.- Specified by:
addHistory
in interfaceWorkflowService
- Parameters:
taskId
- Task IDdescription
- Description- Returns:
- Workflow result
- Throws:
WorkflowException
- workflow exceptionSystemException
- system exceptionAuthenticationException
- authentication exception- See Also:
-
startWorkflow
public com.saperion.connector.wf.WorkflowResult startWorkflow(String definition, String actor, String comment, String attachmentUID) throws WorkflowException Execute start workflow.- Specified by:
startWorkflow
in interfaceWorkflowService
- Parameters:
definition
- Definition nameactor
- Actorcomment
- CommentattachmentUID
- Attachment UID- Returns:
- True, if done
- Throws:
WorkflowException
- workflow exception- See Also:
-
getMember
public com.saperion.intf.wf.WorkflowMember getMember(com.saperion.intf.wf.WorkflowMember member, int depth, String filter) throws WorkflowException, SystemException Reads direct workflow member.- Specified by:
getMember
in interfaceWorkflowService
- Parameters:
member
- workflow member, witch direct children will be returneddepth
- depth of the returned children.filter
- filter string- Returns:
- Member tree
- Throws:
WorkflowException
- workflow exceptionSystemException
- system exception- See Also:
-
getMembers
Reads workflow member.- Specified by:
getMembers
in interfaceWorkflowService
- Returns:
- Member tree
- Throws:
WorkflowException
- workflow exceptionSystemException
- system exception- See Also:
-
getDocHistories
public List<com.saperion.intf.wf.HistoryInfo[]> getDocHistories(String docHdoc) throws WorkflowException Reads history information for a given document.- Specified by:
getDocHistories
in interfaceWorkflowService
- Parameters:
docHdoc
- document's hDoc- Returns:
- list of history information arrays
- Throws:
WorkflowException
- workflow exception- See Also:
-
getComments
public List<com.saperion.intf.wf.CommentInfo> getComments(com.saperion.intf.wf.TaskInfo taskInfo) throws AuthenticationException, SystemException, WorkflowException Retrieves the comments for the specified task.- Specified by:
getComments
in interfaceWorkflowService
- Parameters:
taskInfo
- task- Returns:
- list of comments
- Throws:
AuthenticationException
- authentication exceptionSystemException
- system exceptionWorkflowException
- workflow exception- See Also:
-
getWfDisplayName
Retrieves the comments for the specified task.- Specified by:
getWfDisplayName
in interfaceWorkflowService
- Parameters:
member
- member to get display name for- Returns:
- display name
- See Also:
-
getInboxDefinition
public com.saperion.intf.wf.BoxDefinition getInboxDefinition() throws AuthenticationException, SystemExceptionRetrieves the definition of the current user's inbox.- Specified by:
getInboxDefinition
in interfaceWorkflowService
- Returns:
- BoxDefinition for user's inbox
- Throws:
AuthenticationException
- authentication exceptionSystemException
- system exception- See Also:
-
isWorkflowFeatureEnabled
Description copied from interface:WorkflowService
Checks if the workflow-feature is enabled.- Specified by:
isWorkflowFeatureEnabled
in interfaceWorkflowService
- Returns:
- true, if workflow-feature is enabled
- Throws:
SystemException
- system exception when checking feature
-
getSubstitute
Description copied from interface:WorkflowService
Gets the fullname of the substitute for workflows of the current user.- Specified by:
getSubstitute
in interfaceWorkflowService
- Returns:
- Fullname of the substitute user.
- Throws:
AuthenticationException
- Authentication exceptionSystemException
- system exception
-
getSubstituteUser
public com.saperion.jcs.modules.users.api.User getSubstituteUser() throws AuthenticationException, SystemExceptionDescription copied from interface:WorkflowService
Gets the substitute-user for the current user.- Specified by:
getSubstituteUser
in interfaceWorkflowService
- Returns:
- the substitute user or null if no substitute user is available
- Throws:
AuthenticationException
- authentication exceptionSystemException
- system exception
-
setSubstitute
public void setSubstitute(String substituteFullname) throws AuthenticationException, SystemException Description copied from interface:WorkflowService
Sets the substitute for workflows.- Specified by:
setSubstitute
in interfaceWorkflowService
- Parameters:
substituteFullname
- Fullname of the substitute to store.- Throws:
AuthenticationException
- Authentication exceptionSystemException
- system exception
-