Hi Thomas,
thanks
Its my mistake i am able to solve it .
rule "Your First Rule"
                when
m: Workflow(workflowActorId==null,myid:workflowActorId)
        then
                System.out.println(myid + "its null values");
m.setWorkflowActorId(0);
update(m);


end

On Tue, Aug 17, 2010 at 6:47 PM, sony john <sonyt...@gmail.com> wrote:
> hi thomas,
> Thanks for reply ,
> I want to set values in workflow Object.  How i can do it.  I try
> without update(m) but pojo is not updated. How i can accomplish the
> below
> after calling rules i need to get workflowid that has been updated in rules.  
> {
>  ksession.insert(workflow);
>        ksession.fireAllRules();
> System.out.println( workflow.getWorkflowId());
> }
>
>
> rule "Your First Rule"
>                when
> m: Workflow(workflowActorId==null,myid:workflowActorId)
>        then
>                System.out.println(myid + "its null values");
> m.setWorkflowId(0);
> update(m);
>
>
> end
>
> On Tue, Aug 17, 2010 at 6:30 PM, Swindells, Thomas <tswinde...@nds.com> wrote:
>> You are calling update(m), which means that you are telling drools that m 
>> has changed, which means that any rule that has a condition based upon that 
>> rule gets re-evaluated, which causes "Your First Rule" to be fired again, 
>> which will then update m again...
>>
>> Thomas
>>
>>> -----Original Message-----
>>> From: rules-users-boun...@lists.jboss.org [mailto:rules-users-
>>> boun...@lists.jboss.org] On Behalf Of sony john
>>> Sent: 17 August 2010 11:28
>>> To: rules-users@lists.jboss.org
>>> Subject: [rules-users] rules un end looping when update
>>>
>>> Hi all,
>>> Iam using rules 5.1
>>> iam getting un endded printout in my console.
>>> What could be the issue.
>>> Thanks in advance.
>>>
>>> #created on: Aug 16, 2010
>>> package com.test.supplier
>>>
>>> #list any import classes here.
>>>
>>>
>>>
>>> #declare any global variables here
>>> import com.test.supplier.dao.Workflow;
>>>
>>>
>>>
>>> rule "Your First Rule"
>>>                 when
>>> m: Workflow(workflowActorId==null,myid:workflowActorId)
>>>         then
>>>                 System.out.println(myid + "its null values");
>>> update(m);
>>>
>>>
>>> end
>>> _______________________________________________
>>> rules-users mailing list
>>> rules-users@lists.jboss.org
>>> https://lists.jboss.org/mailman/listinfo/rules-users
>>
>>
>> **************************************************************************************
>> This message is confidential and intended only for the addressee. If you 
>> have received this message in error, please immediately notify the 
>> postmas...@nds.com and delete it from your system as well as any copies. The 
>> content of e-mails as well as traffic data may be monitored by NDS for 
>> employment and security purposes. To protect the environment please do not 
>> print this e-mail unless necessary.
>>
>> NDS Limited. Registered Office: One London Road, Staines, Middlesex, TW18 
>> 4EX, United Kingdom. A company registered in England and Wales. Registered 
>> no. 3080780. VAT no. GB 603 8808 40-00
>> **************************************************************************************
>>
>> _______________________________________________
>> rules-users mailing list
>> rules-users@lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/rules-users
>>
>

_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users

Reply via email to