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.
- Log in to the DNS Integrity Gateway user interface.
- Under Available Actions, click Create Workflow.
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>).
- 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.
- 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.
- In the Workflow Description field, enter a basic summary of what the workflow does.
Under Workflow Type, select one of the
- 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.
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.
- 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.
- 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.
- 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.