Hi,
i would like to search for tasks and processes the same way I search for business objects.
Our client has a library for defining filter, and it sends the filter to server. On server
hibernate query is constructed from filter and the results are sent back to client.
I would like to use the same mechanism for searching for business task. But tasks +
variable instances don't have such a simple structure. E.g. "friend link"
example in book Seam in Action, chapter 14. I would program, that the process has two
variables one is friend1 which create the request and the second is friend2 which can
either accept or reject request. On one page I would like to show a table of all requests,
so I would like to create a filter for all tasks where logged user is in variable friend2.
Maybe you think it is better to assign task to some user. In this case maybe yes, but many
times we offer editation of business objects(not users) and we need to search for tasks
based on this object and assigned to logged user. Now I support searching for tasks with
some criteria on business objects. E.g. friend1.age>30 searches for all the tasks where
the age of friend in variable friend1 is older than 30. (Of course it makes few selects
instead of one, because of any mapping of object variablesand you need to specify process
and task name in the method you are calling).
Except business objects I support String attributes, but to support all other attributes I
need open api of JbpmType.
I need these public methods:
public boolean matches(Class variableClass) ;
public JbpmTypeMatcher getJbpmTypeMatcher();
public Class getVariableInstanceClass ();
Do you think it is possible/reasonable? If it helps somebody I can ask my colleagues if I
can post our filter solution. And if you like it you can pack it in jbpm library. It was
developed for searching business objects and we want to make a simple api for searching
for tasks (our filter doesn't know that there are some VariableInstances and value
conversions..). Or do you prepare any solution for this in the future?
Thanks
Fero
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4179648#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...