Page tree
Skip to end of metadata
Go to start of metadata

About this tutorial

Since this tutorial demonstrates all tasks on a single messaging server, to mimic a system-to-system messaging scenario you will now create and process simple messages in Universal Platform, the ESB, using pipelines.


 Configuring pipelines

A pipeline defines the process and actions for the task you want Universal Platform to perform. Pipelines are defined programmatically using flow-based programming methods.

 

 Configuring a pipeline to publish messages

To create a pipeline to publish messages:

  1. Go to the browser tab that has Platform Manager open.
  2. Select Pipelines. The Pipelines screen is displayed.
  3. Click Add.
  4. On the General tab, enter a name for the pipeline in the format: Pipeline_PublisherWidgetSales.
  5. Click Save.



    The editor enables you to program the pipeline. You program your pipeline for the Dropbox connector you created using flow-based programming methods.


    To begin programming:
  6. Select the Editor tab. The pipeline editor may take some time to load, so don't run away!
  7. Enter text in the filter… field. A list of functions matching your search is displayed.

    When you search for functions, the results are displayed in groups - Universal and Connectors. The Universal group displays the system default connectors and the Connectors group displays custom connectors.
  8. Drag-and-drop the Text function on to the pipeline editor.
  9. Enter publish in the filter… field.
  10. Drag-and-drop the Publish Message function on to the pipeline editor.
  11. Click Save.

     
  12. Select the Text function block on the editor to view the function Details and Properties. If the Properties pane is not displayed, click Open Properties.
  13. Enter some message text in the Properties Text field. This is the message that you want to send.
  14. Click Save.

     
  15. Select the Publish Message function block on the editor to view the function Details and Properties.
  16. Configure the function as follows:
    • Publisher: Publisher_WidgetSales
    • User Credential: ClientLogin_User
  17. Click Save.


    You now need to join the functions using Bind. When you bind functions, you are specifying that the functions are related so that they are executed in the same process, and in doing that, you bind data output and data input to each step. The line between the function blocks shows the order they are executed in.

    To bind the functions:

  18. Enter Bind in the filter… field.

  19. Drag-and-drop the Bind workflow on to the pipeline editor.

  20. Join the functions as follows:

     

  21. Select the Bind workflow block on the editor to view the function Details and Properties.

  22. Select Data from the Bind Properties Text list.

  23. Select Message from the Bind Properties Publish Message list.

  24. Click Save.


    Now you are ready to run the pipeline and create the sales message.

  25. Click Run to execute your program. The results are displayed in the Output pane for you to review and should complete with no errors. If you receive errors, please check your pipeline configuration.

  26. Click Save & Close.



 Configuring a pipeline to subscribe to messages

To create a pipeline to subscribe to messages:

  1. Click Add on the Platform Manager browser tab.
  2. On the General tab, enter a name for the pipeline in the format: Pipeline_SubscriberTuckerSales.
  3. Click Add in the Pipeline Parameters section.
  4. Enter themessagedata in the Parameter Name field.
  5. Click Add
  6. Click Save.

     
  7. Select the Editor tab.
  8. Drag-and drop the following functions on to the pipeline editor:
    • Get Parameter
    • Universal Message
    • Text
    • Log
  9. Select the Get Parameter function block on the editor to view the function Details and Properties.
  10. Configure the function as follows:
    • Parameter Name: themessagedata
  11. Select the Log function block on the editor to view the function Details and Properties.
  12. Configure the function as follows:
    • Level: Warning

      When a log message is set to Warning it highlights in the log. We will use this option in this lesson to make it easier to identify our message.

  13. Click Save.
  14. Drag-and-drop three instances of the Bind workflow on to the pipeline editor.
  15. Join the functions as follows:

     


  16. Select the first Bind function block on the editor to view the function Details and Properties. This is the Get Parameter > Universal Message Bind function.
  17. Configure the function as follows:
    1. Get Parameter: Get Parameter Result
    2. Universal Message: Data
  18. Select the second Bind function block on the editor to view the function Details and Properties. This is the Universal Message > Text Bind function.
  19. Configure the function as follows:
    1. Universal Message: Data
    2. Text: Text
  20. Select the third Bind function block on the editor to view the function Details and Properties. This is the Text Bind > Log function.
  21. Configure the function as follows:
    1. Text: Data
    2. Log: Message
  22. Click Save & Close.

  23. Okay, so let’s evaluate this pipeline quickly. This pipeline effectively takes the message published from the topic, consumes it and pushes a log event to the Universal Platform system log for you to view. You can then view the message in the log.

    In a real-world implementation, you can push the message to any destination you require, such as a database, insert it into a file or pass it to a SQL server to execute a query.

    Next we will look at triggering the pipeline to send the message we created in the Text function of the pipeline.

 Sending a message to a Universal Platform log file through the pipeline

Now that you have successfully created a pipeline to send a message to the Universal Platform, you can execute and read the message.

The part to consider here is how to actually trigger the pipeline to execute the functions, since publishers can push messages, but subscribers are receive-only connections, so how can subscribers trigger the pipeline

Well, there is a solution. You can configure an event to trigger the pipeline when the subscriber sees that there is a new message available.

This means that when Widget Ltd’s ERP system publishes a message, you can read the message in Tucker Inc.’s ERP system.

To execute a message by triggering a subscriber event:

  1. Go to the browser tab that has Platform Manager open.
  2. Select Events. The Events screen is displayed.
  3. Click Add.
  4. Select Subscriber Message Event from the list of extensions. The Event Details screen is displayed.
  5. On the General tab, enter a name for the pipeline in the format: Event_SubscriberTuckerSales.
  6. Click Save.

    You must now configure the event to pass the contents of the message to the pipeline to process, otherwise the event is just a trigger with no data.
     

  7. Click Add in the Event section.
  8. Select Execute Pipeline on Event from the list of events.
  9. Click Edit for the Execute Pipeline Event.
  10. Configure the event as follows:
    • Pipeline: Pipeline_SubscriberTuckerSales
    • Pipeline Parameter: themessagedata
  11. Click Save.
  12. Select Subscriber_TuckerSales from the Subscriber list in the Event Parameters section.
  13. Click Save & Close.


    Now you can run the publish pipeline and see you message in the system log.

     

  14. Select Pipelines on the Platform Manager browser tab.
  15. Click the Actions button for the Pipeline_PublisherWidgetSales pipeline you created.
  16. Click Run. A confirmation message is displayed.
  17. Click Run to confirm executing the pipeline.

     

Now let’s see the results in the system log.

  1. Go to the browser tab that has Universal Console open.
  2. Select System Logs. Your message is displayed in the log queue.

     
 And that's a wrap

And that’s a wrap - congratulations on completing this module! Before we finish, let’s have a quick look at what you have done:

  • No labels