Thanks Kris. That’s what I thought later on after your first mail
on this topic. So I did got the JPA entity persisted/merged after retrieving the
entitymanagerfactory from the working memory’s environment and got it
done through the JPA transaction – I will refactor this to use the JPA
command service so that I don’t have to deal with transaction et all.
-----Original Message-----
From: rules-users-bounces@lists.jboss.org
[mailto:rules-users-bounces@lists.jboss.org] On Behalf Of Kris Verlaenen
Sent: Wednesday, November 25, 2009 10:06 AM
To: Rules Users List; Vijay K Pandey
Cc: Rules Users List
Subject: Re: [rules-users] Drools Flow 5.1 - Update JPA Entity - while workitem
is in pending state - variable persistence strategy
Quoting Vijay K Pandey <VPandey@mdes.ms.gov>:
> > c) I would like to change it through Drools
Process because that's
> where I have associated the JPA entities - I would not like to
update
> it from outside.
Not sure this is a problem. You merely create an association to
these
JPA entities (assuming we implement the pluggable persistence strategy
here as well). And the engine is only interested in the start and
completion of the work item, not really in anything that happens in
between. So I don't think updating the JPA entities from outside
the
engine should be considered a problem.
In theory you could easily update the work item, we simply don't have a
command for that implemented. If you would write a command that
can
then be executed inside a transaction using the JPA command service,
those changes would be persisted.
Kris
Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm
_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users