OSB 12c - Reporting Actions (Report)

Here we go!
Information that you need to know:

Configuring Actions in Stages and Route Nodes

Actions provide instructions for handling messages in pipeline stages, error handler stages, and route nodes. The context determines which actions are available, as described in the following sections.

  • Communication Actions
  • Flow Control Actions
  • Message Processing Actions
  • Reporting Actions

For more detailed information read the following URL: https://docs.oracle.com/middleware/1213/osb/develop/GUID-FE2CAC5B-E4DF-49DE-AD3C-36EEAF750BFE.htm#OSBDV2361

Reporting Actions

You use the actions in this category to log or report errors and generate alerts if required in a message flow within a stage.

The following table describes the reporting actions.

Action  Report
Used to...  Enable message reporting for a pipeline.
An XQuery / XSLT expression is used to create
the data that is reported to the Service Bus dashboard.
You use key value pairs to extract key identifiers
from any message context variable or message payload,
and ignore the rest of the message.
Available in 
  • Pipeline stage
  • Error handler stage
  • Route node
For more detailed information read the following URL: https://docs.oracle.com/middleware/1213/osb/develop/GUID-FE2CAC5B-E4DF-49DE-AD3C-36EEAF750BFE.htm#OSBDV2368

In this post, we will learn how use Report component in Oracle Service Bus.

So, we are going to use the helloWorld OSB project as a reference, to create our project and add the necessary functionality.

Note: if you want to check the helloWorld OSB project, please click on the following URL: https://iscfernandogarciagarcia.blogspot.com/2021/07/osb-12c-helloworld.html

Once finished with the corresponding updates, we are going to do double click on the Pipeline component, right after, the *.pipeline will open, as you can see in the following image.

Then we are going to locate the Assign component, select it and drag it to RequestStage node.

For example:

Now we are going to update the Assign component, filling the Value and Variable fields, using as a reference the following table.

Value  $body/*
Variable  InputRequest

For example:

Then we are going to locate the Report component, select it and drag it to RequestStage node, right after the Assign component.

For example:

Now we are going to update the Report component, filling the Content field and Search keys section, using as a reference the following table.

Content  $InputRequest/*
Key  input
Variable  Body
XPath  ./process/input

For example:

Once completed we should be have the following apparence.
For example:

Later to validate the functionality we are going to execute the service, if everything is OK, it should look like this.

For example:

The following section are the steps so that we can obtain the Report generated by our OSB project.

  1. Log in to the EM console.



  2. Once you have logged in, click on the Target Navigation button, then under SOA click on service-bus.



  3. Once on the service-bus page, we are going to click on the Service Bus button, then click on Message Reports


  4. Then on Search page we need to write the Inbound Service Name, that is the Pipeline name.


  5. As a last step, click on Report Index value, then you should be able to view the Report, as you can see in the following images.


Comments

Popular posts from this blog

SOA 12c - Fault Handling (Creating Fault Policies and Fault Bindings)

SOA 12c - FTP Adapter (List Files)

SOA 12c - DB Adapter (Perform an Operation on a Table)