Setting up a new Custom Workflow - Platform - BlueCat Gateway - 23.1

Gateway Administration Guide

Locale
English
Product name
BlueCat Gateway
Version
23.1

Custom workflows are collections of Python scripts written by customers (or provided by BlueCat) that provide extended, customized functionality within BlueCat Gateway, either in the UI or as functionality that can be used as part of Gateway's REST API. Behind the scenes, custom workflow scripts typically make use of BlueCat Gateway API calls.

When setting up a new Custom Workflow, BlueCat Gateway helps you get started with workflow creation by setting up the overall file structure for the workflow. When developing the workflow functionality, adhering to this file structure lets Gateway easily integrate your new workflow into the product.

To set up a new custom workflow:

  1. Log in to BlueCat Gateway.

  2. From the navigator on the left, click Administration > Create Workflow.

  3. In the New Workflow Name field, type the Python module name of your new workflow.

    Note: The workflow name must start with a letter or underscore character (_) and can contain only letters, numbers, and underscores. Workflow names must be unique, even across all Categories (see the next step).
  4. (Optional) In Workflow Category, type the nested category and subcategories for your new workflow.

    Custom workflows with the same category will be grouped together under Available Actions in the Gateway UI. The category and subcategory will also be used in the folder name for the workflow's scripts.

    For example, if the Workflow Name is "example_workflow" and the Category is "Examples", then:

    • Under Available Actions in the UI, if the workflow is a UI workflow, it will appear under the Examples subheading. Within the Examples subheading, it will appear as the Available Actions Display Name that you enter later.

    • The workflow's files will be stored in a subfolder under the BlueCat Gateway folder named Examples/example_workflow.

    Tip: Leave the Workflow Category field blank if you want to place the new workflow at the root level, or if the workflow will be used only by the REST API.
  5. Enter additional labels as needed by the specific workflow.
    • In Python Implementation Name, enter the Flask name for the workflow that is used for permissions.

      As you type, Gateway fills in Python Implementation Name with an appropriate value. You can edit it if needed.

    • In Endpoint Name, enter the Endppoint Name. The full endpoint is the Python Implementation Name and the Endpoint Name separated by a slash:
      <Python Implementation Name>/<Endpoint Name>
      This name is particularly useful for API-only workflows. As you type, Gateway fills in the Endpoint Name with an appropriate value. You can edit it if needed.
    • In Available Actions Display Name, enter a name for your new workflow as it will appear under the Available Action menu.

      You can leave this field blank if the workflow will be used only by the REST API or by both the REST API and the UI.

  6. In Workflow Description, enter a basic summary of what the workflow does.

  7. Under Workflow Type, select which type of template to create.
    • To make your workflow available through the BlueCat Gateway user interface, select Workflow with UI.
    • To make your workflow available only to the Gateway REST API, select Workflow using only REST API.
  8. When you're done, click Submit.

    Gateway generates files and subdirectories for your new workflow. These include:
    • <workflow name>_page.py
    • <workflow name>_form.py (which contains validators for fields in the page of your workflow)
    • __init__.py
    • Sub-folders for the workflow's HTML page in <bluecat_gateway>/workflows/. For example, <bluecat_gateway>/workflows/Examples/example_workflow.
  9. If you created a UI workflow (that is, if the Workflow Type was Workflow with UI), you must configure permissions so that it will appear in the Gateway UI for users in appropriate groups.

    Regardless, you can now start editing the workflow's script to implement the desired functionality.