[jBPM Users] - extending taskquery
by sravyts
I'm trying to extend TaskQueryImpl so I can add my own domain model search criteria.
I first started out by creating a new query impl class extending AbstractQuery. But then I was thinking that it would be better to extend TaskQueryImpl and append my search criteria to the hql() generated by this class (this way, changes on the jbpm task tables won't cause my queries to error because I get the changes made to TaskQueryImpl for free.)
But ...
in the hql() method of TaskQueryImpl appendOrderByClause(hql) is called. So I can't append other search criteria after calling super.hql()... Couldn't it be possible to call the appendOrderByClause() from the AbstractQuery -> execute method after calling hql()? Ok, maybe the hql() method name is not really a good method name anymore in this case because the full hql is not generated here ...
But it would make the queries a lot more extendable!
What do you think?
Wk,
Sofie
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4255016#4255016
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4255016
16 years, 6 months
[jBPM Users] - Re: JNDI-Lookups for the ProcessEngine in Tomcat
by jbarrez
Sebastion, this is the code that is used in the console to look up the process engine:
| if (processEngine == null) {
| synchronized (ProcessEngine.class) {
|
| if (processEngine == null) {
|
| try {
| InitialContext ctx = new InitialContext();
| processEngine = (ProcessEngine) ctx.lookup(PROCESS_ENGINE_JNDI_NAME);
| } catch (Exception e) {
| // Fall back to default mechanism which build a procEngine from a default jbpm.cfg.xml
| processEngine = Configuration.getProcessEngine();
| }
|
| }
|
| }
|
Since there is no JNDI bound Process Engine in Tomcat, the catch() clause will be executed. So deploying a web service on Tomcat, should work.
* Are you using the exact same Tomcat that you get when u use the ant install task.
* Is the jbpm jar in the tomcat /lib folder?
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4254959#4254959
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4254959
16 years, 6 months