Switch/Flow Switch question

Hi all,
i need to manage multiple credentials and doing some operation inside, so log in with credential 1, do operations, log out, log in with credential 2, do operations, log out, log in with cred 3…etc.

I was thinking to use a flow switch activity, can you confirm that it can handle at least 11 cases? (so, in my case 11 credential and apps?)
In this case, which is the best solution to manage that if i have more than 11 credentials?

Thanks in advance

1 Like

Hi
We can handle this with a LOOP like WHILE LOOP either if we have all the credentials stored in a array or list variable
Did we try that
Like with condition
Counter < listvariable.Count
Where counter is a variable of type int32 with default value as 0
So that we can access each credentials with the index value counter and increment counter atlast with a assign activity like this
Counter = Counter + 1

Unless we don’t need to use multipl credentials and work upon a credentials on any condition then we can surely go for SWITCH CASE
THATS A GOOD CHOICE INDEED

Cheers @andreus91

1 Like

Thanks @Palaniyappan

if i understand listvariable is an array with value credential1,credential2,credential3, ecc.
and i use the counter like the index array.
My problem is: when i log out, i should be able to reconnect to another app, (so different selector) is possible to handle this case in a while loop?

And i’m using reframework, so eventually my idea is to delete getTransaction state and put all the while loop with operations inside process state, what do you think about this solution?

So are we logging in to different application for each credentials
Or based on any condition
@andreus91

1 Like

Yes, is the same program inside but with different access/credential and different app to log-in

Thanks @Palaniyappan

1 Like

Fine
then we can go for SWITCH CASE activity with each case having a different application to login with
or
this would be fine on using QUEUE

Cheers @andreus91

2 Likes

Thanks @Palaniyappan
you can confirm with flow switch i can manage only 11 case?

And at this point, i can put the SWITCH CASE inside the process deleting the get transaction status, is correct?

Yah it can
Cheers @andreus91

1 Like

Sorry @Palaniyappan
Yah for both questions?

Thanks

1 Like

yes buddy for both
@andreus91

1 Like

Hi @Palaniyappan
i’m just testing that, since I have to enter in EACH case, so case1-credential1-doOperation, case2-credential2-doOperation, ecc.

I need to put the SWITCH ACTIVITY inside a while loop and iterate until i will have no more credentials to manage?

I didnt get this buddy
kindly elaborate a bit more pls
@andreus91

1 Like

Ok, sorry mate @Palaniyappan

I have 15 different credentials and 15 different apps to connect, the mechanism is:
-I take credential 1, log in to app 1, managing some orders and log out
-I take credential 2, log in to app 2, managing some orders and log out
-I take credential 3, log in to app 3, managing some orders and log out
and then until credential 15… When i finish credential close all.

1 Like

yah got it
that would work
we can pass the credentials from a collections variable and iterate through WHILE loop with a SWITCH activity in it
–that switch activity will take us to the case based on the input passed, and process based on the login credential passed

@andreus91

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.