Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: edited the attributes of <make-value> because the map is optional (seen in different minilang scripts in OFBiz)
Alert
titleMini Lang Deprecated
typeWarning

According to the proposal thread in [1] we decided to deprecate mini lang. For additional information please refer to the corresponding issue [2].


[1] https://s.apache.org/iS8W

[2]

Jira
serverASF JIRA
serverId5aa69414-a9e9-3523-82ec-879b028fb15b
keyOFBIZ-9350

Current Mini Language (minilang) Reference Guide (Version 3)

...

Section
Column
width20%
<call-simple-method>
Column
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: "inline" or "function".

When set to "inline", existing variables can be modified by the called script. When set to "function", existing variables are protected from modification, and the called script returns values via the <field-to-result> element. Defaults to "inline".

 

Child Elements

Name

Requirements

 

<result-to-field>

optional (one or more), used only when scope="inlinefunction" (default)

(?) (https://cwiki.apache.org/OFBADMIN/mini-language-reference.html#Mini-languageReference-{{}})

...

Section
Column
width20%
<make-value>
Column
Creates a new entity value.

The new entity value exists only in memory - it is not persisted in the data source until it is stored.

Attributes

Name

Type

Requirements

Description

Notes

entity-name

constant, ${expression}

required

The name of the entity.

A runtime exception will be thrown if the entity does not exist.

value-field

expression

required

The name of the field that will contain the new entity value.

 

map

expression

requiredoptional

The name of the field that contains a map that is used to initialize the entity value fields.

Map values whose key matches one of the entity value fields will be copied to the corresponding entity value field.

Defaults to parameters.

Section
Column
width20%
<order-value-list>
Column
Performs an in-memory sort of a list of entity values.
Attributes

Name

Type

Requirements

Description

Notes

list

expression

required

The name of the field that contains the list of entity values.

The target field will be set to null if the list is not found.

order-by-list

expression

required

The name of the field that contains the list of field names to sort on.

Field names can be preceded by a plus symbol (plus) or a minus symbol (minus) to specify an ascending or descending sort for that field. The default is ascending sort. If the order-by-list is not found the target field will be set to a copy of the source list.

to-list

expression

optional

The name of the field that will contain the sorted list.

Defaults to the field specified in the list attribute.

...