I just want to make sure before apply the patch that the change will not
impact in other places.
Thanks
On Fri, Feb 12, 2010 at 5:38 PM, Mauricio Salatino <salaboy(a)gmail.com>wrote:
can you post both, previous and new, sql schema generated for the
VariableInstanceInfo and ProcessInstanceInfo tables?
2010/2/12 Dale Wyttenbach <dale.wyttenbach(a)gmail.com>
> If you try to write a query that requires VariableInstanceInfo.processId,
> it won't work because that class has no processId member.
> I guessed that processInstanceId would be a better join column, and that
> worked (patch attached)
>
> Thanks for the reply.
>
> 2010/2/12 Mauricio Salatino <salaboy(a)gmail.com>
>
> Hmm..
>> I'm looking at the source and I see the following mapping:
>>
>> @OneToMany(cascade = CascadeType.ALL)
>> @JoinColumn(name = "processId")
>> @MapKey(name = "name")
>> private Map<String, VariableInstanceInfo> variables = new
>> HashMap<String, VariableInstanceInfo>();
>>
>> That makes me think that there is a join column called processId between
>> VariableInstanceInfo and ProcessInstanceInfo.
>>
>>
>> 2010/2/12 Dale Wyttenbach <dale.wyttenbach(a)gmail.com>
>>
>>> I have a patch for drools-persistence-jpa should anyone agree with me
>>> that ProcessInstanceInfo and VariableInstanceInfo should be joined by
>>> processInstanceId.
>>>
>>>
>>> On Fri, Feb 12, 2010 at 10:52 AM, Dale Wyttenbach <
>>> dale.wyttenbach(a)gmail.com> wrote:
>>>
>>>> I'm trying to adapt the StringVariablePersister presented in
>>>>
http://blog.athico.com/2009/09/drools-flow-variable-persistence.html
>>>>
>>>>
<
http://blog.athico.com/2009/09/drools-flow-variable-persistence.html>I
>>>> can create process instances with variable "color":
>>>>
>>>> private static WorkflowProcessInstance
>>>> startProcess(StatefulKnowledgeSession ksession, String color) {
>>>> Map<String, Object> vars = new HashMap<String,
Object>();
>>>> vars.put("color", color);
>>>> WorkflowProcessInstance p1 = (WorkflowProcessInstance)
>>>> ksession.startProcess("com.sample.ruleflow", vars);
>>>> return p1;
>>>> }
>>>>
>>>> I can count them:
>>>>
>>>> select
>>>> count(*)
>>>> from
>>>> ProcessInstanceInfo
>>>>
>>>> However I'm stymied as to counting process instances with a given
>>>> color, as there appears to be no join column between ProcessInstanceInfo
and
>>>> VariableInstanceInfo.
>>>> Can such a query be written?
>>>>
>>>> Thanks.
>>>>
>>>>
>>>>
>>>>
>>>
>>> _______________________________________________
>>> rules-users mailing list
>>> rules-users(a)lists.jboss.org
>>>
https://lists.jboss.org/mailman/listinfo/rules-users
>>>
>>>
>>
>>
>> --
>> -
http://salaboy.wordpress.com
>> -
http://www.jbug.com.ar
>> - Salatino "Salaboy" Mauricio -
>>
>> _______________________________________________
>> rules-users mailing list
>> rules-users(a)lists.jboss.org
>>
https://lists.jboss.org/mailman/listinfo/rules-users
>>
>>
>
> _______________________________________________
> rules-users mailing list
> rules-users(a)lists.jboss.org
>
https://lists.jboss.org/mailman/listinfo/rules-users
>
>
--
-
http://salaboy.wordpress.com
-
http://www.jbug.com.ar
- Salatino "Salaboy" Mauricio -