OCS can be implemented as a portal through the Spring MVC Portlet specification. The idea is depicted in the following screenshot where all phases of the order workflow are represented as portlets running simultaneously on the applications' facade:
Each portlet can still undergo some Activiti or Web Flow if it has sub-flows to implement. Web services can be generated in order to pass data among portlets.
Each portlet must have only one controller class. The @Controller
extends org.springframework.web.portlet.DispatcherPortlet
with the following component objects:
Portlet Request: Contains
ACTION
andVIEW
requests; when the request type isACTION
, the Portlet container will call theprocessAction()
method; when the request is of typeVIEW
, the container will call therender()
method defined on the Portlet interface; also containsREQUEST
parameters.Render Request: Represents the request for the render phase; usually contains a
GET
HTTP request body.Action Request:...