Notification notification,
List<OrganizationalEntity> recipients,
List<OrganizationalEntity> businessAdministrators,
WorkItemManager workItemManager,
EntityManagerFactory emf) {
EntityManager em = emf.createEntityManager();
TaskData taskData = task.getTaskData();
// First compile the associated document, we assume this returns a single structure
// That can be used in the main work item evaluation.
Content content = null;
if ( taskData.getDocumentAccessType() == AccessType.Inline ) {
content = em.find( Content.class,
taskData.getDocumentContentId() );
}
ExpressionCompiler compiler = new ExpressionCompiler( new String( content.getContent() ) );
Serializable expr = compiler.compile();
Object object = MVEL.executeExpression( expr );