Wednesday, January 18, 2012

Migrating to JBPM4

As you well know, I was using for one of my projects JBPM3, but then I decided to to jump into something more stable and even cool! (which will give me more automatization and the ability to recover from server crashes - in other words, restart a process previously interrupted :) )

The API changed completely, some classes were renamed others were removed, methods are not the same, configuration is different, in a few words "It doesn't have any relation with the previous version"

Cons:


You won't be able to keep your logs or comments on your tables, no more Transient variables, no more stoping process due to Exceptions, no more suspend or resume process (using the API), poor history of each execution - but it really helps what you see (if you want more details, I recommend you to use wisely your Log4J), if you don't believe me, look at my base handler after I migrated


Pros:


Process definition is the same file which describes de Diagram spec (no more hidden files), configuration file is much simpler (the default params work really nice - It's almost ready for production out of the box), hibernate configuration is much easy to read, process could be started easily by using code (FEWER lines that in JBPM3), ASYNC process really work!, resume processes interrupted, you can define a business key for each execution - look into table JBPM4_HIST_PROCINST, Timer really works! - you'll see it on my process definition

This is how I started my process (due to my process is ASYNC, it doesn't wait until process is completed to return a response - which is great for Fire and Forget, obviously the first request will be the one which takes longer, because it will have to wait until everything is loaded but the next request will be super fast! - I've seen and Avg. of 70ms)

My process definition is cleaner and I really like it


Finally, let me show you a couple of Handlers, except for a few changes, I didn't change them a lot compared with my original JBPM3 code :) Cool beans!

Monday, January 9, 2012

Get Mail Merge in Gmail with This Google Docs Template


Want to send a bunch of emails personalized to each recipient? Sending mass emails is easy using Microsoft Word's mail merge, less so with Gmail. This Google Docs template, however, brings email merging to Gmail.
The free template is provided by consulting firm IT4SmallBusiness and includes in-depth instructions on the first tab. 
To start using this template, log into Gmail, open the MailMerge Google Docs template, and make a copy of it to your Google Docs account (under File > Make a copy...). Write your email on the second sheet, "Email text" and add the special fields like <>. Then go to the third sheet to add the data that will replace those special fields (e.g., the list of email recipients, their names, and other personalized info).
Note that you'll probably want to send your mass emails in batches, lest Google label you a spammer. Mail merge with Gmail would be handy for a lot of uses, from mailing clients/customers to sending party invitations with custom instructions, as the example shows.
MailMerge | via CNet