Creating a new workflow - Platform - BlueCat Gateway - 21.11.2

Gateway Installation Guide

Locale
English
Product name
BlueCat Gateway
Version
21.11.2

Create a template for a custom workflow in BlueCat Gateway.

Creating a new workflow in BlueCat Gateway creates a template and a README file for the workflow. Your workflow can be only a REST API endpoint, or a REST API endpoint and an HTML page in the BlueCat Gateway user interface. BlueCat 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 BlueCat Gateway.
  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 BlueCat Gateway.
  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 BlueCat 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.
    BlueCat Gateway generates files for your workflow in the <bluecat_gateway>/workflows directory. For example, /bluecat_gateway/workflows/servers/BDDS/add_server.
    • If your workflow is available using only REST API, BlueCat Gateway will generate a _page.py file and an _init_.py file.
    • If your workflow is available via REST API and the BlueCat Gateway user interface, BlueCat 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, and sub-folders for the HTML page, including css, img, and js.

Next steps

  1. You must restart BlueCat Gateway.
  2. Set access permissions for your workflow either from the Workflow Permissions page in BlueCat Gateway or from <bluecat_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 BlueCat Gateway in the BlueCat Gateway Help and Documentation.