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
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description void
addComment(java.lang.String comment, int level)
Adds a comment to the workflow.void
addHistory(java.lang.String description)
Adds a history entry.void
executeActivate()
Set inactive process to active.void
executeApprove(ActorInfo nextActor)
Approve step.void
executeAssignToMe()
Get task from absent user, the current user acts as substitute for.void
executeChangeOwner(ActorInfo newOwner)
Change process owner.void
executeCommand(CommandInfo command, java.lang.String definition, ActorInfo nextActor, java.lang.String comment, java.util.Date escalationDate, int activity)
Performs the given command.void
executeDelegate(ActorInfo delegatee)
Delegate to user.void
executeEscalation(java.util.Date escalationDate)
Escalate step.void
executeForward(int transitionId, ActorInfo nextActor)
Forward step.void
executeForward(int transitionId, ActorInfo nextActor, java.lang.String reason)
Forward step.void
executeHold(java.util.Date holdDate)
Set step to hold.void
executeInactivate()
Set step to inactive.void
executeNotResponsible(java.lang.String comment)
Not responsible for this step.void
executePutBack()
Put step back to inbox.void
executeReassign()
Reassign task to original user after it has been taken as a substitute.void
executeReject(ActorInfo nextActor)
Reject step.void
executeRemove(java.lang.String comment)
Remove step.void
executeRemoveNotice()
Remove notice.void
executeResetHold()
Resets hold.void
executeRework(ActorInfo nextActor)
Rework step.void
executeSetActivity(int activity)
Set next activity.void
executeTake()
Take step from task list.void
executeTerminate()
Terminate process.java.io.InputStream
getAttachmentContent(int element)
Reads the content of the attachment.CommandInfo[]
getCommandInfos()
Reads all possible transitions for this task.CommandInfo[]
getCommandInfos(boolean transitionsOnly)
Reads all possible transitions and optional other possible commands for this task.CommentInfo[]
getComments()
Reads the comments.HistoryInfo[]
getHistory()
Reads the process history.java.lang.String
getHistoryXML()
Reads the process history as XML.java.lang.String
getHistoryXML(java.lang.String language)
Reads the process history as XML.java.lang.String
getHistoryXML2(java.lang.String language)
Reads the second variant of process history as XML.java.lang.String
getHistoryXML2(java.lang.String language, boolean isAscending)
Reads the second variant of process history as XML with ascending / descending switch.boolean
getSync()
Reads the sync status.TaskInfo
getTaskInfo()
Reads the task info object of this task.boolean
getTrusted()
Reads the trusted status.int
getWorkingTime()
SaPropertyValue[]
readAttachmentMetadata()
Reads the metadata of the attachment.TaskUserSelection
readSelectableUsersForTransition(int transition)
Obtains the next tasksTaskUserSelection
for the given transition.void
setAlias(ActorInfo alias)
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(java.lang.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)
SaSaveInfo
updateAttachment(java.util.Properties namevaluePairs, java.io.InputStream[] content, java.lang.String versionComment, java.lang.String acls)
Updates the attachment in the backend system with the given metadata, acls and content.void
updateTask(java.util.Properties values)
Updates the user defined fields of this task.
-
-
-
Method Detail
-
getTaskInfo
TaskInfo getTaskInfo() throws SaWorkflowException
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, SaWorkflowException
Reads the metadata of the attachment.- Returns:
- Metadata array of attachment
- Throws:
SaSystemException
- SaSystemExceptionSaAuthenticationException
- SaAuthenticationExceptionSaDDCException
- SaDDCExceptionSaWorkflowException
- Workflow exception
-
getAttachmentContent
java.io.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(java.util.Properties namevaluePairs, java.io.InputStream[] content, java.lang.String versionComment, java.lang.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
CommentInfo[] getComments() throws SaWorkflowException
Reads the comments.- Returns:
- Array of comment objects
- Throws:
SaWorkflowException
- Workflow exception
-
addComment
void addComment(java.lang.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
void setComment(java.lang.String comment)
Set comment to the next execute.- Parameters:
comment
- Comment string
-
addHistory
void addHistory(java.lang.String description) throws SaSystemException, SaAuthenticationException, SaWorkflowException
Adds a history entry.- Parameters:
description
- Comment- Throws:
SaSystemException
- SaSystemExceptionSaAuthenticationException
- SaAuthenticationExceptionSaWorkflowException
- Workflow exception
-
getHistory
HistoryInfo[] getHistory() throws SaWorkflowException
Reads the process history.- Returns:
- List of history objects
- Throws:
SaWorkflowException
- Workflow exception
-
getHistoryXML
java.lang.String getHistoryXML() throws SaWorkflowException
Reads the process history as XML.- Returns:
- XML string of history objects
- Throws:
SaWorkflowException
- Workflow exception
-
getHistoryXML
java.lang.String getHistoryXML(java.lang.String language) throws SaWorkflowException
Reads the process history as XML.- Parameters:
language
- Language- Returns:
- XML string of history objects
- Throws:
SaWorkflowException
- Workflow exception
-
getHistoryXML2
java.lang.String getHistoryXML2(java.lang.String language) throws SaWorkflowException
Reads the second variant of process history as XML.- Parameters:
language
- Language- Returns:
- XML string of history objects
- Throws:
SaWorkflowException
- Workflow exception
-
getHistoryXML2
java.lang.String getHistoryXML2(java.lang.String language, boolean isAscending) throws SaWorkflowException
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
void setSync(boolean isSync) throws SaWorkflowException
Set sync parameter. Default is "true".- Parameters:
isSync
- Synchron work- Throws:
SaWorkflowException
- Workflow exception
-
getSync
boolean getSync() throws SaWorkflowException
Reads the sync status.- Returns:
- Is Synchron
- Throws:
SaWorkflowException
- Workflow exception
-
setTrusted
void setTrusted(boolean isTrusted) throws SaWorkflowException
Set trusted parameter. Default is "false".- Parameters:
isTrusted
- Trusted work- Throws:
SaWorkflowException
- Workflow exception
-
getTrusted
boolean getTrusted() throws SaWorkflowException
Reads the trusted status.- Returns:
- Is trusted
- Throws:
SaWorkflowException
- Workflow exception
-
setWorkingTime
void setWorkingTime(int workingTime) throws SaWorkflowException
- Parameters:
workingTime
- the workingTime to set- Throws:
SaWorkflowException
- Workflow exception
-
getWorkingTime
int getWorkingTime() throws SaWorkflowException
- Returns:
- the workingTime
- Throws:
SaWorkflowException
- Workflow exception
-
setAliasActor
@Deprecated void setAliasActor(ActorInfo aliasActor) throws SaWorkflowException
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
void setAlias(ActorInfo alias) throws SaWorkflowException
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, SaWorkflowException
Reads 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 occurredjava.lang.IllegalArgumentException
- if the given CommandInfo does not represent a transition.
-
executeCommand
void executeCommand(CommandInfo command, java.lang.String definition, ActorInfo nextActor, java.lang.String comment, java.util.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
void executeForward(int transitionId, ActorInfo nextActor) throws SaWorkflowException
Forward step.- Parameters:
transitionId
- Transition IDnextActor
- Next actor- Throws:
SaWorkflowException
- Workflow exception
-
executeForward
void executeForward(int transitionId, ActorInfo nextActor, java.lang.String reason) throws SaWorkflowException
Forward step.- Parameters:
transitionId
- Transition IDnextActor
- Next actorreason
- reason for forward- Throws:
SaWorkflowException
- Workflow exception
-
executeApprove
void executeApprove(ActorInfo nextActor) throws SaWorkflowException
Approve step.- Parameters:
nextActor
- Next actor- Throws:
SaWorkflowException
- Workflow exception
-
executeReject
void executeReject(ActorInfo nextActor) throws SaWorkflowException
Reject step.- Parameters:
nextActor
- Reject actor- Throws:
SaWorkflowException
- Workflow exception
-
executeRework
void executeRework(ActorInfo nextActor) throws SaWorkflowException
Rework step.- Parameters:
nextActor
- Rework actor- Throws:
SaWorkflowException
- Workflow exception
-
executeNotResponsible
void executeNotResponsible(java.lang.String comment) throws SaWorkflowException
Not responsible for this step.- Parameters:
comment
- Comment- Throws:
SaWorkflowException
- Workflow exception
-
executeTake
void executeTake() throws SaWorkflowException
Take step from task list.- Throws:
SaWorkflowException
- Workflow exception
-
executeRemove
void executeRemove(java.lang.String comment) throws SaWorkflowException
Remove step.- Parameters:
comment
- Comment- Throws:
SaWorkflowException
- Workflow exception
-
executeRemoveNotice
void executeRemoveNotice() throws SaWorkflowException
Remove notice.- Throws:
SaWorkflowException
- Workflow exception
-
executeHold
void executeHold(java.util.Date holdDate) throws SaWorkflowException
Set step to hold.- Parameters:
holdDate
- Hold date- Throws:
SaWorkflowException
- Workflow exception
-
executeResetHold
void executeResetHold() throws SaWorkflowException
Resets hold.- Throws:
SaWorkflowException
- Workflow exception
-
executeEscalation
void executeEscalation(java.util.Date escalationDate) throws SaWorkflowException
Escalate step.- Parameters:
escalationDate
- Escalation date- Throws:
SaWorkflowException
- Workflow exception
-
executeInactivate
void executeInactivate() throws SaWorkflowException
Set step to inactive.- Throws:
SaWorkflowException
- Workflow exception
-
executeActivate
void executeActivate() throws SaWorkflowException
Set inactive process to active.- Throws:
SaWorkflowException
- Workflow exception
-
executeTerminate
void executeTerminate() throws SaWorkflowException
Terminate process.- Throws:
SaWorkflowException
- Workflow exception
-
executeChangeOwner
void executeChangeOwner(ActorInfo newOwner) throws SaWorkflowException
Change process owner.- Parameters:
newOwner
- New owner- Throws:
SaWorkflowException
- Workflow exception
-
executeSetActivity
void executeSetActivity(int activity) throws SaWorkflowException
Set next activity.- Parameters:
activity
- Activity ID- Throws:
SaWorkflowException
- Workflow exception
-
executeDelegate
void executeDelegate(ActorInfo delegatee) throws SaWorkflowException
Delegate to user.- Parameters:
delegatee
- Delegatee- Throws:
SaWorkflowException
- Workflow exception
-
executeReassign
void executeReassign() throws SaWorkflowException
Reassign task to original user after it has been taken as a substitute.- Throws:
SaWorkflowException
- Workflow exception
-
executeAssignToMe
void executeAssignToMe() throws SaWorkflowException
Get task from absent user, the current user acts as substitute for.- Throws:
SaWorkflowException
- Workflow exception
-
executePutBack
void executePutBack() throws SaWorkflowException
Put step back to inbox.- Throws:
SaWorkflowException
- Workflow exception
-
updateTask
void updateTask(java.util.Properties values) throws SaWorkflowException
Updates the user defined fields of this task.- Parameters:
values
- Fieldvalues- Throws:
SaWorkflowException
- Workflow exception
-
-