Access to add and change pages is restricted. See: https://cwiki.apache.org/confluence/display/OFBIZ/Wiki+access

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 68 Next »

Mini-language Reference

The Apache Open For Business Project

This is a draft document. It can be modified at any time by any committer. Comments on the draft should be made on the dev mailing list.


Grammar version 2 (http://ofbiz.apache.org/dtds/simple-methods-v2.xsd)

Attributes

Attribute Types

Type

Description

Example

constant

A string constant. The string may not include an expression

name="fooMethod"

constant+expr

A string constant. The string may include an expression, but an expression-only string is not allowed

default="${foo}Method"

expression

A UEL expression without enclosing brackets

from="item.quantity * item.priceEach"

${expression}

A UEL expression with enclosing brackets

default="${parameters.itemId}"

script

A short script ("scriptlet")

script="groovy:foo.bar();"


The <simple-method> element

<simple-method>
Contains a block of code.
<simple-method method-name="fooMethod">
  <!-- some mini-language code goes here -->
</simple-method>

Attributes

method-name

optional

Each simple method in a file must have a unique name

short-description

optional

Used for documentation

default-error-code

optional

 

default-success-code

optional

 

parameter-map-name

optional

 

event-request-object-name

optional

 

event-session-object-name

optional

 

event-response-object-name

optional

 

event-response-code-name

optional

 

event-error-message-name

optional

 

event-error-message-list-name

optional

 

event-event-message-name

optional

 

event-event-message-list-name

optional

 

service-response-message-name

optional

 

service-error-message-name

optional

 

service-error-message-list-name

optional

 

service-error-message-map-name

optional

 

service-success-message-name

optional

 

service-success-message-list-name

optional

 

login-required

optional

 

use-transaction

optional

 

locale-name

optional

 

delegator-name

optional

 

security-name

optional

 

dispatcher-name

optional

 

user-login-name

optional

 


Proposed Changes

  • Eliminate unused and seldom used attributes.
  • Currently, the method-name attribute is optional. Require the method-name attribute.


Assignment Operations

<add-error>
Adds a message to the error message list.
<add-error>
  <fail-message message="There was an error" />
</add-error>

Attributes

error-list-name

optional

The name of a list that will contain the message

Default is "error_list"


Child Elements

<fail-message>

optional

<fail-property>

optional


Proposed Changes

Currently, child elements are optional. Require one child element.

<clear-field>
Removes a field from memory.
<clear-field field="foo" />

Attributes

field

optional

The name of the field to remove

map-name

optional

The name of the map to remove


Proposed Changes

  • Currently, the field attribute is optional. Require the field attribute.
  • Eliminate the map-name attribute.
<create-object>
Create a new Java object.
<create-object field="foo" class-name="com.acme.FooClass">
  <string value="bar" />
  <field field="foo" />
</create-object>

Attributes

field

optional

The name of the field for the new object

class-name

optional

The Java class name


Child Elements

<field>

optional

<string>

optional


Proposed Changes

  • Currently, both attributes are optional. Require both attributes.
  • Deprecate and replace with scriptlet
<fail-message>
Declares a message to be added to a message list.
<add-error>
  <fail-message message="There was an error" />
</add-error>

Attributes

message

optional

The message text


Proposed Changes

  • Currently, the message attribute is optional. Require the message attribute.
<fail-property>
Declares a property key that is used to add a message to a message list.
<add-error>
  <fail-property resource="ErrorMessages" property="FooError" />
</add-error>

Attributes

resource

optional

Name of the resource where the message can be found

property

optional

The message property key


Proposed Changes

  • Currently, both attributes are optional. Require both attributes.
<field-to-list>
Copies a field to a list.
<field-to-list list="barList" field="foo" />

Attributes

list

optional

Name of the list. If the list does not exist, one is created.

field

optional

The field to add to the list


Proposed Changes

  • Currently, both attributes are optional. Require both attributes.
  • Deprecate and replace with UEL expression.
<field-to-request>
Copies a field to a servlet request attribute.
<field-to-request field="foo" request-name="fooAttribute" />

Attributes

field

optional

The name of the field to copy from

request-name

optional

The name of the request attribute to copy to

map-name

optional

The name of the map containing field


Proposed Changes

  • Currently, all attributes are optional. Require the field and request-name attributes.
  • Eliminate the map-name attribute.
  • Deprecate and replace with a UEL expression.
<field-to-result>
Copies a field to a service OUT attribute.
<field-to-result field="foo" result-name="fooAttribute" />

Attributes

Name

Type

Requirements

Description

Note

field

expression

required

The name of the field to copy from, the source of the assignment

 

result-name

expression

optional

The name of the result field to set, the target of the assignment

Defaults to field


Draft Status

Final draft.


<field-to-session>
Copies a field to a servlet session attribute.
<field-to-session field="foo" session-name="fooAttribute" />

Attributes

field

optional

The name of the field to copy from

session-name

optional

The name of the session attribute to copy to

map-name

optional

The name of the map containing field


Proposed Changes

  • Currently, all attributes are optional. Require the field and session-name attributes.
  • Eliminate the map-name attribute.
  • Deprecate and replace with a UEL expression.
<first-from-list>
Copies the first element in a list to a field. If the list is empty or not found, sets the field to null.
<first-from-list entry-name="foo" list-name="fooList" />

Attributes

entry-name

optional

The name of the field to copy to

list-name

optional

The name of the list to copy from


Proposed Changes

  • Currently, both attributes are optional. Require both attributes.
  • Deprecate and replace with a UEL expression.
<list-to-list>
Copies list elements to another list. If the target list is not found, a new list is created.
<list-to-list list-name="foo" to-list-name="fooList" />

Attributes

list-name

optional

The name of the list to copy from

to-list-name

optional

The name of the list to copy to


Proposed Changes

  • Currently, both attributes are optional. Require both attributes.
  • Rename the list-name attribute to from-field or from-list to make the syntax similar to other operators.
<map-to-map>
Copies map entries to another map. If the target map is not found, a new map is created.
<map-to-map map-name="foo" to-map-name="fooMap" />

Attributes

map-name

optional

The name of the map to copy from

to-map-name

optional

The name of the map to copy to


Proposed Changes

  • Currently, both attributes are optional. Require both attributes.
  • Rename the map-name attribute to from-field or from-map to make the syntax similar to other operators.
<now>
Sets a field to the current system time.
<now field="fooNow" />

Attributes

Name

Type

Requirements

Description

Note

field

expression

required

The name of the field to set, the target of the assignment

 

type

constant

optional

The Java data type of field

Defaults to "java.sql.Timestamp"


Draft Status

Final draft.


<now-date-to-env>
Deprecated - use <now>.

Draft Status

Final draft.


<now-timestamp>
Deprecated - use <now>.

Draft Status

Final draft.


<order-by>

Child element of <order-map-list>

Defines a map key to sort on.
<order-map-list list="fooList">
    <order-by field="fooKey" />
</order-map-list>

Attributes

field

optional

The name of the key to sort on


<order-map-list>
Sorts a list of maps.
<order-map-list list="fooList">
    <order-by field="fooKey" />
</order-map-list>

Attributes

list

optional

The name of the list to be sorted


Child Elements

<order-by>

optional

Defines a map key to sort on


Proposed Changes

  • Currently, the list attribute is optional. Require the attribute.
  • Currently, the child elements are optional, and the operator throws an exception at run time when none are found. Require at least one child element.
<property-to-field>
Assigns a resource property to a field.
<property-to-field field="foo" resource="fooResource.properties" property="fooKey" />

Attributes

field

optional

The name of the field

 

resource

optional

The resource that contains the property

 

property

optional

The property key

 

default

optional

A default value to be used when the property is not found

 

no-locale

optional

If "true" no localization will be performed on the property's value

Default is "false"

arg-list-name

optional

The name of a field that contains a list of arguments to be used in formatted property values

 


Proposed Changes

  • Currently, all attributes are optional. Require the field, resource, and property attributes.
<request-parameters-to-list>
Copies request parameters to a list.
<request-parameters-to-list list-name="fooList" request-name="fooParameter" />

Attributes

list-name

optional

Name of the list. If the list does not exist, one is created.

request-name

optional

The name of the request parameter. All parameter values will be added to the list


Proposed Changes

  • Currently, both attributes are optional. Require both attributes.
  • Rename the list-name attribute to list - to make the syntax similar to other operators.
  • Rename the request-name attribute to parameter-name - to make the syntax clearer.
<request-to-field>
Copies a Servlet request attribute to a field.
<request-to-field field="foo" request-name="fooAttribute" />

Attributes

field

optional

The name of the field for the new object

request-name

optional

The name of the request attribute

default

optional

A default constant value - used if the request attribute does not exist

map-name

optional

The name of the map containing field


Proposed Changes

  • Currently, the field and request-name attributes are optional. Require both attributes.
  • Eliminate the map-name attribute.
  • Rename the request-name attribute to attribute-name - to make the syntax clearer.
<session-to-field>
Copies a Servlet session attribute to a field.
<session-to-field field="foo" session-name="fooAttribute" />

Attributes

field

optional

The name of the field for the new object

session-name

optional

The name of the session attribute

default

optional

A default constant value - used if the session attribute does not exist

map-name

optional

The name of the map containing field


Proposed Changes

  • Currently, the field and session-name attributes are optional. Require both attributes.
  • Eliminate the map-name attribute.
  • Rename the session-name attribute to attribute-name - to make the syntax clearer.
<set>
Assigns a field from an expression or script, or from a constant value.
<set field="foo" value="bar" />
<set field="baz" from="foo" />
<!-- Field "baz" contains the string "bar" -->

Attributes

Name

Type

Requirements

Description

Notes

field

expression

required

The name of the field to set, the target of the assignment

 

from

expression, 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+expr

required if from is empty

A constant value

Default type = "java.lang.String"

default

constant+expr, expression

optional

A default value - used if from evaluates to null

Expressions must be enclosed in ${}

type

constant

optional

The Java data type of field

"NewList" will create a new java.util.List, "NewMap" will create a new java.util.Map

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"


Draft Status

Final draft.


<set-calendar>
Performs a Timestamp adjustment operation.
<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


Proposed 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.
<set-service-fields>
Copies map entries that match a service definition to another map. If the target map is not found, a new map is created.
<set-service-fields service-name="fooService" map="barMap" to-map="fooServiceAttributes" />

Attributes

service-name

optional

The name of the service

map

optional

The name of the map to copy from

to-map

optional

The name of the map to copy to

error-list

optional

The name of a list to copy error messages to


Proposed Changes

  • Currently, the service-name, map, and to-map attributes are optional. Require all three attributes.
  • Eliminate the error-list attribute, error messages are added to the result map
<string-append>

Proposed Changes

Deprecate and replace with <set>

<string-to-field>

Proposed Changes

Deprecate and replace with <set>

<string-to-list>

Proposed Changes

Deprecate and replace with <set>

<to-string>

Proposed Changes

Deprecate and replace with <set>

<webapp-property-to-field>
Copies a ServletContext resource property to a field.
<webapp-property-to-field field="foo" resource="fooResource" property="fooKey" />

Attributes

field

optional

The name of the field for the new object

resource

optional

The resource that contains the property

property

optional

The property key

default

optional

A default value to be used when the property is not found

map-name

optional

The name of the map containing field


Proposed Changes

  • Currently, the field, resource and property attributes are optional. Require all three attributes.
  • Eliminate the map-name attribute.


Conditional/Looping Statements

<and>
Combines conditional elements using a boolean AND.
<if>
    <condition>
        <and>
            <if-compare field="colorModel" operator="equals" value="RYB" />
            <or>
                <if-compare field="color" operator="equals" value="red" />
                <if-compare field="color" operator="equals" value="yellow" />
                <if-compare field="color" operator="equals" value="blue" />
            </or>
        </and>
    </condition>
    <then>
        <set field="isPrimaryColor" value="true" type="Boolean" />
    </then>
    <else>
        <set field="isPrimaryColor" value="false" type="Boolean" />
    </else>
</if>
<assert>
Evaluates each contained condition independently, and adds an error message to the error message list for each condition that does not evaluate to true.

Attributes

title

optional

The assertion title - used in error messages to identify the assertion

 

error-list-name

optional

The name of the error list

Defaults to "error_list"


Child Elements

Any <condition> child element

optional

A condition to test


Proposed Changes

  • Currently, the title attribute is optional. Keep the title attribute optional but have it default to the file location and line number.
  • Eliminate the error-list-name attribute.
  • Currently, the child element is optional. Require at least one child element.
<break>
Causes script execution to exit the nearest loop element.
<check-id>
Evaluates the specified field, and adds an error message to the error message list if the field's value is not a valid database ID value.

Attributes

field

optional

The name of the field to validate

 

map-name

optional

The name of the map containing field

 

error-list-name

optional

The name of the error list

Defaults to "error_list"


Child Elements

<fail-message>

optional

<fail-property>

optional


Proposed Changes

  • Currently, the field attribute is optional. Require the field attribute.
  • Eliminate the map-name and error-list-name attributes.
  • Currently, the child elements are optional. Require one child element.
<check-errors>
Halts script execution if the error message list contains any messages. The error message list is returned to the calling process.

Attributes

error-code

optional

The error code to return

Defaults to "error"

error-list-name

optional

The name of the error list

Defaults to "error_list"


Proposed Changes

  • Eliminate the error-list-name attribute.
<check-permission>
Checks if the user has the specified permission, and adds an error message to the error message list if the user does not have the specified permission.

Attributes

permission

optional

The permission to check

 

action

optional

The action to be performed (permission scope)

 

error-list-name

optional

The name of the error list

Defaults to "error_list"


Child Elements

<accept-userlogin-party>

optional

<alt-permission>

optional

<fail-message>

optional

<fail-property>

optional


Proposed Changes

  • Currently, the permission and action attributes are optional. Require the permission and action attributes.
  • Eliminate the error-list-name attribute.
<condition>
Combines a group of conditional elements into a single logical (true/false) expression.
<if>
    <condition>
        <and>
            <if-compare field="colorModel" operator="equals" value="RYB" />
            <or>
                <if-compare field="color" operator="equals" value="red" />
                <if-compare field="color" operator="equals" value="yellow" />
                <if-compare field="color" operator="equals" value="blue" />
            </or>
        </and>
    </condition>
    <then>
        <set field="isPrimaryColor" value="true" type="Boolean" />
    </then>
    <else>
        <set field="isPrimaryColor" value="false" type="Boolean" />
    </else>
</if>
<continue>
Causes script execution to return to the beginning of the nearest enclosing loop element.
<else>
Contains a block of code to be executed when a condition evaluates to false.
<if>
    <condition>
        <and>
            <if-compare field="colorModel" operator="equals" value="RYB" />
            <or>
                <if-compare field="color" operator="equals" value="red" />
                <if-compare field="color" operator="equals" value="yellow" />
                <if-compare field="color" operator="equals" value="blue" />
            </or>
        </and>
    </condition>
    <then>
        <set field="isPrimaryColor" value="true" type="Boolean" />
    </then>
    <else>
        <set field="isPrimaryColor" value="false" type="Boolean" />
    </else>
</if>
<else-if>
Contains a block of code to be executed when a condition evaluates to false.
<if>
    <condition>
        <and>
            <if-compare field="colorModel" operator="equals" value="RYB" />
            <or>
                <if-compare field="color" operator="equals" value="red" />
                <if-compare field="color" operator="equals" value="yellow" />
                <if-compare field="color" operator="equals" value="blue" />
            </or>
        </and>
    </condition>
    <then>
        <set field="isPrimaryColor" value="true" type="Boolean" />
    </then>
    <else-if>
        <condition>
            <and>
                <if-compare field="colorModel" operator="equals" value="CYM" />
                <or>
                    <if-compare field="color" operator="equals" value="cyan" />
                    <if-compare field="color" operator="equals" value="yellow" />
                    <if-compare field="color" operator="equals" value="magenta" />
                </or>
            </and>
        </condition>
        <then>
            <set field="isPrimaryColor" value="true" type="Boolean" />
        </then>
    </else-if>
    <else>
        <set field="isPrimaryColor" value="false" type="Boolean" />
    </else>
</if>
<if>
Contains blocks of code that are executed based on a logical (true/false) condition.
<if>
    <condition>
        <and>
            <if-compare field="colorModel" operator="equals" value="RYB" />
            <or>
                <if-compare field="color" operator="equals" value="red" />
                <if-compare field="color" operator="equals" value="yellow" />
                <if-compare field="color" operator="equals" value="blue" />
            </or>
        </and>
    </condition>
    <then>
        <set field="isPrimaryColor" value="true" type="Boolean" />
    </then>
    <else-if>
        <condition>
            <and>
                <if-compare field="colorModel" operator="equals" value="CYM" />
                <or>
                    <if-compare field="color" operator="equals" value="cyan" />
                    <if-compare field="color" operator="equals" value="yellow" />
                    <if-compare field="color" operator="equals" value="magenta" />
                </or>
            </and>
        </condition>
        <then>
            <set field="isPrimaryColor" value="true" type="Boolean" />
        </then>
    </else-if>
    <else>
        <set field="isPrimaryColor" value="false" type="Boolean" />
    </else>
</if>

Child Elements

<condition>

optional

<then>

optional

<else>

optional

<else-if>

optional


Proposed Changes

  • Currently, the <condition> and <then> child elements are optional. Require the <condition> and <then> child elements.
<if-compare>
Compares a field to a constant value.

Attributes

field

optional

The name of the field to test

 

operator

optional

The comparison operator

 

value

optional

A constant value

 

type

optional

The Java data type of field

Defaults to "String"

format

optional

Object type conversion format

 

map-name

optional

The name of the map containing field

 


Proposed Changes

  • Currently, the field and operator attributes are optional. Require the field and operator attributes.
  • Eliminate the map-name attribute.
<if-compare-field>
Compares a field to another field.

Attributes

field

optional

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

 

operator

optional

The comparison operator

 

to-field

optional

The name of the field to test (the r-value)

Defaults to field

type

optional

The Java data type of field

Defaults to "String"

format

optional

Object type conversion format

 

map-name

optional

The name of the map containing field

 

to-map-name

optional

The name of the map containing to-field

 


Proposed Changes

  • Currently, the field, operator, and to-field attributes are optional. Require the field, operator and to-field attributes.
  • Eliminate the map-name and to-map-name attributes.
<if-empty>
Contains blocks of code that are executed based on the size of a collection.

Attributes

field

optional

The name of the field to test

map-name

optional

The name of the map containing field


Child Elements

<else>

optional


Proposed Changes

  • Currently, the field attribute is optional. Require the field attribute.
  • Eliminate the map-name attribute.
<if-has-permission>
Contains blocks of code that are executed based on the user's permissions.

Attributes

permission

optional

The permission to check

 

action

optional

The action to be performed (permission scope)

 


Child Elements

<else>

optional


Proposed Changes

  • Currently, the permission and action attributes are optional. Require the permission and action attributes.
<if-instance-of>
Contains blocks of code that are executed based on a field's class.

Attributes

field

optional

The name of the field to test

class

optional

The name of the class

map-name

optional

The name of the map containing field


Child Elements

<else>

optional


Proposed Changes

  • Deprecate and replace with scriptlet.
<if-not-empty>
Contains blocks of code that are executed based on the size of a collection.

Attributes

field

optional

The name of the field to test

map-name

optional

The name of the map containing field


Child Elements

<else>

optional


Proposed Changes

  • Currently, the field attribute is optional. Require the field attribute.
  • Eliminate the map-name attribute.
<if-regexp>
Contains blocks of code that are executed based on matching a regular expression to a field.

Attributes

field

optional

The name of the field to test

expr

optional

The regular expression to match

map-name

optional

The name of the map containing field


Child Elements

<else>

optional


Proposed Changes

  • Currently, the field and expr attributes are optional. Require the field and expr attributes.
  • Eliminate the map-name attribute.
<if-validate-method>
Invokes a Java class method that returns a boolean value. Blocks of code are executed based on the boolean value.

Attributes

field

optional

The name of the field to use as a method argument

class

optional

The name of the Java class

method

optional

The name of the class method

map-name

optional

The name of the map containing field


Child Elements

<else>

optional


Proposed Changes

  • Deprecate and replace with simple method call.
<iterate>
Contains a block of code that is executed once for each entry in a specified collection.

Attributes

list

optional

The name of the field containing the collection to iterate

entry

optional

The name of the field that will contain the collection entry


Proposed Changes

  • Currently, both attributes are optional. Require both attributes.
<iterate-map>
Contains a block of code that is executed once for each entry in a MapEntry set.

Attributes

map

optional

The name of the field containing the Map

key

optional

The name of the field that will contain the MapEntry key

value

optional

The name of the field that will contain the MapEntry value


Proposed Changes

  • Currently, all attributes are optional. Require the map attribute and one of the key or value attributes.
<loop>
Contains a block of code that is executed repeatedly until a maximum count is reached.

Attributes

field

optional

The name of the field containing the current count value

 

count

optional

A maximum count expression

Defaults to "0" (zero)


Proposed Changes

  • Currently, all attributes are optional. Require all attributes.
<not>
Inverts a conditional element using a boolean NOT.
<or>
Combines conditional elements using a boolean OR.
<if>
    <condition>
        <and>
            <if-compare field="colorModel" operator="equals" value="RYB" />
            <or>
                <if-compare field="color" operator="equals" value="red" />
                <if-compare field="color" operator="equals" value="yellow" />
                <if-compare field="color" operator="equals" value="blue" />
            </or>
        </and>
    </condition>
    <then>
        <set field="isPrimaryColor" value="true" type="Boolean" />
    </then>
    <else>
        <set field="isPrimaryColor" value="false" type="Boolean" />
    </else>
</if>
<return>
Returns control (execution) to the calling process.

Attributes

response-code

optional

A response code to return to the calling process


<then>
Contains a block of code to be executed when a <condition> element evaluates to true.
<if>
    <condition>
        <and>
            <if-compare field="colorModel" operator="equals" value="RYB" />
            <or>
                <if-compare field="color" operator="equals" value="red" />
                <if-compare field="color" operator="equals" value="yellow" />
                <if-compare field="color" operator="equals" value="blue" />
            </or>
        </and>
    </condition>
    <then>
        <set field="isPrimaryColor" value="true" type="Boolean" />
    </then>
    <else>
        <set field="isPrimaryColor" value="false" type="Boolean" />
    </else>
</if>
<while>
Contains a block of code that is executed repeatedly while a <condition> element evaluates to true.

Child Elements

<condition>

optional

<then>

optional


Proposed Changes

  • Currently, the <condition> and <then> child elements are optional. Require the <condition> and <then> child elements.
<xor>
Combines conditional elements using a boolean XOR.


Call Operations

<call-bsh>
Executes a BSH script.

Proposed Changes

  • Deprecate and replace with <script>.
<call-class-method>
Calls a Java class method using the given fields as parameters.

Proposed Changes

  • Deprecate and replace with <script>.
<call-map-processor>
Invokes a Map processing element.

Attributes

xml-resource

optional

The location of the Map processor file

processor-name

optional

The name of the Map processor element

in-map-name

optional

The name of the field that contains the Map to be processed

out-map-name

optional

The name of the field that will receive the processed Map

error-list-name

optional

The name of the field that will contain a list of error messages generated by the processor


Child Elements

<simple-map-processor>

optional


Proposed Changes

  • Deprecate and replace with a <call-simple-method> element.
<call-object-method>
Calls a Java object method using the given fields as parameters.

Proposed Changes

  • Deprecate and replace with <script>.
<call-service>
Invokes an OFBiz service.

Attributes

service-name

optional

The name of the service to invoke

in-map-name

optional

The name of the field that contains the service IN attributes

include-user-login

optional

If "true" the current UserLogin GenericValue is copied to the service IN attributes

break-on-error

optional

If "true" script execution stops if the called service returns an error

error-code

optional

 

require-new-transaction

optional

 

transaction-timeout

optional

 

success-code

optional

 


Child Elements

<error-prefix>

optional

<error-suffix>

optional

<success-prefix>

optional

<success-suffix>

optional

<message-prefix>

optional

<message-suffix>

optional

<default-message>

optional

<results-to-map>

optional

<result-to-field>

optional

<result-to-request>

optional

<result-to-session>

optional

<result-to-result>

optional


Proposed Changes

  • Currently, the service-name attribute is optional. Require the service-name attribute.
  • Currently, the in-map-name Map is passed directly to the service. Have the in-map-name attribute behave like the <set-service-fields> map attribute.
<call-service-asynch>
Invokes an OFBiz service asynchronously.

Attributes

service-name

optional

The name of the service to invoke

in-map-name

optional

The name of the field that contains the service IN attributes

include-user-login

optional

If "true" the current UserLogin GenericValue is copied to the service IN attributes


Proposed Changes

  • Deprecate and replace with <call-service> element. Add an async attribute ("true"/"false") to the <call-service> element.
<call-simple-method>
Invokes a Mini-language simple method.

Attributes

Name

Type

Requirements

Description

Notes

method-name

constant

required

The name of the <simple-method> element

 

xml-resource

constant

optional

The location of the <simple-method> file

Defaults to current file

scope

constant

optional

The memory scope to use

Defaults to "inline"


Draft Status

Final draft.


<script>
Executes a script.

Attributes

Name

Type

Requirements

Description

Notes

location

constant

required if script is empty

The location of the script file

Script functions/methods can be invoked by appending a hash (#) and the function/method name

script

script

required if location is empty

A short script (scriptlet). Can be used instead of a file

 


Draft Status

Final draft.



Entity Operations

<clear-cache-line>
Removes an entity from the cache.
<clear-cache-line entity-name="Party" />

Attributes

entity-name

optional

The name of the entity to remove

map-name

optional

The name of the map that contains entity-name


Proposed Changes

  • Currently, the entity-name attribute is optional. Require the entity-name attribute.
  • Eliminate the map-name attribute.
<clear-entity-caches>
Removes all entities from the cache.
<clear-entity-caches />
<clone-value>
Copies a field containing a GenericValue to a new GenericValue.

Attributes

value-field

optional

The name of the field containing the existing GenericValue

new-value-field

optional

The name of the field that will contain the new GenericValue


Proposed Changes

  • Deprecate and replace with the <make-value> element.
<condition>
Contains an entity find condition.

Child Elements

<condition-expr>

optional

<condition-list>

optional

<condition-object>

optional

<having-condition-list>

optional


Proposed Changes

  • Currently, the child elements are optional. Require one child element.
<condition-expr>
Declares an entity find condition expression.

Attributes

field-name

optional

The entity field name (comparison l-value)

operator

optional

The condition comparison operator

from-field

optional

The name of the environment field (variable) to compare to (comparison r-value)

value

optional

A string constant to compare to (comparison r-value)

ignore-if-null

optional

When set to "true" ignores the expression if the r-value evaluates to null

ignore-if-empty

optional

When set to "true" ignores the expression if the r-value is empty

ignore-case

optional

When set to "true" ignores case in string comparisons

ignore

optional

When set to "true" ignores the expression


Proposed Changes

  • Currently, the field-name and operator attributes are optional. Require the field-name and operator attributes.
<condition-list>
Combines entity find conditions into a single expression.

Attributes

combine

optional

The operator used to combine the expressions


Child Elements

<condition-expr>

optional

<condition-list>

optional

<condition-object>

optional


<condition-object>
Declares an environment field (variable) that contains an entity find condition expression object.

Attributes

field

optional

The name of the field that contains an entity find condition expression object


Proposed Changes

  • Currently, the field attribute is optional. Require the field attribute.
<create-value>
<entity-and>
<entity-condition>
<entity-count>
<entity-data>
<entity-one>
<field-map>
<filter-list-by-and>
<filter-list-by-date>
<find-by-and>
<find-by-primary-key>
<get-related>
<having-condition-list>
<make-next-seq-id>
<make-value>
<order-by>
<order-value-list>
<refresh-value>
<remove-by-and>
<remove-list>
<remove-related>
<remove-value>
<select-field>
<sequenced-id-to-env>
<set-current-user-login>
<set-nonpk-fields>
<set-pk-fields>
<store-list>
<store-value>
<transaction-begin>
<transaction-commit>
<transaction-rollback>


Calculate Operations

Proposed Changes

Deprecate and replace with UEL expression.

<calcop>
<calculate>
<number>


Map Processor

<compare>
<compare-field>
<convert>
<copy>
<fail-message>
<fail-property>
<make-in-string>
<not-empty>
<process>
<regexp>
<simple-map-processor>
<validate-method>


Logging

<log>


  • No labels