How to validate a piece of information using Warewolf

I have been asked to throw together a quick demo of Warewolf.  To do this, I will show you how to very quickly build a web service using Warewolf. The service will validate that an email address has been passed in and return Success or Failure.

Before we begin there a four concepts that will help us build the web service:

First, each workflow in Warewolf is a web service end-point. This can be seen in a blue link just above the design surface.

Second, tools can be mashed-up in any way on the workflow design surface.

Third, variables are simply defined by typing them and using them e.g.  [[variablename]]

Finally, the variable list defines if an item will be an Input, an Output or neither.

Let’s build an email address validation service on the Service Bus:

  1. Click New Workflow
  2. Drag the Decision tool onto the bottom of the Start node
  3. Check if [[Email]] variable Is Email and click Done
  4. Drag an Assign tool onto the True arm of the decision
  5. On the left of the Assign tool type [[Result]] and on the right type Success
  6. Drag an Assign tool onto the False arm of the decision
  7. On the left of the Assign tool type [[Result]] and on the right type Failure
  8. In the Variables window select Email as an Input and Result as an Output
  9. Press F5 to run and debug your service.

 

Watch this quick video to see it in action:

 

 

FacebookTwitterLinkedInGoogle+RedditEmail

Leave A Comment?