Facade
Façade:
I used facades so that I could pass many values/var to the JSP from the BPEL process.
Example – passed instanceId to be displayed on the jsp…
Steps:
1. Create an xsd consisting all the variables that are required from the BPEL process.
façadeSchema.xsd
Example:
2. Include the xsd in the bpel project and the bpel process (source).
3. Used the schemac compiler utility in order to generate the XML facades.
>schemac –trace –d ./BPEL-INF/classes bpelprocess.wsdl
Note: The classes created will be stored under BPELProj>BPEL-INF>facadeSchema>…
4. Jar these files as follows:
...BPEL-INF/classes>jar cvf facade.jar abc/def/ghi/*.class
Place teh jar file under the WEB-INF/lib folder (the ui).
5. Created a global variable – facadeVar of Element type (of type created in xsd).
6. Example – within the user task, include an assign to copy the bpel variables into the façade.
.
.
.
This way many more bpel variables etc may be assigned to the façade.
Then copy this façade to the task attachment (that is of element type itself):
These variables can be accessed (example in a jsp) - using createFacade...
(to be cont.)...