Custom step validation in FlowWright

Learn about the custom step validation in FlowWright

Last published at: July 18th, 2024

As you may know, you can build custom steps to do anything that you want them to do and use them within workflows.  Many of our customers build custom steps to perform certain functionality within workflows, but what about validating these step inputs? We explain how it works here.

Custom step validation can be easily implemented within the step. First, implement the step using the interface "deIStep2".  This will let you implement a new "validate" method in your step.  Here's an example of what implementing the "validate" method looks like:

 

The above method offers a validation context and a hash table containing a list of inputs and their values. As you can see from the code, the validation code will check if there are values for the "routeTo" and "routeToRoles" inputs to ensure these have values. Once all is set, the method returns a clsStepValidation object from the function.

FlowWright is all about simplicity, and as you can see from the above example, we have made custom step validation extremely simple to implement. Use custom validation to ensure that the values users configure on step properties are correct.