Without overcomplicating things it sounds like you just need to test your input and then open your applications based on that test, which you could achieve with little more than an If statement or two
This example could work if your input was nothing more than a string, stored in your Config file or an Orchestrator Asset… If that value = "App1,App2", then both workflows would be executed, if it was "App1" then only App1 would open, etc…
You’ll need to adjust this to suit whatever your actual inputs are, but this should give the general idea of one approach you could use.
I see. So assuming you won’t know which applications you need until you get to a Transaction, is there any harm in just opening both of your applications at the start?
You could then handle which ‘Transactions’ use the respective applications in your Process.xaml logic?
Alternatively as @poorna_nayak07 suggested, get and test your transaction data before moving into InitAllApplications.
You can get/read all transactions in a list at the initial stage just to determine the applications required for processing.
All other operations work as before.
Yes.
In your case, you could read the process.xaml file in the very first stage may be after initializing configurations.
Get all the application lists that your robot needs in its process stage. Launch all those applications.
Done.
Hereafter all existing process works as usual. Gets individual transaction in get transaction state, determines application and processes that traxn in respective application
Thanks for sharing details. Let me summarize my problem statement:
Dispatcher job is to add application details in queue item. For e.g. transaction item field contains application details : [“Application 1”, “Application 2”] or [“Application 1”] or [“Application 2”].
PERFORMER extracts queue item details in Process.xaml. Not able to understand how to identify which application to launch and close(in end state) in init stage.
Is your method works in case system exception occurs?
The proposed solution will work in case there is any system exception.
There is getQueueItems activity through which you can filter and get new transactions from the orchestrator.
By using this in the init state, you can have a list of new transactions that you are going to process and so the application names.
Use this list of applications and login/open all applications and pass the same list to the end state to close applications.