The release of XBintegrator6.0 and XBscript2.0, last October, was all about creating a solid foundation in terms of functionality. The new 6.2 version, that had its beta release last Monday, will mainly focus on enhancement of the user experience and the developer’s productivity. We are glad to share the highlights of the beta release notes.
Invenso partner Convenso has launched an XBintegrator adapter for Magento, the very popular open source framework to build eCommerce sites, which was recently acquired by eBay. The adapter will allow web shop designers to integrate online shops much more easily with back office applications, such as ERP, CRM, Product and Image Databases, Stock Management systems or Accountancy Software.
In XBintegrator6 we have introduced a new type of interface, the Application Interface. It can be used to integrate directly with your applications. Currently, support for .net and java is provided through a dll and a jar you can use in your programs.
To start, we first need to create an action we can call from an application:
1. Create a script to execute, /Demo/AppIntf/HandleRequest.xb. It wil simply echo what is received as input back to the sender:
<XBscript>
<Main>
XBintegrator6 comes with an additional type of Poller, called the "simple poller". This poller simply executes an action, which may be very useful in combination with the cron-like syntax to execute actions at certain times.
In XBintegrator6, a cron-like syntax can be used to define the ticks of your pollers.

A cron expression is a string comprised of 6 or 7 fields separated by white space. Fields can contain any of the allowed values, along with various combinations of the allowed special characters for that field. The fields are as follows:
| Field Name |
An XBscript can have a constructor method now:
<XBscript>
<Data>
<Field name="scriptField" dft="'default value'" />
</Data>
<Constructor>
<Set var="scriptField" value="'constructor value'" />
</Constructor>
<Main>
<Log msg="'scriptField: '+scriptField" />
</Main>
</XBscript>
Produces this logging:
The new instruction <ProtectPdf allows you to password protect the PDF output of a generated document.
Example:
<XBscript>
<Main>
<Field name="dir" dft="'c:\\temp'" />
<Field name="pdf" dft="dir+'\\Result.pdf'" />
<Field name="protectedPdf" dft="dir+'\\ResultProtected.pdf'" />
<Set var="password" value="'p@55w0rd'" />
XBintegrator6 marks the introduction of a new instruction called <MergePdfBackside. This instruction allows you to insert the contents of a pdf document after each page of a document and save the resulting merged document.
Example:
<XBscript>
<Main>
<Field name="dir" dft="'c:\\temp'" />
<Field name="docFile" dft="dir+'\\SomeDocument.pdf'" />
<Field name="terms" dft="dir+'\\TermsAndConditions.pdf'" />
We introduced a couple of new file instructions in XBintegrator6:
A new XBintegrator6 instruction called <XmlIndent allows you to pretty print your xml when desired:
<XBscript>
<Main>
<Set var="someXml" value="'<Root><FirstName>John</FirstName><LastName>Doe</LastName></Root>'" />
<XmlIndent xml="someXml">
<Output var="XB_OUT" />
</XmlIndent>
</Main>
</XBscript>