If you have a comment on this topic, contact Aptify Documentation. If you want to return to the Aptify Community Site, please click here.

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 NameProcess Flow NameEvent Name
Calendar ViewsGenerate HTML5 Web View MetadataAfterSave
Chart View FunctionsGenerate HTML5 Web UI Part Metadata ItemsAfterSave
Chart View TypesGenerate HTML5 Web UI Part Metadata ItemsAfterSave
Chart ViewsGenerate HTML5 Web View MetadataAfterSave
Currency TypesGenerate HTML5 Web UI Part Metadata ItemsAfterSave
Currency TypesGenerate HTML5 Web Form Template UI PartsAfterSave
Dashboard AreasGenerate HTML5 Web Dashboard UI PartsAfterSave
Dashboard PartsGenerate HTML5 Web Dashboard UI PartsAfterSave
DashboardsGenerate HTML5 Web Dashboard UI PartsAfterSave
EntitiesGenerate HTML5 Web Entity MetadataAfterEntitySaveCompleted
Filter Rule TypesGenerate HTML5 Web UI Part Metadata ItemsAfterSave
Filter RulesGenerate HTML5 Web UI Part Metadata ItemsAfterSave
Form Template PartsGenerate HTML5 Web Form Template UI PartsAfterSave
Form TemplatesGenerate HTML5 Web Form Template UI PartsAfterSave
List TypesGenerate HTML5 Web Entity MetadataAfterSave
Member TypesGenerate HTML5 Web UI Part Metadata ItemsAfterSave
Member TypesGenerate HTML5 Web Form Template UI PartsAfterSave
Order SourcesGenerate HTML5 Web Form Template UI PartsAfterSave
Order Status TypesGenerate HTML5 Web Form Template UI PartsAfterSave
Payment TypesGenerate HTML5 Web Form Template UI PartsAfterSave
Process ComponentsGenerate HTML5 Web UI Part Metadata ItemsAfterSave
Product TypesGenerate HTML5 Web UI Part Metadata ItemsAfterSave
Product TypesGenerate HTML5 Web Form Template UI PartsAfterSave
ProductsGenerate HTML5 Web Form Template UI PartsAfterSave
Shipment TypesGenerate HTML5 Web UI Part Metadata ItemsAfterSave
Shipment TypesGenerate HTML5 Web Form Template UI PartsAfterSave
Timeline ActivitiesGenerate HTML5 Web UI Part Metadata ItemsAfterSave
TokenProvidersGenerate HTML5 Web UI Part Metadata ItemsAfterSave
UI Part Metadata ItemsGenerate HTML5 Web UI Part Metadata ItemsAfterSave
ViewsGenerate HTML5 Web View MetadataAfterSave
WizardsGenerate HTML5 Web UI Part Metadata ItemsAfterSave

 

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 continue. See Delivered Metadata Configurations for more details.

Once you have determine 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.

      New Metadata Generator Configurations Record

  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.

Copyright © 2014-2019 Aptify - Confidential and Proprietary