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
,Iterable<JobPlanTask>
public class WorkflowLoop
extends UC4Object
implements Iterable<JobPlanTask>, WorkflowInterfaces.IUpdatable, LifecycleSaveAware
This class represents Workflow of type FOREACH.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addTask
(JobPlanTask task) Adds a task to this for each loop.void
addTask
(JobPlanTask task, int pos) Adds a task to this ForEach loop at the specified position.void
Adds a task to this for each loop and Recreates the dependencies.void
addTaskAndCreateDependencies
(JobPlanTask task, int pos) Adds a task to this ForEach loop at the specified position and recreates the dependencies.void
Called after an object is saved.Returns attributes of thisJobPlan
.void
clear()
Removes all tasks in this for each workflow.Datasource of the loop.Returns the END task of this FOR EACH workflow.Returns the content of the "Process" tab.Returns the Start Task of this FOR EACH workflow.Returns a worfkflow task with the specified ID.header()
Returns the header data of this object.boolean
Returnstrue
if this Object can be executed.iterator()
boolean
removeTask
(JobPlanTask task) Removes the specified task from theWorkFlowLoop
.boolean
Removes the specified task from theWorkFlowLoop
and recreates the dependencies.rollback()
This method provides access to the rollback tab of an executable object.runtime()
Returns runtime information of this job.void
setProcess
(String script) Sets the content of the "Process" tab.protected void
setTaskFactory
(WorkFlowTaskFactory taskFactory) Sub classes may call this method in order to provide their own sub class ofJobPlanTask
which may contain additional features.int
size()
Number of tasks in the loop.syncs()
Returns aSyncList
object which contains sync conditions of this object.void
update()
Update the object (i.e.void
validate()
Validates the object.values()
Methods inherited from class com.uc4.api.objects.UC4Object
docu, getAccess, getIdnr, getModCount, getName, getObjectClient, getType, isOldVersion, load, store
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
WorkflowLoop
public WorkflowLoop()
-
-
Method Details
-
setTaskFactory
Sub classes may call this method in order to provide their own sub class ofJobPlanTask
which may contain additional features.- Parameters:
taskFactory
- Task Factory
-
addTask
Adds a task to this for each loop.- Parameters:
task
- JobPlanTask
-
addTask
Adds a task to this ForEach loop at the specified position.- Parameters:
task
- JobPlanTaskpos
- Position where the task should be added
-
addTaskAndCreateDependencies
Adds a task to this for each loop and Recreates the dependencies.- Parameters:
task
- JobPlanTask
-
addTaskAndCreateDependencies
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
This method provides access to the rollback tab of an executable object.- Returns:
- Rollback settings
-
iterator
- Specified by:
iterator
in interfaceIterable<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
Returns a worfkflow task with the specified ID.- Parameters:
id
- ID of the task- Returns:
- Task or
null
if not found
-
getStartTask
Returns the Start Task of this FOR EACH workflow.- Returns:
- Start task
-
getEndTask
Returns the END task of this FOR EACH workflow.- Returns:
- End task
-
datasource
Datasource of the loop.- Returns:
- Loop definition
-
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 aSyncList
object which contains sync conditions of this object.- Returns:
- sync conditions
-
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
-
isExecutable
public boolean isExecutable()Description copied from class:UC4Object
Returnstrue
if this Object can be executed.- Specified by:
isExecutable
in classUC4Object
- Returns:
- true if the Object can be executed, false if not.
-
afterSaveObject
public void afterSaveObject()Description copied from interface:LifecycleSaveAware
Called after an object is saved.- Specified by:
afterSaveObject
in interfaceLifecycleSaveAware
-
validate
Description copied from class:UC4Object
Validates the object. If the object is not valid anInvalidObjectException
is thrown.- Overrides:
validate
in classUC4Object
- Throws:
InvalidObjectException
- If the object is not valid
-
removeTask
Removes the specified task from theWorkFlowLoop
.- Parameters:
task
- WorkFlowLoop task which should be removed- Returns:
- True if the task was removed successfully
-
removeTaskAndCreateDependencies
Removes the specified task from theWorkFlowLoop
and 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.IUpdatable
Update the object (i.e. recalculate internal properties, sort tasks, ...)- Specified by:
update
in interfaceWorkflowInterfaces.IUpdatable
-