The Settings page is the one where you ideally would save the name of the credential asset. Both Settings and Constants sheet are parsed and saved in Config dictionary.
We use the Config dictionary in combination with Get Credential Asset activity to fetch username and password fields. (Config(“CredentialName”).ToString as input to Get Credential Asset )
Why not use Assets sheet?
In the image you pasted we will notice that Get Asset cannot get you the credential asset type. If you saved your Credential Asset name in Assets sheet, then the fetch will gracefully fail at try stage and you would not get the required username and password.
Lets dig deeper:
I understand why you are confused. The documentation is not clear on the limitations of IntiAllSettings and the logic used by Get Orchestrator Assets sequence.
This is the image from Page 6 - REFramework Documentation-EN.pdf, which can be found in Documentation folder of REFramework (not the updated 2021 version). I still use a modified version of an earlier version of REFramework).
In the documentation they seem to have missed an important aspect
*Assets: Values defined as assets in Orchestrator.** However looking at the logic in InitAllSettings this description of Assets should have been worded like so
Assets: Values defined as assets (except Credential Assets) in Orchestrator.
So when we review all this information, in your case, Option 4 is the correct answer.
So basically in the official ReFramework, there is missing the activity Get Credential. They only implemented the Get Asset. Actually, I can’t see the reason for that, but okay.
And the Get Credential would get all credentials from the Settings sheet?
Where did you see that? Because in my company I simply created a new Sheet in the Config file called Credentials and so it was clear that anything there is a Cred-asset.
Well, so this is something they simply defined? So by default put any Credential in the Settings sheet. And then extend the Init state of the ReFramework to be able to use that credential, right?
How does GetAppCredentials.xaml work?
With that file invoked you get access to two things, your local windows vault or Orchestrator Credential asset. Say you have a Credential named GoogleCred in your windows valut, the GetAppCredentials.xaml first looks at that windows valut for GoogleCred if it exists, it fetches the username and password. If it does not exist, it looks for GoogleCred from Orchestrator credential asset (provided you have an Credential asset with name GoogleCred)
Alternative is to use Get Credential Asset activity, which only looks for Credential asset name in Orchestrator tenant and returns you the username and password.
Yes, you can define your credential name in Settings sheet. The name will be one of the key value pairs in Config dictionary. Then it is upto you as a developer to either use Get Credential Asset or GetAppCredentials.xaml and pass it Config(“YourCredentialAssetKey”).ToString.
Summary :
In short other assets can be fetched by the Get Asset activity in a for loop in InitAllSettings and their name will be added as key to Config their value will be updated as value in the corresponding index in the config.
For Credential asset, do not use the Assets page (unless you have modified you REFramework to handle credential assets as well)