In you process.xaml first use a switch activity and check which is the bank that is present in the queue item…and depending on that login the corresponding bank
And for logout…you can save the bank name of the previous item at the wnd of process .xaml or after invoke of process.xaml to a variable…and check the variable …if it changes then logout the ocrresponding bank and then login…
So before login xaml switch …add one more switch to logiut based on the previous bank name saved…if wmpty that means there is nothing to logout can move to next login step
Do finally you process would be
Switch for logout
Switch for login
Your actual process
Save the current bank name to check in the next transaction item