TIBCO Designer Tutorial: Calling a Sub Process From A Parent Process

By | November 25, 2013

In TIBCO designer process development, dividing our business logic among multiple parent and sub processes is a quite common. There are many reasons one should follow the approach of parent-child process development in TIBCO. Designing huge and complex TIBCO business processes with all the logic in single process results in a jumbled and unorganized solution which is difficult to debug or modify later. Its always a good approach to divide the business logic among multiple processes with process invocations from one process to another sub process.

Another strong reason of opting for sub process development is code re-usability. In any TIBCO Project, designing sub processes which have common business logic can help in reuse of same code instead of reinventing the wheel every time. For example, if you have logging or auditing required at multiple points in your project, its advised to write logging and auditing code as sub process and invoke this process from any point where this functionality is required.

How to develop sub process and how to integrate parent and sub processes in TIBCO Designer? In this tutorial, I will teach you step by step calling a sub process from a parent process.

 

Step 1:  Create Two Business Processes in TIBCO Designer

In a new TIBCO Project, create two business processes and name them as ParentProcess and SubProcess.

parent and sub process

Step 2: Define Input And Output Parameters of SubProcess

In our tutorial, we will call sub process from the parent process by giving it some input and getting some output as return. We specify the input requirement of sub process in its Start activity. In our example, sub process will get age as input as shown below:

subprocess input

 

We specify output of our sub process in its End activity. Sub process will return status as output which is defined as a string.

subprocess output

 

In our example, we have specified XPath formula in the input of sub process end activity as shown below. It will return status value as “Not Allowed” if age is less than 18 and it will return “Allowed” otherwise.

 

output status field xpath

 

Step 3: Call Sub Process from Parent Process

After completing all required input, output mappings of our sub process, now we need to call this sub process from our parent process. In the ParentProcess, drag subProcess so that “Call Process” activity gets added automatically. In the Input tab of this Call Process activity, specify input value for age as shown below:

parent process input mapping

 

We can see that output tab of Call Process activity has Status field (which is the output field that we specified while designing sub process in Step 2)

parent process output

Step 3: Test Parent And Sub Process in TIBCO Designer Tester

We are now done with designing parent and sub process. Validate the processes and once they get validated successfully, we can proceed towards processes testing. Load ParentProcess in Tester. You will see that process runs successfully as shown below:

tester result parent process

We can see above that we have received status value as “Allowed”. This value is returned from the sub process. By clicking on the sub process in tester, we can verify that sub process also ran successfully.

tester result subprocess

 

 

With this, our tutorial Calling a Sub Process From A Parent Process completes. If you still need more help, below video tutorial about calling a sub process in TIBCO can greatly help you.

TIBCO Designer Tutorial – Call a Subprocess by Xmarter
 

Ajmal Abbasi

Ajmal Hussain Abbasi is a TIBCO Consultant By Profession with more than 6 years experience in TIBCO products. He has extensive practical knowledge of TIBCO Business Works, TIBCO Spotfire, TIBCO BE, EMS and TIBCO ActiveSpaces. He has worked on a number of highly critical integration projects in Telecom sector by using his skills in Tibco Designer, Adapters, TIBCO EMS, RV, Administrator, TIBCO BE, TIBCO ActiveSpaces etc. Ajmal Abbasi is also experienced in developing solutions using Oracle PL/Sql, Linux and Java. You can contact Ajmal Abbasi for Consultancy, Technical Assistance and Technical Discussions.

More Posts - Website - Facebook - LinkedIn

3 thoughts on “TIBCO Designer Tutorial: Calling a Sub Process From A Parent Process

  1. Milan Sahoo

    Hi Ajmal Sir,

    its a excellent website for Tibco professional those are working in all Tibco domains and integration fields.

    99% my doubts have been cleared after gone through many topics..

    Thanks-
    Milan

    Reply
  2. shiva muppana

    hello ajmal.. we are very impressed with your explantions and scenarios. we are currently learning tibco in my company by referring tibco docs as well as by your site. we have got subject very easily by your examples.. and we request please update more examples on bw and palattes and on basics ..

    thank you

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *