cancel
Showing results for 
Search instead for 
Did you mean: 

Hi, can I directly access dynamicconfiguration variable inside Integrated Configuration?

William_Fan
Associate
Associate
0 Kudos
150

Here is my PI solution. 
1. it's a pass through PI solution (REST Adapter) for GET and POST calls. No ESR. 
2. We deliver a TPZ file to customers. No separate adapter module deployment. 
3. In our GET calls, we pass a bunch of HTTP Headers. 

One challenge we had with our customers is that some customers require HTTP Header Content-Type and some don't in GET/DELETE calls. In CI, there's automatic forwarding of HTTP headers from source to target. 
In PI, I understand that I have to list out all the HTTP Headers that I want to pass to downstream system. This means that Content-Type will always be on the header to downstream system regardless if it's provided by sender or not. 
The workaround we came up with is 2 receiver communication channels. 1 with Content-Type and 1 without Content-Type. We currently also have 2 sender communication channels. We would like to set a condition inside Integrated Configuration to determine the appropriate receiver communication channel based on the presence of Content-Type. I made it work with ContextObject HEADER.ID2 by passing the HTTP Header Content-Type to it.  

What we would like is NOT to use HEADER.ID2, but our own variable from DynamicConfiguration. 
In my below screenshot, we have tau_header_content_type and header_content_type. Can I use one of these directly in XPath?

I tried
/DynamicConfiguration/sap:Record[@name='tau_header_content_type']
/DynamicConfiguration/tau_header_content_type
and a bunch of other variations, but they all give me an error. 

 

William_Fan_0-1746036788842.png

William_Fan_1-1746036804132.png

William_Fan_2-1746036918780.png

 

 

 

Accepted Solutions (0)

Answers (1)

Answers (1)

Muniyappan
Active Contributor
0 Kudos

Xpath is meant for payload. You can refer payload and put a condition. For headers, like you have showed, you can use context object, but these are inbuilt and created by SAP. only those available headers you can use. 

You can try this, convert one flow into 3. 

1. Your existing flow REST to REST. Here you send the request to either any of below two flows, contruct the target endpong like /RestAdapter/tau_header_content_type,  /RestAdapter/header_content_type

2. New ICO for channel 1 (Rest to Rest)(sender url/RestAdapter/tau_header_content_type)
3. New ICO for channel 2 ( Rest to Rest)( /RestAdapter/header_content_type)






William_Fan
Associate
Associate
0 Kudos

.

William_Fan
Associate
Associate
0 Kudos
This reply is for Ryan-Crosby. Not sure why I can't directly comment under his. DynamicConfigurationBean allows you to modify header attributes and pass them between sender and receiver channels. I can achieve this by using ASMA.
William_Fan
Associate
Associate
0 Kudos
If I use DynamicConfigurationBean, will that allow me to use it inside the condition editor in Integrated Configuration as a xPath? Because only ContextObject and XPath are available in condition editor. The issue I have is not receiving the value from sender. I don't want to list Content-Type as a header for downstream system if value is not in the sender. Blank value will not solve my issue.
William_Fan
Associate
Associate
0 Kudos
Thanks Muniyappan. Yep. That's how we have it right now. The caller will determine which PI endpoint to call based on a parameter. One with Content-Type, and one without it. I'd like to see if there's a way to achieve this inside PI with 1 endpoint and have a condition checking for incoming Content-Type value. If blank, call endpoint without Content-Type to downstream system.