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
public class WorkflowConnectorService extends ClassicConnectorService implements WorkflowService
Service layer for all workflow-related functions.
-
-
Field Summary
-
Fields inherited from class com.saperion.ngc.model.ClassicConnectorService
ddcCache
-
-
Constructor Summary
Constructors Constructor Description WorkflowConnectorService()
WorkflowConnectorService(javax.servlet.http.HttpSession session)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description com.saperion.connector.wf.WorkflowResult
addComment(java.lang.String taskId, java.lang.String comment)
Execute add comment.com.saperion.connector.wf.WorkflowResult
addHistory(java.lang.String taskId, java.lang.String description)
Execute set history.com.saperion.connector.wf.WorkflowResult
executeActivate(java.lang.String taskId)
Execute activate.com.saperion.connector.wf.WorkflowResult
executeApprove(java.lang.String taskId, java.lang.String nextUser)
Execute delegate.com.saperion.connector.wf.WorkflowResult
executeAssignToMe(java.lang.String taskId)
Execute AssignToMe.com.saperion.connector.wf.WorkflowResult
executeChangeOwner(java.lang.String taskId, java.lang.String newOwner)
Execute change owner.com.saperion.connector.wf.WorkflowResult
executeCommand(WorkflowActionBean workflowAction)
Execute the given command.com.saperion.connector.wf.WorkflowResult
executeDelegate(java.lang.String taskId, java.lang.String delegatee)
Execute delegate.com.saperion.connector.wf.WorkflowResult
executeEscalation(java.lang.String taskId, java.util.Date date)
Execute escalate.com.saperion.connector.wf.WorkflowResult
executeForward(java.lang.String taskId, java.lang.String nextUser, int transition)
Execute forward.com.saperion.connector.wf.WorkflowResult
executeHold(java.lang.String taskId, java.util.Date date)
Execute hold.com.saperion.connector.wf.WorkflowResult
executeInactivate(java.lang.String taskId)
Execute inactivate.com.saperion.connector.wf.WorkflowResult
executeNotResponsible(java.lang.String taskId, java.lang.String comment)
Execute not responsible.com.saperion.connector.wf.WorkflowResult
executePutBack(java.lang.String taskId)
Execute putback.com.saperion.connector.wf.WorkflowResult
executeReassign(java.lang.String taskId)
Execute reassign.com.saperion.connector.wf.WorkflowResult
executeReject(java.lang.String taskId, java.lang.String nextUser)
Execute reject.com.saperion.connector.wf.WorkflowResult
executeRemove(java.lang.String taskId, java.lang.String comment)
Execute remove.com.saperion.connector.wf.WorkflowResult
executeRemoveNotice(java.lang.String taskId)
Execute remove notice.com.saperion.connector.wf.WorkflowResult
executeResetHold(java.lang.String taskId)
Execute reset hold.com.saperion.connector.wf.WorkflowResult
executeRework(java.lang.String taskId, java.lang.String nextUser)
Execute rework.com.saperion.connector.wf.WorkflowResult
executeSetActivity(java.lang.String taskId, int activity)
Execute set activity.com.saperion.connector.wf.WorkflowResult
executeTake(java.lang.String taskId)
Execute take.com.saperion.connector.wf.WorkflowResult
executeTerminate(java.lang.String taskId)
Execute terminate.java.util.List<com.saperion.intf.wf.CommentInfo>
getComments(com.saperion.intf.wf.TaskInfo taskInfo)
Retrieves the comments for the specified task.java.util.List<java.lang.String>
getDefinitions()
Reads the available workflow definitions.java.util.List<com.saperion.wf.ProcessDefinitionDescriptor>
getDefinitions(java.lang.String ddcName)
Reads the available workflow definitions for the specified DDC.java.util.List<com.saperion.intf.wf.HistoryInfo[]>
getDocHistories(java.lang.String docHdoc)
Reads history information for a given document.com.saperion.intf.wf.BoxDefinition
getInboxDefinition()
Retrieves the definition of the current user's inbox.com.saperion.intf.wf.WorkflowMember
getMember(com.saperion.intf.wf.WorkflowMember member, int depth, java.lang.String filter)
Reads direct workflow member.com.saperion.intf.wf.WorkflowMember
getMembers()
Reads workflow member.java.lang.String
getSubstitute()
Gets the fullname of the substitute for workflows of the current user.com.saperion.jcs.modules.users.api.User
getSubstituteUser()
Gets the substitute-user for the current user.com.saperion.connector.wf.SaWFTask
getTask(java.lang.String taskId)
Load the task object.java.lang.String
getWfDisplayName(com.saperion.intf.wf.WorkflowMember member)
Retrieves the comments for the specified task.boolean
isWorkflowFeatureEnabled()
Checks if the workflow-feature is enabled.com.saperion.connector.wf.WorkflowResult
setComment(java.lang.String taskId, java.lang.String comment)
Execute set comment.void
setSubstitute(java.lang.String substituteFullname)
Sets the substitute for workflows.com.saperion.connector.wf.WorkflowResult
startWorkflow(java.lang.String definition, java.lang.String actor, java.lang.String comment, java.lang.String attachmentUID)
Execute start workflow.-
Methods inherited from class com.saperion.ngc.model.ClassicConnectorService
convertAuthenticationException, getCachedDDC, getConnectionProvider, getCurrentUserFromSession, getSession, getWfConnectionProvider, isActive
-
-
-
-
Method Detail
-
getDefinitions
public java.util.List<java.lang.String> getDefinitions() throws AuthenticationException, SystemException, WorkflowException
Reads the available workflow definitions.- Specified by:
getDefinitions
in interfaceWorkflowService
- Returns:
- Workflow definitions
- Throws:
AuthenticationException
- authentication exceptionSystemException
- system exceptionWorkflowException
- workflow exception- See Also:
WorkflowService.getDefinitions()
-
getDefinitions
public java.util.List<com.saperion.wf.ProcessDefinitionDescriptor> getDefinitions(java.lang.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:
WorkflowService.getDefinitions(java.lang.String)
-
getTask
public com.saperion.connector.wf.SaWFTask getTask(java.lang.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:
WorkflowService.getTask(java.lang.String)
-
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:
WorkflowService.executeCommand( com.saperion.ngc.resultset.WorkflowActionBean)
-
executeApprove
public com.saperion.connector.wf.WorkflowResult executeApprove(java.lang.String taskId, java.lang.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:
WorkflowService.executeApprove(java.lang.String, java.lang.String)
-
executeForward
public com.saperion.connector.wf.WorkflowResult executeForward(java.lang.String taskId, java.lang.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:
WorkflowService.executeForward(java.lang.String, java.lang.String, int)
-
executeReject
public com.saperion.connector.wf.WorkflowResult executeReject(java.lang.String taskId, java.lang.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:
WorkflowService.executeReject(java.lang.String, java.lang.String)
-
executeRework
public com.saperion.connector.wf.WorkflowResult executeRework(java.lang.String taskId, java.lang.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:
WorkflowService.executeRework(java.lang.String, java.lang.String)
-
executeNotResponsible
public com.saperion.connector.wf.WorkflowResult executeNotResponsible(java.lang.String taskId, java.lang.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:
WorkflowService.executeNotResponsible(java.lang.String, java.lang.String)
-
executeTake
public com.saperion.connector.wf.WorkflowResult executeTake(java.lang.String taskId) throws WorkflowException
Execute take.- Specified by:
executeTake
in interfaceWorkflowService
- Parameters:
taskId
- Task ID- Returns:
- Workflow result
- Throws:
WorkflowException
- workflow exception- See Also:
WorkflowService.executeTake(java.lang.String)
-
executeRemove
public com.saperion.connector.wf.WorkflowResult executeRemove(java.lang.String taskId, java.lang.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:
WorkflowService.executeRemove(java.lang.String, java.lang.String)
-
executeRemoveNotice
public com.saperion.connector.wf.WorkflowResult executeRemoveNotice(java.lang.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:
WorkflowService.executeRemoveNotice(java.lang.String)
-
executeHold
public com.saperion.connector.wf.WorkflowResult executeHold(java.lang.String taskId, java.util.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:
WorkflowService.executeHold(java.lang.String, java.util.Date)
-
executeResetHold
public com.saperion.connector.wf.WorkflowResult executeResetHold(java.lang.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:
WorkflowService.executeResetHold(java.lang.String)
-
executeEscalation
public com.saperion.connector.wf.WorkflowResult executeEscalation(java.lang.String taskId, java.util.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:
WorkflowService.executeEscalation(java.lang.String, java.util.Date)
-
executeInactivate
public com.saperion.connector.wf.WorkflowResult executeInactivate(java.lang.String taskId) throws WorkflowException
Execute inactivate.- Specified by:
executeInactivate
in interfaceWorkflowService
- Parameters:
taskId
- Task ID- Returns:
- Workflow result
- Throws:
WorkflowException
- workflow exception- See Also:
WorkflowService.executeInactivate(java.lang.String)
-
executeActivate
public com.saperion.connector.wf.WorkflowResult executeActivate(java.lang.String taskId) throws WorkflowException
Execute activate.- Specified by:
executeActivate
in interfaceWorkflowService
- Parameters:
taskId
- Task ID- Returns:
- Workflow result
- Throws:
WorkflowException
- workflow exception- See Also:
WorkflowService.executeActivate(java.lang.String)
-
executeTerminate
public com.saperion.connector.wf.WorkflowResult executeTerminate(java.lang.String taskId) throws WorkflowException
Execute terminate.- Specified by:
executeTerminate
in interfaceWorkflowService
- Parameters:
taskId
- Task ID- Returns:
- Workflow result
- Throws:
WorkflowException
- workflow exception- See Also:
WorkflowService.executeTerminate(java.lang.String)
-
executeChangeOwner
public com.saperion.connector.wf.WorkflowResult executeChangeOwner(java.lang.String taskId, java.lang.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:
WorkflowService.executeChangeOwner(java.lang.String, java.lang.String)
-
executeSetActivity
public com.saperion.connector.wf.WorkflowResult executeSetActivity(java.lang.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:
WorkflowService.executeSetActivity(java.lang.String, int)
-
executeDelegate
public com.saperion.connector.wf.WorkflowResult executeDelegate(java.lang.String taskId, java.lang.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:
WorkflowService.executeDelegate(java.lang.String, java.lang.String)
-
executeReassign
public com.saperion.connector.wf.WorkflowResult executeReassign(java.lang.String taskId) throws WorkflowException
Execute reassign.- Specified by:
executeReassign
in interfaceWorkflowService
- Parameters:
taskId
- Task ID- Returns:
- Workflow result
- Throws:
WorkflowException
- workflow exception- See Also:
WorkflowService.executeReassign(java.lang.String)
-
executeAssignToMe
public com.saperion.connector.wf.WorkflowResult executeAssignToMe(java.lang.String taskId) throws WorkflowException
Execute AssignToMe.- Specified by:
executeAssignToMe
in interfaceWorkflowService
- Parameters:
taskId
- Task ID- Returns:
- Workflow result
- Throws:
WorkflowException
- workflow exception- See Also:
WorkflowService.executeAssignToMe(java.lang.String)
-
executePutBack
public com.saperion.connector.wf.WorkflowResult executePutBack(java.lang.String taskId) throws WorkflowException
Execute putback.- Specified by:
executePutBack
in interfaceWorkflowService
- Parameters:
taskId
- Task ID- Returns:
- Workflow result
- Throws:
WorkflowException
- workflow exception- See Also:
WorkflowService.executePutBack(java.lang.String)
-
setComment
public com.saperion.connector.wf.WorkflowResult setComment(java.lang.String taskId, java.lang.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:
WorkflowService.setComment(java.lang.String, java.lang.String)
-
addComment
public com.saperion.connector.wf.WorkflowResult addComment(java.lang.String taskId, java.lang.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:
WorkflowService.addComment(java.lang.String, java.lang.String)
-
addHistory
public com.saperion.connector.wf.WorkflowResult addHistory(java.lang.String taskId, java.lang.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:
WorkflowService.addHistory(java.lang.String, java.lang.String)
-
startWorkflow
public com.saperion.connector.wf.WorkflowResult startWorkflow(java.lang.String definition, java.lang.String actor, java.lang.String comment, java.lang.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:
WorkflowService.startWorkflow(java.lang.String, java.lang.String, java.lang.String, java.lang.String)
-
getMember
public com.saperion.intf.wf.WorkflowMember getMember(com.saperion.intf.wf.WorkflowMember member, int depth, java.lang.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:
WorkflowService.getMember(com.saperion.intf.wf.WorkflowMember, int, java.lang.String)
-
getMembers
public com.saperion.intf.wf.WorkflowMember getMembers() throws WorkflowException, SystemException
Reads workflow member.- Specified by:
getMembers
in interfaceWorkflowService
- Returns:
- Member tree
- Throws:
WorkflowException
- workflow exceptionSystemException
- system exception- See Also:
WorkflowService.getMembers()
-
getDocHistories
public java.util.List<com.saperion.intf.wf.HistoryInfo[]> getDocHistories(java.lang.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:
WorkflowService.getDocHistories(java.lang.String)
-
getComments
public java.util.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:
WorkflowService.getComments(com.saperion.intf.wf.TaskInfo)
-
getWfDisplayName
public java.lang.String getWfDisplayName(com.saperion.intf.wf.WorkflowMember member)
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:
WorkflowService.getWfDisplayName(WorkflowMember)
-
getInboxDefinition
public com.saperion.intf.wf.BoxDefinition getInboxDefinition() throws AuthenticationException, SystemException
Retrieves 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:
WorkflowService.getInboxDefinition()
-
isWorkflowFeatureEnabled
public boolean isWorkflowFeatureEnabled() throws SystemException
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
public java.lang.String getSubstitute() throws AuthenticationException, SystemException
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, SystemException
Description 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(java.lang.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
-
-