In this post the idea is to talk about one of our “new friends” in TIBCO AMX BusinessWorks 6.x.
Its name is “bogusroot” and probably you haven’t heard from it. This is a new friend that is here to help us in our TIBCO BusinessWorks development but in a way that you have never imagined.
This is not a new killer-app for our BusinessWorks projects. Neither it is a new methodology to make that all your processes ends successfully. Neither is a plug-in or tool inside our new TIBCO BusinessWorks Studio for Designer. So, what is it?
It is only a XSD element definition provided OOTB by TIBCO. But, what make him so important?
When you are used to work with TIBCO BW 5 maybe you are not aware that everything you are doing is according to the standard. Specially when you are talking about XML Manipulation. One of our usual practice is to create a AnyType as a root of our Input Editor window. Something like the configuration you can see in the image below:
Ok, if you have to define the same thing inside a XML Schema that should be validated. What do you do? What do you get exactly the same approach?
You can do different things but none of them are exactly the same, because this approach is not ‘valid’according to the standard definition. You should do one of the following approaches:
– Create a new XML Schema and the root element is called the thing you want (maybe the name of the activity) and its type it is xsd:anyType.
– You can create a XML Schema and the root element has a <any> as a child element.
But, none of them are exactly the same. So, what happened when a process like this are migrated to the BusinessWorks 6, using the standard tool? Ok, let’s see.
We are going to create a simple object. One process with three (3) activities: Start, Mapper and End, like you can see here:
After the migration to Business Works 6 we are going to find something similar to this:
And here it is our new friend, bogusroot to solve our problem. So, bogusroot it is only the second approach we explained but it is the “standard way” to do it on TIBCO BusinessWorks 6.
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <xs:schema xmlns:pd="http://xmlns.tibco.com/bw/process/2003" xmlns:tns="/Process-Definition.process/Map-Data" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" attributeFormDefault="unqualified" elementFormDefault="unqualified" targetNamespace="/Process-Definition.process/Map-Data"> <xs:element name="bogusroot"> <xs:complexType> <xs:sequence> <xs:any namespace="##any" processContents="strict"/> </xs:sequence> </xs:complexType> </xs:element> </xs:schema>
Could you create your own schema with the same approach? Of course, but, why are you going to create something when they already provided you one?
And now, the story of our new friend is finished. Please, treat it well. It is a good colleague 🙂