Hi, Thanks for the response. As you suggested, It's better to discuss and find a possible way of implementing this. Shall I arrange a meeting tomorrow(19/7/2016)? If possible, please let me know an available time slot.
Thanks and Regards 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. > > 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>* > -- 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