[rules-users] Drools Flow: Variable Persistence Strategies

Mauricio Salatino salaboy at gmail.com
Thu Feb 18 09:08:53 EST 2010


Let me take a look at that too.. probably it's an oracle problem right? I
mean, probably it just happen with oracle.. we can create a fix for that too


2010/2/18 Dale Wyttenbach <dale.wyttenbach at gmail.com>

> My pleasure.
>
> Within ProcessInstanceInfo, I've got a similar observation about the
> eventTypes member.  'private Set<EventType>' is currently commented out in
> favor of 'private Set<String>'.  When using an Oracle hibernate dialect,
> this results in the DDL 'create table ProcessInstanceInfo_eventTypes' which
> yields the error 'ORA-00972: identifier is too long'.  I imagine this will
> be resolved when the String is promoted to EventType but I thought you might
> want to know.
>
> 2010/2/13 Mauricio Salatino <salaboy at gmail.com>
>
> done.. I will apply the patch into the trunk.. it seems to be correct.
>> Thanks a lot!
>>
>> 2010/2/13 Dale Wyttenbach <dale.wyttenbach at gmail.com>
>>
>> Please see attached.
>>>
>>>
>>> 2010/2/12 Mauricio Salatino <salaboy at gmail.com>
>>>
>>>> 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 at 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 at 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 at 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 at 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 at 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 at 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 at lists.jboss.org
>>>>>>> https://lists.jboss.org/mailman/listinfo/rules-users
>>>>>>>
>>>>>>>
>>>>>>
>>>>>> _______________________________________________
>>>>>> rules-users mailing list
>>>>>> rules-users at lists.jboss.org
>>>>>> https://lists.jboss.org/mailman/listinfo/rules-users
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> - http://salaboy.wordpress.com
>>>>> - http://www.jbug.com.ar
>>>>> - Salatino "Salaboy" Mauricio -
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> - http://salaboy.wordpress.com
>>>> - http://www.jbug.com.ar
>>>> - Salatino "Salaboy" Mauricio -
>>>>
>>>> _______________________________________________
>>>> rules-users mailing list
>>>> rules-users at lists.jboss.org
>>>> https://lists.jboss.org/mailman/listinfo/rules-users
>>>>
>>>>
>>>
>>> _______________________________________________
>>> rules-users mailing list
>>> rules-users at 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 at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/rules-users
>>
>>
>
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
>


-- 
- http://salaboy.wordpress.com
- http://www.jbug.com.ar
- Salatino "Salaboy" Mauricio -
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20100218/4c86fae4/attachment.html 


More information about the rules-users mailing list