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.)
You are now ready to begin creating your dataflow.
The first step is to define the input to the dataflow.
Your dataflow will take two fields as input: FirstName and LastName.
Drag an Input stage from the palette to the canvas.
Double-click the Input stage on the canvas.
Click Add then click Add
again.
In the Field name field, type
FirstName.
Click OK, then click OK
again.
Click Add then click Add
again.
In the Field name field, type
LastName.
Click OK, then click OK
again.
You have finished defining the dataflow input. Click
OK.
Next, you will add a stage to change the casing of the data in the FirstName
and LastName fields to all upper case.
Drag a Transformer stage from the palette to the canvas.
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:
Double-click the Transformer stage.
Click Add.
In the tree on the left side, under Formatting
click Case.
In the Field field, select
FirstName. Leave Upper
selected.
Click Add.
In the Field field, select
LastName. Leave Upper
selected.
Click Add.
Click Close.
You have finished configuring Transformer to change the value in the
FirstName and LastName fields to upper case. Click
OK.
Finally, you will define the output for the dataflow. Your dataflow will return
the FirstName and LastName fields as output.
Drag an Output stage to the canvas.
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:
Double-click the Output stage on the canvas.
Check the Expose box. The check boxes next to
FirstName and LastName should now be checked.
Click OK.
In Enterprise Designer, select File > Save.
Give your dataflow the name MyFirstDataflow-Service and
click OK.
Select File > Expose/Unexpose and Save. This exposes your dataflow, making it available as a service on
the server.
To test your service:
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.
Go to Services > Other Services.
In the list of services, check the box next to
MyFirstDataflow-Service then click the Edit
button .
Enter a name in the FirstName field in all lower case letters.
Enter a name in the LastName field in all lower case letters.
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: