Get Credential activity be invoked

Based on best practice, in which file of the Robotic Enterprise (RE) Framework should any workflows using the Get Credential activity be invoked,

InitAIISettings.xaml or InitAIIApplications.xaml?

Please help

@tharaninatarajan1901

Login ideally happens only in initallapplications…unless we need to login somewhere else…so its good to use get creds also in the same…

Unless you need the credentials in any other part of the code…you need to initialize it in initilaize state

Hope this helps

Cheers

The InitAllSettings.xaml file is responsible for initializing various settings and configurations required by the automation process. It is usually the central place where you retrieve and store all the necessary input data and credentials. Since the Get Credential activity is used to retrieve credentials, it is commonly invoked within the InitAllSettings.xaml workflow to fetch the required credentials and store them in variables or arguments for later use in the automation process.

On the other hand, InitAllApplications.xaml is responsible for launching and initializing the applications or systems required for the automation. It focuses more on application-specific initialization tasks rather than managing credentials.

Therefore, to ensure a proper separation of concerns and to follow a best practice, the Get Credential activity should be invoked in the InitAllSettings.xaml file within the RE Framework.

Regards,
Vasanth

Hi @tharaninatarajan1901

You can use the Get Credential activity in InitAllApplications.xaml.
Login to the website or to login to any desktop account we use get credential activity. In RE Frameworks we develop the login pages in the InitAllApplications xaml only. Then better to use in the InitAllApplications xaml.

Hope it helps!!

Hi @tharaninatarajan1901

At some places/organization, there are rules setup to get and use the credentials inside the Login workflow itself and do not store them in arguments and traverse around the workflow.

So there are 2 things: If you want to respect governance: fetch and use credentials inside the workflow itself.

or else in the Init block, use get credentials and store those credentials username and password in the dictionary itself and use it through-out the code where ever necessary.

Thanks,
Aditya

Hi @tharaninatarajan1901

Based on best practices, workflows using the Get Credential activity should be invoked in the InitAllApplications.xaml file of the Robotic Enterprise (RE) Framework.

Thanks!!

I’d say there is no single correct answer for this one, as best practices differ per organization. There are plus sides for both ways.

I prefer fetching credentials just once in Init state… potentially saving a couple of api requests to Orchestrator :grinning: