Skip to main content

Hi,

I have a process where I am collecting a bearer token, and I then need to use that value in a subsequent message.

 

Looking at the guide it looks like I can use an integration function in message routing too (which I haven’t done before).

The function is pretty simple as shown below. I have then added the function and argument into the argument value for the message routing.

 

It doesn’t appear to be getting picked up.

The exception message I am getting is stating - Exception: AccessToken is required for bearer authentication.

However, if I hard code it with a value I get a different response.

I’m not able to add the full token into the argument due to the length, otherwise I would try that for testing.

Therefore, can I use functions in this way. The FSM Connect Guide implies I can. If you can what have I done wrong?

Regards


Ady

FSM6 U23

 

Hi @AdrianEgley ,

The integration function needs to be called within the map's processes tab to be used in routing rule arguments. If the token value isn't included, you'll get an exception since it's required for bearer authentication. For security reasons, sensitive information like bearer tokens and passwords won't appear in the transaction arguments of the run log.


Hi @SAMLK,

What Execution Point would you use for that? I’m assuming ‘On Mapping’.

If so, the process is in place on the map, and checking the logging I cannot see that being fired.

Ady


Hi Ady,

Yes I would use On Mapping. Could you share the xml map with the header and process if possible?


@SAMLK 

I didn’t think I needed a Process Argument as the SQL script in the function is bringing back a single value.

Therefore its a pretty simple process.

The Message Routing and Function are unchanged from the above.

Thank you

 

Ady


Hi Ady,

If your SQL query "select token from AW_LANDSCAPE_TOKEN" returns only one record, you don't need a process argument. For multiple values, you can either hardcode them in the SQL or use a process argument. To troubleshoot, change the execution point to "on mapping," set the primary table to "request," and enable "always" logging. Then check if you can see any observations.

Make sure to refresh the integration cache and server cache.

 


@SAMLK 

 

Configuring the Process to call the call SQL correctly with the correct table name has done the trick.

I am now getting a valid response.

Thank you


Ady


Reply