Package com.uc4.api.objects
Class WorkflowLoop
- java.lang.Object
-
- com.uc4.api.objects.UC4Object
-
- com.uc4.api.objects.WorkflowLoop
-
- All Implemented Interfaces:
LifecycleSaveAware,WorkflowInterfaces.IUpdatable,java.lang.Iterable<JobPlanTask>
public class WorkflowLoop extends UC4Object implements java.lang.Iterable<JobPlanTask>, WorkflowInterfaces.IUpdatable, LifecycleSaveAware
This class represents Workflow of type FOREACH.
-
-
Constructor Summary
Constructors Constructor Description WorkflowLoop()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddTask(JobPlanTask task)Adds a task to this for each loop.voidaddTask(JobPlanTask task, int pos)Adds a task to this ForEach loop at the specified position.voidaddTaskAndCreateDependencies(JobPlanTask task)Adds a task to this for each loop and Recreates the dependencies.voidaddTaskAndCreateDependencies(JobPlanTask task, int pos)Adds a task to this ForEach loop at the specified position and recreates the dependencies.voidafterSaveObject()Called after an object is saved.JobPlanAttributesattributes()Returns attributes of thisJobPlan.voidclear()Removes all tasks in this for each workflow.LoopDataSourcedatasource()Datasource of the loop.JobPlanTaskgetEndTask()Returns the END task of this FOR EACH workflow.java.lang.StringgetProcess()Returns the content of the "Process" tab.JobPlanTaskgetStartTask()Returns the Start Task of this FOR EACH workflow.JobPlanTaskgetTaskByUserDefinedID(java.lang.String id)Returns a worfkflow task with the specified ID.XHeaderheader()Returns the header data of this object.booleanisExecutable()Returnstrueif this Object can be executed.java.util.Iterator<JobPlanTask>iterator()booleanremoveTask(JobPlanTask task)Removes the specified task from theWorkFlowLoop.booleanremoveTaskAndCreateDependencies(JobPlanTask task)Removes the specified task from theWorkFlowLoopand recreates the dependencies.Rollbackrollback()This method provides access to the rollback tab of an executable object.Runtimeruntime()Returns runtime information of this job.voidsetProcess(java.lang.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.intsize()Number of tasks in the loop.SyncListsyncs()Returns aSyncListobject which contains sync conditions of this object.voidupdate()Update the object (i.e.voidvalidate()Validates the object.ObjectValuesvalues()-
Methods inherited from class com.uc4.api.objects.UC4Object
docu, getAccess, getIdnr, getModCount, getName, getType, isOldVersion, load, store
-
-
-
-
Method Detail
-
setTaskFactory
protected void setTaskFactory(WorkFlowTaskFactory taskFactory)
Sub classes may call this method in order to provide their own sub class ofJobPlanTaskwhich may contain additional features.- Parameters:
taskFactory- Task Factory
-
addTask
public void addTask(JobPlanTask task)
Adds a task to this for each loop.- Parameters:
task- JobPlanTask
-
addTask
public void addTask(JobPlanTask task, int pos)
Adds a task to this ForEach loop at the specified position.- Parameters:
task- JobPlanTaskpos- Position where the task should be added
-
addTaskAndCreateDependencies
public void addTaskAndCreateDependencies(JobPlanTask task)
Adds a task to this for each loop and Recreates the dependencies.- Parameters:
task- JobPlanTask
-
addTaskAndCreateDependencies
public void addTaskAndCreateDependencies(JobPlanTask task, int pos)
Adds a task to this ForEach loop at the specified position and recreates the dependencies.- Parameters:
task- JobPlanTaskpos- Position where the task should be added
-
rollback
public Rollback rollback()
This method provides access to the rollback tab of an executable object.- Returns:
- Rollback settings
-
iterator
public java.util.Iterator<JobPlanTask> iterator()
- Specified by:
iteratorin interfacejava.lang.Iterable<JobPlanTask>
-
clear
public void clear()
Removes all tasks in this for each workflow.
-
size
public int size()
Number of tasks in the loop. This method does not count the END and FE objects- Returns:
- Number of tasks
-
getTaskByUserDefinedID
public JobPlanTask getTaskByUserDefinedID(java.lang.String id)
Returns a worfkflow task with the specified ID.- Parameters:
id- ID of the task- Returns:
- Task or
nullif not found
-
getStartTask
public JobPlanTask getStartTask()
Returns the Start Task of this FOR EACH workflow.- Returns:
- Start task
-
getEndTask
public JobPlanTask getEndTask()
Returns the END task of this FOR EACH workflow.- Returns:
- End task
-
datasource
public LoopDataSource datasource()
Datasource of the loop.- Returns:
- Loop definition
-
values
public ObjectValues values()
- Returns:
- Variables of this object
-
header
public XHeader header()
Returns the header data of this object. This is the information of the header tab in the dialog client.- Returns:
- header
-
syncs
public SyncList syncs()
Returns aSyncListobject which contains sync conditions of this object.- Returns:
- sync conditions
-
runtime
public Runtime runtime()
Returns runtime information of this job. This corresponds to the "Runtime" tab in the dialog client.- Returns:
- Runtime information
-
getProcess
public java.lang.String getProcess()
Returns the content of the "Process" tab.- Returns:
- JCL
-
setProcess
public void setProcess(java.lang.String script)
Sets the content of the "Process" tab.- Parameters:
script- Script
-
attributes
public JobPlanAttributes attributes()
Returns attributes of thisJobPlan.- Returns:
- JobPlan attributes
-
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.
-
afterSaveObject
public void afterSaveObject()
Description copied from interface:LifecycleSaveAwareCalled after an object is saved.- Specified by:
afterSaveObjectin interfaceLifecycleSaveAware
-
validate
public void validate() throws java.io.InvalidObjectExceptionDescription copied from class:UC4ObjectValidates the object. If the object is not valid anInvalidObjectExceptionis thrown.
-
removeTask
public boolean removeTask(JobPlanTask task)
Removes the specified task from theWorkFlowLoop.- Parameters:
task- WorkFlowLoop task which should be removed- Returns:
- True if the task was removed successfully
-
removeTaskAndCreateDependencies
public boolean removeTaskAndCreateDependencies(JobPlanTask task)
Removes the specified task from theWorkFlowLoopand recreates the dependencies.- Parameters:
task- WorkFlowLoop task which should be removed- Returns:
- True if the task was removed successfully
-
update
public void update()
Description copied from interface:WorkflowInterfaces.IUpdatableUpdate the object (i.e. recalculate internal properties, sort tasks, ...)- Specified by:
updatein interfaceWorkflowInterfaces.IUpdatable
-
-