Class Runtime

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

public class Runtime extends Object
The "Runtime" tab is an object class-specific tab that is found in every executable object in UC4.

It is used for setting parameters for a task's runtime behavior.

The "Runtime" tab is structured as follows:
  • Handling of Return Code
  • Setting of the Forecast
  • Evaluating the estimated runtime (Runtime Evaluation)
  • Supervising the maximum runtime (Runtime Supervision)
  • Supervising the minimum runtime (Runtime Supervision)
  • Reaction to exceeding or falling below runtime (Runtime Supervision)
  • Constructor Details

    • Runtime

      protected Runtime(com.uc4.util.XMLDocument doc)
  • Method Details

    • store

      protected void store(com.uc4.util.XMLDocument doc, Element request)
    • getRetCodeExecuteObject

      public UC4ObjectName getRetCodeExecuteObject()
      Returns the name of the Automation Engine Object which should be executed when the actual return code is higher than the maximum allowed return code. If an Automation Engine Object is not set an empty UC4ObjectName instance is returned.
      Returns:
      Name of the Object that should be executed, never null
    • setRetCodeExecuteObject

      public void setRetCodeExecuteObject(UC4ObjectName retCodeExecuteObject)
      Sets the name of the Automation Engine Object which should be executed when the actual return code is higher than the maximum allowed return code. To disable the execution of an Object call this method with null or an empty UC4ObjectName instance.
      Parameters:
      retCodeExecuteObject - Name of the Object that should be executed, never null
    • maximumRuntime

      public MaximumRuntime maximumRuntime()
      Returns a MaximumRuntime which can be used to modify the maximum runtime settings.
      Returns:
      MaximumRuntime
    • isCancelJobAboveMRT

      public boolean isCancelJobAboveMRT()
      Returns true if the exceeding runtime will initiate a cancel or the completion of the task. Only available when the maximum runtime is being supervised.
      Returns:
      Boolean which is set to true if the object should be canceled when the runtime is exceeded
    • setCancelJobAboveMRT

      public void setCancelJobAboveMRT(boolean cancelJobAboveMRT)
      If cancelJobAboveMRT is set to true the exceeding runtime will initiate a cancel or the completion of the task.
      Parameters:
      cancelJobAboveMRT - Boolean which is set to true if the object should be canceled when the runtime is exceeded
    • getExecuteObject

      public UC4ObjectName getExecuteObject()
      Returns the object which is executed when the runtime exceeds or falls below the specified limits. Only available when runtime is being supervised.
      Returns:
      UC4ObjectName of the executed object
    • getStepList

      public StepListItem[] getStepList()
      Returns teh OS 390 Step List.
      Returns:
      Step List or null if there is none
    • setStepList

      public void setStepList(StepListItem[] stepList)
      Sets the Step List for OS 390 Jobs.
      Parameters:
      stepList - Step List
    • setExecuteObject

      public void setExecuteObject(UC4ObjectName executeObject)
      Sets the object which is executed when the runtime exceeds or falls below the specified limits. Only available when runtime is being supervised.
      Parameters:
      executeObject - UC4ObjectName of the executed object
    • estimatedRuntime

      public EstimatedRuntime estimatedRuntime()
      Returns a EstimatedRuntime which can be used to set the estimated runtime settings.
      Returns:
      EstimatedRuntime
    • minimumRuntime

      public MinimumRuntime minimumRuntime()
      Returns a MinimumRuntime which can be used to modify the minimum runtime settings.
      Returns:
      MinimumRuntime
    • getMaxRetCode

      public int getMaxRetCode()
      Returns the maximum Return Code for the normal end of a task.
      Returns:
      Return Code
    • setMaxRetCode

      public void setMaxRetCode(int maxRetCode)
      Sets the maximum Return Code for the normal end of a task or Step list for OS/390 Jobs. A task ends normally (Status "ENDED_OK") if its Return Code is less than or equal to the specified maximum Return Code. The Return Codes of the steps may be compared with the entries in the step list for OS/390 Jobs. The test checks if the Job is considered normally ended or aborted. This can also be set with the script statement :EXIT next to the Return Code when ending a task.
      Parameters:
      maxRetCode - Return code
    • getForecastState

      public ForecastTaskState getForecastState()
      Returns the status, which should be returned by this task when making a forecast.
      Returns:
      End status for forecasts
    • setForecastState

      public void setForecastState(ForecastTaskState forecastState)
      Sets the end status, which should be returned by this task when making a forecast.
      Parameters:
      forecastState - End status for forecasts