As we know, the a!scsField function can only be called within certain objects. Can someone share an example of using a!scsfield functions in a rule to retrieve the 3rd party credentials?
a!scfield function is used for fetching credentials stored in admin console/third-party-credentials. for example
if you have stored crednitials for a third party system and want to retrieve it and pass to that system while making a service call then you can use this function.
First parameter would be name which you have made an entry on third party credntials console, second parameter would be the field name which you want to retrieve. usually first parameter would be unique key which can be as per your standard and the second parameter would be field again unique but value would be the password which you need to sent to authenticate the system.
I did exactly what you stated in your email but the return value of a!scfield function is not the password. Plz see my expression rule and its test result below. I heard the reason is that the a!scsField function can only be called within certain objects. Do you know what are the objects?
/*My expression rule*/
a!localVariables( local!pwd: a!scsField(cons!LBS_ACCT_NUM_KEY_NAME,"pwd",true), if(isnull(local!pwd),"password is null","LBS Acct Number Generator API password=" & local!pwd) )
Time < 1 ms
"LBS Acct Number Generator API password=[externalSystemKey=lbs.acct.number.generator.api, fieldKey=pwd, usePerUser=true]"
The scsField function is mostly used in plugins and legacy functions. It can't be used in a normal expression - it only works if the function you use is explicitly expecting scsField as the data type.
Also, I don't believe you can use the value of your password in an expression. This could potentially compromise the security of your stored passwords if the plaintext could be used in expressions.
Can you use connected systems instead of passwords in the Secure Credential Store? What system are you integrating with?
I am trying to call an external SOAP service. In my expression rule, I am trying to construct the SOAP request that includes the following SOAP header by getting the password from the 3rd party credential stored in Appian admin console. Is there another way to do it?
You won't be able to use the secure credential store for this, since you can't insert those values into an arbitrary expression. Can you use the Call Web Service Smart Service? That service will automatically construct the SOAP envelope and it provides an easy checkbox to select the secure credential store options.
If that doesn't work, you might be able to use the advanced call web service from the app market. This can work if your WSDL doesn't have the WS-Security UsernameToken.
If that still doesn't work, you probably can't use the secure credential store. Instead, you could store credentials in a constant or database table. Then, you can retrieve them and insert them into your expression above.
I do use WS-Security UsernameToken. So I will try to use Call Web Service Smart Service and let you know the results.
Discussion posts and replies are publicly visible
© 2020 Appian. All rights reserved.