Package com.uc4.api.objects
Class WorkflowIF
java.lang.Object
com.uc4.api.objects.UC4Object
com.uc4.api.objects.WorkflowIF
- All Implemented Interfaces:
LifecycleSaveAware,WorkflowInterfaces.IUpdatable
public class WorkflowIF
extends UC4Object
implements WorkflowInterfaces.IUpdatable, LifecycleSaveAware
This class represents an IF in a ProcessFlow.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddFalse(JobPlanTask task) Adds a task to thefalsebranch of this IF workflow.voidaddFalse(JobPlanTask task, int pos) Adds a task to thefalsebranch of this IF workflow at the specified position.voidaddTrue(JobPlanTask task) Adds a task to thetruebranch of this IF workflow.voidaddTrue(JobPlanTask task, int pos) Adds a task to thetruebranch of this IF workflow at the specified position.voidCalled after an object is saved.Returns attributes of thisJobPlan.voidclear()Removes all tasks from thetrueandfalsebranches.Returns the condition of the IF.protected com.uc4.api.objects.WorkflowTaskscreateWorkflowTasks(com.uc4.util.XMLDocument doc, ConnectionAttributes info) Creates aWorkflowTasksobject which holds the tasks of a workflow.Returns an iterator over tasks in thefalsebranch.Returns the END task of an IF.intReturns the number of tasks in thefalsebranch.intReturns the number of tasks in thetruebranch.Returns the content of the "Process" tab.Returns the Start Task of an IF.Returns a worfkflow task with the specified ID.header()Returns the header data of this object.booleanReturnstrueif this Object can be executed.booleanremoveTask(JobPlanTask task) Removes the specified task from theWorkFLowIF.rollback()This method provides access to the rollback tab of an executable object.runtime()Returns runtime information of this job.voidsetProcess(String script) Sets the content of the "Process" tab.protected voidsetTaskFactory(WorkFlowTaskFactory taskFactory) Sub classes may call this method in order to provide their own sub class ofJobPlanTaskwhich may contain additional features.syncs()Returns aSyncListobject which contains sync conditions of this object.Returns an iterator over tasks in thetruebranch.voidupdate()Update the object (i.e.voidvalidate()Validates the object.values()Methods inherited from class com.uc4.api.objects.UC4Object
docu, getAccess, getIdnr, getModCount, getName, getObjectClient, getType, isOldVersion, load, store
-
Constructor Details
-
WorkflowIF
public WorkflowIF()
-
-
Method Details
-
setTaskFactory
Sub classes may call this method in order to provide their own sub class ofJobPlanTaskwhich may contain additional features.- Parameters:
taskFactory- Task Factory
-
values
- Returns:
- Variables of this object
-
header
Returns the header data of this object. This is the information of the header tab in the dialog client.- Returns:
- header
-
syncs
Returns aSyncListobject which contains sync conditions of this object.- Returns:
- sync conditions
-
getTaskByUserDefinedID
Returns a worfkflow task with the specified ID.- Parameters:
id- ID of the task- Returns:
- Task or
nullif not found
-
runtime
Returns runtime information of this job. This corresponds to the "Runtime" tab in the dialog client.- Returns:
- Runtime information
-
getProcess
Returns the content of the "Process" tab.- Returns:
- JCL
-
setProcess
Sets the content of the "Process" tab.- Parameters:
script- Script
-
attributes
Returns attributes of thisJobPlan.- Returns:
- JobPlan attributes
-
addTrue
Adds a task to thetruebranch of this IF workflow.- Parameters:
task- JobPlanTask to add
-
addTrue
Adds a task to thetruebranch of this IF workflow at the specified position.- Parameters:
task- JobPlanTask to addpos- Position where the task should be added
-
removeTask
Removes the specified task from theWorkFLowIF.- Parameters:
task- WorkFLowIF task which should be removed- Returns:
- True if the task was removed successfully
- Throws:
InvalidObjectException- If the object is not valid
-
getStartTask
Returns the Start Task of an IF.- Returns:
- Start task
-
getEndTask
Returns the END task of an IF.- Returns:
- End task
-
rollback
This method provides access to the rollback tab of an executable object.- Returns:
- Rollback settings
-
addFalse
Adds a task to thefalsebranch of this IF workflow.- Parameters:
task- JobPlanTask to add
-
addFalse
Adds a task to thefalsebranch of this IF workflow at the specified position.- Parameters:
task- JobPlanTask to addpos- Position where the task should be added
-
getNumberOfTrueTasks
public int getNumberOfTrueTasks()Returns the number of tasks in thetruebranch.- Returns:
- Number of tasks which are executed when the condition is
true
-
getNumberOfFalseTasks
public int getNumberOfFalseTasks()Returns the number of tasks in thefalsebranch.- Returns:
- Number of tasks which are executed when the condition is
false
-
trueTasksIterator
Returns an iterator over tasks in thetruebranch.- Returns:
- Iterator of tasks in the
truebranch.
-
falseTasksIterator
Returns an iterator over tasks in thefalsebranch.- Returns:
- Iterator of tasks in the
falsebranch.
-
condition
Returns the condition of the IF.- Returns:
- IF condition
-
clear
public void clear()Removes all tasks from thetrueandfalsebranches. -
isExecutable
public boolean isExecutable()Description copied from class:UC4ObjectReturnstrueif this Object can be executed.- Specified by:
isExecutablein classUC4Object- Returns:
- true if the Object can be executed, false if not.
-
createWorkflowTasks
protected com.uc4.api.objects.WorkflowTasks createWorkflowTasks(com.uc4.util.XMLDocument doc, ConnectionAttributes info) Creates aWorkflowTasksobject which holds the tasks of a workflow. Sub classes may override this method.- Parameters:
doc- XML Documentinfo- Connection attributes- Returns:
- WorklfowTasks
-
validate
Description copied from class:UC4ObjectValidates the object. If the object is not valid anInvalidObjectExceptionis thrown.- Overrides:
validatein classUC4Object- Throws:
InvalidObjectException- If the object is not valid
-
update
public void update()Description copied from interface:WorkflowInterfaces.IUpdatableUpdate the object (i.e. recalculate internal properties, sort tasks, ...)- Specified by:
updatein interfaceWorkflowInterfaces.IUpdatable
-
afterSaveObject
public void afterSaveObject()Description copied from interface:LifecycleSaveAwareCalled after an object is saved.- Specified by:
afterSaveObjectin interfaceLifecycleSaveAware
-