.. _Types of Dynamic Applications: https://docs.sciencelogic.com/latest/Content/Web_Content_Dev_and_Integration/Dynamic_Application_Development/dynamic_app_dev_intro.htm #################################### Additional |FRAMEWORK_NAME| Features #################################### The |FRAMEWORK_NAME| also has other features that will help you to define your Dynamic Applications. .. _substitution: ************ Substitution ************ Substitution occurs during the Argument Parsing |STEP_NAME|, prior to converting the snippet argument into the appropriate |STEP_NAME_PLURAL| for the framework to execute. Substitution occurs for the following values, indicated within the ``<`` and ``>`` characters. .. list-table:: * - - The application ID of the Dynamic Application * - - The timestamp for the data when saving to the database for the Dynamic Application * - - The poll frequency of the Dynamic Application * - - The name of this component device * - - The Unique identifier for the DCM tree of this component device * - - The Unique ID of this component device * - - The Device ID (DID) of this device/component device * - - The root Device ID of this component device * - - The parent Device ID of this component device * - - The Globally Unique Identifier (GUID) of this component device * - - The IP address of this component device Substitution Usage ================== The way to use the substitution values is as follows: .. image:: _static/snippet_arg_substitution.png Custom Substitution =================== You can also write your custom substitution in the snippet code. An empty dictionary, called ``custom_substitution``, lets you build your own custom substitutions. The example below shows you how to do custom substitutions: .. image:: _static/custom_substitution.png Substitution Example ==================== Suppose we have a device with a Unique Identifier equal to ``/api/account/1`` and a custom substitution as in the avobe image. The substitution in the snippet argument will be as follows. +-------------------------------------+-------------------------------------+ | Before substitution | After substitution | +-------------------------------------+-------------------------------------+ | .. code-block:: none | .. code-block:: none | | :emphasize-lines: 5,8 | :emphasize-lines: 5,8 | | | | | low_code: | low_code: | | version: 2.0 | version: 2.0 | | id: FirstName | id: FirstName | | steps: | steps: | | - http: | - http: | | uri: "" | uri: "/api/account/1" | | - json | - json | | - simple_key: "" | - simple_key: "contact_fname"| +-------------------------------------+-------------------------------------+ ************ Bulk Snippet ************ Bulk Snippets are designed to improve performance when the same network request can service many collections. This means that if you need substitution during a Requestor, there is limited or no benefit to Bulk Snippets. On the other hand, if your substitution is happening during a processor, Bulk Snippets will reduce the number of network requests and improve overall performance. As an example you would want to use a bulk snippet if you are using a component UID when selecting the result using the jsonpath |STEP_NAME|. .. note:: The |FRAMEWORK_NAME| will execute bulk collection if the application type is configured to Bulk Snippet.