My First Dataflow (Service)

This example shows how to create a simple dataflow that accepts data from an API or web service call, processes the data, and returns a response via the API or web service. Since this dataflow is intended to be exposed as a service on the Spectrum Technology Platform server, it is a service dataflow. (The other primary type of dataflow, a job, performs batch processing, reading data from a file or database, processing the data, then writing the output to a file or database.)

  1. Select Start > Programs > Precisely > Spectrum Technology Platform > Client Tools > Enterprise Designer.
  2. Select File > New > Dataflow > Service.
    You are now ready to begin creating your dataflow.
  3. The first step is to define the input to the dataflow.
    Your dataflow will take two fields as input: FirstName and LastName.
    1. Drag an Input stage from the palette to the canvas.
    2. Double-click the Input stage on the canvas.
    3. Click Add then click Add again.
    4. In the Field name field, type FirstName.
    5. Click OK, then click OK again.
    6. Click Add then click Add again.
    7. In the Field name field, type LastName.
    8. Click OK, then click OK again.
    9. You have finished defining the dataflow input. Click OK.
  4. Next, you will add a stage to change the casing of the data in the FirstName and LastName fields to all upper case.
    1. Drag a Transformer stage from the palette to the canvas.
    2. Click the solid black triangle on the right side of the Input stage (the output port) and drag it to the left side of the Transformer stage on the canvas to create a channel connecting Input and Transformer.
      Your dataflow should look like this:
    3. Double-click the Transformer stage.
    4. Click Add.
    5. In the tree on the left side, under Formatting click Case.
    6. In the Field field, select FirstName. Leave Upper selected.
    7. Click Add.
    8. In the Field field, select LastName. Leave Upper selected.
    9. Click Add.
    10. Click Close.
    11. You have finished configuring Transformer to change the value in the FirstName and LastName fields to upper case. Click OK.
  5. Finally, you will define the output for the dataflow. Your dataflow will return the FirstName and LastName fields as output.
    1. Drag an Output stage to the canvas.
    2. Click the solid black triangle on the right side of the Transformer stage and drag it to the left side of the Output stage on the canvas.
      Your dataflow should look like this:
    3. Double-click the Output stage on the canvas.
    4. Check the Expose box. The check boxes next to FirstName and LastName should now be checked.
    5. Click OK.
  6. In Enterprise Designer, select File > Save.
  7. Give your dataflow the name MyFirstDataflow-Service and click OK.
  8. Select File > Expose/Unexpose and Save. This exposes your dataflow, making it available as a service on the server.
  9. To test your service:
    1. Open Management Console by going to this URL in a web browser:

      http://server:port/managementconsole

      Where server is the server name or IP address of your Spectrum Technology Platform server and port is the HTTP port used by Spectrum Technology Platform. By default, the HTTP port is 8080 and the HTTPS port is 8443.

    2. Go to Services > Other Services.
    3. In the list of services, check the box next to MyFirstDataflow-Service then click the Edit button .
    4. Enter a name in the FirstName field in all lower case letters.
    5. Enter a name in the LastName field in all lower case letters.
    6. Click Run Preview.

      You can see that the service made the name fields all upper case letters, as you specified in your dataflow Transformer stage.

Congratulations! You have designed and run your first service dataflow. The service is now available on the server and can be accessed via an API or web services call. The resource URL for this service's SOAP endpoint is:

http://<ServerName>:<Port>/soap/MyFirstDataflow-Service

The resource URL for this service's REST endpoint is:

http://<ServerName>:<Port>/rest/MyFirstDataflow-Service