Business Process Modeling - BTMSoftwareSolutions.com

Wednesday, September 15, 2010

Orbeon Rich Text Editor PDF tip

If you are using Orbeon and create xForms and PDFs outside of form builder and form runner, then this tip might help if you come across a PDF generation error.

When using the rich text editor, tags are placed within your xml text().  when sending this text to xsl-fo, you have to apply-templates which convert the html tags to xsl-fo structure so the formatting can be rendered.  An error that I was encountering is if a person put a double space within the text or between sentences.  The PDF would throw an error upon opening.  After looking at what was being stored in the xml, I noticed:  .  This is what was throwing the error.

To simply correct, when the user exits the rich text editor I called the orbeon event DOMFOcusOut.  I thne used the setvalue to replace the same node with a copy of itself, minus the  .  To do this just use the replace function.  So something like this:


<xforms:setvalue ref="instance('yourinstance')..." value="replace(instance('yourinstance').., '&amp;nbsp;', ''" />

Note that I had to escape the & with &amp;.

That is it. Any questions contact us.  http://btmsoftwaresolutions.com/.

Friday, September 10, 2010

Instant Messaging with Intalio, openESB, GlassFish, PSI and OpenFire XMPP Server

If you are interested in deploying an Instant Messaging component in your Intalio process, read on.  I recently was involved in a project in which a telecommunications company wanted to send instant messaging notifications when certain events where triggered (usually timers).  The architecture that was chosen was using a php script that accepted a post and then relayed the information to XMPP server.  In this scenario OpenFire XMPP server was used. I was only responsible for developing the REST call from within Intalio which was pretty easy and straight forward.  However not being a php developer, I wanted another solution I could use in other environments.

In a previous blog, I noted how I used openESB to create an LDAP web service Intalio could call to query for users and then send email notifications.  I have not been back to openESB in sometime, but I came across their new XMPP Binding Connector (BC).  I read some documentation and figured I could use the same design with XMPP that I did with LDAP.  Create a web service in openESB using NetBeans and then deploy the service to Glassfish Server and let Intalio call the web service.

So, here are the basic components.  Create a project with two WSDLs and one BPEL diagram.  The first WSDL I usually call trigger, since Intalio will call this end point and trigger the invocation of the XMPP WSDL.  The WSDL will be SOAP document literal and just pass in two parameters, jabber id (jid) and message.  The BPEL process will receive the message and then assign the variables for the XMPP WSDL.  Then invoke the XMPP WSDL and you are done.  You have to add the XMPP jar files to openESB but the documentation is on openESB for you to read.

Next take the WSDL for the trigger (SOAP document literal) and put it in your Intalio project.  Also take the schema you had to create for the WSDL and place that in Intalio.  Wire up the WSDL in the intalio mapper, deploy and test.

I installed OpenFire XMPP server locally and used PSI XMPP Client.  Installation and set up is easy.

Any questions, contact me at btmsoftwaresolutions.com.  Any other good XMPP uses in BPM let me know.