Creating a new workflow - Platform - BlueCat Gateway - 18.2.1

Gateway Installation Guide

prodname
BlueCat Gateway
version_custom
18.2.1

Create a template for a custom workflow in the DNS Integrity Gateway.

Creating a new workflow in the DNS Integrity Gateway user interface creates a template, or skeleton, for the workflow. Your workflow can be only a REST API endpoint, or a REST API endpoint and an HTML page in the DNS Integrity Gateway user interface. The DNS Integrity Gateway generates the necessary files for your workflow template, then you must manually modify the generated Python files with code for the steps of your custom workflow.

  1. Log in to the DNS Integrity Gateway user interface.
  2. Under Available Actions, click Create Workflow.
  3. Type the name of your new workflow in the New Workflow Name field. As you type, the Python Implementation Name and Endpoint Name fields will auto-complete. You can modify the content of those fields as necessary.
    Note: The workflow name must start with a letter or underscore and consist of only letters, numbers, and underscores.
    • Python Implementation Name—the Flask name for the workflow; used in permissioning.
    • Endpoint Name—the endpoint of the workflow; the full endpoint is a composite of the Python Implementation Name and Endpoint Name (<implementation_name/endpoint_name>).
  4. Optional—In the Workflow Category field, type the nested category and sub-categories for your new workflow. For example, if you are creating an "add server" workflow, you could create servers/BDDS. Leave this field blank if you want to place the new workflow at the root level.
  5. In the Available Actions Display Name field, enter a name for your new workflow as it will appear under the Available Action menu in the DNS Integrity Gateway user interface.
  6. In the Workflow Description field, enter a basic summary of what the workflow does.
  7. Under Workflow Type, select one of the following:
    • Workflow with UI—your workflow will be available through the DNS Integrity Gateway user interface and as a REST API.
    • Workflow using only REST API—your workflow will only be executable through a REST API.
  8. Click SUBMIT.
    The DNS Integrity Gateway generates files for your workflow in the <dns_integrity_gateway>/workflows directory. For example, /dns_integrity_gateway/workflows/servers/BDDS/add_server.
    • If your workflow is available using only REST API, the DNS Integrity Gateway will generate a _page.py file and an __init__.py file.
    • If your workflow is available via REST API and the DNS Integrity Gateway user interface, the DNS Integrity Gateway generates a _page.py file, a _form.py file (this contains validators for fields in the page of your workflow) an __init__.py file, as well as sub-folders for the HTML page, including css, img, and js.

Next steps

  1. If the module_reload variable is set to false (default) in <dns_integrity_gateway>/config.py, you will need to restart the DNS Integrity Gateway.
  2. Set access permissions for your workflow either from the Workflow Permissions page in the DNS Integrity Gateway user interface or from <dns_integrity_gateway>/permissions.json. Once permissions are set, your new workflow will appear under the Available Actions menu.
  3. Modify the _page.py file with the code for your new workflow. For further details, refer to Customizing the DNS Integrity Gateway in the DNS Integrity Gateway Help and Documentation.