Package com.saperion.connector.wf
Class SaWFTaskImpl
java.lang.Object
com.saperion.connector.wf.SaWFTaskImpl
- All Implemented Interfaces:
- SaWFTask
Implementation of the @link 
Implements the handling of all step related tasks for a
SaWFTask interface.
 Implements the handling of all step related tasks for a
TaskInfo- Author:
- rbo
- 
Constructor SummaryConstructorsConstructorDescriptionSaWFTaskImpl(SaClassicConnectorImpl connector, TaskInfo taskInfo, String user) Constructor.
- 
Method SummaryModifier and TypeMethodDescriptionvoidaddComment(String commentString, int level) Adds a comment to the workflow.voidaddHistory(String descriptionString) Adds a history entry.voidSet inactive process to active.voidexecuteApprove(ActorInfo nextActor) Approve step.voidGet task from absent user, the current user acts as substitute for.voidexecuteChangeOwner(ActorInfo newOwner) Change process owner.voidexecuteCommand(CommandInfo command, String processName, ActorInfo nextActor, String commentString, Date escalationDate, int activity) Performs the given command.voidexecuteDelegate(ActorInfo delegatee) Delegate to user.voidexecuteEscalation(Date escalationDate) Escalate step.voidexecuteForward(int transitionId, ActorInfo nextActor) Forward step.voidexecuteForward(int transitionId, ActorInfo nextActor, String reason) Forward step.voidexecuteHold(Date holdDate) Set step to hold.voidSet step to inactive.voidexecuteNotResponsible(String commentString) Not responsible for this step.voidPut step back to inbox.voidReassign task to original user after it has been taken as a substitute.voidexecuteReject(ActorInfo nextActor) Reject step.voidexecuteRemove(String removeComment) Remove step.voidRemove notice.voidResets hold.voidexecuteRework(ActorInfo nextActor) Rework step.voidexecuteSetActivity(int activity) Set next activity.voidTake step from task list.voidTerminate process.getAttachmentContent(int element) Reads the content of the attachment.Reads all possible transitions for this task.getCommandInfos(boolean transitionsOnly) Reads all possible transitions and optional other possible commands for this task.Reads the comments.Reads the process history.Reads the process history as XML.getHistoryXML(String language) Reads the process history as XML.getHistoryXML2(String language) Reads the second variant of process history as XML.getHistoryXML2(String language, boolean isAscending) Reads the second variant of process history as XML with ascending / descending switch.booleangetSync()Reads the sync status.Reads the task info object of this task.booleanReads the trusted status.intReads the metadata of the attachment.readSelectableUsersForTransition(int transition) Obtains the next tasksTaskUserSelectionfor the given transition.voidSets the actor to be used as alias for the next action.voidsetAliasActor(ActorInfo aliasActor) Sets the alias actor.voidsetComment(String commentString) Set comment to the next execute.voidsetSync(boolean isSync) Set sync parameter.voidsetTrusted(boolean isTrusted) Set trusted parameter.voidsetWorkingTime(int time) updateAttachment(Properties namevaluePairs, InputStream[] content, String versionComment, String acls) Updates the attachment in the backend system with the given metadata, acls and content.voidupdateTask(Properties values) Updates the user defined fields of this task.
- 
Constructor Details- 
SaWFTaskImplpublic SaWFTaskImpl(SaClassicConnectorImpl connector, TaskInfo taskInfo, String user) throws SaAuthenticationException, SaSystemException, SaWorkflowException Constructor.- Parameters:
- connector- Connector instance
- taskInfo- Task info
- user- User name
- Throws:
- SaWorkflowException- Workflow exception
- SaSystemException- System exception
- SaAuthenticationException- Authentication exception
 
 
- 
- 
Method Details- 
executeApproveApprove step.- Specified by:
- executeApprovein interface- SaWFTask
- Parameters:
- nextActor- Next actor
- Throws:
- SaWorkflowException- Workflow exception
- See Also:
 
- 
executeChangeOwnerChange process owner.- Specified by:
- executeChangeOwnerin interface- SaWFTask
- Parameters:
- newOwner- New owner
- Throws:
- SaWorkflowException- Workflow exception
- See Also:
 
- 
executeCommandpublic void executeCommand(CommandInfo command, String processName, ActorInfo nextActor, String commentString, Date escalationDate, int activity) throws SaWorkflowException Performs the given command. The parameters must fit to the given parameter. Unneeded parameters can be set to null.- Specified by:
- executeCommandin interface- SaWFTask
- Parameters:
- command- Required. Command object.
- processName- Optional. Process definition name.
- nextActor- Optional. Next actor / delegatee
- commentString- Optional. Comment
- escalationDate- Optional. Escalation date
- activity- Optional. Activity
- Throws:
- SaWorkflowException- Workflow exception
- See Also:
 
- 
executeDelegateDelegate to user.- Specified by:
- executeDelegatein interface- SaWFTask
- Parameters:
- delegatee- Delegatee
- Throws:
- SaWorkflowException- Workflow exception
- See Also:
 
- 
executeReassignReassign task to original user after it has been taken as a substitute.- Specified by:
- executeReassignin interface- SaWFTask
- Throws:
- SaWorkflowException- Workflow exception
- See Also:
 
- 
executeAssignToMeGet task from absent user, the current user acts as substitute for.- Specified by:
- executeAssignToMein interface- SaWFTask
- Throws:
- SaWorkflowException- Workflow exception
- See Also:
 
- 
executeEscalationEscalate step.- Specified by:
- executeEscalationin interface- SaWFTask
- Parameters:
- escalationDate- Escalation date
- Throws:
- SaWorkflowException- Workflow exception
- See Also:
 
- 
executeForwardForward step.- Specified by:
- executeForwardin interface- SaWFTask
- Parameters:
- transitionId- Transition ID
- nextActor- Next actor
- Throws:
- SaWorkflowException- Workflow exception
- See Also:
 
- 
executeForwardpublic void executeForward(int transitionId, ActorInfo nextActor, String reason) throws SaWorkflowException Forward step.- Specified by:
- executeForwardin interface- SaWFTask
- Parameters:
- transitionId- Transition ID
- nextActor- Next actor
- reason- reason for forward
- Throws:
- SaWorkflowException- Workflow exception
- See Also:
 
- 
executeHoldSet step to hold.- Specified by:
- executeHoldin interface- SaWFTask
- Parameters:
- holdDate- Hold date
- Throws:
- SaWorkflowException- Workflow exception
- See Also:
 
- 
executeResetHoldResets hold.- Specified by:
- executeResetHoldin interface- SaWFTask
- Throws:
- SaWorkflowException- Workflow exception
- See Also:
 
- 
executeNotResponsibleNot responsible for this step.- Specified by:
- executeNotResponsiblein interface- SaWFTask
- Parameters:
- commentString- Comment
- Throws:
- SaWorkflowException- Workflow exception
- See Also:
 
- 
executePutBackPut step back to inbox.- Specified by:
- executePutBackin interface- SaWFTask
- Throws:
- SaWorkflowException- Workflow exception
- See Also:
 
- 
executeRejectReject step.- Specified by:
- executeRejectin interface- SaWFTask
- Parameters:
- nextActor- Reject actor
- Throws:
- SaWorkflowException- Workflow exception
- See Also:
 
- 
executeRemoveRemove step.- Specified by:
- executeRemovein interface- SaWFTask
- Parameters:
- removeComment- Comment
- Throws:
- SaWorkflowException- Workflow exception
- See Also:
 
- 
executeRemoveNoticeRemove notice.- Specified by:
- executeRemoveNoticein interface- SaWFTask
- Throws:
- SaWorkflowException- Workflow exception
- See Also:
 
- 
executeReworkRework step.- Specified by:
- executeReworkin interface- SaWFTask
- Parameters:
- nextActor- Rework actor
- Throws:
- SaWorkflowException- Workflow exception
- See Also:
 
- 
executeActivateSet inactive process to active.- Specified by:
- executeActivatein interface- SaWFTask
- Throws:
- SaWorkflowException- Workflow exception
- See Also:
 
- 
executeSetActivitySet next activity.- Specified by:
- executeSetActivityin interface- SaWFTask
- Parameters:
- activity- Activity ID
- Throws:
- SaWorkflowException- Workflow exception
- See Also:
 
- 
executeTakeTake step from task list.- Specified by:
- executeTakein interface- SaWFTask
- Throws:
- SaWorkflowException- Workflow exception
- See Also:
 
- 
executeTerminateTerminate process.- Specified by:
- executeTerminatein interface- SaWFTask
- Throws:
- SaWorkflowException- Workflow exception
- See Also:
 
- 
executeInactivateSet step to inactive.- Specified by:
- executeInactivatein interface- SaWFTask
- Throws:
- SaWorkflowException- Workflow exception
- See Also:
 
- 
getAttachmentContentpublic InputStream getAttachmentContent(int element) throws SaSystemException, SaAuthenticationException, SaWorkflowException Reads the content of the attachment.- Specified by:
- getAttachmentContentin interface- SaWFTask
- Parameters:
- element- position in the document structure; 0 if the document is unstructured.
- Returns:
- Content stream of base document
- Throws:
- SaSystemException- SaSystemException
- SaAuthenticationException- SaAuthenticationException
- SaWorkflowException- Workflow exception
- See Also:
 
- 
getCommandInfospublic CommandInfo[] getCommandInfos() throws SaAuthenticationException, SaSystemException, SaWorkflowExceptionReads all possible transitions for this task.- Specified by:
- getCommandInfosin interface- SaWFTask
- Returns:
- Command list
- Throws:
- SaAuthenticationException- Authentication exception
- SaSystemException- System exception
- SaWorkflowException- Workflow exception
- See Also:
 
- 
getCommandInfospublic CommandInfo[] getCommandInfos(boolean transitionsOnly) throws SaAuthenticationException, SaSystemException, SaWorkflowException Reads all possible transitions and optional other possible commands for this task.- Specified by:
- getCommandInfosin interface- SaWFTask
- Parameters:
- transitionsOnly- if true, only transition commands will be returned
- Returns:
- Command list
- Throws:
- SaAuthenticationException- Authentication exception
- SaSystemException- System exception
- SaWorkflowException- Workflow exception
- See Also:
 
- 
readSelectableUsersForTransitionpublic TaskUserSelection readSelectableUsersForTransition(int transition) throws SaAuthenticationException, SaSystemException, SaWorkflowException Obtains the next tasksTaskUserSelectionfor the given transition.- Specified by:
- readSelectableUsersForTransitionin interface- SaWFTask
- Parameters:
- transition- The id of the transition one wants to obtain the user selection from.
- Returns:
- The next tasks TaskUserSelectionfor the given transition.
- Throws:
- SaAuthenticationException- if the session is not valid anymore
- SaSystemException- if an error occurred on the server
- SaWorkflowException- if a workflow specific error occurred
 
- 
getCommentsReads the comments.- Specified by:
- getCommentsin interface- SaWFTask
- Returns:
- Array of comment objects
- Throws:
- SaWorkflowException- Workflow exception
- See Also:
 
- 
getHistoryReads the process history.- Specified by:
- getHistoryin interface- SaWFTask
- Returns:
- List of history objects
- Throws:
- SaWorkflowException- Workflow exception
- See Also:
 
- 
getHistoryXMLReads the process history as XML.- Specified by:
- getHistoryXMLin interface- SaWFTask
- Returns:
- XML string of history objects
- Throws:
- SaWorkflowException- Workflow exception
- See Also:
 
- 
getHistoryXMLReads the process history as XML.- Specified by:
- getHistoryXMLin interface- SaWFTask
- Parameters:
- language- Language
- Returns:
- XML string of history objects
- Throws:
- SaWorkflowException- Workflow exception
- See Also:
 
- 
getHistoryXML2Reads the second variant of process history as XML.- Specified by:
- getHistoryXML2in interface- SaWFTask
- Parameters:
- language- Language
- Returns:
- XML string of history objects
- Throws:
- SaWorkflowException- Workflow exception
- See Also:
 
- 
getHistoryXML2Reads the second variant of process history as XML with ascending / descending switch.- Specified by:
- getHistoryXML2in interface- SaWFTask
- Parameters:
- language- Language
- isAscending- Is ascending
- Returns:
- XML string of history objects
- Throws:
- SaWorkflowException- Workflow exception
- See Also:
 
- 
getSyncReads the sync status.- Specified by:
- getSyncin interface- SaWFTask
- Returns:
- Is Synchron
- Throws:
- SaWorkflowException- Workflow exception
- See Also:
 
- 
getTrustedReads the trusted status.- Specified by:
- getTrustedin interface- SaWFTask
- Returns:
- Is trusted
- Throws:
- SaWorkflowException- Workflow exception
- See Also:
 
- 
getWorkingTime- Specified by:
- getWorkingTimein interface- SaWFTask
- Returns:
- the workingTime
- Throws:
- SaWorkflowException- Workflow exception
- See Also:
 
- 
getTaskInfoReads the task info object of this task.- Specified by:
- getTaskInfoin interface- SaWFTask
- Returns:
- TaskInfo object for this task
- Throws:
- SaWorkflowException- Workflow exception
- See Also:
 
- 
readAttachmentMetadatapublic SaPropertyValue[] readAttachmentMetadata() throws SaSystemException, SaAuthenticationException, SaDDCException, SaWorkflowExceptionReads the metadata of the attachment.- Specified by:
- readAttachmentMetadatain interface- SaWFTask
- Returns:
- Metadata array of attachment
- Throws:
- SaSystemException- SaSystemException
- SaAuthenticationException- SaAuthenticationException
- SaDDCException- SaDDCException
- SaWorkflowException- Workflow exception
- See Also:
 
- 
setAliasActorSets the alias actor.- Specified by:
- setAliasActorin interface- SaWFTask
- Parameters:
- aliasActor- Alias actor
- Throws:
- SaWorkflowException- Workflow exception
- See Also:
 
- 
setAliasSets the actor to be used as alias for the next action.- Specified by:
- setAliasin interface- SaWFTask
- Parameters:
- alias- alias actor
- Throws:
- SaWorkflowException- workflow exception
- See Also:
 
- 
addCommentpublic void addComment(String commentString, int level) throws SaAuthenticationException, SaSystemException, SaWorkflowException Adds a comment to the workflow.- Specified by:
- addCommentin interface- SaWFTask
- Parameters:
- commentString- Comment
- level- Level
- Throws:
- SaAuthenticationException- SaAuthenticationException
- SaSystemException- SaSystemException
- SaWorkflowException- Workflow exception
- See Also:
 
- 
setCommentSet comment to the next execute.- Specified by:
- setCommentin interface- SaWFTask
- Parameters:
- commentString- Comment string
- See Also:
 
- 
addHistorypublic void addHistory(String descriptionString) throws SaAuthenticationException, SaSystemException, SaWorkflowException Adds a history entry.- Specified by:
- addHistoryin interface- SaWFTask
- Parameters:
- descriptionString- Comment
- Throws:
- SaAuthenticationException- SaAuthenticationException
- SaSystemException- SaSystemException
- SaWorkflowException- Workflow exception
- See Also:
 
- 
setSyncSet sync parameter. Default is "true".- Specified by:
- setSyncin interface- SaWFTask
- Parameters:
- isSync- Synchron work
- Throws:
- SaWorkflowException- Workflow exception
- See Also:
 
- 
setTrustedSet trusted parameter. Default is "false".- Specified by:
- setTrustedin interface- SaWFTask
- Parameters:
- isTrusted- Trusted work
- Throws:
- SaWorkflowException- Workflow exception
- See Also:
 
- 
setWorkingTime- Specified by:
- setWorkingTimein interface- SaWFTask
- Parameters:
- time- the workingTime to set
- Throws:
- SaWorkflowException- Workflow exception
- See Also:
 
- 
updateAttachmentpublic SaSaveInfo updateAttachment(Properties namevaluePairs, InputStream[] content, String versionComment, String acls) throws SaSystemException, SaAuthenticationException, SaDDCException, SaWorkflowException Updates the attachment in the backend system with the given metadata, acls and content. Only the attached metadata and elements are changed. If the document was checked out, it will be automatically checked in.- Specified by:
- updateAttachmentin interface- SaWFTask
- Parameters:
- namevaluePairs- A properties object containing the metadata
- content- Multiple content data
- versionComment- The comment for the version
- acls- ACL name string
- Returns:
- SaSaveInfo SaSaveInfo object describing the document
- Throws:
- SaSystemException- SaSystemException
- SaAuthenticationException- SaAuthenticationException
- SaDDCException- SaDDCException
- SaWorkflowException- Workflow exception
- See Also:
 
- 
updateTaskUpdates the user defined fields of this task.- Specified by:
- updateTaskin interface- SaWFTask
- Parameters:
- values- Fieldvalues
- Throws:
- SaWorkflowException- Workflow exception
- See Also:
 
 
-