Step By Step Guide for Configuring User-Defined Search In PI
If we consider any PI System, across an interface there will be thousands of messages flowing. So it becomes very difficult to search for a message which is required to us. To make the message search in an easy way User-Defined Search can be configured. User-Defined search is nothing but searching for a required message in an interface based on the content of the payload or the dynamic header. In this document step by step procedures for configuring User-defined search in Integration engine (Abap stack) and Adapter engine (Java stack) has been explained.
Basic Concepts and Overview:
1. If you consider the payload which is given below We can define user-defined search for any of its content.
2. Let us take a Name here as an example.
3. Once we define the Name as search criteria in the UDS, Based on the value which we give the particular message that satisfies our search value will be filtered and that message will be displayed.
For configuring User-defined Search the following three things need to be configured.
- Filters–They contain the details about the interface .i.e. the sender and receiver components, Interfaces and their namespaces.
- Extractors–Extractors for filters contain extraction details for the filters i.e. based on which criteria we want to filter the messages. It can be content of the payload or dynamic header. So here we need to define the required the X-path expression or dynamic header.
- Namespace Prefixes–Here we define the namespace prefix and the corresponding value for the namespace prefix.
In Adapter engine User-defined search we have an Indexing option. Indexing is nothing but searching for the message which has been already sent to PI and processed. Currently this option is available in adapter engine. We don’t have this option for Integration Engine.
PI 7.3 system and Access to Transactions SXMS_LMS_CONF, SXMB_MONI, and SXMB_IFR are required for PI System.
User-Defined search in Integration Engine (Abap Stack):
With PI 7.3 We can open Abap stack by two ways.
- Using normal SAP Logon.
- Using Browser.
- The step by step procedure to open Abap stack using browser is explained in this guide.
- In the Abap stack use the transaction “SXMS_LMS_CONF” to define filters, extractors and namespace prefixes.
Opening Abap stack using web browser:
Opening ABAP stack using web browser is a new feature available with PI 7.3.Now let us
see how to open Abap stack using web browser and then we will how to configure User-
defined Search using the transaction “SXMS_LMS_CONF”.
1. Open PI browser.
2. Then select “configuration and Monitoring Home” Which is encircled in black in the screenshot below.
3.Then select monitoring tab and under that Integration Engine tab and select “message monitor (Database)” option which is encircled in black in the screenshot below.
4. Once we click that we will be redirected to Abap stack as shown below.
5. Then we need to go to transaction”SXMS_LMS_CONF” to define User-Defined Search.
1.Once we open the transaction “SXMS_LMS_CONF” we will find the option to add, delete and edit filters as shown below.
2. Define filters by giving sender and receiver parties, components, Interface name and namespace.
1. The next step is configuring Extractors for the filters.
2. Select the filter for which Extractor need to be defined.
3. At the bottom of the screen you will find the option to create Extractor which is encircled in Black in the screenshot below.
4. Once we select new option a new tab will open as shown in next slide where we will define our Extractors.
5. Define extractors for the filters by giving X-path or dynamic header.
6. Also you can invoke these extractors during message processing or by external job.Select them according to the requirement.
7. One Filter can have many Extractors.
1.in the same screen at the right side bottom you will find an option to add Namespace Prefix which is encircled in black in the screenshot.
2. The screenshot below is for Namespace prefix definition.
3. Define namespace prefix and namespace value and corresponding prefix.
Searching for the message using User-Defined Search Criteria:
1. After configuring filters and extractors, namespaces go to transaction “SXI_MONITOR”.
2. Select the “User-Defined selection Criteria” tab.
3. There you can find two columns Name and value.
4. Name is where the extractor defined will be selected and give the value based on which You want to search for the message.
5. Values are given as shown below.
6. You can search for all values or for any of the value.
7. Its like “or” and “And”
8. Now the messages will be filtered based on the” user-defined” search criteria and you can see the user defined attributes by selecting attributes tab or by pressing F7.
9. This is how UDS works in Integration engine.
User-Defined Search in Adapter Engine (Java Stack):
1. Hope you all now got the idea what is User-Defined Search. Now we will see how to do various configurations for UDS in Adapter Engine message search.
2. Open java stack of PI.Go to configuration and monitoring home.
3. There you will find “User-Defined Search Configuration”. Select that option.
4. Once you select the “User-Defined Search” option you will be directed to the page as shown below.
5. Here you find the filters, extractors and prefixes tab.
6. You can create new filter by using the “New” button which is highlighted by the black circle.
7. You can edit the existing filter by using the” Edit” button which is highlighted by red circle.
8. You can also the delete the existing filter by using “Delete” button which is highlighted by green circle.
9. You can also activate or deactivate the filter.
1. Now we will see how to create filters for a interface.
2. Select the “New” button for creating filter. You will be redirected to the page as shown below.
3. New filter can be created by giving Name of the filter, Sender & receiver parties, components, and interface name and namespace.
4. Here also you can activate or deactivate the filter with the help of status option.
1. Now its time to create extractors for the filters.
2. Select the “search Criteria” option which is encircled in black in the screenshot below to define extractors.
3. Select the Filter for which you want to create extractor. Now select the new Button and define the extractor.
4. For extractor you need to give the Name, Type .i.e. whether it is xpath expression or dynamic header.
5. Then give the required Xpath or Dynamic header based on which you want to search for the message.
1. After creating Filters and extractors now namespace prefixes should be defined.
2. Select the prefixes tab.
3.Select the prefix tab and give the namespace prefix and the corresponding value.
Searching for the message using User-Defined Search Criteria:
1. Now its time to check our UDS which we have configured.
2. Select monitoring option and below which you will see under” Adapter engine” tab.
3. After selecting that select” message monitor option “which is encircled with black in the figure below.
1. You will be redirected to Monitoring messages page. Select Database view and also select
“Advanced” option which is encircled with Red in the figure below.
2. Once you select the Advance option you can see the “User-defined Search” criteria.
3. Select the ADD predefined tab.
4. Now you can see the filters and extractors which we have defined earlier.
5. Now select the required filter and extractor for your interface.
6. Then give the value based on which you want to filter.
7. for example if EmpId is the filter criteria and your giving”1” as the value. Messages that contain “1”in the payload will be displayed.
8. The screenshot below here shows the messages filtered based on the value or content.
9. In User-Defined Attributes tab you can see the values which we have defined.
1. As discussed earlier, Indexing option is available for adapter engine User-Defined search.
2. Select the Indexing options button which has been encircled with black in the screenshot below.
3. By indexing we mean we can search for the message which has been already processed.
4. We can give the required dates and select “start Indexing” button to start indexing.
And the status can be checked by selecting” Indexing status” button.