public class TaskResult extends Object
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.| Modifier and Type | Method and Description |
|---|---|
TaskResult |
copy()
This method is used to return the copy of the TaskResult Object.
|
UC4ObjectName |
getExecuteObject()
Returns the object that is to be started when the specified status is not reached.
|
TaskState |
getOkState()
Gets the task status which should be reached.
|
int |
getRepeatCount()
Returns the number of repetitions.
|
int |
getRepeatWaitMinutes()
Returns the waiting time in minutes before the Job is repeated.
|
boolean |
isOnlyAfterLastUnsuccessfulRepetition()
Returns
true 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)
If
onlyAfterLastUnsuccessfulRepetition is set to true the selected object
will not be started immediately but only after a specified number of repeated runs. |
public TaskState getOkState()
public void setOkState(TaskState okState)
okState - Task status which should be reachedpublic boolean isOnlyAfterLastUnsuccessfulRepetition()
true if the selected object should not be started immediately
but only after a specified number of repeated runs.public void setOnlyAfterLastUnsuccessfulRepetition(boolean onlyAfterLastUnsuccessfulRepetition)
onlyAfterLastUnsuccessfulRepetition is set to true the selected object
will not be started immediately but only after a specified number of repeated runs.onlyAfterLastUnsuccessfulRepetition - Boolean which is set to true
if the object should not be started immediatelypublic UC4ObjectName getExecuteObject()
public void setExecuteObject(UC4ObjectName executeObject)
executeObject - Object to startpublic int getRepeatCount()
public int getRepeatWaitMinutes()
public void repeat(int times,
int minutes)
times - number of repetitionsminutes - waiting time in minutes before the Job is repeatedpublic TaskResult copy()
Copyright © 2021. All rights reserved.