Creating workflows with UI Component Fields - Platform - BlueCat Gateway - 24.2

Gateway Administration Guide

ft:locale
en-US
Product name
BlueCat Gateway
Version
24.2
Note: Currently, custom workflows can only use UI elements from the legacy Gateway UI. They currently cannot use UI elements from the updated UI introduced in BlueCat Gateway v23.2.
When you create a custom workflow with a UI, you will modify files in the <bluecat_gateway>/workflows/ directory that is generated when creating a new workflow from the BlueCat Gateway user interface.
  1. Create a workflow. You can do so manually (outside of Gateway or by using the Create Workflow administrative workflow. For more details, see Setting up a new Custom Workflow.

  2. In <workflow_name>_form.py, add the needed UI Component fields.

    Note: By default, all UI Component Fields are disabled upon loading a workflow. Fields will become enabled as you progress through the form. After clicking SUBMIT, if you receive an error from the server all fields remain enabled. You can customize this using the is_disabled_on_start and is_disabled_on_error parameters.
  3. Modify the workflow files as needed in the <bluecat_gateway>/workflows/ directory:

    • <workflow_name>_page.py: Specify the endpoint that will be called when clicking Submit. When creating a workflow from the Create workflow page, by default the Form Submit function name will be <workflow_name>_<page_name>_form, and called inside HTML using action=url_for (<workflow_name><function_name>).

    • <workflow_name>.js: Contains any of the customizations needed in a workflow. For an example, see the Update Alias Record workflow.

    • Text/en.txt: Reserved for future use with UI Component Fields. Otherwise, it can be used for custom workflow internationalization.

    • <workflow_name>_form.py: Contains a GenericFormTemplate class, where you can specify UI Component Fields and their interactions. If desired, use the PlainHtml Component field to add static HTML in between components. For example, PlainHTML('<hr>').

  4. Set the <workflow_name> and permissions for each UI Component Field. If you want to change a default label, set the label and required parameters. Set coerce to force a data type of a field. For example, <coerce=int>.

    Note: If necessary, customize the server-side endpoint by providing the server_side_method parameter. Use inputs to map server endpoint form parameters passed to server-side endpoints with client HTML elements. If none are provided all elements in the DOM will be submitted.