Automating Metadata Generation

Metadata generation is used to generate the respective metadata (HTML, etc.) so that changes appear in the Aptify Web interface. For example, if we add a new currency type then we need to generate Web UI Part Metadata Items to get the respective changes to reflect in web (after we clear cache and local storage). Starting with 5.5.4.4000, Aptify enhances the metadata generation framework to reduce the times in which users need to manually generate metadata when changes are made to entities, form templates, dashboard or any UI Part metadata from the desktop or web clients. To support this feature, Aptify includes a new entity called Metadata Generator Configurations and by default includes a number of metadata configurations for common scenarios, including adding a new currency type. To automate the generation, Aptify includes a new process flow called MetaDataGeneratorProcessFlow that it used by your application server to trigger the metadata generation at the appropriate time.

 

Application Server Required

This feature utilizes Aptify's application server to run the necessary generators automatically. See Installing Application Servers in the Product Knowledge site for more information about setting up and running an application server.

 

 This topic contains the following sub-topics:

 

Default Metadata Generators are Disabled.

By default, all Metadata Generator Configurations records delivered with Aptify are inactive as well as their corresponding event handlers. See Enabling Default Metadata Generators Configurations for more details.

Default Metadata Configurations

Below is a list of the metadata configurations that are included by default.

Metadata Configurations Records Must Be Unique

You can only have one Metadata Configurations record per entity per metadata generator process flow per event. This will ensure that the generation happens only once. If you attempt to create a record with the same entity, process flow and event, an error is generated, and you will not be able to save the record.

Entity Name Process Flow Name Event Name
Calendar Views Generate HTML5 Web View Metadata AfterSave
Chart View Functions Generate HTML5 Web UI Part Metadata Items AfterSave
Chart View Types Generate HTML5 Web UI Part Metadata Items AfterSave
Chart Views Generate HTML5 Web View Metadata AfterSave
Currency Types Generate HTML5 Web UI Part Metadata Items AfterSave
Currency Types Generate HTML5 Web Form Template UI Parts AfterSave
Dashboard Areas Generate HTML5 Web Dashboard UI Parts AfterSave
Dashboard Parts Generate HTML5 Web Dashboard UI Parts AfterSave
Dashboards Generate HTML5 Web Dashboard UI Parts AfterSave
Entities Generate HTML5 Web Entity Metadata AfterEntitySaveCompleted
Filter Rule Types Generate HTML5 Web UI Part Metadata Items AfterSave
Filter Rules Generate HTML5 Web UI Part Metadata Items AfterSave
Form Template Parts Generate HTML5 Web Form Template UI Parts AfterSave
Form Templates Generate HTML5 Web Form Template UI Parts AfterSave
List Types Generate HTML5 Web Entity Metadata AfterSave
Member Types Generate HTML5 Web UI Part Metadata Items AfterSave
Member Types Generate HTML5 Web Form Template UI Parts AfterSave
Order Sources Generate HTML5 Web Form Template UI Parts AfterSave
Order Status Types Generate HTML5 Web Form Template UI Parts AfterSave
Payment Types Generate HTML5 Web Form Template UI Parts AfterSave
Process Components Generate HTML5 Web UI Part Metadata Items AfterSave
Product Types Generate HTML5 Web UI Part Metadata Items AfterSave
Product Types Generate HTML5 Web Form Template UI Parts AfterSave
Products Generate HTML5 Web Form Template UI Parts AfterSave
Shipment Types Generate HTML5 Web UI Part Metadata Items AfterSave
Shipment Types Generate HTML5 Web Form Template UI Parts AfterSave
Timeline Activities Generate HTML5 Web UI Part Metadata Items AfterSave
TokenProviders Generate HTML5 Web UI Part Metadata Items AfterSave
UI Part Metadata Items Generate HTML5 Web UI Part Metadata Items AfterSave
Views Generate HTML5 Web View Metadata AfterSave
Wizards Generate HTML5 Web UI Part Metadata Items AfterSave

 

Enabling the Default Metadata Generator Configurations

By default, all Metadata Generator Configurations records delivered with Aptify are inactive as well as their corresponding event handlers.  Below are steps to enable all of the default configurations in one go using an Entity Bulk Operation (EBO) that is also included as stock.

If You Have Existing Events for Metadata Generation

If you have existing event handlers that generate metadata, this Entity Bulk Operation will attempt to identify duplicate event handler records and inactivate them automatically without manual intervention. Aptify recommends confirming that only one event handler is active per entity per event so that duplicate process flow runs are not fired.

 

  1. Navigate to the Metadata Configurations service.
    • This service is by default found under the Process Pipeline application. 
  2. Open or create a view of all records.
  3. Click the Entity Bulk Operations Wizard icon in the view toolbar to launch the wizard. 
  4. Click Next to begin the wizard.
  5. Select the AptifyUpdateMetadataConfigRecord EBO.
  6. Click Next and Finish to begin the operation.
  7. After the bulk operation executes, the wizard prompts to run another bulk operation on the same set of data. Click No to close the Entity Bulk Operations wizard.

Creating New Metadata Configurations 

Metadata Configurations Records Must Be Unique

Look for an existing metadata configuration before continuing. See Delivered Metadata Configurations for more details.

Once you have determined that there is not an existing metadata configuration that meets your needs, you can create a new metadata configuration with the following steps.

  1. Open a new Metadata Configurations record.
    • This service is by default found under the Process Pipeline application. 
  2. Enter the Entity ID of the entity in which you want to generate metadata against.
  3. Enter the Process Flow ID of 
  4. Enter the Event ID of the event handler in which you want the generation to occur.
  5. Check the Is Active option.
    • If this option is not checked, the metadata generator will not be triggered.
    • Be default, all Metadata Configurations records are unchecked. See
    • If you want to disable a metadata configuration, make sure the Is Active option is unchecked.
  6. If you want to specify any input properties related to the metadata process flow, select the Metadata PF Inputs Maps tab and open a new sub-type record.
    • If no input properties are specified, the current GE object will be used.
    • Input properties are not required, however for best results, it is recommended to provide one or more properties, to streamline the metadata generator to only regenerate the necessary metadata. 
      • For example, if you want to generate currency types, entering the below values will generate only the UI parts for currency types. Without specifying these values, all UI Part Metadata would be generated.
    • If you don't know the ID or name of the item(s) you want to generate, you can specify a SQL statement to run against the appropriate. For example, if you want to generate all the form templates related to Shipment Types, select SQL as the Type and specifythe following:
      • select il.FormTemplateID as ID,im.InputProperty,source from vwFormTemplatePartInputMap im
        inner join 
        vwFormTemplatePartLinks il
        on im.FormTemplatePartID=il.FormTemplatePartID
        where source like '%shiptypes%'
        and im.InputProperty = 'DisplaySQL'

  7. Save the Metadata Configurations record.
    • During the save process, an Event Handlers record is created with the current GE object and the ID of the event in which the process flow should run (for example, AfterSave)

Specifying a Different Metadata Configuration Process Flow


By default, Aptify includes a process flow called MetaDataGeneratorProcessFlow that is used to generate the necessary metadata. If you want to change the process flow that is used, you can do so by modifying the ProcessFlowName attribute (found on the Configurations > Attributes sub-tab) on the Metadata Configurations entity.

Was this article helpful?
0 out of 0 found this helpful

Comments

0 comments

Please sign in to leave a comment.