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.WorkflowResultaddComment(java.lang.String taskId, java.lang.String comment)Execute add comment.com.saperion.connector.wf.WorkflowResultaddHistory(java.lang.String taskId, java.lang.String description)Execute set history.com.saperion.connector.wf.WorkflowResultexecuteActivate(java.lang.String taskId)Execute activate.com.saperion.connector.wf.WorkflowResultexecuteApprove(java.lang.String taskId, java.lang.String nextUser)Execute delegate.com.saperion.connector.wf.WorkflowResultexecuteAssignToMe(java.lang.String taskId)Execute AssignToMe.com.saperion.connector.wf.WorkflowResultexecuteChangeOwner(java.lang.String taskId, java.lang.String newOwner)Execute change owner.com.saperion.connector.wf.WorkflowResultexecuteCommand(WorkflowActionBean workflowAction)Execute the given command.com.saperion.connector.wf.WorkflowResultexecuteDelegate(java.lang.String taskId, java.lang.String delegatee)Execute delegate.com.saperion.connector.wf.WorkflowResultexecuteEscalation(java.lang.String taskId, java.util.Date date)Execute escalate.com.saperion.connector.wf.WorkflowResultexecuteForward(java.lang.String taskId, java.lang.String nextUser, int transition)Execute forward.com.saperion.connector.wf.WorkflowResultexecuteHold(java.lang.String taskId, java.util.Date date)Execute hold.com.saperion.connector.wf.WorkflowResultexecuteInactivate(java.lang.String taskId)Execute inactivate.com.saperion.connector.wf.WorkflowResultexecuteNotResponsible(java.lang.String taskId, java.lang.String comment)Execute not responsible.com.saperion.connector.wf.WorkflowResultexecutePutBack(java.lang.String taskId)Execute putback.com.saperion.connector.wf.WorkflowResultexecuteReassign(java.lang.String taskId)Execute reassign.com.saperion.connector.wf.WorkflowResultexecuteReject(java.lang.String taskId, java.lang.String nextUser)Execute reject.com.saperion.connector.wf.WorkflowResultexecuteRemove(java.lang.String taskId, java.lang.String comment)Execute remove.com.saperion.connector.wf.WorkflowResultexecuteRemoveNotice(java.lang.String taskId)Execute remove notice.com.saperion.connector.wf.WorkflowResultexecuteResetHold(java.lang.String taskId)Execute reset hold.com.saperion.connector.wf.WorkflowResultexecuteRework(java.lang.String taskId, java.lang.String nextUser)Execute rework.com.saperion.connector.wf.WorkflowResultexecuteSetActivity(java.lang.String taskId, int activity)Execute set activity.com.saperion.connector.wf.WorkflowResultexecuteTake(java.lang.String taskId)Execute take.com.saperion.connector.wf.WorkflowResultexecuteTerminate(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.BoxDefinitiongetInboxDefinition()Retrieves the definition of the current user's inbox.com.saperion.intf.wf.WorkflowMembergetMember(com.saperion.intf.wf.WorkflowMember member, int depth, java.lang.String filter)Reads direct workflow member.com.saperion.intf.wf.WorkflowMembergetMembers()Reads workflow member.java.lang.StringgetSubstitute()Gets the fullname of the substitute for workflows of the current user.com.saperion.jcs.modules.users.api.UsergetSubstituteUser()Gets the substitute-user for the current user.com.saperion.connector.wf.SaWFTaskgetTask(java.lang.String taskId)Load the task object.java.lang.StringgetWfDisplayName(com.saperion.intf.wf.WorkflowMember member)Retrieves the comments for the specified task.booleanisWorkflowFeatureEnabled()Checks if the workflow-feature is enabled.com.saperion.connector.wf.WorkflowResultsetComment(java.lang.String taskId, java.lang.String comment)Execute set comment.voidsetSubstitute(java.lang.String substituteFullname)Sets the substitute for workflows.com.saperion.connector.wf.WorkflowResultstartWorkflow(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, WorkflowExceptionReads the available workflow definitions.- Specified by:
getDefinitionsin 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, WorkflowExceptionReads 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:
WorkflowService.getDefinitions(java.lang.String)
-
getTask
public com.saperion.connector.wf.SaWFTask getTask(java.lang.String taskId) throws AuthenticationException, SystemException, WorkflowExceptionLoad the task object.- Specified by:
getTaskin 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:
executeCommandin 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 WorkflowExceptionExecute delegate.- Specified by:
executeApprovein 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 WorkflowExceptionExecute forward.- Specified by:
executeForwardin 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 WorkflowExceptionExecute reject.- Specified by:
executeRejectin 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 WorkflowExceptionExecute rework.- Specified by:
executeReworkin 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 WorkflowExceptionExecute not responsible.- Specified by:
executeNotResponsiblein 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 WorkflowExceptionExecute take.- Specified by:
executeTakein 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 WorkflowExceptionExecute remove.- Specified by:
executeRemovein 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 WorkflowExceptionExecute remove notice.- Specified by:
executeRemoveNoticein 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 WorkflowExceptionExecute hold.- Specified by:
executeHoldin 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 WorkflowExceptionExecute reset hold.- Specified by:
executeResetHoldin 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 WorkflowExceptionExecute escalate.- Specified by:
executeEscalationin 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 WorkflowExceptionExecute inactivate.- Specified by:
executeInactivatein 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 WorkflowExceptionExecute activate.- Specified by:
executeActivatein 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 WorkflowExceptionExecute terminate.- Specified by:
executeTerminatein 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 WorkflowExceptionExecute change owner.- Specified by:
executeChangeOwnerin 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 WorkflowExceptionExecute set activity.- Specified by:
executeSetActivityin 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 WorkflowExceptionExecute delegate.- Specified by:
executeDelegatein 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 WorkflowExceptionExecute reassign.- Specified by:
executeReassignin 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 WorkflowExceptionExecute AssignToMe.- Specified by:
executeAssignToMein 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 WorkflowExceptionExecute putback.- Specified by:
executePutBackin 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 WorkflowExceptionExecute set comment.- Specified by:
setCommentin 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 WorkflowExceptionExecute add comment.- Specified by:
addCommentin 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, AuthenticationExceptionExecute set history.- Specified by:
addHistoryin 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 WorkflowExceptionExecute start workflow.- Specified by:
startWorkflowin 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, SystemExceptionReads 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:
WorkflowService.getMember(com.saperion.intf.wf.WorkflowMember, int, java.lang.String)
-
getMembers
public com.saperion.intf.wf.WorkflowMember getMembers() throws WorkflowException, SystemExceptionReads workflow member.- Specified by:
getMembersin 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 WorkflowExceptionReads 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:
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, WorkflowExceptionRetrieves 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:
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:
getWfDisplayNamein 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, 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:
WorkflowService.getInboxDefinition()
-
isWorkflowFeatureEnabled
public boolean isWorkflowFeatureEnabled() throws SystemExceptionDescription 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
public java.lang.String getSubstitute() throws AuthenticationException, SystemExceptionDescription 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(java.lang.String substituteFullname) throws AuthenticationException, SystemExceptionDescription 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
-
-