During the realization phase we will be coding many business functionalities through EJBs and exposing EJBs as web services so that we can consume the existing functionality from various different programming paradigms.
For example , Reading a particular product/Material information from the Backend systems( DB,MDD repository, ECC or R/3 system ).Basically what this service does is taking a RequestID or Material ID as input and it returns all the material attributes.
We may be using the above services at various stages during our process .
Let's consider a simple scenario where
- We are using the service to pull the details and displaying on the UI.
- Using service to pull the details and Generating a HTML format and send e-mail to various responsible roles.
In scenario (2) we may be having another service which sends e-mail .
Now, we have three services in total
- Reading the Material/Product info
- Generating the HTML format of the product information
- Sending the customized e-mail
Now, I have a requirement in my Business Process where after successful creation of a product/Material , I would like to send an e-mail of the created product information to various responsible roles involved in the process.
In general , if you want to implement the same then ideally we will be creating a EJB which calls above all three EJBs and we need to code for sending the information from one to another and expose this EJB as a single web service. This requires considerable amount of development.
We can use Service Composer which makes our life easier to create a single service out of these three as below.
Material ID, Email_To,Email_CC,Subject,Message are the inputs to the modelled service. We are passing Material ID only to "Read ProductDetails" service and other parameters to "Send EMail" service.
Send Email service should be executed only after reading the product details.So we are using Slit and join conditions to make sure that Email service will be executed ony after "Read product details"