Refactored for jbpm 6.