Ok, Jeff. In case we have to fetch data in parallel from multiple applications (to reduce the time taken) and then consolidate the data from all of them and display, how can we do it? Is parallel processing possible in this case?
A single activity runs at a time. What you do inside of that activity is up to you. If you have a multi-project solution, the activity can trigger something in each project at the same time. If you want to spawn multiple threads in a single project - use a parallel processing block.
So, if you activity is called RetrieveData - retrieving that data should be done as part of that activity. If you need your activities to be performed in a specific sequence, use different activities.
Thanks, Jeff. I'm bit new to Interaction Framework concept and need some more details. In case we need parallel processing within the same activity, is that possible? Would triggering another activity (through click event), still proceed through asynchronous call instead of being queued until the previous activity is completed?
You can perform parallel processing within an activity, however you cannot have multiple activities executing at once. In addition, and activity can be responded to by multiple automations and multiple projects. The ActivityStarted event will fire in all of your projects at the same time, so all of the projects can respond to it and take action in parallel. When all of those threads have been completed, the next activity in queue would then fire its ActivityStarted event.
Calling StartActivity doesn't actually initiate the activity. It merely puts the activity on the queue to be executed as soon as its turn in queue is up. If there are no activities in the queue, then the ActivityStarted event will fire right-away. If there are activities in-queue, then the activity will be added to the queue and executed when it has reached its place in-line.