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.WorkflowResultaddComment(String taskId, String comment) Execute add comment.com.saperion.connector.wf.WorkflowResultaddHistory(String taskId, String description) Execute set history.com.saperion.connector.wf.WorkflowResultexecuteActivate(String taskId) Execute activate.com.saperion.connector.wf.WorkflowResultexecuteApprove(String taskId, String nextUser) Execute delegate.com.saperion.connector.wf.WorkflowResultexecuteAssignToMe(String taskId) Execute AssignToMe.com.saperion.connector.wf.WorkflowResultexecuteChangeOwner(String taskId, String newOwner) Execute change owner.com.saperion.connector.wf.WorkflowResultexecuteCommand(WorkflowActionBean workflowAction) Execute the given command.com.saperion.connector.wf.WorkflowResultexecuteDelegate(String taskId, String delegatee) Execute delegate.com.saperion.connector.wf.WorkflowResultexecuteEscalation(String taskId, Date date) Execute escalate.com.saperion.connector.wf.WorkflowResultexecuteForward(String taskId, String nextUser, int transition) Execute forward.com.saperion.connector.wf.WorkflowResultexecuteHold(String taskId, Date date) Execute hold.com.saperion.connector.wf.WorkflowResultexecuteInactivate(String taskId) Execute inactivate.com.saperion.connector.wf.WorkflowResultexecuteNotResponsible(String taskId, String comment) Execute not responsible.com.saperion.connector.wf.WorkflowResultexecutePutBack(String taskId) Execute putback.com.saperion.connector.wf.WorkflowResultexecuteReassign(String taskId) Execute reassign.com.saperion.connector.wf.WorkflowResultexecuteReject(String taskId, String nextUser) Execute reject.com.saperion.connector.wf.WorkflowResultexecuteRemove(String taskId, String comment) Execute remove.com.saperion.connector.wf.WorkflowResultexecuteRemoveNotice(String taskId) Execute remove notice.com.saperion.connector.wf.WorkflowResultexecuteResetHold(String taskId) Execute reset hold.com.saperion.connector.wf.WorkflowResultexecuteRework(String taskId, String nextUser) Execute rework.com.saperion.connector.wf.WorkflowResultexecuteSetActivity(String taskId, int activity) Execute set activity.com.saperion.connector.wf.WorkflowResultexecuteTake(String taskId) Execute take.com.saperion.connector.wf.WorkflowResultexecuteTerminate(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.BoxDefinitionRetrieves the definition of the current user's inbox.com.saperion.intf.wf.WorkflowMemberReads direct workflow member.com.saperion.intf.wf.WorkflowMemberReads workflow member.Gets the fullname of the substitute for workflows of the current user.com.saperion.jcs.modules.users.api.UserGets the substitute-user for the current user.com.saperion.connector.wf.SaWFTaskLoad the task object.getWfDisplayName(com.saperion.intf.wf.WorkflowMember member) Retrieves the comments for the specified task.booleanChecks if the workflow-feature is enabled.com.saperion.connector.wf.WorkflowResultsetComment(String taskId, String comment) Execute set comment.voidsetSubstitute(String substituteFullname) Sets the substitute for workflows.com.saperion.connector.wf.WorkflowResultstartWorkflow(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:
getDefinitionsin 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:
getDefinitionsin 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:
getTaskin 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:
executeCommandin 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:
executeApprovein 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:
executeForwardin 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:
executeRejectin 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:
executeReworkin 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:
executeNotResponsiblein interfaceWorkflowService- Parameters:
taskId- Task IDcomment- Comment- Returns:
- Workflow result
- Throws:
WorkflowException- workflow exception- See Also:
-
executeTake
Execute take.- Specified by:
executeTakein 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:
executeRemovein 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:
executeRemoveNoticein 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:
executeHoldin 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:
executeResetHoldin 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:
executeEscalationin 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:
executeInactivatein 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:
executeActivatein 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:
executeTerminatein 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:
executeChangeOwnerin 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:
executeSetActivityin 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:
executeDelegatein 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:
executeReassignin 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:
executeAssignToMein 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:
executePutBackin 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:
setCommentin 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:
addCommentin 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:
addHistoryin 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:
startWorkflowin 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:
getMemberin 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:
getMembersin 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:
getDocHistoriesin 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:
getCommentsin 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:
getWfDisplayNamein 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:
getInboxDefinitionin interfaceWorkflowService- Returns:
- BoxDefinition for user's inbox
- Throws:
AuthenticationException- authentication exceptionSystemException- system exception- See Also:
-
isWorkflowFeatureEnabled
Description copied from interface:WorkflowServiceChecks if the workflow-feature is enabled.- Specified by:
isWorkflowFeatureEnabledin interfaceWorkflowService- Returns:
- true, if workflow-feature is enabled
- Throws:
SystemException- system exception when checking feature
-
getSubstitute
Description copied from interface:WorkflowServiceGets the fullname of the substitute for workflows of the current user.- Specified by:
getSubstitutein 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:WorkflowServiceGets the substitute-user for the current user.- Specified by:
getSubstituteUserin 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:WorkflowServiceSets the substitute for workflows.- Specified by:
setSubstitutein interfaceWorkflowService- Parameters:
substituteFullname- Fullname of the substitute to store.- Throws:
AuthenticationException- Authentication exceptionSystemException- system exception
-