exportData Business Rule Component
An Export Data business rule component allows you to convert data in a structure of data map entries in Loftware Enterprise SP to an equivalent string of text or binary data . This data can be used in other applications that accept data in CSV or XML format.
Tip: You can use an Import Data business rule component to convert a string of data from CSV or XML format to a namespace containing a structure of data map entries.
The following is the syntax for an Export Data business rule component.
Important! Content in a business rule is case sensitive. This includes business rule component names, attributes, and values.
Note: For each business rule component, most elements and attributes are optional, but you should specify enough to achieve the functionality that you intend. In most cases, you can omit attributes that are not relevant to your task and default values will be used. You must specify a name and a namespace. Except where otherwise indicated, attributes accept string values.
About the syntax documentation
Vertical bars indicate that you must choose one of the options shown. Italicized items can be named or specified by you.
<exportData name="This_component" namespace="Parent_of_component"
sticky="true|false" configuratorType="Block_type_ID" alias="Data_reference">
<triggers>
<trigger eventTrigger="ENQUEUE|PRINTJOBDETAIL|LABEL|Custom_Event" priority="integer" propagation="NONE|BEFORE|AFTER"/>
</triggers>
<executionCondition>
</executionCondition>
<defaultData>
<entry name="Name_of_data_map_entry"
dataType="STRING|INTEGER|BOOLEAN|NUMBER|BINARY|DATE"
mergePolicy="MERGE_ALL|MERGE_NONE|MERGE_FROM_CHILD|MERGE_TO_PARENT"
action="OVERRIDE|NOT_EXISTS|DELETE|APPEND|PREPEND">
<value>Value_of_data_map_entry</value>
</entry>
</defaultData>
<parameters>
<parameter parameterKey="Name_of_parameter"
dataType="STRING|INTEGER|BOOLEAN|NUMBER|BINARY|DATE" resolveValue="true|false">
<parameterValue>Initial_value_of_parameter</parameterValue>
</parameter>
</parameters>
<preProcessingEvents>
<preProcessEvent eventName="Custom_Event" includeSiblings="true|false" />
</preProcessingEvents>
<postProcessingEvents>
<postProcessEvent eventName="Custom_Event" includeSiblings="true|false" />
</postProcessingEvents>
<errorProcessingEvents>
<errorProcessEvent eventName="Custom_Event" includeSiblings="true|false" />
</errorProcessingEvents>
<children>
</children>
<sourceDataRef>namespace</sourceDataRef>
<dataFormat>CSV|XML</dataFormat>
<dataType>STRING|BINARY</dataType>
<targetDataRef>data_map_entry</targetDataRef>
</exportData>
Syntax Tips
Additional information is available about the following items.
action
For a business rule component that can return a value, this property determines whether that value remains in the data map when the business rule component finishes running and returns control to its parent business rule component. The default value is OVERRIDE.
Note: The impact of a business rule component returning control to its parent is also affected by mergePolicy.
OVERRIDE
|
When control is returned to the parent, the value produced by the business rule component is retained for the data map entry, replacing any previous value for the data map entry.
|
NOT_EXISTS
|
When control is returned to the parent, the value produced by the business rule component is retained for the data map entry only if a data map entry with that name did not exist prior to the execution of this business rule component. Otherwise, the previous value for the data map entry is reinstated.
|
DELETE
|
When control is returned to the parent, the data map entry is deleted from the data map.
|
APPEND
|
If the data map entry existed before the business rule component was run, then when control is returned to the parent the new value for the data map entry is concatenated onto the end of the old value.
|
PREPEND
|
If the data map entry existed before the business rule component was run, then when control is returned to the parent the new value for the data map entry is concatenated onto the beginning of the old value.
|
alias
An alias is a data reference for a business rule component. It is comparable to a in a label template.
configuratorType
For a business rule component that was generated by using the , this attribute is a numeric identifier that usually indicates what type of the business rule component is part of.
If the value of the attribute is 0, then it indicates one of the following about the type of component block:
- None: The business rule component was created by using the XML Editor or a version of Loftware Enterprise SP prior to Loftware Enterprise SP 3.0, and therefore is not part of a component block.
- Block fragment: The business rule component was generated by the Configurator as part of a component block. Refer to the configuratorType of the parent of this business rule component to determine the type of component block.
Tip: This attribute is automatically included in business rule components generated by the Configurator. If you are editing a business rule by using the XML Editor, you do not need to add this attribute, and you can either ignore or delete existing instances of this attribute with no effect on the functionality of the business rule.
0
|
None or block fragment
|
1
|
Conditional
|
2
|
Format Date/Time
|
4
|
Run Data Map Script
|
5
|
Get First Row
|
7
|
Print
|
8
|
Configure Test Data
|
10
|
Run Another Component Set
|
11
|
Conditional List
|
12
|
Run Another Business Rule
|
13
|
Repeat for All Rows
|
16
|
Prepend/Append
|
17
|
Conditional True/False
|
18
|
Update
|
19
|
Fixed Repeat
|
20
|
Log Data
|
23
|
Delete
|
For information about different types of component blocks, see Component Blocks.
dataType or valueType
The type of data that the component returns or to which it refers. The default value is STRING.
Additional details for specific types of components.
- For a parameter, the dataType specifies the data type of the parameter value. For a parameter in a dataService business rule component, the result map for a JDBC data service can be represented as a string.
- For a comparison in a condition, the valueType specifies the data type of a value to be compared.
- A dateTime business rule component always returns a value with a data type of STRING regardless of the dataType specified.
- For an exportData business rule component, only STRING and BINARY are supported for the dataType element.
STRING
|
A text string. Any number or date/time included is treated as text.
|
INTEGER
|
A signed integer value.
|
NUMBER
|
A signed decimal value.
|
BOOLEAN
|
A value of true or false.
|
BINARY
|
An array of bytes.
|
DATE
|
A date/time value stored in one of the following formats:
|
mergePolicy
For a business rule component that returns a value, this property (in conjunction with the mergePolicy of its parent business rule component) determines whether the returned value remains in the data map when the business rule component finishes running and returns control to its parent. The default value is MERGE_ALL.
Note: The impact of a business rule component returning control to its parent is also affected by action.
MERGE_ALL or MERGE_TO_PARENT
|
MERGE_ALL or MERGE_FROM_CHILD
|
When the business rule component is finished running, the data map entry containing the value that it returns remains in the data map.
|
MERGE_ALL or MERGE_TO_PARENT
|
MERGE_NONE or MERGE_TO_PARENT
|
When the business rule component is finished running, the data map entry containing the value that it returns is removed from the data map.
|
MERGE_NONE or MERGE_FROM_CHILD
|
Any
|
When the business rule component is finished running, the data map entry containing the value that it returns is removed from the data map.
|
name
Required for a business rule component or a default data entry. The name is a string used to identify the business rule component or, for a default data entry, the data map entry.
For a securityInfo or systemDiagnostics business rule component, the name and namespace indicate the path to the data saved in the data map. Alternatively, for a systemDiagnostics business rule component if the name and the namespace are empty strings, then the diagnostic information is saved to the !DIAGNOSTICS! namespace.
namespace
Required for a business rule component. The namespace is a string used to identify the parent of the business rule component specified by the name attribute. Do not include a leading slash.
For a securityInfo or systemDiagnostics business rule component, the name and namespace indicate the path to the data saved in the data map. Alternatively, for a systemDiagnostics business rule component if the name and the namespace are empty strings, then the diagnostic information is saved to the !DIAGNOSTICS! namespace.
Body
|
The namespace for fields in a label template created in Label Design is Body.
Note: Integrations automatically prefix paths in the print job file with /Body where needed.
|
runtime
|
The namespace for system properties is runtime.
|
Custom Namespace
|
You can create custom namespaces that are named at your discretion. The children of a namespace should always be business rule components, not other namespaces.
|
sticky
If parameters are used in the business rule component, whether the value of each parameter remains fixed throughout the execution of the business rule component. The default value is false.
true
|
The values of parameters in the business rule component remain fixed throughout the execution of the business rule component. If the value is a data ref, the value initially obtained for the data ref is used for the duration of the execution of the business rule component.
|
false
|
The values of parameters in the business rule component can be overridden during the execution of the business rule component. If the value is a data ref and the value of that data ref changes during the execution of the business rule component, then the current value of the data ref is used.
|
Tip: For assistance with a business rule that you have created or to have Loftware create business rules for you, contact Loftware's Professional Services Group.