Skip to main content
Solved

FSM Connect - Substitution Variable in Message Routing

  • October 22, 2024
  • 6 replies
  • 55 views

AdrianEgley
Hero (Customer)
Forum|alt.badge.img+14

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

 

Best answer by SAMLK

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.

View original
Did this topic help you find an answer to your question?

6 replies

SAMLK
Hero (Partner)
Forum|alt.badge.img+13
  • Hero (Partner)
  • 233 replies
  • Answer
  • October 23, 2024

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.


AdrianEgley
Hero (Customer)
Forum|alt.badge.img+14
  • Author
  • Hero (Customer)
  • 170 replies
  • October 23, 2024

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


SAMLK
Hero (Partner)
Forum|alt.badge.img+13
  • Hero (Partner)
  • 233 replies
  • October 23, 2024

Hi Ady,

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


AdrianEgley
Hero (Customer)
Forum|alt.badge.img+14
  • Author
  • Hero (Customer)
  • 170 replies
  • October 23, 2024

@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


SAMLK
Hero (Partner)
Forum|alt.badge.img+13
  • Hero (Partner)
  • 233 replies
  • October 23, 2024

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.

 


AdrianEgley
Hero (Customer)
Forum|alt.badge.img+14
  • Author
  • Hero (Customer)
  • 170 replies
  • October 23, 2024

@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


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings