Schema Reference Vs Complex Elements: TIBCO Process Development

During my 10+ years development experience in the field of TIBCO, I have come across many implementations ranging from small scale to complex enterprise level integration projects. While looking at the coding schemes followed by others, I have drawn many conclusions, identified several serious coding flaws and have also suggested several best practices based on heavy research and development for proof of the concepts.

I have decided to write down a series of Posts on my blog here to discuss and share my experiences so that every one visiting my blog can benefit from that. In this post, I am going to explain about usage of Complex Elements defined within Input Editor of the process starter verses use of XML Schema Shared Resource.

Background Information:

When you design TIBCO BW processes using TIBCO Designer, you often come across situations where sub-processes are being called from the parent processes. These sub-processes often expect some input and also return some output as well. The Input and Output Elements of the sub-process are defined/referenced in Its Start and End activity respectively.

When writing a process, you have two choices regarding definition of parameters:

  1. In the Output Editor tab of the Start Activity and Input Editor tab of the End Activity, using Plus button, add a Complex Element and Its sub-elements.
  2. Create XML Schema using XML Palette Schema activity and then refer to It using XML Element Reference option from Content drop down.

Which Option to Use?

So the question rises that what are the scenarios where one should simply define Elements in the Start and End Activity and when one should create a Schema and then refer to the schema in these activities?

So below are the points which you should take into consideration when deciding on it:

  • Is your sub-process using some Generic Input and Output Structure? If yes and you think that you may have to create some processes with the same Input and Output parameters in future as well, you should opt for re-usable XSD instead of hard coded Elements. Use of XML Schema will standardize and generalize your parameters and you will be able to use same Schema when and where needed. If you go for hard coded Parametric elements for your process, same practice will be followed if another process is created in future with the same parameters.
  • Are your Input and Output Structure very simple or Complex Enough? If your sub-process is expecting just one or a couple of inputs and also sending back a simple response (like just a response message), you can go for defining these elements simply in the Start and End activity editors. It doesn’t make sense to create a huge bunch of XML Schemas in a project when they are not really needed.  But if your process input or output is not that simple and a large number of elements are going to be used with in-depth nesting of the tags, you should use XML Schemas separately. You can always import XSDs in other Schemas and in that way it becomes more easy to re-use Schema elements.
  • Are there any chances of the processes moving to a SOAP web service in future? If yes then be careful! WSDL Messages refer to XML Schemas only and not to hard coded Elements. If you are using XSDs for your processes, you can refer to same XSDs for your WSDL Messages as well but if you are using Complex Elements defined internally to the process, you will have to create XML Schemas to be used for your WSDL Messages.

 

Ajmal Abbasi

Ajmal Hussain Abbasi is Integration Consultant By Profession with 13+ years experience in Integration domain mainly with TIBCO products. He has extensive practical knowledge of TIBCO Business Works, TIBCO Cloud, TIBCO Flogo, TIBCO Mashery, TIBCO Spotfire, EMS and TIBCO ActiveSpaces. He has worked on a number of highly critical integration projects in various sectors by using his skills in TIBCO Flogo, TIBCO API Management (Mashery), TCI, Tibco Designer, TIBCO Business Studio, Adapters, TIBCO EMS, RV, Administrator, TIBCO BE, TIBCO ActiveSpaces etc. Ajmal Abbasi has experience with MuleSoft ESB as well. Ajmal Abbasi is also experienced in the area of API Management particularly with WSO2 API management platforms. Ajmal Abbasi is also experienced in developing solutions using Core Java and J2EE Technologies. You can contact Ajmal Abbasi for Consultancy, Technical Assistance and Technical Discussions.

More Posts - Website - Facebook - LinkedIn - YouTube

2 thoughts on “Schema Reference Vs Complex Elements: TIBCO Process Development

  1. Denis Morgan

    Thank you Ajaml. I was wondering if there are any run time performance differences between using a schema or hard-coding in the Start and End activities.

    Reply
  2. prava

    Can you pls tell how to use the ”any element” content type for mapping?

    Reply

Leave a Reply

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