The Expere Document Engine is composed of reusable services organized into sequences or workflows called microflows through which commands are routed. The concept is similar to the Chain of Responsibility design pattern except that each service always operates on the command. Commands flow through the services as XML where each service interrogates the XML, performs some unit of work (often changing the XML structure), and then passes it on to the next service.
Microflows are created and managed using J2EE Enterprise Java Beans (EJB). The Expere Document Engine uses a stateless session bean that instantiates and configures microflows. The application server may pool EJB instances to service API requests on demand. Each pooled microflow is named and is looked up through Java Naming and Directory Interface (JNDI).
The entry point to the Expere Document Engine API is a single servlet. Request messages sent to this endpoint are inspected and then mapped to a JNDI name that is used to retrieve an EJB instance. Once the servlet has an instance of the EJB, it synchronously invokes the microflow, passing the API call (request message). When the message has passed through all services in the microflow, the resulting response message is returned to the servlet and streamed back to the client.