Create a custom workflow using UI Component Fields. You will modify files in the <bluecat_gateway>/workflows/ directory generated when creating a new workflow from the BlueCat Gateway user interface.
- Create a workflow. This can be performed manually or by using the Create Workflow administrative workflow.
-
In <workflow_name>_form.py, add the needed UI Component
fields.
Note: By default, all UI Component Fields are disabled upon loading a workflow. Fields will become enabled as you progress through the form. After clicking SUBMIT, if you receive an error from the server all fields remain enabled. You can customize this using the is_disabled_on_start and is_disabled_on_error parameters.
-
Modify the workflow files as needed in the
<bluecat_gateway>/workflows/
directory:- <workflow_name>_page.py—you need to specify the endpoint that will be called when clicking Submit. By default, when using ‘Create Workflow’ the Form Submit function name will be in the format <workflow_name>_<page_name>_form and called inside HTML using action=url_for (<workflow_name><function_name>).
- <workflow_name>.js—contains any of the customizations needed in a workflow. For an example refer to the ‘Update Alias Record’ workflow.
- Text/en.txt—Reserved for future use with UI Component Fields, otherwise it can be used as custom workflow internationalization.
- <workflow_name>_form.py—contains a GenericFormTemplate class where you can specify UI Component Fields and their interactions. Use the PlainHtml Component field if you desire to add static HTML in between components. For example, PlainHTML(‘<hr>’).
-
Set the <workflow_name> and permissions for each UI Component Field. If you
want to change a default label, set the label and required
parameters. Set coerce to force a data type of a field. For example,
<coerce=int>.
If necessary, customize the server-side endpoint by providing the server_side_method parameter. Use inputs to map server endpoint form parameters passed to server-side endpoints with client HTML elements. If none are provided all elements in the DOM will be submitted.