Description
ST2 WORKFLOW DESIGNER
USER EXPERIENCE ENHANCEMENTS
1. Problem Statement
ST2 Workflow Composer Graphical User Interface requires parameter names in a non-intuitive syntax. For example, standard way of adding parameters to an action requires a strict notation
<% ctx().myParameter %>
ctx() which represents "Context" need not be exposed to the end user. Further, strict mandate of "<% " is error prone.
Same issue exists in <% failed() %> and <% succeeded() %> constructs in TRANSITIONS.
Secondly, users need to remember the parameter names and type them correctly. A mistyped parameter name gets revealed much later resulting in inefficient workflow creation process.
2. Expected Behavior
Just like modern cars don?t need users to change gears, the details of ctx() etc need to be taken care of by GUI logic. Users are only concerned with parameters, and should be allowed to enter them in most intuitive manner.
Users need to be given an optional drop down menu to select parameters from. This way they can chose right parameter.
In case users choose to type the parameter name, automatic auto-completion should take place as users type out the parameter.
The list of parameters should be taken from workflow parameters, as defined by users. This list can change, meaning users can add/delete/modify parameter. This should be handled intelligently. Meaning backend logic should keep track of parameters as defined by users and which one of those are being used in different actions. If a parameter is used in one or more actions, users should not be allowed to delete it from workflow; they should first edit the corresponding actions.
In TRANSITIONS tab, the "When" clause should be a drop down that has "Succeeded", "Failed".
3. Use Cases
3.1. Workflow Creation
Recommended workflow creation steps are as follows
* Create new workflow by clicking on "+" button
* Select your Pack from drop down menu
* Name your workflow
* Add description
* Save the workflow
At this point workflow is created but not useful yet
3.2. Adding Parameters/Vars to your workflow
* Select PARAMETER or VARS tab
* Add parameters/vars by selecting "ADD PAREMETER"/"ADD VARIABLE". Name your parameters/vars clearly so that they can be used unambiguously in your workflow
* Orquesta forces some rules. For example no dashes are allowed. GUI must check for these rules and reject names that don't follow them, and suggest appropriate changes via useful help messages
3.3. Adding Actions to your Workflow
* Drag and drop required action(s) in the workflow
* Join the actions using arrows (see St2 documentation on how to do this) and create your workflow
* Review your workflow to make sure it does what you need it to do. Goal is to verify logic and not details
3.4. Adding Conditional Branching to your Workflow
* The 'When' clause will have a drop down for "Failed" and "Succeded". Pick what you want and create rest of the logic as before
3.5. Add Parameters and Variables to your Workflow
Most of the suggested changes will appear in this step
* For each action, fill in all the required parameters
* There are three ways you can pass parameter to an action. Easiest one is to have a hard coded constant/number. This is not recommended, but sometimes you may end up doing this.
Second is that you may want to pass results from earlier action as parameter.
Third, and most common, is that your parameter is passed from workflow parameter definition. For this purpose there should be a dropdown that lists currently defined workflow parameters. You can chose right parameter. GUI must take care of making sure right datatype is maintained when displaying the list. In this context, users should also be allowed to type the parameter, GUI providing auto-completed list as user types.
3.6. Deleting/Editing a parameter from Workflow
* Users can delete a parameter from GUI by selecting PARAMETERS tab and "Trash Can" icon next to given parameter
* GUI should check if this parameter is currently being used by any actions in the workflow
* If parameter is being used then delete action should not be allowed, with proper error message. Error message should list all the actions that are using the parameter
* Same logic for Editing a parameter. Specifically, changing the data type should not be permitted if parameter is being used. Changing description is OK
3.7. Backward Compatibility
Since all the additions are GUI based, there should be 100% backward compatibility. In other words all the workflows created using St2 3.2 or 3.3 version should be viewable/editable in new format.
Note about YAML and other files
This is a GUI specific enhancement. All the YAML and other data files should remain orthogonal to this development. Specifically, there is no change in them. Further, YAML files from older releases such as 3.2 and 3.3 should immediately enjoy the new GUI features without any changes. The saved files from the enhanced GUI should be exactly same as release 3.2 and 3.3.
Note about drop down menu
There should be some way to override the dropdown menu option and type whatever you want to type. If GUI supports this natively then it is well and good. If not then there should be an option to bypass dropdown.
This is important because additional options may be added in the supporting file structure. The GUI may be late in catching up to these features. Users should still be able to enjoy the new features without waiting for "next release of GUI which supports these feature"