[rules-users] Inserting Facts from Json Format
Wolfgang Laun
wolfgang.laun at gmail.com
Fri Dec 9 02:18:47 EST 2011
Do you mean that the class is defined in DRL using "declare"? (You
cannot "define an object in a rule".)
A declared type is a Java type, even if it is only available in DRL
code. So, write a rule that's triggered by whatever fits into your
application logic (*) and on the RHS proceed with the code to read and
unmarshal JSON, and insert the resulting objects.
(*) For one firing at startup use
rule "load facts from JSON"
salience 1000
when
then
//...
end
-W
On 09/12/2011, ihabo01 <ihabo01 at gmail.com> wrote:
> Many thanks Vincent,
>
> But this is actually the problem, my object is not a JAVA object. It is only
> defined in the rule, so only the rule knows about it.
>
> Any other thoughts how I can achieve that?
>
> PS: I have looked at the following page but there is no enough documentation
> to understand if it can help achieve what I am looking for:
> http://docs.jboss.org/drools/release/5.3.0.Final/droolsjbpm-integration-docs/html_single/index.html#d0e795
> Regards,
>
> Ihab
>
>
> --
> View this message in context:
> http://drools.46999.n3.nabble.com/Inserting-Facts-from-Json-Format-tp3570810p3572194.html
> Sent from the Drools: User forum mailing list archive at Nabble.com.
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
More information about the rules-users
mailing list