Package com.saperion.connector.wf
Interface SaWFTask
-
- All Known Implementing Classes:
SaWFTaskImpl
public interface SaWFTaskClass for handling all step related tasks.- Author:
- rbo
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description voidaddComment(java.lang.String comment, int level)Adds a comment to the workflow.voidaddHistory(java.lang.String description)Adds a history entry.voidexecuteActivate()Set inactive process to active.voidexecuteApprove(ActorInfo nextActor)Approve step.voidexecuteAssignToMe()Get task from absent user, the current user acts as substitute for.voidexecuteChangeOwner(ActorInfo newOwner)Change process owner.voidexecuteCommand(CommandInfo command, java.lang.String definition, ActorInfo nextActor, java.lang.String comment, java.util.Date escalationDate, int activity)Performs the given command.voidexecuteDelegate(ActorInfo delegatee)Delegate to user.voidexecuteEscalation(java.util.Date escalationDate)Escalate step.voidexecuteForward(int transitionId, ActorInfo nextActor)Forward step.voidexecuteForward(int transitionId, ActorInfo nextActor, java.lang.String reason)Forward step.voidexecuteHold(java.util.Date holdDate)Set step to hold.voidexecuteInactivate()Set step to inactive.voidexecuteNotResponsible(java.lang.String comment)Not responsible for this step.voidexecutePutBack()Put step back to inbox.voidexecuteReassign()Reassign task to original user after it has been taken as a substitute.voidexecuteReject(ActorInfo nextActor)Reject step.voidexecuteRemove(java.lang.String comment)Remove step.voidexecuteRemoveNotice()Remove notice.voidexecuteResetHold()Resets hold.voidexecuteRework(ActorInfo nextActor)Rework step.voidexecuteSetActivity(int activity)Set next activity.voidexecuteTake()Take step from task list.voidexecuteTerminate()Terminate process.java.io.InputStreamgetAttachmentContent(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.StringgetHistoryXML()Reads the process history as XML.java.lang.StringgetHistoryXML(java.lang.String language)Reads the process history as XML.java.lang.StringgetHistoryXML2(java.lang.String language)Reads the second variant of process history as XML.java.lang.StringgetHistoryXML2(java.lang.String language, boolean isAscending)Reads the second variant of process history as XML with ascending / descending switch.booleangetSync()Reads the sync status.TaskInfogetTaskInfo()Reads the task info object of this task.booleangetTrusted()Reads the trusted status.intgetWorkingTime()SaPropertyValue[]readAttachmentMetadata()Reads the metadata of the attachment.TaskUserSelectionreadSelectableUsersForTransition(int transition)Obtains the next tasksTaskUserSelectionfor the given transition.voidsetAlias(ActorInfo alias)Sets the actor to be used as alias for the next action.voidsetAliasActor(ActorInfo aliasActor)Deprecated.this method actually sets the next actor by overwriting the nextActor field.voidsetComment(java.lang.String comment)Set comment to the next execute.voidsetSync(boolean isSync)Set sync parameter.voidsetTrusted(boolean isTrusted)Set trusted parameter.voidsetWorkingTime(int workingTime)SaSaveInfoupdateAttachment(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.voidupdateTask(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, SaWorkflowExceptionReads 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, SaWorkflowExceptionAdds 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, SaWorkflowExceptionAdds 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 SaWorkflowExceptionReads 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 SaWorkflowExceptionReads 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 SaWorkflowExceptionReads 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 SaWorkflowExceptionReads 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 SaWorkflowExceptionSet sync parameter. Default is "true".- Parameters:
isSync- Synchron work- Throws:
SaWorkflowException- Workflow exception
-
getSync
boolean getSync() throws SaWorkflowExceptionReads the sync status.- Returns:
- Is Synchron
- Throws:
SaWorkflowException- Workflow exception
-
setTrusted
void setTrusted(boolean isTrusted) throws SaWorkflowExceptionSet trusted parameter. Default is "false".- Parameters:
isTrusted- Trusted work- Throws:
SaWorkflowException- Workflow exception
-
getTrusted
boolean getTrusted() throws SaWorkflowExceptionReads 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 tasksTaskUserSelectionfor the given transition.- 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 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 SaWorkflowExceptionForward step.- Parameters:
transitionId- Transition IDnextActor- Next actor- Throws:
SaWorkflowException- Workflow exception
-
executeForward
void executeForward(int transitionId, ActorInfo nextActor, java.lang.String reason) throws SaWorkflowExceptionForward 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 SaWorkflowExceptionNot responsible for this step.- Parameters:
comment- Comment- Throws:
SaWorkflowException- Workflow exception
-
executeTake
void executeTake() throws SaWorkflowExceptionTake step from task list.- Throws:
SaWorkflowException- Workflow exception
-
executeRemove
void executeRemove(java.lang.String comment) throws SaWorkflowExceptionRemove step.- Parameters:
comment- Comment- Throws:
SaWorkflowException- Workflow exception
-
executeRemoveNotice
void executeRemoveNotice() throws SaWorkflowExceptionRemove notice.- Throws:
SaWorkflowException- Workflow exception
-
executeHold
void executeHold(java.util.Date holdDate) throws SaWorkflowExceptionSet step to hold.- Parameters:
holdDate- Hold date- Throws:
SaWorkflowException- Workflow exception
-
executeResetHold
void executeResetHold() throws SaWorkflowExceptionResets hold.- Throws:
SaWorkflowException- Workflow exception
-
executeEscalation
void executeEscalation(java.util.Date escalationDate) throws SaWorkflowExceptionEscalate step.- Parameters:
escalationDate- Escalation date- Throws:
SaWorkflowException- Workflow exception
-
executeInactivate
void executeInactivate() throws SaWorkflowExceptionSet step to inactive.- Throws:
SaWorkflowException- Workflow exception
-
executeActivate
void executeActivate() throws SaWorkflowExceptionSet inactive process to active.- Throws:
SaWorkflowException- Workflow exception
-
executeTerminate
void executeTerminate() throws SaWorkflowExceptionTerminate 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 SaWorkflowExceptionSet 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 SaWorkflowExceptionReassign task to original user after it has been taken as a substitute.- Throws:
SaWorkflowException- Workflow exception
-
executeAssignToMe
void executeAssignToMe() throws SaWorkflowExceptionGet task from absent user, the current user acts as substitute for.- Throws:
SaWorkflowException- Workflow exception
-
executePutBack
void executePutBack() throws SaWorkflowExceptionPut step back to inbox.- Throws:
SaWorkflowException- Workflow exception
-
updateTask
void updateTask(java.util.Properties values) throws SaWorkflowExceptionUpdates the user defined fields of this task.- Parameters:
values- Fieldvalues- Throws:
SaWorkflowException- Workflow exception
-
-