-
1. Re: How to get Task based on Task Variables.
tejjbpm Jul 22, 2009 10:17 AM (in response to sushantgupta402)Could you be a bit more specific on what you want? Can you provide some code sample?
-
2. Re: How to get Task based on Task Variables.
kukeltje Jul 22, 2009 10:21 AM (in response to sushantgupta402)jBPM 4? Currently you have to use the query api.... might be that a method for this will become available in the taskService in one of the next releases, but currently it is not.
-
3. Re: How to get Task based on Task Variables.
sushantgupta402 Jul 22, 2009 12:33 PM (in response to sushantgupta402)I am working on JBPM3.3.1 and JBPM3.2.2
-
4. Re: How to get Task based on Task Variables.
kukeltje Jul 22, 2009 6:28 PM (in response to sushantgupta402)then use a custom hibernate query on the session that you can retrieve from the context
-
5. Re: How to get Task based on Task Variables.
sravyts Aug 12, 2009 3:40 AM (in response to sushantgupta402)@kukeltje: I'm using jbpm 4 and want to do the same thing: get a list of tasks which have a certain value for one particular variable.
You say that the query api should be used, but I don't see any possibility to query for variables? Is this something that will be added later on, or should we write a custom hql? -
6. Re: How to get Task based on Task Variables.
sravyts Aug 12, 2009 3:44 AM (in response to sushantgupta402)Some extra info on my previous post:
In jbpm 3 we extended TaskInstance (hibernate level) with some property and used a custom TaskInstanceFactory. We could create a custom query to retrieve all tasks with a given value for that property (no need to use variables) + we could create a bi-directional mapping between the property object and the task object.
But in jbpm 4 I don't see a possibility to do this, because we can't register a custom taskInstanceFactory. So we are forced (imho) to use a variable to bind a task to these objects in our datamodel (and loose the bi-directional mapping) or activily keep an extra mapping table up to date.