.. _step-TriggerApplication: TriggerApplication ================== This step allows you to trigger any number of the same application based off of app variables or input data. If this step is set to have an 'output_to' setting, then it will automatically wait until all of it's child triggered apps are completed. If output_to is not set, then it will simply trigger the childrenand then report success/failure on whether or not they were successful. If this step isn't output_to anything, you can manually enable the waiting for child_failure with the wait_for_child_completion parameter .. versionadded:: 1.0.0 * **Friendly name:** ``Trigger Application`` * **Step class:** ``base_steps_syncpack.steps.TriggerApplication.TriggerApplication`` * **Step version:** ``1.3.3`` * **Required parameters:** ``value_as`` Parameters ---------- .. list-table:: :header-rows: 1 :widths: 22 16 8 16 38 * - Name - Type - Required - Default - Description * - ``foreach`` - json - no - -- - Trigger multiple applications for each value in the list or dict Example: ``${appvar.mappings}`` * - ``input_iterator`` - json - no - ``False`` - If this is true, then trigger app will be executed for each item in the array of input data from the previous step. The data will be addedas an app_variable defined by the value_as parameter to the triggered app. This isnot compatible with the foreach parameter * - ``key_as`` - string - no - -- - If the 'foreach' field is a dict, this field specifies what app variable the key will be set as Example: ``snow_ci`` * - ``value_as`` - json - yes - -- - If the 'foreach' field is a dict, specifies what app variable the value will be set as. If the foreach field is a list, then the variable will be set with the elements of the list Example: ``em7_device_classes`` * - ``trigger_app`` - string - no - -- - The name of the application which should be triggered Example: ``em7_snow_device_export`` * - ``app_vars`` - json - no - -- - Allows a user to dynamically set a variable in a specific step of the triggered application Example: ``[{'name': 'em7_relative_url', 'value': '${stepfunc.determine_relative_url} ${em7_device_classes}]'`` * - ``exit_on_child_failure`` - boolean - no - ``True`` - Only applies if this step is enabled to wait for triggered children completion. If this value is True, then if ny triggered app fails then this step will immediately be marked failure. If it is false, then this step will not fail if a child fails, but will still wait until all triggered apps are completed * - ``wait_for_child_completion`` - boolean - no - ``False`` - Manual toggle of whether or not to wait for the triggered applications to complete * - ``config_from_app_vars`` - boolean - no - ``False`` - Manual toggle of whether or not to use configuration from app_vars for the triggered applications * - ``autofill_null_vars`` - boolean - no - ``False`` - Manual toggle of whether or not to autofill null appvars Other inherited parameters -------------------------- This step also accepts 1 optional parameter(s) inherited from :ref:`step-Jinja2Template`. Every step also accepts the platform parameters common to all steps -- see :ref:`platform-parameters`. Dependencies ------------ * **Inherits from:** ``TriggerApplication`` -> ``Jinja2Template`` -> ``BaseStep`` -> ``Serializable`` * **SyncPack modules:** ``base_steps_syncpack.steps.Jinja2Template`` * **External packages:** ``celery``, ``ipaascommon``, ``ipaascore`` .. include:: /_step_notes/TriggerApplication.rst API --- .. autoclass:: base_steps_syncpack.steps.TriggerApplication.TriggerApplication :members: :show-inheritance: