[jboss-jira] [JBoss JIRA] (DROOLS-1168) notify property change
Sante Stanisci (JIRA)
issues at jboss.org
Thu May 19 03:44:00 EDT 2016
[ https://issues.jboss.org/browse/DROOLS-1168?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13239786#comment-13239786 ]
Sante Stanisci commented on DROOLS-1168:
----------------------------------------
This is a workaround finded by me
rule "completeUntMisVen"
when
eval(checkRulesEnabled == 0)
$entity : MtbLisvData(untMisVen == null && codMart != null )
$untMis: java.lang.String() from SalesRules.completeUntMisLisv(conn, $entity)
then
//modify ( $entity ) { setUntMisVen($untMis) }
String[] fields = new String[]{"untMisVen"};
DroolsUtil.completeEntity($entity, fields, $untMis);
long l = 434576465786346l; //random long
LongBitMask ll = new LongBitMask(l);
update($entity, ll, $entity.getClass());
//update($entity)
end
It is a correct solution?
In this way bitmask is not 0 and next rule fire correctly
> notify property change
> ----------------------
>
> Key: DROOLS-1168
> URL: https://issues.jboss.org/browse/DROOLS-1168
> Project: Drools
> Issue Type: Enhancement
> Components: core engine
> Affects Versions: 6.4.0.Final
> Environment: java 6, eclipse 4, windows 8.1
> Reporter: Sante Stanisci
> Assignee: Mario Fusco
> Priority: Critical
> Attachments: DroolsUtil.java, EntityBase.java, MtbLisvData.java, rules.drl
>
>
> in the then statement instead of modify use a custom function to change the field. This change does not notify the property even if the class is annotated with @PropertyReactive
> How can I manually notify the change?
> Use a stateless session
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
More information about the jboss-jira
mailing list