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.
- Log in to BlueCat Gateway.
- 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 BlueCat Gateway.
- 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 BlueCat Gateway user interface and as a REST API.
- Workflow using only REST API—your workflow will only be executable through a REST API.
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.
- You must restart BlueCat Gateway.
- 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.
- 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.