Skip to main content

I would like to know if It’s possible to use a dynamic URL as an endpoint of an outgoing message.

 

For example, doing the configuration of the message using the ‘Message Routing’ (next image), I need to use a URL that will change depending on same variables (in a ideal scenario this variables would be defined on the same XML type Business Rule, that call this outgoing message).

 

 

I am trying to call a URL that has a service and it has this format  

 

=> “http//URLHOST /field1=X,field2 = Y”

 

do you know if I can achieve this by using the XML maps and Routing Message Rules ? 

 

Dear Pedro,

If the values that you are trying to append in the URL in message routing rule are present in the mapping of XML maps then its possible to use those value as variable in this URL.

Try appending the parameter which you used to fetch in


URL : ………………..{xpath://abcd}

***/abcd should be present in the extract column of mapping in XML map.
In your scenario check if the value X and Y are present in mapping then call them in URL using {}


Adding to what Umesh just shared with some examples: 

 

we have a few of these in place.   the URL in the message routing rule looks as follows: (uneditted) 

https://router.hereapi.com/v8/routes?transportMode={p:transportmode}&origin={xpath://origin_lat},{xpath://origin_long}&destination={xpath://destination_lat},{xpath://destination_long}&return={p:return}&apiKey={param:HERE_API_KEY}

 

3 type of variables in use in the URL 

  • xpath://<value>  comes from the Mapping on the XML MAP (extract_column)
  • param:<value>  comes from Cust app params
  • p:<value>  comes from the extended properties on the XML MAP

 

URL in message routing:

XML Map: Mapping

 

XML Map: Extended properties

 

 

Hope this helps

-Rudy

 


Wow, 
Greetings! 
This seems to be a new learning to me as well.
Thank You so much  STRGoedhart.

Could you let me know if there is any possibility of calling an URL by appending a value of a unique number as we discussed above with sending any parameters in outbound to external system?

Means The client wants to just call a system URL by appending a Unique identifier number based on which they will response us back with the status if its success or failure.


Reply