Class CustomScriptTask

    • Field Detail

      • UNKNOWN_TYPE

        public static final Type UNKNOWN_TYPE
      • PYTHON_SCRIPT_PREFIX

        public static final java.lang.String PYTHON_SCRIPT_PREFIX
        See Also:
        Constant Field Values
      • IGNORE_SCRIPT_VARIABLE_INTERPOLATION

        public static final java.lang.String IGNORE_SCRIPT_VARIABLE_INTERPOLATION
        See Also:
        Constant Field Values
      • SCRIPT_PROPERTY_NAME

        public static final java.lang.String SCRIPT_PROPERTY_NAME
        See Also:
        Constant Field Values
      • WAIT_FOR_SIGNAL_PROPERTY_NAME

        public static final java.lang.String WAIT_FOR_SIGNAL_PROPERTY_NAME
        See Also:
        Constant Field Values
    • Constructor Detail

      • CustomScriptTask

        public CustomScriptTask()
    • Method Detail

      • freezeVariablesInCustomFields

        public java.util.Set<java.lang.String> freezeVariablesInCustomFields​(java.util.Map<java.lang.String,​ValueWithInterpolation> variables,
                                                                             java.util.Map<java.lang.String,​java.lang.String> passwordVariables,
                                                                             Changes changes,
                                                                             boolean freezeEvenIfUnresolved)
        Description copied from class: Task

        To be overridden in child classes with custom fields that can contain variables.

        Apply VariableHelper.replaceAll(Object, Map, Set, boolean) to each field; if child entities are modified, add them to changes.
        Overrides:
        freezeVariablesInCustomFields in class Task
      • setPythonScript

        public void setPythonScript​(PythonScript pythonScript)
      • getStatusLine

        public java.lang.String getStatusLine()
      • setStatusLine

        public void setStatusLine​(java.lang.String statusLine)
      • setNextScriptPath

        public void setNextScriptPath​(java.lang.String nextScriptPath)
      • getNextScriptPath

        public java.lang.String getNextScriptPath()
      • getInterval

        public java.lang.Integer getInterval()
      • setInterval

        public void setInterval​(java.lang.Integer interval)
      • hasNextScriptToExecute

        public boolean hasNextScriptToExecute()
      • schedule

        public void schedule​(java.lang.String scriptPath)
        Tells the custom script task that the next script needs to be scheduled after this Jython script is finished. The passed script path must be a valid Jython script on the classpath.
      • schedule

        public void schedule​(java.lang.String scriptPath,
                             java.lang.Integer interval)
        Tells the custom script task that the next script needs to be scheduled after this Jython script is finished with specified delay in seconds. The passed script path must be a valid Jython script on the classpath. The passed interval must be any value between 1 and 231-1.
      • resetSchedule

        public void resetSchedule()
      • fail

        public Changes fail​(java.lang.String targetId,
                            java.lang.String failReason,
                            User user,
                            boolean fromAbort)
        Overrides:
        fail in class Task
      • isWaitingForSignal

        public boolean isWaitingForSignal()
      • retry

        public Changes retry​(java.lang.String targetId)
        Overrides:
        retry in class Task
      • getScriptPath

        public java.lang.String getScriptPath()
      • hasAbortScript

        public boolean hasAbortScript()
        Overrides:
        hasAbortScript in class Task
      • getAbortScriptPath

        public java.lang.String getAbortScriptPath()
      • getAbortScript

        public java.lang.String getAbortScript()
                                        throws java.io.IOException
        Overrides:
        getAbortScript in class Task
        Throws:
        java.io.IOException
      • isPropertyVariableInterpolationOff

        public boolean isPropertyVariableInterpolationOff​(PythonScript pythonScript)
      • isUnknown

        public boolean isUnknown()
      • isKeepPreviousOutputPropertiesOnRetry

        public boolean isKeepPreviousOutputPropertiesOnRetry()
      • setKeepPreviousOutputPropertiesOnRetry

        public void setKeepPreviousOutputPropertiesOnRetry​(boolean keepPreviousOutputPropertiesOnRetry)