Interface TableParameterRuntime

  • All Superinterfaces:
    TableParameter

    public interface TableParameterRuntime
    extends TableParameter
    Runtime interface to Table parameters from RedwoodScript.

    Table parameters consist of two parts:

    • The reference: stored in the JobParameter object's InValueString and/or OutValueString attributes, depending on direction. This is stored in the form <type:source>, where type is from the TableParameterType reference, and source depends on type, as specified in JobParameter.setOutValueTableParameter(String).
    • The content: in Redwood Table XML (RTX) format.

    While the content is typically stored in a JobFile, there are two other cases to consider:

    • TableParameterType.Inline where the content is stored directly in the JobParameter object's InValueString and/or OutValueString. This is supported for all parameter directions.
    • TableParameterType.Table where the content is stored in a Table object. This is only supported for In parameters.

    Due to the nature of table parameters, and the normal rules around parameter values, not all methods are valid in all contexts:

    • Writing output values of parameters is only allowed if they are for the currently running job.
    • Reading output values of parameters is allowed in general, with special exceptions for parameters of the currently running job.

    It is possible to create conflicts in values or content by calling certain sequences of methods from this interface and other interfaces, especially when combined with creating JobFile objects externally. Users should take care to ensure that there is only one way of writing to a JobFile. It is recommended that this interface be used exclusively when dealing with table parameters. Creating JobFile objects and String values directly is likely to lead to bugs or incompatibilities with future features.

    When using InOut parameters, different references should be used, except in the case where the Out value is exactly the same as the In value, where using the same value is required to reference the same content.

    For RedwoodScript jobs, there is also a distinction between the internal value and the database value of a parameter. The internal value is the value available via the variable named after the parameter, in the current job. The database value is the value visible from a SchedulerSession (from the database). When the job finishes, the internal value will be written to the database (overwriting updates made by any other means). This is the case for all parameters.

    When calling methods that set the OutValueString of an attribute (ie. most of the getRTXWriter*() methods, and all the setOutValue*() methods) these changes will be reflected in the internal value immediately, and will be visible externally when the job finishes