Typical field-name/map-name pair. With the "." Syntax, the map-name is typically no longer necessary because you can do map-name.field-name in the field-name attribute, but those are still there for legacy purposes. Name of the field to put value in. Name of the related map. Type of the value put in the field. String of type java.lang.String Opening tag of simple-method files. Opening tag of a simple-method definition. A simple method can be called in either an event context from the Control Servlet (or another event) or in a service context through the Service Engine, or any other component that has access to a service dispatcher. The field-to-request and field-to-session elements will be IGNORED when called in a service context. So, they are ONLY used when called in an event context. The field-to-result elements will be ignored in an event context, ie only used in a service. The parameter-map-name env entry will contain the HttpRequest parameters for running in an event context and and the input context when running in a service. A name (preferably a legal Java identifier) for this method. This name must be unique for the XML file it is in as it will be used to reference this method externally. A short description of the method for certain system error messages. Is a logged in user (UserLogin object, or login.username and login.password Strings) required to run this method? "true" or "false" (defauts to "true") Create a transaction if none exists for this thread? "true" or "false" (defauts to "true") The default error return code. (defauts to "error") The default success return code. (defauts to "success") As event: copy of request parameters. As service: incoming context. (defauts to "parameters") As event only (defauts to "request") As event only (defauts to "response") As event only (defauts to "_response_code") As event only (defauts to "_error_message_") As event only (defauts to "_event_message_") As service only (defauts to "responseMessage") As service only (defauts to "errorMessage") As service only (defauts to "errorMessageList") As service only (defauts to "errorMessageMap") As service only (defauts to "successMessage") As service only (defauts to "successMessageList") Name of locale variable (defauts to "locale") A GenericDelegator object to use in the method (defauts to "delegator") A Security object to use in the method (defauts to "security") A LocalDispatcher object to use in the method (defauts to "dispatcher") Name of user login variable (defauts to "userLogin") The call-map-processor tag invokes a simple map processor from an existing map, creating a new map or adding to an existing one if the named out-map already exists. Resulting messages are added to the named list, and a new list is created if a list with the given name does not yet exist. Note that all lists and maps exist in the same context and must have unique names. An inline simple-map-processor can be used by putting a simple-map-processor tag under the call-map-processor tag. If both an external and an inline map-processor are specified, the external one will be called first, allowing the inline one to override its behavior. 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. 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. 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. The name of a map in the method environment to use as the input map. 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. 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". Take all the incoming files for this service, or all the incoming service attributes, and look for fields with the same name in the incoming map and copy those onto the outgoing map. Name of the service from which take all the incoming files, or all incoming attributes. Incoming map to copy fields from. Map to copy to fields to. The call-service tag invokes a service through the Service Engine. If the specified error code is returned from the service, the event is aborted and the transaction in the current thread is rolled back. Otherwise, the remaining operations are invoked. The result-to-request and result-to-session elements will be IGNORED when called in a service context. So, they are ONLY used when called in an event context. Name of the service to call. 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 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". 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". Defaults to "error". Defaults to "success". Specify a resource and a property to prepend to the error message. Specify a resource and a property to append to the error message. Specify a resource and a property to prepend to the success message. Specify a resource and a property to append to the success message. Specify a resource and a property to prepend to any kind of message. Specify a resource and a property to append to any kind of message. Message that you can specify for the case where the service does not return a message. You can just specify a default-message to use as if the service had returned that default-message. results-to-map will take all of the results of the service, the outgoing maps from the service and put them in a map of the given map-name. Name of a map where results will be put in. Specify the name of the field in the result and then the name of the field in the context you want to put it in, and optionally the name in the map. There's a field-map there. If you don't specify a field-name then the result-name will be used for the field-name, that's the name of the variable that will be created in the current context for the value of that result. Name of the result. May be used for the field-name. If you don't specify a field-name, that's the name of the variable that will be created in the current context for the value of that result. Optionnal map name. Optionnal field name. result-to-request is event specific. It takes the result with the given name and puts it in a request attribute with the given name here. Again the request-name is optional. If you leave it off then it will put it in an attribute with the name of the result-name. Name of the result. May be used for the request attribute name. If you don't specify a request-name , that's the name of the request attribute that will be created for the value of that result. Optionnal request name. Specify the name of the session attribute that you want it to put the value in. If you don't specify one it will use the result-name. Name of the result. May be used for the session attribute name. If you don't specify a session-name , that's the name of the session attribute that will be created for the value of that result. Optionnal session name. result-to-result is service specific (when the service is being called as a service). It will take the result of the service you're calling with the call service operation and it will put it in with the result of the current service. So result-name is the name of the result in the service that was called using the call-service tag. NOTE that these attributes are somewhat confusing: result-name is the name of the field in the result of this service call that the value comes FROM; service-result-name is the name of the field in the result of this simple-method called as a service where the value goes TO; in other words FROM result-name and TO service-result-name. Name of the field in the result of this service call that the value comes FROM. Name of the field in the result of this simple-method called as a service where the value goes TO. Calls a service asynchronously and ignores the result, so no return messages are used; that doesn't mean no errors will result, but they would just be system errors like database failures, etc. which all have system error messages. Name of the service called asynchronously. The name of a map in the method environment to use as the input map. Defaults to "true". Runs an external bsh script from the classpath if resource is specified and then runs the inlined bsh script if any is specified. The bsh context is the current simple-method environment including maps, lists and special objects whose names are defined in the simple-method attributes. The current env cannot be modified, but if a Map is returned by the bsh block the entries in the map will be put into the current env. Error messages go on the error list and are handled with the check-errors tag. The name of the list in the method environment to check for error messages. Defaults to "error_list". The call-simple-method tag calls another simple-method in the same context as the current one. In other words the called simple-method will have the same environment as the calling simple-method, including all environment fields, and either the event or service objects that the calling simple-method was called with. 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. 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. Calls a method on an existing object that exists in a field in the environment or in a map in the environment. The string and field sub-elements are passed to the method as arguments in the order they are specified. If the sub-elements do not match the method arguments an error will be returned. The return value will be put in the named field if an value is returned and if a field and optionally a map name are specified. Used to specify an inline String argument to the method call. Used to specify a field to be passed as an argument to the method call. The field can be in a map in the environment or if no map-name is specified then the field will come directly from the environment. The name of the field the object is in that has the method to be called. 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. The name of the method to call on the given object. The name of the field to put the result in. If not specified any return value will be ignored. 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. Calls a static method on a class. The string and field sub-elements are passed to the method as arguments in the order they are specified. If the sub-elements do not match the method arguments an error will be returned. The return value will be put in the named field if an value is returned and if a field and optionally a map name are specified. Used to specify an inline String argument to the method call. Used to specify a field to be passed as an argument to the method call. The field can be in a map in the environment or if no map-name is specified then the field will come directly from the environment. The name of the class to call the static method on. The name of the static method to call on the given class. The name of the field to put the result in. If not specified any return value will be ignored. 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. Creates an object of the given class and if the field-name is specified saves it in that field. The string and field sub-elements are passed to the constructor method as arguments in the order they are specified. If the sub-elements do not match the constructor method arguments an error will be returned. Used to specify an inline String argument to the constructor method. Used to specify a field to be passed as an argument to the constructor method. The field can be in a map in the environment or if no map-name is specified then the field will come directly from the environment. The name of the class to construct an object of. The name of a field to put the new object in. If not specified the object will be created but ignored after that. The name of the map the field will go in. If not specified the field will be put in the environment. The field-to-request tag copies a field from a map to the specified servlet request attribute. The tag is only used when the simple-method is called as an event, it is ignored otherwise. 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. The name (key) of the map field to use. The name of the request attribute to use. Defaults to the field-name. The field-to-session tag copies a field from a map to the specified servlet session attribute. The tag is only used when the simple-method is called as an event, it is ignored otherwise. 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. The name (key) of the map field to use. The name of the session attribute to use. Defaults to the field-name. The request-to-field tag copies an attribute from the servlet request to a field of a map in the method environment. The tag is only used when the simple-method is called as an event, it is ignored otherwise (except the default value, if specified). 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. The name (key) of the map field to use. 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. The name of the request attribute to use. Defaults to the field-name. The request-parameters-to-list tag appends a request parameter values from the servlet request to the specified list. The tag is only used when the simple-method is called as an event, it is ignored otherwise. The name of the request parameter values to use. The name of the list in the method environment that the request parameter values will be appended to. (default: request-name) The session-to-field tag copies an attribute from the servlet session to a field of a map in the method environment. The tag is only used when the simple-method is called as an event, it is ignored otherwise (except the default value, if specified). 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. The name (key) of the map field to use. 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. The name of the session attribute to use. Defaults to the field-name. 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). 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". The property whose value will be put in the field. A default value to use if the property value is null or empty. This will also be used when NOT running as an event. The name (key) of the field to use. The name of the session attribute to use. Defaults to the field-name. 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. 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. The name (key) of the map field to use. The name of the request attribute to use. Defaults to the field-name. The map-to-map tag copies all fields from one map to another map. The name of the map in the method environment the fields will come from. The name of the map in the method environment the fields will go to. If empty the fields will be copied to the environment. The field-to-list tag appends a field to the specified list. 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. The name (key) of the map field to use. The name of the list in the method environment that the object will be appended to. Copy a list to another list. Name of the list to copy from Name of the list to copy to Sort a list : ordered by fields names given in order-by attribute. Name of the list ordered by fields names given in order-by attribute. Move a value from one field to another field. You can also take a value, just a string constant or a string that is made up of a mixture of constant and flexible string expansion variables, the ${} things, that will be put in the field. You can also specify a default value in the case that the value evaluates to an empty string or the from field is null or empty. Then the default-value will be used. Again you can use the flexible string expander here, the ${} syntax and such. It can also do a type conversion, so going from whatever type the source data is in, which would be a string value or whatever the variable type is for a from field, it can convert that to any of these types before setting it in the target field. Name of the field to copy value to. Name of the field to copy value from. Simple value to copy in field. Default value to copy in field if value evaluates to an empty string or the from field is null or empty. Type to convert to. If the source variable is null it should set it on the new field, and the default for that is false. If the source variable is null it will leave the target field as it was. 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. NOTE: the prefix and suffix will only be used IFF the current string and the string to be appended are both not empty. 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. 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. 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. The string to append to the field named in field-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. Used in conjunction with arg-list-name. String that will be prepended to the string, Used in conjunction with arg-list-name. String that will be appended to the string, Take a string literally that can also have a flexible string expander and such in it, and it will add it to a list. Note that you can have an arg-listname for using the standard Java style argument list where you have in the source string numbers inside of { } brackets that represent the number the index in the argument list to insert at that point. String to add to the list named in list-name. List to add string to. 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. To insert a message above a field (used in conjunction with @fieldErrors FTL macro) The to-string tag converts the Object in the specified field to a String, putting the string in the same field. 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. The name (key) of the map field to use. Format based on the type of the object (date,number, etc.). Padding to use if a numeric object is used. The clear-field tag clears/removes the specified field. 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. The name (key) of the map field to use. The first-from-list tag will get the first entry from the given list and put it in the environment field with the given entry-name. he name of the method environment field that will contain the first entry in the list. The name of the method environment field that contains the list to get the first entry from. The transaction-begin tag will begin a transaction if one is not already in place. If a transaction is begun the environment field named as the began-transaction-name will be set to true, otherwise it will be set to false. Note that unless the simple-method is flagged to not use a transaction all simple-methods will be inside a transaction. The same is true for service calls through the Service Engine. 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". The transaction-commit tag will commit a transaction if a transaction was begun in the current demarcation context as represented by the environment field named as the began-transaction-name. If the Boolean in that field is false no commit will be done. 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". The transaction-rollback tag will rollback a transaction if a transaction was begun in the current demarcation context as represented by the environment field named as the began-transaction-name. If the Boolean in that field is false a set rollback only will operation will be done instead of rollback which will force the transaction to rollback regardless of which method or object is responsible for beginning and ending the transaction. 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". The sequenced-id-to-env tag gets a sequenced ID from the Entity Engine (through the delegator) and puts it in the specified method environment field. The object will be a java.lang.Long, but can of course be converted to a String. 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. The name of the method environment field the sequenced ID will be put in. 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. 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. The name of the list in the method environment to check for error messages. Defaults to "error_list". The find-by-primary-key tag uses the delegator to find an entity value by its primary key. The resulting GenericValue object will be placed in the method environment using the specified value-name. The name of the entity to find an instance of. The name of a map in the method environment that will be used for the entity fields. The name of the method environment field that contains the GenericValue object. 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". List containing name of fields to select, if empty defaults to all entity fields. 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. The find-by-and tag uses the delegator to find entity values by anding the fields passed in the map. The resulting GenericValue objects will be placed in the method environment using the specified list-name. The name of the entity to find instances of. The name of a map in the method environment that will be used for the entity fields. The name of a list in the method environment that contains a list of strings specifying fields to order the results by. 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. 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". 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". The name of the method environment field that contains the list of GenericValue objects. Does a find-by-primarykey, always returns a single generic value object if it's found, otherwise returns null. Specify where to find primary key fields if you set auto-field-map to false. Specify fields to select, otherwise all fields will be selected. Name of the entity to look for. Name of the variable to put entity in. 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". Looks for all primary key field names in the current context as well as in the parameters map or not. Defaults to true. Does a find-by-and, returns a list if values are found, otherwise returns null. Uses name/value pairs, that will be used for the query and will all be "anded" together. The result-set-type by default is scroll which is flexible so you can go forward Specify fields to select, otherwise all fields will be selected. Defines fields to order list by. Name of entity to search in. 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". 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. Specify fields to select, otherwise all fields will be selected. 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". 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. Name of field to select. Defines fields to order list by. Name of field to order list by. Specify a start, value, and a number of results to include. Should resolve into a non-negative integer. Should resolve into a non-negative integer. Specify a view-index, and a view-size of elements to view. Start at view-index - 1 times of view-size with origin 0. Example : view-index=3 and view-size=10 gives elements 21 to 30. Index of elements to view, depends on view-size. Should resolve into a non-negative integer. Number of elements to view. Should resolve into a positive integer. 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". A name/value pair. Name of the field. 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". 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". The filter-list-by-and tag filters the given list by the fields in the specified map. The name of the method environment field that contains the list of GenericValue objects. 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). 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. The filter-list-by-date tag filters the given list by the valid date using the from and thru dates in each value object. The name of the method environment field that contains the list of GenericValue objects. 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). The name of a field in the method environment date to filter by. Defaults to now. The name of the GenericValue field to use as the beginning effective date. Defaults to fromDate. The name of the GenericValue field to use as the ending effective date. Defaults to thruDate. Specifies whether or not all GenericValue objects in the list are of the same entity. Defaults to true. The make-value tag uses the delegator to construct an entity value. The resulting value will not necessarily exist in the database, but will simply be assembled using the entity-name and fields map. The resulting GenericValue object will be placed in the method environment using the specified value-name. The name of the method environment field that contains the GenericValue object. The name of the entity to construct an instance of. The name of a map in the method environment that will be used for the entity fields. The clone-value tag make a copy of the value in the method environment field specified by value-name. The resulting GenericValue object will be placed in the method environment using the specified new-value-name. The name of the method environment field that contains the GenericValue object. The name of the method environment field that will contain the new GenericValue object. The create-value tag persists the specified GenericValue object by creating a new instance of the entity in the datasource. An error will result if an instance of the entity exists in the datasource with the same primary key. The name of the method environment field that contains the GenericValue object. Clear the cache, defaults to true The store-value tag persists the specified GenericValue object by updating the instance of the entity in the datasource. An error will result if an instance of the entity does not exist in the datasource with the same primary key. The name of the method environment field that contains the GenericValue object. Clear the cache, defaults to true Clear the cache, defaults to true The remove-value tag removes the specified GenericValue object by removing the instance of the entity in the datasource. An error will result if an instance of the entity does not exist in the datasource with the same primary key. The name of the method environment field that contains the GenericValue object. Clear the cache, defaults to true Clear the cache, defaults to true The remove-by-and tag uses the delegator to remove entity values from the datasource and is constrained by anding the fields passed in the map. Make sure the map contains something, or all values will be removed. The name of the entity to remove instances of. The name of a map in the method environment that will be used for the entity fields. Clear the cache, defaults to true Uses the delegator to clear elements from the cache; intelligently looks at the map passed to see if it is a byPrimaryKey, and byAnd, or an all. The name of the entity to clear cache lines of. 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. This is a very simple tag that should be used sparingly because of the performance impact. It clears all lines from all Entity Engine caches. It has no attributes or sub-elements. Looks for each PK field in the named map and if it exists there it will copy it into the named value object. The name of the method environment field that contains the GenericValue object. The name of a map in the method environment that will be used for the entity fields. Specifies whether or not to set fields that are null or empty. Defaults to true. Looks for each non-PK field in the named map and if it exists there it will copy it into the named value object. The name of the method environment field that contains the GenericValue object. The name of a map in the method environment that will be used for the entity fields. Specifies whether or not to set fields that are null or empty. Defaults to true. The store-list tag uses the delegator to store all entity values in the list. This is different than storing a single value in that values in the list will be inserted if it does not exist or updated if it does exist. The name of the method environment field that contains the list of GenericValue objects. Clear the cache, defaults to true The remove-list tag uses the delegator to remove all entity values in the list. For each value in the list if it is a primary key just that entity instance will be removed, but if it is not a full primary key all entity instances will be removed from the datasource that match the constraint of the field map. The name of the method environment field that contains the list of GenericValue objects. Clear the cache, defaults to true The operations contained by the iterate tag will be executed for each of the entries in the list, and will make the current entry available in the method environment by the entry-name specified. This tag can contain any of the simple-method operations, including the conditional/if operations. Any simple-method operation can be nested under the iterate tag. The name of the method environment field that will contain each entry as we iterate through the list. The name of the method environment field that contains the list to iterate over. The message lists from invoking are not checked until the check-errors tag is used. The named list is checked and if it contains any messages they are put in the servlet request object and the specified error code is returned to the control servlet. Defaults to "error". The name of the list in the method environment to check for error messages. Defaults to "error_list". Adds an error message with to the given error list from either an inline message or a message from a properties file. Used to specify an inline message. Has one attribute called 'message'. Used to get the message from a properties file. Has two attributes: resource and property. The name of the list in the method environment to check for error messages. Defaults to "error_list". Returns immediately from the simple-method with the given response code string. The string to return as a response code. Defaults to "success". Each condition under the assert element will be checked and if it fails an error will be added to the given error list. Note that while the definitions for the if-* operations are used, the tags should be empty because of the differing semantics. The name of the list in the method environment to check for error messages. Defaults to "error_list". The if operation offers a flexible way of specifying combinations of conditions, alternate conditions, and operations to run on true evaluation of the conditions or to run otherwise. The other if operations are meant for a specific, simple condition when used outside of the condition sub-element of this operation. The attributes of the other if operations are the same when used inside this operation. Note that while the definitions for the if-* operations are used, the tags should be empty because of the differing semantics. 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). 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. 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. 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. While loop operation, uses the same condition element as the if operation. 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). 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. 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). 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. 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. 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. To be true just one of the elements underneath needs to be true. The process will return (with true value) as soon as a condition is verified not evaluating remaining conditions if any. To be true only one of the elements underneath can be true. The process will return (with false value) as soon as 2 conditions are verified not evaluating remaining conditions if any. If no conditions evaluate to true the process will return false. To be true all of the elements underneath need to be true. The process will return (with false value) as soon as a condition evaluates to false not evaluating remaining conditions if any. If no conditions evaluate to false the process will return true. Can only have one condition underneath and simply reverse the boolean value of this condition. The operations contained by the if-validate-method tag will only be executed if the validate method returns true. If-validate-method calls a static Java method that takes a String and returns a boolean. This tag can contain any of the simple-method operations, including the conditional/if operations. Any simple-method operation can be nested under an if-* tag. 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. 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). The name of the map field that will be validated. 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. The name of the class that contains the validation method. If not specified defaults to "org.ofbiz.base.util.UtilValidate". Checks if the field is an instance of the name class. Any simple-method operation can be nested under an if-* tag. 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. 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). The name of the map field that will be validated as being an instance of the named class. The name of the class that named instance in field-name is supposed to belong. The operations contained by the if-compare tag will only be executed if the comparison returns true. This tag can contain any of the simple-method operations, including the conditional/if operations. Any simple-method operation can be nested under an if-* tag. 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. 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). The name of the map field that will be compared. The value that the field will compared to. Must be a String, but can be converted to other types. A format specifier to use when converting String objects to other data types, mainly Date, Time and Timestamp. The operations contained by the if-compare-field tag will only be executed if the comparison returns true. This tag can contain any of the simple-method operations, including the conditional/if operations. Any simple-method operation can be nested under an if-* tag. 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. 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). The name of the map field that will be compared. 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. The name of the to-map field that the main field will be compared to. If left empty will default to the field-name. A format specifier to use when converting String objects to other data types, mainly Date, Time and Timestamp. The operations contained by the if-regexp tag will only be executed if the value complies with the regular expression. This tag can contain any of the simple-method operations, including the conditional/if operations. Any simple-method operation can be nested under an if-* tag. 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. 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). The name of the map field that will be compared. A regular expression that the map value must comply with. The operations contained by the if-empty tag will only be executed if the map field is empty. This tag can contain any of the simple-method operations, including the conditional/if operations. Any simple-method operation can be nested under an if-* tag. 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. 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). The name of the map field that will be compared. The operations contained by the if-not-empty tag will only be executed if the map field is not empty. This tag can contain any of the simple-method operations, including the conditional/if operations. Any simple-method operation can be nested under an if-* tag. 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. 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). The name of the map field that will be compared. The operations contained by the if-has-permission tag will only be executed if the user has the specified permission, and optionally the action. This tag can contain any of the simple-method operations, including the conditional/if operations. Any simple-method operation can be nested under an if-* tag. 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. The name of the permission in the database. The user must belong to a security group that has this permission. 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. The check-permission tag checks to see if the current user has the specified permission. The the user does not have the specified permission or there is no user associated with the context then the failure message from fail-message or file-property will be added to the specified error list. Allows you to specify alternate permissions, any of which will satisfy this check permission. If the current userLogin does not have any of these permissions the error will be added to the list. Has two attributes: permission and action that behave just as the corresponding attributes described above for the check-permission element. An inline failure message. A failure message from a properties file. The name of the permission in the database. The user must belong to a security group that has this permission. 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. 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". If that tag is present userlogin party is accepted, rather than requiring that the user have the permission. Often used in cases where you want to allow a user to for example see their own order, or update their own contact information. Environment variable name used (defaults to partyId), Allows to specify a number of alternate permissions. This tag basically has the same attributes as the check-permission tag, permission and action. If the user has any of the alt-permissions, they subsume standard permissions. The name of the permission in the database. The user must belong to a security group that has this permission. 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. ].]]> An inline failure message. A failure message from a properties file. The name of the field that contains the ID value to check. The name of the Map that contains the field. If not specified the environment will be used to find the field. 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". The log tag logs a message used the OFBiz Debug class, which uses Log4J to log to the console, a file, or some other location. The message is a concatenation of the message attribute and then all of the field and string sub-element values in the order they are specified. Inserts the value of the field into the message where specified. Inserts the value of the inline string into the message where specified. 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. A shortcut for simple messages. If used along with field and/or string sub-elements the inline string in the message will come first. The now-timestamp-to-env tag creates a java.sql.Timestamp object with the current date and time in it and puts it in a field in the method environment. The name of the method environment field the timestamp will be put in. The now-date-to-env tag creates a java.sql.Date object with the current date in it and puts it in a field in the method environment. The name of the method environment field the date will be put in. The property-to-field tag puts the inlined string value in the specified field. The resource location of the properties file. The property whose value will be put in the field. 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. The name (key) of the map field to use. The default value to use if the specified property is empty. If sets to true don't use the default locale variable. Defaults to false. The set-current-user-login tag sets the UserLogin GenericValue object to be used for authentication for the rest of the method. This is mostly used for calling services, etc. The name of the method environment field that contains the UserLogin GenericValue object. The calculate tag performs the specified calculation and puts the result in an object in the field of the specified map (see the calculate element attribute descriptions above). The type of the object can be specified with thetype attribute, but defaults to Double. The calculate tag can contain calcop andnumber tags, and the calcop tag can also contain these two tags to enable nested calculations. Each calcop tag has three attributes: operator, map-name and field-name. Only the operator is required. The operator specifies the operation to perform on the given field and nested calcops and numbers. It must be one of the following: get | add | subtract | multiply | divide | negative. This tag is used to apply an operator in the calculation. It can have calcop and number tags nested under it, making it also act like a parenthesis. It has three attributes: operator, map-name, and field-name. These are described below. 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. The name (key) of the map field to use. Rounding mode for BigDecimal calculation, primarily for divide operation. Rounding mode to round towards positive infinity Rounding mode to round towards negative infinity Rounding mode to round towards "nearest neighbor" unless both neighbors are equidistant, in which case round up Rounding mode to round towards "nearest neighbor" unless both neighbors are equidistant, in which case round down Rounding mode to round towards "nearest neighbor" unless both neighbors are equidistant, in which case round up Rounding mode to round towards "nearest neighbor" unless both neighbors are equidistant, in which case round down Rounding mode to round towards the "nearest neighbor" unless both neighbors are equidistant, in which case, round towards the even neighbor Rounding mode to assert that the requested operation has an exact result, hence no rounding is necessary Initial scale to use for the internal BigDecimal. Defaults to 2 for monetary calculations. The calcop tag has an operator: get, add, subtract, multiply, divide, and negative. So add, subtract, multiply, and divide are just the basic arithmetic operations. Gets the positive value. Negates the value 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. The name (key) of the map field to use. This is used to put a numeric constant (a number) into the calculation. It has one attribute: value. This must be a properly formatted number or an error will result. May use flexible string. Literal or flexible string. The Simple Map Processor Mini-Language performes two primary tasks: validation and conversion. It does this in a context of moving values from one Map to another. The input map will commonly contain Strings, but can contain other object types like Integer, Long, Float, Double, java.sql.Date, Time, and Timestamp. In addition to dealing with the fields already in the incoming Map you can build Strings and add them to the in-Map before the processing begins with the make-in-string tag. You can have zero or many make-in-string tags, and they must all come before the process tags. Inside each make-in-string is a list of snippets to concatenate together to make the final String. Each snippet can be another field in the in-Map (in-field element), a value from a properties file (property element), or a constant (constant element). The process tag is used to contain the operations to be done on the specified field in the in-Map. It has one required attribute, the field to operate on. The operations that it contains are: validate-method, compare, compare-field, regexp, not-empty, copy, and convert. All process operations tags except copy must contain one of two tags: fail-message or fail-property. If the operation fails a message is added to the message list that is either the specified fail-message, or the String from the properties file value that is specified in fail-property. Messages are collected in List as the Simple Map Processor runs. If the List is not empty when it completes then something failed in the map processor. This is done so that all failures will be reported immediately rather than having to fix one failure before another can be discovered. All process operations automatically convert the field value and other values from their current type to the type specified for the operation, where applicable. The ObjectType.simpleTypeConvert method is used to do the conversion. It supports the following types: String, Double, Float, Long, Integer, Date, Time, and Timestamp. If the type is not specified String is the default. The validate-method tag is used to call any static method that accepts a String and returns a boolean. If the field coming in is not a String it will be converted to a String before calling the method. The two attributes for this tag are class and method which should contain the fully qualified class name and the method name, respectively. If the class name is not specified it will default to org.ofbiz.base.util.UtilValidate. The compare tag is used to compare the field value to the value specified in the value attribute. An operator must be specified to indicate the comparison desired. Operators available include less, greater, less-equals, greater-equals, equals, not-equals, and contains. The compare-field tag is just like the compare tag except that instead of specifying a value you specify the name of another field in the in-Map to compare the current field to. The regexp tag validate the current field against the regular expression specified in the expr attribute of the tag. Standard Perl style regular expressions are used with the ORO library from Jakarta. The not-empty tag verifies that the current field is not empty. If the field is a String it must not be null and must have a length greater than zero, otherwise it must simply not be null. The not-empty tag has no attributes. The copy operation simply copies the current field value to the out-Map from the in-Map. There are three optional attributes. If a different field name is desired in the out-Map it can be specified in the to-field attribute. The replace attribute can be used to specify if an existing field in the out-Map should be replaced or not. The replace attribute defaults to true. The set-if-null attribute specifies whether or not the value should be put in the out-Map if it is null. The default for set-if-null is false. The convert tag does the same thing as copy except that the type can be converted to the type specified in the type attribute. The format attribute can be used to specify the format for date/time fields. These two tags are in addition to all of the the attributes in the copy tag. If no to-field is specified, it is the same as the field on process.