Simple Description
John Smith, Sales Chief of ACME, changes the credit level of a customer "Big Pipe". Once the change has been made in OFBiz, the ECA associated with this event sends a message to ESME where other sales staff can see that the status for the customer has changed.
In this initial use case, there is no ESME client embedded in the OfBiz UI but rather the user UI is that of the Stax environment or other connected clients.
Technical Details
Overview
Required Environment
- ESME Server (http://esmecloudserverapache.dickhirsch.staxapps.net/)
- OFBiz Server (https://demo.ofbiz.org)
Required users
- OFBiz
- John Smith - Sales Chief
- ESME (All members of ESME Pool "BigPipe")
- Ralph Butler - Sales Staff
- Amy Davidson - Sales Staff
- John Smith - Sales Chief
- OFBiz Back-end
Technical Details: OFBiz
- ECA that responds to changes on customer object
- One generic service "sendEsmeMessage" that sends ESME messages. This service should be configurable with such things as token (needed to use ESME's APIs) and server URL. Initially, this could probably use existing HTTP Services to make a HTTP Post call to the ESME API method "send_msg" with the extra parameter "token". You could also hard-code the server name and token for an initial test.
- One specific service that calls the generic service and formats the message.
Iteration Sugestions
- Iteration 1: SendESMEMessage is called directly from the ECA. SendESME service has a hardcoded Stax URL with a hardcoded taken, server URL and message.
- Iteration 2: A dynamic message that contains event details is sent to SendESMEMessage
- Iteration 3: A specific service is created that calls with generic service with amessage to send as a parameter
- Iteration 4: The details for the ESME Call (Server URL, Token, etc) are made configurable via a UI.
Implementation Details
eecas.xml
<?xml version="1.0" encoding="UTF-8"?>
<- WorkEffort Keyword Indexing ECAs ->
<eca entity="Example" operation="create-store" event="return">
<action service="sendMessage" mode="sync"/>
</eca></entity-eca>