Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: <set> element final draft

...

Section
Column
width20%
<set>
Column
Assigns a value to a field.
Code Block
xml
xml
<set field="foo" value="bar" />
<set field="baz" from-field="foo" />
<!-- Field "baz" contains the string "bar" -->

Attributes

Name

Type

Requirements

Description

 Notes

field

expression

optionalrequired

The name of the field to set (the l-value), the target of the assignment

 

from-field

expression

optional

The name of a field to copy from (the r-value)

 

, script

required if value is empty

An expression or script that returns an object or null

The script must be prefixed with the script language followed by a colon (":")

value

constant

required if from is empty

value

constant+expr

optional

A constant value 

Default type = "String"

default-value

constant, constant+expr, expression

optional

A default value - used if from-field evaluates to null

 Expressions must be enclosed in ${}

type

constant

optional

The Java data type of field

Defaults to "String" 

set-if-null

constant

optional

Controls if field can be set to null.

Defaults to "false"

set-if-empty

constant

optional

Controls if field can be set to an empty value. The meaning of "empty" depends on the Java data type.

Defaults to "true"


Infonote
titleProposed ChangesDraft Status

Final draft

  • Currently, the field attribute is optional. Require the field attribute.
  • Currently, the from-field and value attributes are optional. Require one of the two attributes.
  • Add a new attribute: from-script. The attribute will be used exclusively for scriptlets that are currently found in other attributes.
  • Rename the from-field attribute to from. The attribute will be used exclusively for UEL expressions.
  • Change the behavior of the value attribute: The attribute will be used exclusively for string constants.
  • Rename the default-value attribute to default.
  • Remove the type attribute default

    .


    Section
    Column
    width20%
    <set-calendar>
    Column
    Performs a Timestamp adjustment operation.
    Code Block
    xml
    xml
    <set-calendar field="tomorrowStamp" from-field="nowTimestamp" day="1" />
    <set-calendar field="yesterdayStamp" from-field="nowTimestamp" day="-1" />
    

    Attributes

    field

    optional

    The name of the field to set (the l-value)

    from-field

    optional

    The name of a field to copy from (the r-value)

    value

    optional

    A constant value

    default-value

    optional

    A default constant value - used if from-field evaluates to null

    type

    optional

    The Java data type of field

    years

    optional

    A signed integer adjustment amount

    months

    optional

    A signed integer adjustment amount

    days

    optional

    A signed integer adjustment amount

    hours

    optional

    A signed integer adjustment amount

    minutes

    optional

    A signed integer adjustment amount

    seconds

    optional

    A signed integer adjustment amount

    millis

    optional

    A signed integer adjustment amount

    period-align-start

    optional

    Set the adjusted Timestamp to period start: "day", "week", "month", "year"

    period-align-end

    optional

    Set the adjusted Timestamp to period end: "day", "week", "month", "year"

    locale

    optional

    The locale (calendar) to be used for the operation

    time-zone

    optional

    The time zone to be used for the operation


    Info
    titleProposed Changes
    • Currently, the field attribute is optional. Require the field attribute.
    • Currently, the from-field and value attributes are optional. Require one of the two attributes.
    • Rename the from-field attribute to from. The attribute will be used exclusively for UEL expressions.
    • Change the behavior of the value attribute: The attribute will be used exclusively for string constants.
    • Remove the default-value attribute. The value attribute will be used for default constant values.

    ...