@ajay, The documentation itself has the example how to register the handler and start the service. Handler is nothing but a Consumer function for the function notificationService.registerMailHandler(...)
MailNotificationService.java
public void registerMailHandler(Consumer<Mail> consumer) {
MessageTransformationHandler handler = new MessageTransformationHandler(consumer,
configuration.downloadAttachments(), configuration.getAttachmentPath());
registerMessageHandler(handler);
}
public void registerMailHandler(Consumer<Mail> consumer) will be decorated as like below. This is how handlers are registered and started:
@aravindhrs: I am a Camunda newbie… I have Camunda running under a Wildfly. I am not clear how (in which object / file) I have to enter / call the example handler? So where do I have to put the file “MailNotifiactionService.java” and where do I have to enter it, so that the Process Engine uses it?
And how do I access it in the start event of the Camunda workflow?
Thanks for a little support and sorry for the basic questions
Hi @Ingo_Richtsmeier . Thanks, the installation itself worked, the extension runs under Wildfly. Send mail and poll mail also works, but the “react on incoming mails” I have not yet got to run. I lack the knowledge where (in which script) I have to enter the following code:
configuration = MailConfigurationFactory.getConfiguration();
notificationService = new MailNotificationService(configuration);
I would like to make my question more specific: How do I bring the Java file: MailNotificationService.java into the Camunda engine, resp. into the mail engine? I have never done this before… what steps are needed for this in my Camunda wildfly environment?
thank you for some help