[rules-users] Inserting Facts from Json Format

rouvas at mm.di.uoa.gr rouvas at mm.di.uoa.gr
Fri Dec 9 03:56:05 EST 2011


ihabo01 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.

Get a FactHandle to the Fact and iterate over the list of properties
matching their names to those of the JSON properties.
If you find a equally named property set its value to the value of the
JSON object.

Sorry, can't be more specific, I'm writing this from memory.

-Stathis

>
> 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