[rules-users] Inserting String Object and accessing it in Guvnor

Michael Anstis michael.anstis at gmail.com
Sun Sep 30 16:58:35 EDT 2012


Sessions are a runtime concept, Guvnor is a design time environment.

Ignoring this disconnect and assuming you want to use java.lang.String as a
fact type in Guvnor you should be able to simply add an import for said
class.

sent on the move

On 30 Sep 2012 18:55, "Manasi" <manasi.a.damle at capgemini.com> wrote:

> Hi,
>
> Currently in my application I want to insert a *String object* into a
> StatefulKnowledgeSession.
> I don't want to insert object of any *User defined type* ,as input
> parameter
> contains only one string parameter.
>
> I am able to insert String object into my StatefulKnowledgeSession, but
> don't know how to access it in Guvnor , as I want to use value from this
> string object to satisfy one of the rule in my Guvnor decision table. I
> want
> to use this String object as one of the condition columns in Guvnor.
>
> Below is some code I am using:
>
> StatefulKnowledgeSession session = kbase.newStatefulKnowledgeSession();
> String myString = new String("department");
> session.insert(myString);
> session.fireAllRules();
>
>
> Is there any way to access this String object in Guvnor?
>
> Thanks,
> Manasi.
>
>
>
>
>
>
> --
> View this message in context:
> http://drools.46999.n3.nabble.com/Inserting-String-Object-and-accessing-it-in-Guvnor-tp4020056.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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20120930/a8312b53/attachment.html 


More information about the rules-users mailing list