Hello everyone.
I want to use real time mediation but when i create a pricing rule it does not work, it uses the default price.
I have an instance of jbilling running on mysql
I have added
i have create a rule in the trend_pricing package. to set a new price to items
this is the rule
rule "Row 4 customer pricing"
salience 50
dialect "mvel"
when
result : PricingResult( itemId == "101" , price == ( null ) )
then
result.setPrice( "45" );
update( result );
end
all the drools config is default, but when i try this is my java code
JbillingAPI api = JbillingAPIFactory.getAPI();
//UserWS userData = api.getUserWS(userId);
PricingField[] fields=new PricingField[7];
fields[0]=new PricingField("userfield",userfield);
fields[1]=new PricingField("quantity",40);
fields[2]=new PricingField("disposition","A");
fields[3]=new PricingField("event_date",new Date());
fields[4]=new PricingField("dst","23776043537");
fields[5]=new PricingField("src","23576043537");
fields[6]=new PricingField("item_number",101);
api.updateCurrentOrder(userId,new OrderLineWS[]{}, fields, new Date(), "new line from mediation");
the user has a main subscription order.
i don't understand why the pricing rule is not executed.