That is exactly what I meant. Rules writer should be aware of the API only. In the drools policy case, it is the deliver() method as you mentioned.
On Tue, Apr 25, 2017 at 7:00 PM, HERNANDEZ-HERRERO, JORGE <jh1730 at att.com> wrote: > Yes, I can buy into it Zhang, if I understand correctly what you meant, > let me rephrase: the PolicyEngine interface exposes unnecessarily some > signatures to the rules writer that could be misused to invoke > functionality they shouldn?t. Basically, rules writers, just need to have > a ?deliver(Channel-Name, Object)? as an interface method and little more. > Please correct me if I am not capturing correctly your message. > > Current working assumption is that drools apps are certified and > trusted. Removing that assumption, opens the challenge on how to sandbox > them, but may be that?s something that we should tackle eventually. > > > > In the meantime, please feel free to contribute a patch if you wish. > > > > Thanks. > > Jorge > > > > > > *From:* Jingjing Zhang [mailto:jjzhangjjzhang at gmail.com] > *Sent:* Tuesday, April 25, 2017 5:09 PM > *To:* HERNANDEZ-HERRERO, JORGE <jh1730 at att.com> > *Cc:* onap-discuss at lists.onap.org > *Subject:* Re: [onap-discuss] [Policy] Drools notify its decisions to > outside world > > > > Hi Jorge, > > > > I see that invoke from drools-applications repo. > > But I don't understand why the detail code inside drools policy should be > exposed to drools rule writers. > > can you enlighten me on this? Thanks. > > > > On Tue, Apr 25, 2017 at 3:17 PM, HERNANDEZ-HERRERO, JORGE <jh1730 at att.com> > wrote: > > The drools based ?policies? are stateful, and built around drools > technology drl + java helpers. The PolicyEngine.manager.deliver() is > typically invoked from the .drl. For example the vFW and vDNS flows, see > the .drl in the policy/drools-applications repo, will invoke it. > > > > Best regards, > > Jorge > > > > *From:* onap-discuss-bounces at lists.onap.org [mailto:onap-discuss-bounces@ > lists.onap.org] *On Behalf Of *Jingjing Zhang > *Sent:* Tuesday, April 25, 2017 10:35 AM > *To:* onap-discuss at lists.onap.org > *Subject:* [onap-discuss] [Policy] Drools notify its decisions to outside > world > > > > To my understanding, after drools policy engine make a decision, it should > send out the decision to the message bus and further delivered to external > systems. > > I think the order is PdpJmx.ruleFired -> PolicySession.afterMatchFired- > >MavenDroolsController.deliver->policyEngine.manager.deliver(). However, > I didn't see the sequence happening. > > So, how does the decision being propagated throughout the system? > > > > -- > > Regards! > Zhang, Jingjing > > > _______________________________________________ > onap-discuss mailing list > onap-discuss at lists.onap.org > https://lists.onap.org/mailman/listinfo/onap-discuss > <https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.onap.org_mailman_listinfo_onap-2Ddiscuss&d=DwMFaQ&c=LFYZ-o9_HUMeMTSQicvjIg&r=AOclne09odx6cmeimzFUhQ&m=3NfsMoyk9YEdVOFtsWEy1WwNweMr5BOtRgHG8EDEDYE&s=0Wtk-Pz9OvQqVEFXdc8MlbcIXZItnx4ih7kuQgCk2jI&e=> > > > > > > -- > > Regards! > Zhang, Jingjing > > _______________________________________________ > onap-discuss mailing list > onap-discuss at lists.onap.org > https://lists.onap.org/mailman/listinfo/onap-discuss > > -- Regards! Zhang, Jingjing -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.onap.org/pipermail/onap-discuss/attachments/20170426/bbcd9f73/attachment.html>
