[rules-users] Seting up test scenarios for Excel Decision Table with a map of data coming in

mvanders mark.vandersteen at servicestream.com.au
Thu Feb 6 21:59:30 EST 2014


Thank you guys, for the above I've come to use the following.

This will also make it MUCH MUCH easier for the business users to add new
rules to the decision sheets (excel) and allow them to just use a simple Job
Fact for the input of data to test against :)

For others interested, what i ended up doing was creating an DRL rule in the
following fashion as per suggestion.

rule "JobMapRule"
    dialect "mvel"
    when
        job : Job( )
    then
        Map incomingData = new HashMap();
	        
        incomingData.put('workType', job.workType);
        incomingData.put('status', job.status);
        
        insert(incomingData)
        retract(job)
end

This way my incomingData Fact gets created to memory, then removes the Job
Fact from memory so that it does not appear to have fired within the Test
Scenarios as well :)

Thanks for your help. This has been an extremely large learning curve this
past few days.

Cheers
Mark



--
View this message in context: http://drools.46999.n3.nabble.com/Seting-up-test-scenarios-for-Excel-Decision-Table-with-a-map-of-data-coming-in-tp4027995p4028012.html
Sent from the Drools: User forum mailing list archive at Nabble.com.


More information about the rules-users mailing list