# # Copyright (c) 2016-2024 Linagora # # This program/library is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 2.1 of the License, or (at your # option) any later version. # # This program/library is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or # FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License # for more details. # # You should have received a copy of the GNU Lesser General Public License # along with this program/library; If not, see http://www.gnu.org/licenses/ # for the GNU Lesser General Public License version 2.1. # This sample is an implementation of the following use-case: - an employee of a railways company send its shifting summary to its human resource center, - the shifting summary is a photo of a paper report. The employee takes the photo with its smartphone and send it through an app, - several human resource center exist in the company, so the shifting summary must be sent to the right human resource center according to the employee that sent the shifting summary, - the shifting summary is sent to the human resource center as an attachment of an email, - when the shifting summary is received by the human resource center, a successful notification is the to the employee. If the shifting summary is not received after a given period, a failure notification is returned to the employee. Implementation details: This use case is mainly implemented with a BPMN process: - a new process instance is started when the employee invokes the service to send its shifting summary, - the process will invoke another service of a central user directory to retrieve the human resource center of the employee and its email address, - next, the shifting summary is sent to the human resource center through another service, - and, the process wait a confirmation of the shifting summary reception. We consider that the shifting summary is received, when it is put in the right mailbox, so we can use the delivery notification status mechanism of protocol SMTP to known when the mail is correctly delivered. On the DNS notification, a service is invoked to completed the user task on which the process instance is waiting, - next, the successful notification is returned to the employee. Or if the user task is not complete after 15min, a failure notification is returned to the employee. Service unit inventory: - su-flowable-ShiftingSummary-provide: it's the SU associated to the BPMN process. It provides two services: - {http://org.ow2.petals.samples.rld.service.business.rld/1.0/}submit that is the service invoked by the employee to send its shifting summary, - {http://org.ow2.petals.samples.rld.service.business.rld/1.0/}confirmReceiving, the service invoked on DNS notification to confirm the email delivery. - su-SOAP-ShiftingSummary: it's the SU exposing 'su-flowable-ShiftingSummary-provide' as HTTP/SOAP service, - su-Mail-emailing-provide: it's a SU grouping all services sending emails, - su-Mail-shiftingSummarySentConfirmed-consume: it's the SU that invokes the service '{http://org.ow2.petals.samples.rld.service.business.rld/1.0/}confirmReceiving' on DNS notification, - su-Camel-Communication-provide: it's a SU introducing an abstraction layer about email and notifications, - su-SOAP-UserBase-provide: it's a SU to access services of the central user directory, - su-SOAP-Notification-provide: it's a SU to access services of the notification system to send notifications to employees,