Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents

Table of Contents
 

Introduction

he Mini-Language concept in Open For Business is similar to the Gang of Four Interpreter pattern, or the Mark Grand Little Language pattern. This is also the central theme of the Building Parsers with Java book by Steven John Metsker which the OFBiz Rule Engine is based on. The idea is to create simple languages that simplify complex or frequently performed tasks.

...

Attribute NameRequired?Description
map-nameNThe name of the map in the method environment. If not specified the field-name will be used to set the field in the method environment.
field-nameYThe name (key) of the map field to use.
defaultNA default value to use if the session attribute is null or is a String and is empty. This will also be used when NOT running as an event.
session-nameNThe name of the session attribute to use. Defaults to the field-name.

webapp-property-to-field

The webapp-property-to-field tag copies a property value from a properties file in a ServletContext resource to a field.

The tag is only used when the simple-method is called as an event, it is ignored otherwise (except the default value, if specified).

Attribute NameRequired?Description
resourceYThe resource location of the properties file inside the webapp, and relative to the root of the webapp (can be inside a war file). An example of this is "/WEB-INF/myprops.properties".
propertyYThe property whose value will be put in the field.
defaultNA default value to use if the property value is null or empty. This will also be used when NOT running as an event.
map-nameNThe name of the map in the method environment. If not specified the field-name will be used to set the field in the method environment.
field-nameYThe name (key) of the map field to use.

Service Specific Operations

field-to-result

The field-to-result tag copies a field from a map to the specified service result field.

The tag is only used when the simple-method is called as a service, it is ignored otherwise.

Attribute NameRequired?Description
map-nameNThe name of the map in the method environment. If not specified the field-name will be used to get the field from the method environment.
field-nameYThe name (key) of the map field to use.
result-nameNThe name of the request attribute to use. Defaults to the field-name.

Method Environment Operations

map-to-map

The map-to-map tag copies all fields from one map to another map