Workflowmanager Module Uses View

From SAD

Jump to: navigation, search


Primary Presentation


Visio file

Element Catalog

For a description of elements not listed below, see OPC Module Uses View - Element Catalog.


This class is a stateless session bean. It provides the implementation for the OpcPurchaseOrderService web service. When it receives a purchase order, it checks that all arguments are valid and if ok dispatches the order to the workflowmanager sending a message to a JMS queue.


This class is a message-driven bean. It is activated when there is a message in the queue. It processes two kinds of messages:

  • purchase order message: in this case it calls the PoHandler class. The sequence diagram down below shows the interactions involved in processing a purchase order.
  • invoice message: this is a message that came from one of the external suppliers in response for a booking order. WorkFlowManagerBean calls the InvoiceHandler class to take care of this messages.

WorkFlowManagerBean also sets a timer with the EJB container so that it is activated periodically to check the status of all pending orders.


The PoHandler class is not visible outside the workflowmanager package. It acts as a delegate of the WorkFlowManagerBean class to handle any purchase order request. When processing a request, it first uses POReceiver and processmanager to insert the order in the database in the Pending state. Then it calls CreditCardVerifier synchronously to charge the customer's credit card. If the credit card is OK, it sends a message to a JMS queue to be processed by OrderFillerBean. Finally, it sends another JMS message to CrmBean, which will create and send an email to the customer informing about the status of his order.


The InvoiceHandler is not visible outside the workflowmanager package. It acts as a delegate of the WorkflowManagerBean class to handle any invoice it receives from any of the suppliers. When an invoice is received, InvoiceHandler basically uses processmanager to update the status of the corresponding order.
A given adventure package order may consist of:

  • zero or one hotel booking
  • zero, one or two airline flights (departing and returning flight)
  • zero or more activity items

When InvoiceHandler receives the last invoice confirming completion of the reservation, it sends a JMS message to CrmBean to notify the customer via email.


This class is a message-driven bean. It is responsible for handling the communication with customers via email.


This class is used to verify the credit information for a user. It contacts an external web service to get the banking related information for the credit card number specified.


This class is a message-driven bean. It is responsible for sending out all the booking requests to the airline, lodging and activity suppliers involved in a given purchase order.


The purchase order receiver's responsibility is to create a purchase order entity bean and persist it in a relational database. The POReceiver is implemented as a Java class and it creates a PurchaseOrder entity bean.


This "value object" class holds the data for an invoice that arrives from any of the external suppliers. It has a method to provide an XML representation of the invoice.

Sequence diagram - purchase order within workflowmanager


Sequence diagram - order filling


Context Diagram


Variability Guide

SMTP host, message body contents, subject, sender address and reply-to address for all email messages sent by CrmBean are configurable via text files that can be changed at run time, but require reinitialization of the application to take effect. These files are implemented using standard Java i18n support.
See also OPC Runtime Refinement View - Variability Guide


See OPC Runtime Refinement View - Rationale

Related Views

Parent view: OPC Module Uses View

Personal tools