CallOperations
Attribute Name | Required | Description |
resource | Name of a properties file on the classpath. | |
error-list-name | The name of the list in the method environment to check for error messages. Defaults to "error_list". |
Attribute Name | Required | Description |
class-name | The name of the class to call the static method on. | |
method-name | The name of the static method to call on the given class. | |
ret-field-name | The name of the field to put the result in. If not specified any return value will be ignored. | |
ret-map-name | The name of the map the field of the return value is in. If not specified but the field name is then the environment will be used to find the field in. |
Attribute Name | Required | Description |
in-map-name | The name of a map in the method environment to use as the input map. | |
out-map-name | The name of a map in the method environment to use as the output map. Will be created if it does not exist already. If already exists will be added to in place. | |
xml-resource | The full path and filename on the classpath of the XML file which contains an external map processor to execute. This is only required if an external map processor is desired. | |
processor-name | The name of the external map processor to execute in the specified xml-resource. This is only required if an external map processor is desired. | |
error-list-name | The name of a list in the method environment that the error messages will be added to. Will be created if it does not exist. Defaults to "error_list". |
Sub Element Name | How Many | Description |
simple-map-processor | 0 to 1 | Uses the same definition as the simple-map-processor in the context of a simple-map-processors XML file. Allows for an inlined simple-map-processor. |
Attribute Name | Required | Description |
obj-field-name | The name of the field the object is in that has the method to be called. | |
method-name | The name of the method to call on the given object. | |
obj-map-name | The name of the map the field of the object is in that has the method to be called. If this is not specified the environment will be used to find the field in. | |
ret-field-name | The name of the field to put the result in. If not specified any return value will be ignored. | |
ret-map-name | The name of the map the field of the return value is in. If not specified but the field name is then the environment will be used to find the field in. |
Attribute Name | Required | Description |
service-name | Name of the service to call. | |
in-map-name | Optional name of a map in the method environment to use as the input map. If you're not going to pass any parameters to the service than you can just leave off the in-map name, although typically in a service tag you will see a service-name and the in-mapname passed in. | |
include-user-login | Include-user-login by default will include the user login so if there is a user login for the current simple-method it will pass that in to the service. If you don't want it to pass that in you can just set this to false. Defaults to "true". | |
break-on-error | If there's an error in the service by default it will stop the current simple-method and return an error message that came from the service it called. If you don't want it to when there's an error you can just set that to false. Defaults to "true". | |
error-code | Defaults to "error". | |
success-code | Defaults to "success". | |
require-new-transaction | Defines if the simple-method requires a new transaction or not. Defaults to "false". | |
transaction-timeout | Defines the time out for the transaction, in milliseconds. None by defaults. |
Sub Element Name | How Many | Description |
error-prefix | 0 to 1 | |
error-suffix | 0 to 1 | |
success-prefix | 0 to 1 | |
success-suffix | 0 to 1 | |
message-prefix | 0 to 1 | |
message-suffix | 0 to 1 | |
default-message | 0 to 1 | |
results-to-map | 0 to many | |
result-to-field | 0 to many | |
result-to-request | 0 to many | |
result-to-session | 0 to many | |
result-to-result | 0 to many |
Attribute Name | Required | Description |
service-name | Name of the service called asynchronously. | |
in-map-name | The name of a map in the method environment to use as the input map. | |
include-user-login | Defaults to "true". |
Attribute Name | Required | Description |
method-name | The name of the simple-method to execute in the specified xml-resource, or in the current XML file if no xml-resource is specified. | |
xml-resource | The full path and filename on the classpath of the XML file which contains an external simple-method to execute. This is only required if a simple-method in a different file is desired. |
Attribute Name | Required | Description |
class-name | The name of the class to construct an object of. | |
field-name | The name of a field to put the new object in. If not specified the object will be created but ignored after that. | |
map-name | The name of the map the field will go in. If not specified the field will be put in the environment. |
Attribute Name | Required | Description |
service-name | Name of the service from which take all the incoming files, or all incoming attributes. | |
map-name | Incoming map to copy fields from. | |
to-map-name | Map to copy to fields to. |
ControlOperations
Attribute Name | Required | Description |
error-list-name | The name of the list in the method environment to check for error messages. Defaults to "error_list". |
Attribute Name | Required | Description |
error-code | Defaults to "error". | |
error-list-name | The name of the list in the method environment to check for error messages. Defaults to "error_list". |
Sub Element Name | How Many | Description |
error-prefix | 0 to 1 | |
error-suffix | 0 to 1 | |
message-prefix | 0 to 1 | |
message-suffix | 0 to 1 |
Attribute Name | Required | Description |
entry-name | The name of the method environment field that will contain each entry as we iterate through the list. | |
list-name | The name of the method environment field that contains the list to iterate over. |
Attribute Name | Required | Description |
key-name | Name of the variable to put the key. | |
value-name | Name of the variable to put the value in. | |
map-name | Name of the map to use. |
Attribute Name | Required | Description |
count | Number of times to loop. | |
field | Current count is put in the field attribute. |
Attribute Name | Required | Description |
response-code | The string to return as a response code. Defaults to "success". |
EntityFindOperations
Attribute Name | Required | Description |
entity-name | Name of entity to search in. | |
list-name | Name of the list where to put results. | |
use-cache | Specifies whether or not the delegator's cache should be searched before going to the database. This results in much faster retrieval times, but can return stale data that is not the most current in the database. Must be "true" or "false", defaults to "false". | |
filter-by-date | Look for from-date and through-date fields in the list of results coming back and filters by the current date and time if set to true. Defaults to false. |
Sub Element Name | How Many | Description |
field-map | 1 to many | |
select-field | 0 to many | Specify fields to select, otherwise all fields will be selected. |
order-by | 0 to many | Defines fields to order list by. |
limit-range | 0 to 1 | |
limit-view | 0 to 1 | |
use-iterator | 0 to 1 |
Attribute Name | Required | Description |
entity-name | Name of entity to search in. | |
list-name | Name of the list where to put results. | |
use-cache | Specifies whether or not the delegator's cache should be searched before going to the database. This results in much faster retrieval times, but can return stale data that is not the most current in the database. Must be "true" or "false", defaults to "false". | |
filter-by-date | Look for from date and through date fields in the list of results coming back and filters by the current date and time if set to true. Defaults to false. | |
distinct | Filter the results making sure that all of them are unique. Defaults to false. | |
delegator-name | Name of a delegator to use. By default uses the delegator associated with that instance of the service engine. |
Sub Element Name | How Many | Description |
condition-expr | 0 to 1 | |
condition-list | 0 to 1 | |
condition-object | 0 to 1 | |
having-condition-list | 0 to 1 | |
select-field | 0 to many | Specify fields to select, otherwise all fields will be selected. |
order-by | 0 to many | |
limit-range | 0 to 1 | |
limit-view | 0 to 1 | |
use-iterator | 0 to 1 |
Attribute Name | Required | Description |
entity-name | Name of entity to search in. | |
count-name | Name of the variable to put result of the count in. | |
delegator-name | Name of a delegator to use. By default uses the delegator associated with that instance of the service engine. |
Sub Element Name | How Many | Description |
condition-expr | 1 to 1 | |
condition-list | 1 to 1 | |
condition-object | 1 to 1 | |
having-condition-list | 0 to 1 |
Attribute Name | Required | Description |
entity-name | Name of the entity to look for. | |
value-name | Name of the variable to put entity in. | |
use-cache | Specifies whether or not the delegator's cache should be searched before going to the database. This results in much faster retrieval times, but can return stale data that is not the most current in the database. Must be "true" or "false", defaults to "false". | |
auto-field-map | Looks for all primary key field names in the current context as well as in the parameters map or not. Defaults to true. |
Sub Element Name | How Many | Description |
field-map | 0 to many | Specify where to find primary key fields if you set auto-field-map to false. |
select-field | 0 to many | Specify fields to select, otherwise all fields will be selected. |
Attribute Name | Required | Description |
list-name | The name of the method environment field that contains the list of GenericValue objects. | |
to-list-name | The name of the method environment field the filtered list will be put into. Defaults to the value of the list-name attribute (ie goes to the same place it came from, replacing the old list). | |
map-name | The name of a map in the method environment that will be used for the entity fields. If no map is used this will just make a copy of the list. |
Attribute Name | Required | Description |
list-name | The name of the method environment field that contains the list of GenericValue objects. | |
to-list-name | The name of the method environment field the filtered list will be put into. Defaults to the value of the list-name attribute (ie goes to the same place it came from, replacing the old list). | |
valid-date-name | The name of a field in the method environment date to filter by. Defaults to now. | |
from-field-name | The name of the GenericValue field to use as the beginning effective date. Defaults to fromDate. | |
thru-field-name | The name of the GenericValue field to use as the ending effective date. Defaults to thruDate. | |
all-same | Specifies whether or not all GenericValue objects in the list are of the same entity. Defaults to true. |
Attribute Name | Required | Description |
entity-name | The name of the entity to find instances of. | |
map-name | The name of a map in the method environment that will be used for the entity fields. | |
list-name | The name of the method environment field that contains the list of GenericValue objects. | |
order-by-list-name | This will be a list sitting in the context that has string entries in it for each field that you want it to order by/ Each field in the list, or each entry in the list, will just be a string with a field name. It can be preceded by a plus or a minus to specify an ascending or descending sort for that. The default is ascending sort, so you just put a minus in front of the field-name if you want it to be descending. | |
delegator-name | By default this operation is done using the delegator that is part of the simple-method calling context. This allows you to override the default delegator by naming an alternate delegator. | |
use-cache | Specifies whether or not the delegator's cache should be searched before going to the database. This results in much faster retrieval times, but can return stale data that is not the most current in the database. Must be "true" or "false", defaults to "false". | |
use-iterator | Specifies whether or not to use the EntityListIterator when doing the query. This is much more efficient for large data sets because the results are read incrementaly instead of all at once. Note that when using this the use-cache setting will be ignored. Also note that an EntityListIterator must be closed when you are finished, but this is done automatically by the iterate operation. Must be "true" or "false", defaults to "false". |
Attribute Name | Required | Description |
map-name | The name of a map in the method environment that will be used for the entity fields. | |
value-name | The name of the method environment field that contains the GenericValue object. | |
entity-name | The name of the entity to find an instance of. | |
use-cache | Specifies whether or not the delegator's cache should be searched before going to the database. This results in much faster retrieval times, but can return stale data that is not the most current in the database. Must be "true" or "false", defaults to "false". | |
fields-to-select-list | List containing name of fields to select, if empty defaults to all entity fields. | |
delegator-name | By default this operation is done using the delegator that is part of the simple-method calling context. This allows you to override the default delegator by naming an alternate delegator. |
Attribute Name | Required | Description |
value-name | Name of a generic value sitting in the context from where you want to get a related generic value. | |
relation-name | Name of the relation to use to relate generic value in value-name to generic value in to-value. | |
list-name | Name of a list where to put the result in. | |
map-name | Name of a map that will restrain the query further, beyond the field mappings and their relationship. | |
order-by-list-name | This will be a list sitting in the context that has string entries in it for each field that you want it to order by/ Each field in the list, or each entry in the list, will just be a string with a field name. It can be preceded by a plus or a minus to specify an ascending or descending sort for that. The default is ascending sort, so you just put a minus in front of the field-name if you want it to be descending. | |
use-cache | Specifies whether or not the delegator's cache should be searched before going to the database. This results in much faster retrieval times, but can return stale data that is not the most current in the database. Must be "true" or "false", defaults to "false". |
Attribute Name | Required | Description |
value-name | Name of a generic value sitting in the context from where you want to get a related-one generic value. | |
relation-name | Name of the one-relation to use to relate generic value in value-name to generic value in to-value. | |
to-value-name | Name of a generic value where to put the result. | |
use-cache | Specifies whether or not the delegator's cache should be searched before going to the database. This results in much faster retrieval times, but can return stale data that is not the most current in the database. Must be "true" or "false", defaults to "false". |
Attribute Name | Required | Description |
list-name | Name of the list of generic value objects that we want to sort. | |
order-by-list-name | This will be a list sitting in the context that has string entries in it for each field that you want it to order by. Each field in the list, or each entry in the list, will just be a string with a field name. It can be preceded by a plus or a minus to specify an ascending or descending sort for that. The default is ascending sort, so you just put a minus in front of the field-name if you want it to be descending. | |
to-list-name | Name of the output list. If it is empty, as it is optional, it will simply use the list-name. In other words it will take the ordered list and put it over top of the resource list. |
EntityListOperations
Attribute Name | Required | Description |
list-name | The name of the method environment field that contains the list of GenericValue objects. | |
do-cache-clear | Clear the cache, defaults to true |
Attribute Name | Required | Description |
list-name | The name of the method environment field that contains the list of GenericValue objects. | |
do-cache-clear | Clear the cache, defaults to true |
EntityMiscOperations
Attribute Name | Required | Description |
location | Specify the location of an XML file to load in database or verify in assert mode. | |
delegator-name | Overrides the delegator or default context by specifying a delegator-name. | |
timeout | Override the timeout to start a new transaction and load the data with a longer timeout. | |
error-list-name | The name of the list in the method environment to check for error messages. Defaults to "error_list". | |
mode | "load" or "assert". Default to "load". |
Attribute Name | Required | Description |
value-name | Specify the name of the entity for a sequenced-id-to-env preparing the primarySequencedId. The name of the entity is typically what we use for the sequenced name, but you can use anything you want if you want to have different sets of sequences. The risk of course of many different sets of sequences for the same entity is unless you somehow prefix or suffix the value, you could have a key conflict. So we just use the entity name for these primary sequences. | |
seq-field-name | The field that will have the sub-sequenced value. We use the seqId suffix on the field names in the OFBiz data model to denote that that field is a secondary sequenced ID and should therefore be maintained for this sort of operation. | |
numeric-padding | Since these are eventually strings we do numeric-padding so that the sort is consistent, By default we pad it with five positions. | |
increment-by | Default to 1. If you want to leave some space in the sub-sequence you can use a greater increment. |
Attribute Name | Required | Description |
sequence-name | The name of the sequence to pass to the delegator. The same name must always be used for sequenced IDs that will be used for a certain entity field otherwise non-unique keys may result. | |
env-name | The name of the method environment field the sequenced ID will be put in. | |
get-long-only | Get a numerical long value and put it there, so it does not do that by default. By default getlong-only is false. If you want it to just get a long number then you can set that to true. That's in there for supporting lower level functionality, but that's not the typical pattern used in OFBiz as we do use strings for sequencing. | |
stagger-max | By default this is one. But if you want to have sequenced Ids that are staggered, instead of consecutive, then you can set this to something like twenty. And then it will do a random staggering for each sequenced id; instead of picking the next value all the time it will pick something between the next value and twenty away from the next value, if stagger-max is set to twenty. So that can be used to make the sequenced Ids more difficult to guess. |
EntityTxOperations
Attribute Name | Required | Description |
began-transaction-name | The name of the method environment field that contains a Boolean specifying whether or not a transaction was begun in the current transaction demarcation. Defaults to "beganTransaction". |
Attribute Name | Required | Description |
began-transaction-name | The name of the method environment field that contains a Boolean specifying whether or not a transaction was begun in the current transaction demarcation. Defaults to "beganTransaction". |
Attribute Name | Required | Description |
began-transaction-name | The name of the method environment field that contains a Boolean specifying whether or not a transaction was begun in the current transaction demarcation. Defaults to "beganTransaction". |
EntityValueOperations
Attribute Name | Required | Description |
entity-name | The name of the entity to clear cache lines of. | |
map-name | The name of a map in the method environment that will be used for the entity fields. If the fields in the map form the full primary key the entry will be removed from the byPrimaryKey cache. If the map exists but the fields do not include a full primary key the entry will be removed from the byAnd cache. If no map-name is specified the entry will be removed from the all cache. |
Attribute Name | Required | Description |
Attribute Name | Required | Description |
value-name | The name of the method environment field that contains the GenericValue object. | |
new-value-name | The name of the method environment field that will contain the new GenericValue object. |
Attribute Name | Required | Description |
value-name | The name of the method environment field that contains the GenericValue object. | |
do-cache-clear | Clear the cache, defaults to true |
Attribute Name | Required | Description |
value-name | The name of the method environment field that contains the GenericValue object. | |
entity-name | The name of the entity to construct an instance of. | |
map-name | The name of a map in the method environment that will be used for the entity fields. |
Attribute Name | Required | Description |
value-name | Name of the value to refresh from database. | |
do-cache-clear | Clear the cache, defaults to true. |
Attribute Name | Required | Description |
entity-name | The name of the entity to remove instances of. | |
map-name | The name of a map in the method environment that will be used for the entity fields. | |
do-cache-clear | Clear the cache, defaults to true |
Attribute Name | Required | Description |
value-name | Name of a generic value to remove all related records. | |
relation-name | Name of a relation to use to remove related records. | |
do-cache-clear | Clear the cache, defaults to true |
Attribute Name | Required | Description |
value-name | The name of the method environment field that contains the GenericValue object. | |
do-cache-clear | Clear the cache, defaults to true |
Attribute Name | Required | Description |
value-name | The name of the method environment field that contains the GenericValue object. | |
map-name | The name of a map in the method environment that will be used for the entity fields. | |
set-if-null | Specifies whether or not to set fields that are null or empty. Defaults to true. |
Attribute Name | Required | Description |
value-name | The name of the method environment field that contains the GenericValue object. | |
map-name | The name of a map in the method environment that will be used for the entity fields. | |
set-if-null | Specifies whether or not to set fields that are null or empty. Defaults to true. |
Attribute Name | Required | Description |
value-name | The name of the method environment field that contains the GenericValue object. | |
do-cache-clear | Clear the cache, defaults to true |
EnvOperations
Attribute Name | Required | Description |
field-name | The name (key) of the map field to use. | |
map-name | The 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. |
Attribute Name | Required | Description |
field-name | The name (key) of the map field to use. | |
list-name | The name of the list in the method environment that the object will be appended to. | |
map-name | The 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. |
Attribute Name | Required | Description |
entry-name | The name of the method environment field that will contain the first entry in the list. | |
list-name | The name of the method environment field that contains the list to get the first entry from. |
Attribute Name | Required | Description |
list-name | Name of the list to copy from | |
to-list-name | Name of the list to copy to. |
Attribute Name | Required | Description |
map-name | The name of the map in the method environment the fields will come from. | |
to-map-name | The name of the map in the method environment the fields will go to. If empty the fields will be copied to the environment. |
Attribute Name | Required | Description |
list-name | Name of the list ordered by fields names given in order-by attribute. |
Sub Element Name | How Many | Description |
order-by | 1 to many |
Attribute Name | Required | Description |
field | Name of the field to copy value to. | |
from-field | Name of the field to copy value from. | |
value | Simple value to copy in field. | |
default-value | Default value to copy in field if value evaluates to an empty string or the from field is null or empty. | |
type | Type to convert to. | |
set-if-null | Specifies whether or not to set fields that are null or empty. Defaults to true. | |
set-if-empty | If the source value, either from a value or from a field, is empty, and empty-string an empty list or a null value. In this case it's set to true. If you don't want to set, if you want it to leave the target field alone when the source is empty, then you need to set this to false. |
Attribute Name | Required | Description |
field-name | The field that you want string-append to operate on. This is the target field where the value will be put, and this is the string to append to that field. So if the field does not exist then it will create a new field with this string value. If it does exist then it will append this string value to the end. | |
string | The string to append to the field named in field-name. | |
map-name | The 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. | |
arg-list-name | arg-list-name is used to insert values from a list into the string using the object in the standard Java library that does this sort of string expresison with a { } brackets and a number, no dollar sign. This pattern of the arg-list-name with the prefix and suffix is something form the early days which is still supported, but the best thing to do here is just use the flexible string expander which is far more flexible and powerful. So you can have the prefix variables to expand and everything all mixed into one string. | |
prefix | Used in conjunction with arg-list-name. String that will be prepended to the string, | |
suffix | Used in conjunction with arg-list-name. String that will be appended to the string, |
Attribute Name | Required | Description |
string | String to add to the list named in list-name. | |
list-name | List to add string to. | |
arg-list-name | arg-list-name is used to insert values from a list into the string using the object in the standard Java library that does this sort of string expresison with a { } brackets and a number, no dollar sign. This pattern of the arg-list-name with the prefix and suffix is something form the early days which is still supported, but the best thing to do here is just use the flexible string expander which is far more flexible and powerful. So you can have the prefix variables to expand and everything all mixed into one string. | |
message-field-name | To insert a message above a field (used in conjunction with @fieldErrors FTL macro) |
Attribute Name | Required | Description |
field-name | The name (key) of the map field to use. | |
map-name | The 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. | |
format | Format based on the type of the object (date,number, etc.). | |
numeric-padding | Padding to use if a numeric object is used. |
EventOperations
Attribute Name | Required | Description |
field-name | The name (key) of the map field to use. | |
map-name | The 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. | |
request-name | The name of the request attribute to use. Defaults to the field-name. |
Attribute Name | Required | Description |
field-name | The name (key) of the map field to use. | |
map-name | The 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. | |
session-name | The name of the session attribute to use. Defaults to the field-name. |
Attribute Name | Required | Description |
request-name | The name of the request parameter values to use. | |
list-name | The name of the list in the method environment that the request parameter values will be appended to. (default: request-name) |
Attribute Name | Required | Description |
field-name | The name (key) of the map field to use. | |
map-name | The 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. | |
default | A default value to use if the request attribute is null or is a String and is empty. This will also be used when NOT running as an event. | |
request-name | The name of the request attribute to use. Defaults to the field-name. |
Attribute Name | Required | Description |
field-name | The name (key) of the map field to use. | |
map-name | The 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. | |
default | A 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-name | The name of the session attribute to use. Defaults to the field-name. |
Attribute Name | Required | Description |
resource | The 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". | |
property | The property whose value will be put in the field. | |
field-name | The name (key) of the field to use. | |
default | A default value to use if the property value is null or empty. This will also be used when NOT running as an event. | |
session-name | The name of the session attribute to use. Defaults to the field-name. |
IfBasicOperations
Attribute Name | Required | Description |
field-name | The name of the map field that will be compared. | |
value | The value that the field will compared to. Must be a String, but can be converted to other types. | |
map-name | The name of the method environment field that contains the map that the field to be validated will come from. If not specified the field-name will be treated as a method environment field name (an env-name). | |
format | Format based on the type of the object (date,number, etc.). |
Sub Element Name | How Many | Description |
else | 0 to 1 | The else tag can be used to contain operations that will run if the condition fails, or in other words if the operations under the if tag do not run. It can contain any simple-method operation. The else tag must be placed as the last tag under the if-* tag. |
Attribute Name | Required | Description |
field-name | The name of the map field that will be compared. | |
map-name | The name of the method environment field that contains the map that the field to be validated will come from. If not specified the field-name will be treated as a method environment field name (an env-name). | |
to-map-name | The name of the method environment field that contains the map that the field to be compared will come from. If left empty will default to the method environment. It does not default to the map-name because that would make it impossible to compare a map field to an environment field. | |
to-field-name | The name of the to-map field that the main field will be compared to. If left empty will default to the field-name. | |
format | Format based on the type of the object (date,number, etc.). |
Sub Element Name | How Many | Description |
else | 0 to 1 | The else tag can be used to contain operations that will run if the condition fails, or in other words if the operations under the if tag do not run. It can contain any simple-method operation. The else tag must be placed as the last tag under the if-* tag. |
Attribute Name | Required | Description |
field-name | The name of the map field that will be compared. | |
map-name | The name of the method environment field that contains the map that the field to be validated will come from. If not specified the field-name will be treated as a method environment field name (an env-name). |
Sub Element Name | How Many | Description |
else | 0 to 1 | The else tag can be used to contain operations that will run if the condition fails, or in other words if the operations under the if tag do not run. It can contain any simple-method operation. The else tag must be placed as the last tag under the if-* tag. |
Attribute Name | Required | Description |
permission | The name of the permission in the database. The user must belong to a security group that has this permission. | |
action | If an action is specified the user can have one of two permissions: the permission + "_ADMIN" or permission + action. Examples of actions include "_CREATE", "_VIEW", etc. |
Sub Element Name | How Many | Description |
else | 0 to 1 | The else tag can be used to contain operations that will run if the condition fails, or in other words if the operations under the if tag do not run. It can contain any simple-method operation. The else tag must be placed as the last tag under the if-* tag. |
Attribute Name | Required | Description |
field-name | The name of the map field that will be validated as being an instance of the named class. | |
class | The name of the class that named instance in field-name is supposed to belong. | |
map-name | The name of the method environment field that contains the map that the field to be validated will come from. If not specified the field-name will be treated as a method environment field name (an env-name). |
Sub Element Name | How Many | Description |
else | 0 to 1 | The else tag can be used to contain operations that will run if the condition fails, or in other words if the operations under the if tag do not run. It can contain any simple-method operation. The else tag must be placed as the last tag under the if-* tag. |
Attribute Name | Required | Description |
field-name | The name of the map field that will be compared. | |
expr | A regular expression that the map value must comply with. | |
map-name | The name of the method environment field that contains the map that the field to be validated will come from. If not specified the field-name will be treated as a method environment field name (an env-name). |
Sub Element Name | How Many | Description |
else | 0 to 1 | The else tag can be used to contain operations that will run if the condition fails, or in other words if the operations under the if tag do not run. It can contain any simple-method operation. The else tag must be placed as the last tag under the if-* tag. |
Attribute Name | Required | Description |
field-name | The name of the map field that will be validated. | |
method | The name of the method that will be called to validate the field. It must be a static method that takes a single String parameter and return a boolean. | |
map-name | The name of the method environment field that contains the map that the field to be validated will come from. If not specified the field-name will be treated as a method environment field name (an env-name). | |
class | The name of the class that contains the validation method. If not specified defaults to "org.ofbiz.base.util.UtilValidate". |
Sub Element Name | How Many | Description |
else | 0 to 1 | The else tag can be used to contain operations that will run if the condition fails, or in other words if the operations under the if tag do not run. It can contain any simple-method operation. The else tag must be placed as the last tag under the if-* tag. |
IfOtherOperations
Attribute Name | Required | Description |
title | Each assert operation have a title that can be used in the report for the testing. These can be used in the normal code. | |
error-list-name | The name of the list in the method environment to check for error messages. Defaults to "error_list". |
Attribute Name | Required | Description |
field-name | The name of the field that contains the ID value to check. | |
map-name | The name of the Map that contains the field. If not specified the environment will be used to find the field. | |
error-list-name | The name of a list in the method environment that the error messages will be added to. Will be created if does not exist. Defaults to "error_list". |
Attribute Name | Required | Description |
permission | The name of the permission in the database. The user must belong to a security group that has this permission. | |
action | If an action is specified the user can have one of two permissions: the permission + "_ADMIN" or permission + action. Examples of actions include "_CREATE", "_VIEW", etc. | |
error-list-name | The name of a list in the method environment that the error messages will be added to. Will be created if does not exist. Defaults to "error_list". |
Sub Element Name | How Many | Description |
accept-userlogin-party | 0 to 1 | |
alt-permission | 0 to many | |
fail-message | 1 to 1 | |
fail-property | 1 to 1 |
Attribute Name | Required | Description |
Sub Element Name | How Many | Description |
condition | 1 to 1 | A simple element with no attributes that contains the condition that will be evaluated to determine which sub-operations to execute. To combine the other if operations documented below the and, or, xor, and notelements can be used. The and, or, and xor elements can contain as many general if operations and modifier/combination elements (ie and, or, xor, and not). |
then | 1 to 1 | The then element is used to contain operations that will run if the condition evaluate to true. A then tag must be included, but can be empty. |
else-if | 0 to many | The else-if element can be used to specify alternate conditional execution blocks. Each else-if element must contain two sub-elements: condition and then. These operations are used the same as the condition and then elements describes above. If the condition of the parent if element is evaluated to false, each condition of the else-if sub-elements will be evaluated, and the operations under the then element corresponding first condition that evaluates to true will be run. |
else | 0 to 1 | The else element can be used to contain operations that will run if the condition evaluates to false, and if no else-ifsub-conditions evaluate to true. It can contain any simple-method operation. The else tag must be placed as the last tag under the if tag. |
Attribute Name | Required | Description |
field-name | The name of the map field that will be compared. | |
map-name | The name of the method environment field that contains the map that the field to be validated will come from. If not specified the field-name will be treated as a method environment field name (an env-name). |
Sub Element Name | How Many | Description |
else | 0 to 1 | The else tag can be used to contain operations that will run if the condition fails, or in other words if the operations under the if tag do not run. It can contain any simple-method operation. The else tag must be placed as the last tag under the if-* tag. |
Attribute Name | Required | Description |
Sub Element Name | How Many | Description |
condition | 1 to 1 | A simple element with no attributes that contains the condition that will be evaluated to determine which sub-operations to execute. To combine the other if operations documented below the and, or, xor, and notelements can be used. The and, or, and xor elements can contain as many general if operations and modifier/combination elements (ie and, or, xor, and not). |
then | 1 to 1 | The then element is used to contain operations that will run if the condition evaluate to true. A then tag must be included, but can be empty. |
OtherOperations
Attribute Name | Required | Description |
field-name | The name (key) of the map (or env if map-name is empty) field to use. | |
map-name | The 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. | |
type | ||
rounding-mode | Rounding mode for BigDecimal calculation, primarily for divide operation. | |
decimal-scale | Initial scale to use for the internal BigDecimal. Defaults to 2 for monetary calculations. | |
decimal-format |
Attribute Name | Required | Description |
level | The logging/debug level to use. Must be one of the following: verbose | timing | info | important | warning | error | fatal | always. These are the standard OFBiz logging levels. | |
message | A shortcut for simple messages. If used along with field and/or string sub-elements the inline string in the message will come first. |
Attribute Name | Required | Description |
env-name | The name of the method environment field the date will be put in. |
Attribute Name | Required | Description |
env-name | The name of the method environment field the timestamp will be put in. |
Attribute Name | Required | Description |
resource | Name of a properties file on the classpath. | |
property | The property whose value will be put in the field. | |
field-name | The name (key) of the map field to use. | |
map-name | The 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. | |
default | The default value to use if the specified property is empty. | |
no-locale | If sets to true don't use the default locale variable. Defaults to false. | |
arg-list-name |
Attribute Name | Required | Description |
value-name | The name of the method environment field that contains the UserLogin GenericValue object. |
ServiceOperations
Attribute Name | Required | Description |
field-name | The name (key) of the map field to use. | |
map-name | The 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. | |
result-name | The name of the request attribute to use. Defaults to the field-name. |