Versions Compared

Key

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

With Aptify, many application process flows require mapping data from queries to objects, queries to property collections or property collections to objects. To map data from one area of the system to another without having to get values individually, Aptify includes the Generate Data Mapper Process Component wizard that a developer can use to create process components that map data from a source to a destination reducing the amount of code a developer needs to write.

For example, in a situation where a Process Flow needs to load Person records from a View, and then execute a Stored Procedure passing the PersonID and CompanyID.
  • The Load Data Table component can execute a Stored Procedure with context parameters, but it cannot access Entity Field values. 
  • The Value Retriever component can be used, but can only load one Entity Field at a time.  The Process Flow would need two separate Value Retrievers, one for each field.

This wizard creates a single component that will load all properties that the Process Flow needs in a single step, simplifying Process Flow development and maintenance.

Follow the steps below to use the Generate Data Mapper Process Component Wizard to generate process components that map data within Aptify.

  1. Go to the Process Components service.
  2. Launch the Aptify Generate Data Mapper Process Component Wizard from the Process Components entity browser toolbar or the toolbar of a view run from the service.
  3. Select one of the following options:
    • New: Generates a new Data Mapper process component.
    • Update: Updates an existing Data Mapper process component.
    • Clone: If you want to copy an existing Data Mapper process component and then modified as needed, select the Clone option.

  4. If you select the Update or Clone options, select the Data Mapper process component you want to update or clone from the Select Process Component drop-down menu.
    • The name of the selected process component is automatically populated in the Name field.

      Generate Data Mapper Process Component Wizard Update Option

  5. If you selected the New option, enter a Name for the new Data Mapper process component.
    • If you selected the Update or Clone option, you can modify the name as desired.

    Generate Data Mapper Process Component Wizard New Option

  6. Select Next.
  7. Select the New Map button on the Object Map tab to define the object that will be used in the data mapping.
  8. Enter the Name for the source/destination object to be mapped. 
    • If this is a property you are using as an Input Property (i.e., it exists in the Process Flow Context Object already), the name must match the name of the property in the Process Flow Context Object.  If this is a property you are using only within the Data Mapper, or will be using for output, you can choose the name as you wish.

  9. Select a Source Type, the available source types are:
    • NEW GE OBJECTPROPERTY(DATA TABLE): Indicates that a new GE Object will be loaded. In this instance, Source Details will include the entity name, and optionally, in parenthesis, the ID of the record to load. If the record ID is not provided, a new record is createdthe source of the object is a Data Table property.
    • PROPERTY(GE): Indicates  Indicates that the source of the object is a generic entity object (normally from a process flow or event handler).
    • PROPERTIES: Indicates  Indicates that the source of the object is the properties/context object from the process flow other than a generic entity object. If the source is a generic entity object, use the Property (GE) source type.
    • NEW GE OBJECT: Indicates that a new GE Object will be loaded. In this instance, Source Details will include the entity name, and optionally, in parenthesis, the ID of the record to load. If the record ID is not provided, a new record is created.
    • SQL STATEMENT: Indicates the object is will be a Data Table object that contains the results of the SQL query specified and the fields available from this object will be the set of fields from the SQL query. The input property is a SQL Statement to be executed to retrieve data.
    • DATA ROW: Indicates that the object is a single row from a Data Table.

  10. Enter Source Details. The information that goes in this field is determined by the value chosen in the Source Type field.
    • If Source Type is New GE Object: Enter the name of the entity from which you want to map, and optionally, in parenthesis, the ID of the record to load. If the record ID is not provided, a new record is created.If Source Type is Property Source Type is PROPERTY(DATA TABLE): List the columns for the data table, separated by comma.
    • If Source Type is PROPERTY(GE): Enter the name of the existing generic entity object (from a process flow or event handler) which you want to map.
    • If Source Type is Properties is PROPERTIES: Enter the name of the input property that you want to provide as an input to the process component or the name of context object if you want to use the property as an output for the process component. This should be the same as the Name value.
    • If Source Type is SQL Statement NEW GE OBJECT: Enter the name of the entity from which you want to map, and optionally, in parenthesis, the ID of the record to load. If the record ID is not provided, a new record is created.
    • If Source Type is SQL STATEMENT: Enter the SQL statement that extracts the required information (set of fields) to use in the data mapping. Note that only the first row of the SQL query will be considered. Use a SELECT query that returns only one row.
    • If Source Type is DATA ROW: Enter the name of the Data Table and the index of the row: DataTableName(RowIndex)

  11. Enter any Comments for the Object Map.

    Object Map Tab
  12. Keep the following in mind as you define your object map:
    • <% %> Syntax is supported to allow access to context properties, including properties defined in the data map.
    • Ordering of these properties is important.  If you are defining dependent properties, the dependencies must be listed first.
      • Provide a RowIndex to identify which DataRow, the Rothe wIndex property must be defined before the DataRow property.  PersonsDataTable(<%RowIndex%>)
      • Provide an EntityID to load a GE object, then EntityID must be defined before the PROPERTY (GE) property.  Persons(<%EntityID%>)
         
    • Output Properties must be defined as well.
       
  13. Add additional object maps as necessary.
  14. Select the Data Map tab and select the New Map button to define the data mapping steps that correspond to the objects defined on the Object Map tab. Note that the steps are executed in the order in which they appear on the tab.
    • Each row describes how to map Input data to one of the defined Output Properties, GEs, SQL Statements, Data Tables, and Data Rows will be mapped according to their definitions in the Object Map – the Data Map is for specifying how attributes of those complex properties map to Properties.
       
  15. Enter the Source Object (name of object from Object Map tab - this is the data source that provides a property. This can be either type of GE, an SQL Statement, or a Data Row.).

  16. Enter the Source Attribute. The information that goes in this field is determined by the Source Type of the object chosen in the Source Object field. The drop-down list shows all possible values.
    • If Source Type is New GE Object of PropertyNEW GE OBJECT or PROPERTY(GE): A drop-down list is made available with all fields from the GE Object. Select an appropriate field for the desired results of the mapping.
    • If Source Type is Properties PROPERTIES: Enter the name of the object from the Object Map tab.
    • If Source Type is SQL StatementSTATEMENT: Enter the name of the field that is returned from the SQL query.

  17. Enter the Destination Object. This is the property where the value will be stored. The drop down list shows all objects listed on the Object Map.
  18. Enter the Destination Attribute. Repeat the Destination Object value.  The drop down list will show only the value of the Destination Object.
  19. Enter any Comments for the Data Map.

Data Map Tab
You can view the generated process component by selecting the newly created record from the Process Components service.

Process Component Generated From the Wizard

 

Note

One additional InputProperty XML is defined. The InputProperty does not need to be provided when using the generated component in a Process Flow. The Component is created within the Data Mapper Components category.

Info

When you use the Generated Component In a process flow, remember the following:

  • The Input Properties will be filled out for the component.  These cannot be changed via the component.  Any changes must be done by re-running the wizard to update the component.
  • The Output Properties must be completed to map the Output properties from the Component to the Context properties for the Process Flow.