In the previous post we have gone through necessary steps to use user-defined search criteria on ABAP stack. Now it’s time for similar guide dedicated for Java stack. This guide has been made with SAP PO 7.5.
Again, we have 3 major steps to do:
- Define custom filter
- Index messages
- Run custom filter in message monitor
- Go to Configuration and Monitoring Home, then Configuration and Administration -> Adapter Engine -> User – Defined Message Search Configuration
2. Create new filter by pressing on ‘New’ button, then click ‘Create‘. Provide necessary information such as Name of the filter, Name and namespace of the interface it’s dedicated to. Make sure that you don’t leave following fields empty as it will interrupt your filter. For your own peace of mind, in most cases, fill these fields with “*”. When you’re done press “Save” button.
- Sender Party
- Sender Component
- Receiver Party
- Receiver Component
3. Scroll down to the bottom of the page. In the Search Criteria tab press the button ‘New‘. In the pop-up window provide a name of your search criteria, provide XPath to the element you want to filter in the payload of your message and press ‘Save‘ button.
4. Proceed to the ‘Prefixes‘ tab and, again, press ‘New‘ button, then ‘Create‘. Provide prefix namespace and prefix value. Screenshot below should give you an idea of how to feel in these fields. In the end press ‘Save‘.
5. Make sure that the filter you created is activated. To do so, select your filter and press ‘Activate‘ button on top of the window.
6. Now you are ready to do a quick test of your filter. Press ‘Test Search Criteria‘, provide ID of a sample message and press ‘Test Search Criteria‘ button in the pop-up window. If you set up your filter correctly you should see the value of the field the XPath provided is pointing at (marked green in the picture below).
- Just like in ABAP stack in order to be able to use your filter you need to index messages first. Press ‘Index Options‘ button, provide date range and press ‘Start indexing‘. You can check the status of the background job by pressing ‘Indexing status‘ button.
Using custom search criteria
- Go to Configuration and Monitoring Home, then Configuration and Administration -> Monitoring -> Adapter Engine -> Message Monitor -> PI Messages. Check the box ‘User-Defined Search Criteria‘ and then ‘Add Predefined‘. Provide the name of your Search Criteria, the value you’re looking for and press ‘Go‘ button. As a result you should see the list of messages meeting your criteria.
Find more awesome tutorials on lessonslearnedsap.com