Class JobPlanDependencies
- java.lang.Object
-
- com.uc4.api.objects.JobPlanDependencies
-
- All Implemented Interfaces:
java.lang.Iterable<JobPlanTaskDependency>
public class JobPlanDependencies extends java.lang.Object implements java.lang.Iterable<JobPlanTaskDependency>
JobPlan task dependencies.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addDependency(JobPlanTask task)
Adds a dependency without a certain status.protected void
addDependency(JobPlanTask predecessor, int branchType)
Adds a dependency without a certain status.protected void
addDependency(JobPlanTask predecessor, int branchType, TaskState taskState)
Adds a dependency with a certain status.void
addDependency(JobPlanTask predecessor, TaskState when)
Adds a dependency.void
addSuccessorTask(JobPlanTask task)
Adds the given task to the successor list.void
clear()
Removes all dependencies.JobPlanDependencies
copy(JobPlanTask jobPlanTask)
Creates a deep copy of this object and all it's properties except for the predecessor and successor object lists.protected void
decrementPreCounter()
UC4ObjectName
getElseExecute()
Returns the object that should be executed when a defined condition does not occur.int
getLatestEndDays()
Returns the number of days for the latest end time of this task.Time
getLatestEndTime()
Returns theTime
for the latest end of this task.int
getLatestStartDays()
Returns the number of days for the latest start time of this task.Time
getLatestStartTime()
Returns theTime
for the latest start of this task.protected int
getPreCounter()
UC4TimezoneName
getTimezone()
Returns the TimeZone that is to be used.boolean
isAtTheLatest()
Returnstrue
if the latest start and end time is enabled.boolean
isElseAbort()
Returnstrue
if the task and the JobPlan itself are canceled when the defined conditions do not occur.boolean
isElseBlock()
Returnstrue
if the JobPlan blocks at the preceding task.boolean
isElseBlockAndAbort()
Returnstrue
if the JobPlan blocks at the preceding task.boolean
isElseSkip()
Returnstrue
if the task will be skipped when the defined conditions do not occur.boolean
isLatestEnd()
Returnstrue
if the latest end time is selected.boolean
isLatestStart()
Returnstrue
if the latest start time is selected.boolean
isStatusMatchAll()
Returnstrue
if all predecessors must end with the determined status (AND Link).boolean
isStatusMatchOne()
Returnstrue
if at least one predecessor ends as defined.java.util.Iterator<JobPlanTaskDependency>
iterator()
Returns an iterator overJobPlanTaskDependency
This iterator cannot be used to remove dependencies.protected void
prepareLnrSort()
protected void
removeAll()
boolean
removeDependency(JobPlanTaskDependency dependency)
Removes the specified dependency.void
selectLatestEnd()
Enables the check for the latest end time.void
selectLatestStart()
Enables the check for the latest start time.void
setAtTheLatest(boolean atTheLatest)
Enables or disables the latest start and end time.protected void
setDependencyListener(IChangeListener listener)
void
setElseAbort()
The task and the JobPlan itself are canceled when the defined conditions do not occur.void
setElseBlock()
The JobPlan blocks at the preceding task when the defined conditions do not occur.void
setElseBlockAndAbort()
The JobPlan blocks at the preceding task.void
setElseExecute(UC4ObjectName elseExecute)
Sets the object that should be executed when a defined condition does not occur.void
setElseSkip()
Skips the task if the defined conditions do not occur.void
setLatestEndDays(int latestEndDays)
Sets the number of days for the latest end time of this task.void
setLatestEndTime(Time latestEndTime)
Sets theTime
for the latest end of this task.void
setLatestStartDays(int latestStartDays)
Sets the number of days for the latest start time of this task.void
setLatestStartTime(Time latestStartTime)
Sets theTime
for the latest start of this task.void
setStatusMatchAll()
The task will only be executed if all predecessors end with the determined status (AND Link).void
setStatusMatchOne()
The task will only be executed if at least one predecessor ends as defined (OR Link).void
setTimezone(UC4TimezoneName timezone)
Sets the TimeZone that is to be used.int
size()
Gets the number of predecessor dependencies.java.util.Iterator<JobPlanTask>
successorIterator()
-
-
-
Method Detail
-
copy
public JobPlanDependencies copy(JobPlanTask jobPlanTask)
Creates a deep copy of this object and all it's properties except for the predecessor and successor object lists. These are not cloned since they represent the arrows in the workflow graph and shouldn't be duplicated.- Parameters:
jobPlanTask
- The task to which this dependency object belongs.- Returns:
- A copy of this object.
-
isAtTheLatest
public boolean isAtTheLatest()
Returnstrue
if the latest start and end time is enabled.- Returns:
- True if latest start and end time is enabled
-
setAtTheLatest
public void setAtTheLatest(boolean atTheLatest)
Enables or disables the latest start and end time.- Parameters:
atTheLatest
- True if latest start and end time should be enabled
-
getLatestEndDays
public int getLatestEndDays()
Returns the number of days for the latest end time of this task.- Returns:
- Number of days for the latest end time
-
setLatestEndDays
public void setLatestEndDays(int latestEndDays)
Sets the number of days for the latest end time of this task.- Parameters:
latestEndDays
- Number of days for the latest end time
-
getLatestEndTime
public Time getLatestEndTime()
Returns theTime
for the latest end of this task.- Returns:
- Time of the latest end
-
setLatestEndTime
public void setLatestEndTime(Time latestEndTime)
Sets theTime
for the latest end of this task.- Parameters:
latestEndTime
- Time of the latest end
-
getLatestStartDays
public int getLatestStartDays()
Returns the number of days for the latest start time of this task.- Returns:
- Number of days for the latest start time
-
setLatestStartDays
public void setLatestStartDays(int latestStartDays)
Sets the number of days for the latest start time of this task.- Parameters:
latestStartDays
- Number of days for the latest start time
-
getLatestStartTime
public Time getLatestStartTime()
Returns theTime
for the latest start of this task.- Returns:
- Time of the latest start
-
setLatestStartTime
public void setLatestStartTime(Time latestStartTime)
Sets theTime
for the latest start of this task.- Parameters:
latestStartTime
- Time of the latest start
-
getTimezone
public UC4TimezoneName getTimezone()
Returns the TimeZone that is to be used.- Returns:
- TimeZone that is to be used
-
setTimezone
public void setTimezone(UC4TimezoneName timezone)
Sets the TimeZone that is to be used.- Parameters:
timezone
- TimeZone that is to be used
-
selectLatestStart
public void selectLatestStart()
Enables the check for the latest start time.
-
selectLatestEnd
public void selectLatestEnd()
Enables the check for the latest end time.
-
isLatestStart
public boolean isLatestStart()
Returnstrue
if the latest start time is selected.- Returns:
- True if latest start is selected
-
isLatestEnd
public boolean isLatestEnd()
Returnstrue
if the latest end time is selected.- Returns:
- True if latest end is selected
-
setElseSkip
public void setElseSkip()
Skips the task if the defined conditions do not occur.
-
isElseSkip
public boolean isElseSkip()
Returnstrue
if the task will be skipped when the defined conditions do not occur.- Returns:
- True if "Skip" is the selected action
-
setElseBlock
public void setElseBlock()
The JobPlan blocks at the preceding task when the defined conditions do not occur.This does not apply to tasks running parallel within the JobPlan, they are continuing to be processed. The JobPlan as a whole will not block until they have been executed. If there are no parallel running tasks, the task and the JobPlan are blocked immediately.
-
isElseBlock
public boolean isElseBlock()
Returnstrue
if the JobPlan blocks at the preceding task. when the defined conditions do not occur.- Returns:
- True if "Block" is the selected action
-
setElseBlockAndAbort
public void setElseBlockAndAbort()
The JobPlan blocks at the preceding task.This does not apply to tasks running parallel within the JobPlan, their processing is being continued. The JobPlan as a whole will not block until they have been executed. If there are no parallel running tasks, the task and the JobPlan are blocked immediately.
If a superordinate JobPlan (parent) is available, a signal indicating an abnormal end is sent to it. The superordinate JobPlan then considers this blocked JobPlan as canceled. Without this signal being sent, the JobPlan (although being blocked) would be considered active by the superordinate JobPlan, as processing has not yet been ended. All successors would then be in the status "Waiting for precondition", which included a standstill of this JobPlan branch.
-
isElseBlockAndAbort
public boolean isElseBlockAndAbort()
Returnstrue
if the JobPlan blocks at the preceding task.- Returns:
- True if "Block + Abort Signal" is the selected action
-
setElseAbort
public void setElseAbort()
The task and the JobPlan itself are canceled when the defined conditions do not occur.
-
isElseAbort
public boolean isElseAbort()
Returnstrue
if the task and the JobPlan itself are canceled when the defined conditions do not occur.- Returns:
- True if "Abort" is the selected action
-
getElseExecute
public UC4ObjectName getElseExecute()
Returns the object that should be executed when a defined condition does not occur.- Returns:
- Object that should be executed
-
setElseExecute
public void setElseExecute(UC4ObjectName elseExecute)
Sets the object that should be executed when a defined condition does not occur.- Parameters:
elseExecute
- Object that should be executed
-
setStatusMatchAll
public void setStatusMatchAll()
The task will only be executed if all predecessors end with the determined status (AND Link).
-
setStatusMatchOne
public void setStatusMatchOne()
The task will only be executed if at least one predecessor ends as defined (OR Link).
-
isStatusMatchAll
public boolean isStatusMatchAll()
Returnstrue
if all predecessors must end with the determined status (AND Link).- Returns:
- True if all predecessors must end with the determined status
-
isStatusMatchOne
public boolean isStatusMatchOne()
Returnstrue
if at least one predecessor ends as defined.- Returns:
- True if at least one predecessor ends as defined
-
iterator
public java.util.Iterator<JobPlanTaskDependency> iterator()
Returns an iterator overJobPlanTaskDependency
This iterator cannot be used to remove dependencies. Use the methodremoveDependency
instead.- Specified by:
iterator
in interfacejava.lang.Iterable<JobPlanTaskDependency>
- Returns:
- Iterator over predecessor dependencies
-
prepareLnrSort
protected void prepareLnrSort()
-
decrementPreCounter
protected void decrementPreCounter()
-
getPreCounter
protected int getPreCounter()
-
addDependency
public void addDependency(JobPlanTask predecessor, TaskState when)
Adds a dependency.- Parameters:
predecessor
- Predecessor taskwhen
- Expected status of the predecessor
-
clear
public void clear()
Removes all dependencies.
-
removeDependency
public boolean removeDependency(JobPlanTaskDependency dependency)
Removes the specified dependency.- Parameters:
dependency
- Task dependency- Returns:
- True if the dependecny was removed successfully
-
removeAll
protected void removeAll()
-
addSuccessorTask
public void addSuccessorTask(JobPlanTask task)
Adds the given task to the successor list.- Parameters:
task
- The task to add as successor.
-
setDependencyListener
protected void setDependencyListener(IChangeListener listener)
-
size
public int size()
Gets the number of predecessor dependencies.- Returns:
- Number of dependencies.
-
successorIterator
public java.util.Iterator<JobPlanTask> successorIterator()
- Returns:
- An iterator over the successor tasks.
-
addDependency
public void addDependency(JobPlanTask task)
Adds a dependency without a certain status.- Parameters:
task
- Predecessor
-
addDependency
protected void addDependency(JobPlanTask predecessor, int branchType)
Adds a dependency without a certain status.- Parameters:
task
- Predecessor
-
addDependency
protected void addDependency(JobPlanTask predecessor, int branchType, TaskState taskState)
Adds a dependency with a certain status.- Parameters:
predecessor
- Task to be added as dependency.branchType
- Branch Type of the Dependency.taskState
- Status/State of the task being added as dependency.
-
-