My msgflow looks like:
MQinput -> Compute node -> HTTP Request
I have override.properties for DEV set to:
MsgflowName#HTTP Request.URLSpecifier = https://myDevUrl.com/id
and another 2 override.properties files for TEST and PROD:
MsgflowName#HTTP Request.URLSpecifier = https://myTestUrl.com/id
and
MsgflowName#HTTP Request.URLSpecifier = https://myProdUrl.com/id
but I want to pass URLs dynamicaly like https://myDevUrl.com/id/123, where 123 is id, which I get in request.
I know that I can use:
SET OutputLocalEnvironment.Destination.HTTP.RequestURL = https://myUrl.com/id/123
but for this command I don't know if that URL is for DEV, TEST or PROD.
I can resolve this by inserting URL for DEV/TEST/PROD to DB, but I'm looking for simpler way.
So my question is:
I there any way to get a URL from HTTP Request node (which is set in override.properties)
Something like:
SET URL = OutputLocalEnvironment.Destination.HTTP.RequestURL; -- was not worked
or
is there any other workaround?
Looking at the properties that are accessible from ESQL, you have to go for the workaround.
Define a User-Defined Property (UDP) in the overrides like this:
MsgflowName#TheURL = https://myDevUrl.com/id
Access the UDP like this:
CREATE COMPUTE MODULE YourModule
DECLARE TheURL EXTERNAL CHARACTER '';
CREATE FUNCTION Main() RETURNS BOOLEAN
BEGIN
DECLARE idFromRequest CHARACTER ...;
DECLARE url CHARACTER TheURL || '/' || idFromRequest;
SET OutputLocalEnvironment.Destination.HTTP.RequestURL = url;
...