Jump to content
  • How to create a TIBCO ActiveMatrix® BPM case from a Spotfire LiveView™ Web alert rule


    There might be requirements where an alert rule set on Spotfire LiveView™ Web needs to trigger and open a workflow on TIBCO ActiveMatrix® BPM. In the following tutorial, I will guide you on how to achieve this requirement. We will use the available TIBCO ActiveMatrix BPM operator that wraps ActiveMatrix BPM REST APIs to be easily called from within a StreamBase application.

    In this example, the first step is to create a simple example flow having an Input Stream operator, a Map Operator to add a timestamp and a LiveView Publish Operator to publish the processed tuple to a LiveView table.
    screen_shot_2017-08-04_at_13_21_12.thumb.png.f791857c8b201931519c987efb8a19ca.png
    That's a pretty easy application flow publishing incoming tuples to LiveView. The next step is to create an application flow that receives tuples from a raised alert on an input stream, then eventually filters the tuples based on some criterias using the Filter Operator which is followed by two Map Operators to add the documented parameters like the modul name, the process name, the version number requested by the ActiveMatrix BPM Operator. The described application flow is the following:
    screen_shot_2017-08-04_at_14_47_17.thumb.png.35888bc37bd8675c5c5ed0b967741feb.png
     

    The next step is to create an alert rule on LiveView Web that will trigger on some values and send data to the Alert Input Stream named "Alert_IS" of the previous flow. But before doing this, let's create a LiveView Web dashboard with some cards.
    screen_shot_2017-08-04_at_16_42_27.thumb.png.a8edb45a1cea5d3d2df1966f4c835337.png
     

    What we have now on the dashboard is: on the top left a card with a table showing incoming stocks, next to it a card with a table for the raised alerts and on the bottom left a card that allows to send tuples of stocks to the engine. Now it's time to define an alert rule that will trigger on a specific stock with a certain value. In this rule, when the stock of "ENEL" has a value above 3, an alert is raised and added to the Alert Table.
    annotate_your_screenshot1.thumb.png.dc5beb5e0519edf2366285667db14274.png
     

    But we need also to send back a tuple to the Alert_IS input stream in order to create a workflow on ActiveMatrix BPM. You can do this by choosing the action "Send Tuple" from the drop down list as shown: 
    screen_shot_2017-08-04_at_17_27_09.thumb.png.700ac9ed13e34e718a093c7662245068.png
     

    As the Alert_IS is expecting two fields: stock_name and stock_value, let's define them and send them back to the SB engine:
    alertrule_bpm.thumb.png.a86c8f8ddb06aca6f2e63f43185bf7c2.png
     

    This was the final step. Now each time a ENEL stock reaches a value above 3, an alert is triggered and added to the Alert table. The previous defined action sends back this tuple to the engine where the application flow is excecuted.
    screen_shot_2017-08-04_at_17_33_42.png.47cc2bb3d0359c72e8282a300825abd2.png
     

    As you can see, just with few steps it is possible to integrate Spotfire® Streaming with TIBCO ActiveMatrix BPM and have a user defined alert rule triggering workflows. 


    User Feedback

    Recommended Comments

    There are no comments to display.


×
×
  • Create New...