Enumerations can be used in models to limit the possible values a workflow designer can assign to a member of a model.

Consider for instance an API for 'orders' in a 'store'. We got the operations 'Add new order', 'Update order' and 'Delete order'. Let's look at the 'Order' model:

'status' is of type 'Enum':

And if we look at that enum you can see what possible values that member can have. You can add or delete memberse using the buttons in the circled area.

Let's look at an operation using the 'Order' model, 'Update order'

It uses 'PATCH' to only update certain members, accepting a body of model 'Order'. Let's look how this will look in Flow Studio:

When using 'Constant' as mapping to 'status' only the members of the enum are available. You can still mess it up by selecting 'Variable' as mapping and providing an invalid value in the passed variable. But with the usage of enums you can at least guide the person using the connector in Flow Studio in what kind of values are expected.

Last updated