Question


Standard Chartered Global Business Services
IN
Last activity: 19 Jul 2018 15:45 EDT
Multiple activities with same interaction key
Would it possible to have multiple activities with same interaction key (using Interaction Framework) run in parallel?
**Moderation Team has archived post**
This post has been archived for educational purposes. Contents and links will no longer be updated. If you have the same/similar question, please write a new post.
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Accepted Solution


Pegasystems Inc.
US
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.


Pegasystems Inc.
US
No. Activities by definition run from a queue sequentially.


Standard Chartered Global Business Services
IN
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?


Pegasystems Inc.
US
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.


Standard Chartered Global Business Services
IN
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?
Accepted Solution


Pegasystems Inc.
US
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.
-
Piyush Tiwari


Standard Chartered Global Business Services
IN
Thanks, Thomas. It was really helpful.
Regards
Murugan