When a process spawns another process using call-process activity, how to wait for the spawned process to complete before proceeding with the subsequent activities in the main process? or How to wait for spawned children to complete?

When a process spawns another process using call-process activity, how to wait for the spawned process to complete before proceeding with the subsequent activities in the main process? or How to wait for spawned children to complete?

book

Article ID: KB0093226

calendar_today

Updated On:

Products Versions
TIBCO ActiveMatrix BusinessWorks -
Not Applicable -

Description

Resolution:
Please find the attached project, SpawnWaitNotify.zip, to this solution. This test case project provides solution to this scenario using wait and notify activities.

1. Parent process spawns the children processes and uses ProcessId as Key for wait-notify activities to distinguish the children spawned by a particular parent process instance

2. After spawing children processes, it waits for the notifications from all the children processes. Once it receives notifications from all the children processes then proceeds with the subsequent processing.

3. Child process receives parent processId as input on starter activity. After finishing all the processing it notifies the parent process with the processId as key.

Note: This project is only a test case project created to demonstrate the logic of waiting for spawned processes to finish continuing with subsequent processing. If customers want to use this, it is customers responsibility to test it thoroughly.

Issue/Introduction

When a process spawns another process using call-process activity, how to wait for the spawned process to complete before proceeding with the subsequent activities in the main process? or How to wait for spawned children to complete?

Attachments

When a process spawns another process using call-process activity, how to wait for the spawned process to complete before proceeding with the subsequent activities in the main process? or How to wait for spawned children to complete? get_app