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.)...
5 Comments:
what exactly are facades used for? Are we talking about XML types? I am a newbie so was wondering...
also, are your web service java web services? do you know whether .net works with BPEL?
-Using the facades(java classes and interfaces),various BPEL variables can be accessed using getters & setters. These java classes(&interfaces)are geenrated from xml schema.
-The variables to be accessed could be any one defined in the bpel process (or other XML var).
-We are using web services (in java).
-And also, yes -.net works with BPEL.
so i'm confused. What's the wsdl bpelprocess.wsdl? Is that wehere you have the schema sort of?
Schema is included in the main project and you import that schema into the wsdl of the bpel process.
Schemac is like Axis wsdl2java utility- it is xsd2java. You give the schema; it gives you the java code.
Post a Comment
<< Home