Hi, Thanks for the response. I have arranged a meeting from 4.30pm - 5.30pm today(20/7/2016).
Best Regards On Tue, Jul 19, 2016 at 11:58 AM, Sriskandarajah Suhothayan <s...@wso2.com> wrote: > Since Option 2 is now possible I think you can move to it now. The > advantage is, with this approach you are not restricted to emails and you > can now use SOAP, REST and other adopters to trigger some actions based on > notifications, which will make IS much more powerful than just sending > emails. > > I'm available from 2.30 pm at PG. > > Regards > Suho > > On Tue, Jul 19, 2016 at 11:17 AM, Johann Nallathamby <joh...@wso2.com> > wrote: > >> Hi Suho, >> >> On Mon, Jul 18, 2016 at 11:44 PM, Sriskandarajah Suhothayan < >> s...@wso2.com> wrote: >> >>> Hi >>> >>> Based on the request of IS team we have recently added support for >>> loading template files from the registry. >>> I think with this feature we can do the mapping at Event Publisher side, >>> then IS can send only the core data for the notification. I think building >>> the whole message at IS is too much customization for emails. >>> >> >> As discussed previously both methods should work. >> >> Replacing placeholder with data in the arbitrary data map was in the >> master at the time and now it should have been release AFAIU. This is what >> Indunil was trying. >> >> And also you guys have added the support to pick registry templates based >> on some place holder values in the registry path. What we discussed was to >> send the 'locale' value as a stream attribute for our use case. If this >> approach works this is also fine for us. >> >> We tried with option1 just to get something working quickly. >> >> >>> >>> Please set up a meeting so we can discuss the possible ways to >>> implementing this. >>> >>> Regards >>> Suho >>> >>> On Mon, Jul 18, 2016 at 5:52 PM, Indunil Upeksha Rathnayake < >>> indu...@wso2.com> wrote: >>> >>>> Hi, >>>> >>>> We are trying to do some improvements to the notification sending >>>> module where we have integrated analytics common features in IS, in order >>>> to send several notifications (ex:Email, SMS). >>>> >>>> Current implementation is in [1], there only the email notification was >>>> focused where we are directly publishing to the EmailEventAdapter. >>>> >>>> Now we are trying to send notifications via publishing an event to the >>>> Event stream without directly calling an Output Adapter. The approach we >>>> have taken is as follows. >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> *1) In server start up following will be created.i) A stream for each >>>> and every notification type including the necessary attributes. Ex: >>>> Email Notification - a Stream with the subject, body and footer as >>>> attributesii) Event Publishers, registered for each and every stream in the >>>> required Output event adapter type. Ex: Email Notification - event >>>> Publisher in email output event adapter type.2) Publishing an event to >>>> EventStreamService, which includes an arbitrary data map with the necessary >>>> data needed for the specific notification type. Ex: Email Notification >>>> - Please find the code segments in [2] for having a better understanding.* >>>> >>>> There in IS side, we are selecting a specific email template and will >>>> be filled out the place holders before sending the subject, body and footer >>>> as arbitrary map attributes. >>>> >>>> But even-though we passed an arbitrary data map, when we are sending an >>>> email from the EmailEventAdapter, it won't filter out the subject, body or >>>> header from that arbitrary data map. >>>> As I have understood, if someone pass an event with an arbitrary data >>>> map, the email body will be set as [3] (Refer [4]), it won't filter out the >>>> content(Refer [5]). >>>> Is this has to be worked if we provide *output mappings* for event >>>> publisher as* {{subject}{body}{footer}}* to convert the event to the >>>> supported format? >>>> >>>> I have gone through the code [6], where the event data will be passed >>>> through EventStreamProducer, but there also seems like it's not >>>> possible to send an email in required format(subject, body and footer). >>>> >>>> Really appreciate your comments/suggestions to understand the correct >>>> approach to be taken. >>>> >>>> [1] >>>> https://github.com/wso2-extensions/identity-event-handler-email/blob/master/components/event-handler-email/org.wso2.carbon.identity.event.handler.email/src/main/java/org.wso2.carbon.identity.event.handler.email/handler/EmailEventHandler.java#L164 >>>> [2] >>>> https://drive.google.com/a/wso2.com/file/d/0Bz_EQkE2mOgBY00yYVpGelZJNms/view?usp=sharing >>>> [3] >>>> https://drive.google.com/a/wso2.com/file/d/0Bz_EQkE2mOgBNEMtYjJvSFB2emM/view?usp=sharing >>>> [4] >>>> https://github.com/wso2/carbon-analytics-common/blob/master/components/event-publisher/org.wso2.carbon.event.publisher.core/src/main/java/org/wso2/carbon/event/publisher/core/internal/type/text/TextOutputMapper.java#L139 >>>> [5] >>>> https://github.com/wso2/carbon-analytics-common/blob/master/components/event-publisher/event-output-adapters/org.wso2.carbon.event.output.adapter.email/src/main/java/org/wso2/carbon/event/output/adapter/email/EmailEventAdapter.java#L233 >>>> [6] >>>> https://github.com/wso2/carbon-event-processing/blob/master/components/event-simulator/org.wso2.carbon.event.simulator.core/src/main/java/org/wso2/carbon/event/simulator/core/internal/CarbonEventSimulator.java#L183 >>>> >>>> Thanks and Regards >>>> -- >>>> Indunil Upeksha Rathnayake >>>> Software Engineer | WSO2 Inc >>>> Email indu...@wso2.com >>>> Mobile 0772182255 >>>> >>> >>> >>> >>> -- >>> >>> *S. Suhothayan* >>> Technical Lead & Team Lead of WSO2 Complex Event Processor >>> *WSO2 Inc. *http://wso2.com >>> * <http://wso2.com/>* >>> lean . enterprise . middleware >>> >>> >>> *cell: (+94) 779 756 757 <%28%2B94%29%20779%20756%20757> | blog: >>> http://suhothayan.blogspot.com/ <http://suhothayan.blogspot.com/>twitter: >>> http://twitter.com/suhothayan <http://twitter.com/suhothayan> | linked-in: >>> http://lk.linkedin.com/in/suhothayan <http://lk.linkedin.com/in/suhothayan>* >>> >> >> >> >> -- >> Thanks & Regards, >> >> *Johann Dilantha Nallathamby* >> Technical Lead & Product Lead of WSO2 Identity Server >> Governance Technologies Team >> WSO2, Inc. >> lean.enterprise.middleware >> >> Mobile - *+94777776950* >> Blog - *http://nallaa.wordpress.com <http://nallaa.wordpress.com>* >> > > > > -- > > *S. Suhothayan* > Associate Director / Architect & Team Lead of WSO2 Complex Event Processor > *WSO2 Inc. *http://wso2.com > * <http://wso2.com/>* > lean . enterprise . middleware > > > *cell: (+94) 779 756 757 <%28%2B94%29%20779%20756%20757> | blog: > http://suhothayan.blogspot.com/ <http://suhothayan.blogspot.com/>twitter: > http://twitter.com/suhothayan <http://twitter.com/suhothayan> | linked-in: > http://lk.linkedin.com/in/suhothayan <http://lk.linkedin.com/in/suhothayan>* > -- Indunil Upeksha Rathnayake Software Engineer | WSO2 Inc Email indu...@wso2.com Mobile 0772182255
_______________________________________________ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev