Class TaskResult

java.lang.Object
com.uc4.api.objects.TaskResult

public class TaskResult extends Object
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 Details

    • doNotStore

      protected boolean doNotStore
  • Constructor Details

    • TaskResult

      protected TaskResult()
    • TaskResult

      protected TaskResult(com.uc4.util.XMLDocument doc, Element task)
  • Method Details

    • store

      protected void store(com.uc4.util.XMLDocument doc, Element task)
    • getOkState

      public TaskState 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

      public void setOkState(TaskState okState)
      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()
      Returns true 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)
      If onlyAfterLastUnsuccessfulRepetition is set to true 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

      public UC4ObjectName getExecuteObject()
      Returns the object that is to be started when the specified status is not reached.
      Returns:
      Object to start
    • setExecuteObject

      public void setExecuteObject(UC4ObjectName executeObject)
      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 repetitions
      minutes - waiting time in minutes before the Job is repeated
    • copy

      public TaskResult copy()
      This method is used to return the copy of the TaskResult Object.
      Returns:
      TaskResult