return sb.toString();
}
@SuppressWarnings("unchecked")
public static Object eval(String str, Map vars) {
ExpressionCompiler compiler = new ExpressionCompiler( str.trim() );
ParserContext context = new ParserContext();
context.addPackageImport( "org.drools.task" );
context.addPackageImport( "java.util" );
context.addImport( "AccessType", AccessType.class );
context.addImport( "AllowedToDelegate", AllowedToDelegate.class );
context.addImport( "Attachment", Attachment.class );
context.addImport( "BooleanExpression", BooleanExpression.class );
context.addImport( "Comment", Comment.class );
context.addImport( "Deadline", Deadline.class );
context.addImport( "Deadlines", Deadlines.class );
context.addImport( "Delegation", Delegation.class );
context.addImport( "Escalation", Escalation.class );
context.addImport( "Group", Group.class );
context.addImport( "I18NText", I18NText.class );
context.addImport( "Notification", Notification.class );
context.addImport( "OrganizationalEntity", OrganizationalEntity.class );
context.addImport( "PeopleAssignments", PeopleAssignments.class );
context.addImport( "Reassignment", Reassignment.class );
context.addImport( "Status", Status.class );
context.addImport( "Task", Task.class );
context.addImport( "TaskData", TaskData.class );
context.addImport( "TaskSummary", TaskSummary.class );
context.addImport( "User", User.class );
return MVEL.executeExpression( compiler.compile( context ), vars );
}