While developing processes in TIBCO BW with a liner single control flow, often we face bottleneck situations and our a certain activity taking longer time may result in a delay for subsequent activities as well. For example, If we opt for a liner sequential processing logic in our TIBCO BW Code, If a JDBC activity gets halted or delays due to any database or network issues, activities next to this will also suffer. To avoid this problem, one can go for parallel processing technique in TIBCO BW implementation.
How to Implement Parallel Processing in TIBCO:
Sub processes which are called from a parent process normally run in the same job (same thread) and hence, they exhibit a sequential flow. For parallel processing, It is required to spawn new jobs for the sub processes. This is achieved by checking Spawn checkbox while calling a sub-process form the parent process.
Scenario: Parent and Sub Process running in Same Job (No Spawning)
In this scenario, I am going to create a parent process and a sub process and will call the sub-process from the parent process without checking Spawn option.
The two processes are very simple in this case and they are created just to simulate the sequential and parallel processing and have no other implementation inside.
Below is the parent process which is calling a sub-process without Spawn:
Child process is simple with just Start and End activities (with a transition from Start to End activity).
Now when I load the two processes in the designer tester and run a Job for parent process, both processes get executed in the same thread (job) in a sequential manner:
Scenario: Parent and Sub Process running with separate Jobs (With Spawning)
Now let us achieve parallel processing by using Spawn option. In the parent process while calling sub-process, check the Spawn checkbox as shown below:
Now if the load the two processes in designer tester and start our parent process Job, we can see that a new Job is created for child process as well and both processes are running in parallel in separate threads: