Data Mapping
Data Mapper is a script grammar available for script tasks, task scripts, web-services, sub-processes, and global signals. With Data Mapper, you can graphically map data across datafields and parameters to create complex BOM objects from a combination of process data fields and parameters.
Note: For data mapper, the script created employs a create-or-merge strategy at runtime. If the parent-tree for the target element does not exist, TIBCO Business Studio creates it prior to assigning the mapped element. If there is any invalid mapping in the process data, an appropriate validation error is displayed in the Problems tab.
The process data can include data fields, parameters, user-defined scripts, process information, and work item information. The left hand side of the data mapper shows the source list, and the right hand side shows the target list. The mappings defined using the process data mapper are applied to the target datafields and parameters at runtime.
- Data Mapper is available on Script Tasks as an option in the Script Defined As: list on the General tab of the Properties view.
- For a Task script, Data Mapper is available as an option in the Script Defined As: list in the process manager and work manager scripts in the Script tab of the Properties view.
- For a Web Service, Data Mapper is available using the Input To Service and Output From Service tabs in the Properties view.
- For a Call Sub-Process, Data Mapper is available using the Map To Sub-Process and Map From Sub-Process tabs in the Properties view.
- For a Catch error event (including Web Service fault catch event, catch-all error events), Data Mapper is available using the Map From Error tab in the Properties view.
Note: If you change the script grammar from Data Mapper to JavaScript, TIBCO Business Studio generates a new JavaScript with the data you have already defined in the Data Mapper. In complex mapping scenarios, you can draw the main assignments easily and then modify the result to perform more complex actions. However, changing the grammar from JavaScript to Data Mapper results in loss of the script.
Note: The overall strategy for handling mappings into the children of complex type target data is to create the target element if it does not exist prior to performing assignment to the child element. If the target parent element already exists then the assignment is made to the child of the existing element.
Copyright © Cloud Software Group, Inc. All rights reserved.