Package com.uc4.api.objects
Class TaskResult
java.lang.Object
com.uc4.api.objects.TaskResult
With the
TaskResult
you can define a reaction to the end status of a task.
Hence, you can activate this task repeatedly and/or start any other task
when the preset status cannot be reached. The further processing
within a JobPlan can also be specified.-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
protected
TaskResult
(com.uc4.util.XMLDocument doc, Element task) -
Method Summary
Modifier and TypeMethodDescriptioncopy()
This method is used to return the copy of the TaskResult Object.Returns the object that is to be started when the specified status is not reached.Gets the task status which should be reached.int
Returns the number of repetitions.int
Returns the waiting time in minutes before the Job is repeated.boolean
Returnstrue
if the selected object should not be started immediately but only after a specified number of repeated runs.void
repeat
(int times, int minutes) Repeats the task.void
setExecuteObject
(UC4ObjectName executeObject) Returns the object that is to be started when the specified status is not reached.void
setOkState
(TaskState okState) Sets the task status which should be reached.void
setOnlyAfterLastUnsuccessfulRepetition
(boolean onlyAfterLastUnsuccessfulRepetition) IfonlyAfterLastUnsuccessfulRepetition
is set totrue
the selected object will not be started immediately but only after a specified number of repeated runs.protected void
-
Field Details
-
doNotStore
protected boolean doNotStore
-
-
Constructor Details
-
TaskResult
protected TaskResult() -
TaskResult
-
-
Method Details
-
store
-
getOkState
Gets the task status which should be reached. If no status is selected, the result of the task is not monitored. If the task does not end on the specified status, the actions defined in Else will be executed.- Returns:
- Task status
-
setOkState
Sets the task status which should be reached. If no status is selected, the result of the task is not monitored. If the task does not end on the specified status, the actions defined in Else will be executed.- Parameters:
okState
- Task status which should be reached
-
isOnlyAfterLastUnsuccessfulRepetition
public boolean isOnlyAfterLastUnsuccessfulRepetition()Returnstrue
if the selected object should not be started immediately but only after a specified number of repeated runs.- Returns:
- Boolean which is set to true if the object should not be started immediately
-
setOnlyAfterLastUnsuccessfulRepetition
public void setOnlyAfterLastUnsuccessfulRepetition(boolean onlyAfterLastUnsuccessfulRepetition) IfonlyAfterLastUnsuccessfulRepetition
is set totrue
the selected object will not be started immediately but only after a specified number of repeated runs.- Parameters:
onlyAfterLastUnsuccessfulRepetition
- Boolean which is set to true if the object should not be started immediately
-
getExecuteObject
Returns the object that is to be started when the specified status is not reached.- Returns:
- Object to start
-
setExecuteObject
Returns the object that is to be started when the specified status is not reached.- Parameters:
executeObject
- Object to start
-
getRepeatCount
public int getRepeatCount()Returns the number of repetitions.- Returns:
- Number of repetitions
-
getRepeatWaitMinutes
public int getRepeatWaitMinutes()Returns the waiting time in minutes before the Job is repeated. 0 minutes stands for immediate repetition.- Returns:
- Waiting time in minutes
-
repeat
public void repeat(int times, int minutes) Repeats the task.- Parameters:
times
- number of repetitionsminutes
- waiting time in minutes before the Job is repeated
-
copy
This method is used to return the copy of the TaskResult Object.- Returns:
- TaskResult
-