Package com.saperion.connector.wf
Interface SaWFTask
- All Known Implementing Classes:
SaWFTaskImpl
public interface SaWFTask
Class for handling all step related tasks.
- Author:
- rbo
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addComment
(String comment, int level) Adds a comment to the workflow.void
addHistory
(String description) Adds a history entry.void
Set inactive process to active.void
executeApprove
(ActorInfo nextActor) Approve step.void
Get task from absent user, the current user acts as substitute for.void
executeChangeOwner
(ActorInfo newOwner) Change process owner.void
executeCommand
(CommandInfo command, String definition, ActorInfo nextActor, String comment, Date escalationDate, int activity) Performs the given command.void
executeDelegate
(ActorInfo delegatee) Delegate to user.void
executeEscalation
(Date escalationDate) Escalate step.void
executeForward
(int transitionId, ActorInfo nextActor) Forward step.void
executeForward
(int transitionId, ActorInfo nextActor, String reason) Forward step.void
executeHold
(Date holdDate) Set step to hold.void
Set step to inactive.void
executeNotResponsible
(String comment) Not responsible for this step.void
Put step back to inbox.void
Reassign task to original user after it has been taken as a substitute.void
executeReject
(ActorInfo nextActor) Reject step.void
executeRemove
(String comment) Remove step.void
Remove notice.void
Resets hold.void
executeRework
(ActorInfo nextActor) Rework step.void
executeSetActivity
(int activity) Set next activity.void
Take step from task list.void
Terminate 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.boolean
getSync()
Reads the sync status.Reads the task info object of this task.boolean
Reads the trusted status.int
Reads the metadata of the attachment.readSelectableUsersForTransition
(int transition) Obtains the next tasksTaskUserSelection
for the given transition.void
Sets the actor to be used as alias for the next action.void
setAliasActor
(ActorInfo aliasActor) Deprecated.this method actually sets the next actor by overwriting the nextActor field.void
setComment
(String comment) Set comment to the next execute.void
setSync
(boolean isSync) Set sync parameter.void
setTrusted
(boolean isTrusted) Set trusted parameter.void
setWorkingTime
(int workingTime) updateAttachment
(Properties namevaluePairs, InputStream[] content, String versionComment, String acls) Updates the attachment in the backend system with the given metadata, acls and content.void
updateTask
(Properties values) Updates the user defined fields of this task.
-
Method Details
-
getTaskInfo
Reads the task info object of this task.- Returns:
- TaskInfo object for this task
- Throws:
SaWorkflowException
- Workflow exception
-
readAttachmentMetadata
SaPropertyValue[] readAttachmentMetadata() throws SaSystemException, SaAuthenticationException, SaDDCException, SaWorkflowExceptionReads the metadata of the attachment.- Returns:
- Metadata array of attachment
- Throws:
SaSystemException
- SaSystemExceptionSaAuthenticationException
- SaAuthenticationExceptionSaDDCException
- SaDDCExceptionSaWorkflowException
- Workflow exception
-
getAttachmentContent
InputStream getAttachmentContent(int element) throws SaSystemException, SaAuthenticationException, SaWorkflowException Reads the content of the attachment.- Parameters:
element
- position in the document structure; 0 if the document is unstructured.- Returns:
- Content stream of base document
- Throws:
SaSystemException
- SaSystemExceptionSaAuthenticationException
- SaAuthenticationExceptionSaWorkflowException
- Workflow exception
-
updateAttachment
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.- Parameters:
namevaluePairs
- A properties object containing the metadatacontent
- Multiple content dataversionComment
- The comment for the versionacls
- ACL name string- Returns:
- SaSaveInfo SaSaveInfo object describing the document
- Throws:
SaSystemException
- SaSystemExceptionSaAuthenticationException
- SaAuthenticationExceptionSaDDCException
- SaDDCExceptionSaWorkflowException
- Workflow exception
-
getComments
Reads the comments.- Returns:
- Array of comment objects
- Throws:
SaWorkflowException
- Workflow exception
-
addComment
void addComment(String comment, int level) throws SaSystemException, SaAuthenticationException, SaWorkflowException Adds a comment to the workflow.- Parameters:
comment
- Commentlevel
- Level- Throws:
SaSystemException
- SaSystemExceptionSaAuthenticationException
- SaAuthenticationExceptionSaWorkflowException
- Workflow exception
-
setComment
Set comment to the next execute.- Parameters:
comment
- Comment string
-
addHistory
void addHistory(String description) throws SaSystemException, SaAuthenticationException, SaWorkflowException Adds a history entry.- Parameters:
description
- Comment- Throws:
SaSystemException
- SaSystemExceptionSaAuthenticationException
- SaAuthenticationExceptionSaWorkflowException
- Workflow exception
-
getHistory
Reads the process history.- Returns:
- List of history objects
- Throws:
SaWorkflowException
- Workflow exception
-
getHistoryXML
Reads the process history as XML.- Returns:
- XML string of history objects
- Throws:
SaWorkflowException
- Workflow exception
-
getHistoryXML
Reads the process history as XML.- Parameters:
language
- Language- Returns:
- XML string of history objects
- Throws:
SaWorkflowException
- Workflow exception
-
getHistoryXML2
Reads the second variant of process history as XML.- Parameters:
language
- Language- Returns:
- XML string of history objects
- Throws:
SaWorkflowException
- Workflow exception
-
getHistoryXML2
Reads the second variant of process history as XML with ascending / descending switch.- Parameters:
language
- LanguageisAscending
- Is ascending- Returns:
- XML string of history objects
- Throws:
SaWorkflowException
- Workflow exception
-
setSync
Set sync parameter. Default is "true".- Parameters:
isSync
- Synchron work- Throws:
SaWorkflowException
- Workflow exception
-
getSync
Reads the sync status.- Returns:
- Is Synchron
- Throws:
SaWorkflowException
- Workflow exception
-
setTrusted
Set trusted parameter. Default is "false".- Parameters:
isTrusted
- Trusted work- Throws:
SaWorkflowException
- Workflow exception
-
getTrusted
Reads the trusted status.- Returns:
- Is trusted
- Throws:
SaWorkflowException
- Workflow exception
-
setWorkingTime
- Parameters:
workingTime
- the workingTime to set- Throws:
SaWorkflowException
- Workflow exception
-
getWorkingTime
- Returns:
- the workingTime
- Throws:
SaWorkflowException
- Workflow exception
-
setAliasActor
Deprecated.this method actually sets the next actor by overwriting the nextActor field. UsesetAlias(ActorInfo)
instead. Will be removed in 8.1.Sets the alias actor.- Parameters:
aliasActor
- Alias actor- Throws:
SaWorkflowException
- Workflow exception
-
setAlias
Sets the actor to be used as alias for the next action.- Parameters:
alias
- alias actor- Throws:
SaWorkflowException
- workflow exception
-
getCommandInfos
CommandInfo[] getCommandInfos() throws SaAuthenticationException, SaSystemException, SaWorkflowExceptionReads all possible transitions for this task.- Returns:
- Command list
- Throws:
SaSystemException
- System exceptionSaAuthenticationException
- Authentication exceptionSaWorkflowException
- Workflow exception
-
getCommandInfos
CommandInfo[] getCommandInfos(boolean transitionsOnly) throws SaAuthenticationException, SaSystemException, SaWorkflowException Reads all possible transitions and optional other possible commands for this task.- Parameters:
transitionsOnly
- if true, only transition commands will be returned- Returns:
- Command list
- Throws:
SaSystemException
- System exceptionSaAuthenticationException
- Authentication exceptionSaWorkflowException
- Workflow exception
-
readSelectableUsersForTransition
TaskUserSelection readSelectableUsersForTransition(int transition) throws SaAuthenticationException, SaSystemException, SaWorkflowException Obtains the next tasksTaskUserSelection
for the given transition.- Parameters:
transition
- The id of the transition one wants to obtain the user selection from.- Returns:
- The next tasks
TaskUserSelection
for the given transition. - Throws:
SaAuthenticationException
- if the session is not valid anymoreSaSystemException
- if an error occurred on the serverSaWorkflowException
- if a workflow specific error occurredIllegalArgumentException
- if the given CommandInfo does not represent a transition.
-
executeCommand
void executeCommand(CommandInfo command, String definition, ActorInfo nextActor, String comment, 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.- Parameters:
command
- Required. Command object.definition
- Optional. Process definition name.nextActor
- Optional. Next actor / delegateecomment
- Optional. CommentescalationDate
- Optional. Escalation dateactivity
- Optional. Activity- Throws:
SaWorkflowException
- Workflow exception
-
executeForward
Forward step.- Parameters:
transitionId
- Transition IDnextActor
- Next actor- Throws:
SaWorkflowException
- Workflow exception
-
executeForward
void executeForward(int transitionId, ActorInfo nextActor, String reason) throws SaWorkflowException Forward step.- Parameters:
transitionId
- Transition IDnextActor
- Next actorreason
- reason for forward- Throws:
SaWorkflowException
- Workflow exception
-
executeApprove
Approve step.- Parameters:
nextActor
- Next actor- Throws:
SaWorkflowException
- Workflow exception
-
executeReject
Reject step.- Parameters:
nextActor
- Reject actor- Throws:
SaWorkflowException
- Workflow exception
-
executeRework
Rework step.- Parameters:
nextActor
- Rework actor- Throws:
SaWorkflowException
- Workflow exception
-
executeNotResponsible
Not responsible for this step.- Parameters:
comment
- Comment- Throws:
SaWorkflowException
- Workflow exception
-
executeTake
Take step from task list.- Throws:
SaWorkflowException
- Workflow exception
-
executeRemove
Remove step.- Parameters:
comment
- Comment- Throws:
SaWorkflowException
- Workflow exception
-
executeRemoveNotice
Remove notice.- Throws:
SaWorkflowException
- Workflow exception
-
executeHold
Set step to hold.- Parameters:
holdDate
- Hold date- Throws:
SaWorkflowException
- Workflow exception
-
executeResetHold
Resets hold.- Throws:
SaWorkflowException
- Workflow exception
-
executeEscalation
Escalate step.- Parameters:
escalationDate
- Escalation date- Throws:
SaWorkflowException
- Workflow exception
-
executeInactivate
Set step to inactive.- Throws:
SaWorkflowException
- Workflow exception
-
executeActivate
Set inactive process to active.- Throws:
SaWorkflowException
- Workflow exception
-
executeTerminate
Terminate process.- Throws:
SaWorkflowException
- Workflow exception
-
executeChangeOwner
Change process owner.- Parameters:
newOwner
- New owner- Throws:
SaWorkflowException
- Workflow exception
-
executeSetActivity
Set next activity.- Parameters:
activity
- Activity ID- Throws:
SaWorkflowException
- Workflow exception
-
executeDelegate
Delegate to user.- Parameters:
delegatee
- Delegatee- Throws:
SaWorkflowException
- Workflow exception
-
executeReassign
Reassign task to original user after it has been taken as a substitute.- Throws:
SaWorkflowException
- Workflow exception
-
executeAssignToMe
Get task from absent user, the current user acts as substitute for.- Throws:
SaWorkflowException
- Workflow exception
-
executePutBack
Put step back to inbox.- Throws:
SaWorkflowException
- Workflow exception
-
updateTask
Updates the user defined fields of this task.- Parameters:
values
- Fieldvalues- Throws:
SaWorkflowException
- Workflow exception
-