I have a requirement from business with multiple scenarios like 1,2,3 and so on. So i am using switch activity for this but business says they will get more scenarios like 4,5,6 so on in near future and they are asking is there a way to add the additional scenarios without touching the code. They dont want to go to the code again and do a change request for the additional requirement and this may impact them with the maintenance window.
So is there any alternative ways where i can go through and confirm the business about the feasibility.
Exact condition what is it ?
If you are just matching key world like value should A should be city names like
Jaipur ,Ahmedabad you can declare list or values in config file or you can pass this in json format via asset and
If they want to add more values
You can add into json text new condition
So, I have 0 knowledge of the specifics of your process nor how different the scenarios are from one another but, with the information you have shared in mind I would think on a design approach of a single dispatcher with multiple performers.
My solution to your question will be as follows:
A Configuration component (App, form,excel file, database) where you will manage the scenarios in a table or even JSON format
A sample table structure could be something like this, where the scenario # is the search key, the name works as a reference for the business, and the queue name for each individual scenarios
Scenario #
Scenario Name
QueueName
1
Name 1
QueueName1
2
Name 2
QueueName2
3
Name 3
QueueName3
4
Name 4
QueueName4
5
Name 5
QueueName5
6
Name 6
QueueName6
A Dispatcher that will get the input data, create transactions and allocate them to their specific queues, that uses the configuration table you created previously, this could be done by a FilterDataTable activity or a Select command
Assuming each scenario performs different actions, build individual performer processes so you can keep each scenario independent and modify only the specific process whenever you need to make changes without having to touch the code and potentially affect other scenarios
Bonus points:
if a design restructure is way too complicated at this point in development, you could think of a library that handles such differences, then you just need to maintain the library and update a dependency when you’re read to deploy.
TL,DR if the design is modular you should be able to seamlessly integrate new scenarios.