Seaside Orbeon Integration
Last updated
Last updated
How does GemStone/S interchange information with Orbeon Forms (a Java Application) ?
In order to integrate GemStone/S with Orbeon Forms there are some mandatory fields/component that each Form must have:
Internal Section:
Component named "k" - used by GemStone/S application to identify the continuation.
Component named "s" - used by GemStone/S application to identify the session.
Component named "oop" - used by GemStone/S application to identify the interaction object (transition).
Component named "oop2" - used by GemStone/S application to identify the interaction object2 (assingment).
Component named "uuid" - security token to identify the request.
User Section:
Component named "username" - to show the GemStone/S app user.
Component named "rol" - to show the roles of the GemStone/S user.
Component named "processId" - to show the process id that owns the form.
Usually a web user is logged in BPM Flow (the BPM application) an from there an Orbeon Form is called. Each Orbeon Form represent a task inside the BPM Flow (which is a GemStone Smalltalk Seaside application). The communication process is the following (blue dotted lines in the picture above):
The user click inside the BPM to perform a task.
The GemStone/S application generate a GUID and associate a XML (which contain user data -roles and so on-) with this GUID (this GUID is called token).
The GemStone/S application then redirect the request to the corresponding Orbeon Form passing the GUID as parameter in the URL {redirect(token) in the picture}.
The Orbeon Form take the token (GUID) from the url and call a "Security Service" that is hosted by the BPM (GemStone/S application) {callSecurityService(token) in the picture}.
The GemStone/S application register the call and check if there is any GUID waiting in the Token dictionary (like a HashTable) {registerToken in the picture}.
If there is GUID waiting then the Service answer the associated XML and remove this entry from the Token dictionary (can no be used anymore). If there is no GUID then answer an empty XML {securityResult(xml)}.
The Orbeon Form application take the result from the Service and display the XML in the form {securityResult(xml)}. If the XML is empty then the form will not display anything. The XML data is placed in the form components.
To configure the interaction you have to do the following in Orbeon Forms:
1- Add a service to call:
2- Add an action to show the result of the service:
3- Configure Sections to show data only when the service result is NOT empty:
After the web user is inside Orbeon he proceed to fill the form. Once the user finalize this task click on button "Send" in the Form:
The web user click "Send" in the Orbeon Form.
The Orbeon Form is saved.
Orbeon call a GemStone/S Restful service and wait the answer.
The GemStone/S application take the XML of the form and process it.
The GemStone/S Restful service answer a HTML code which is a redirect to it self (where the user previously called Orbeon).
Orbeon takes the html (of the restful service) and load it in the user web browser.
The user is redirected to GemStone/S application again.
To configure this you have to add the following lines to Orbeon file "properties-local.xml": Close Form button in Orbeon to redirect to Seaside:
Orbeon Send button will send the XML of the form to GemStone and GemStone will answer a HTML code with a redirect to the Seaside application. Orbeon will inject the HTML code (redirect) into user browser: