In the second part of the series I would like to introduce a way to use UMF to display message outside of the order management screens.
The goal is to provide a path for developers to display messages in both active (popup) or passive manner (in a list applet) and capture end user responses without the need for browser scripting. The example follows the recommendations of My Oracle Support (namely document 757843.1). If you wish to view the document, you need a My Oracle Support account.
The example uses UMF (rather the Unified Messaging Service) to display a dialog indicating to the end user that the account he or she has just saved has a status of "Inactive". The dialog has buttons ("Continue" and "Cancel") which the user should click to either continue with the changes or cancel the operation. Part 3 of the series (future post) will describe the steps to capture the responses in a more sophisticated manner.
1. Create the message type
In the Siebel client, navigate to Administration - Order Management | Message Types and create a new message type to define the dialog.
Set the following fields
- Name = Enter a unique name
- Display Mode = Active
- Group = Internal Error Message
- Title = UMF Test Message (or figure out a better title)
- Bitmap = select a bitmap (you can upload bitmaps using the Administration - Document screen)
- Short Text = enter a short text
- Full Text = enter the message text (this will be displayed to the user). You can use substitution fields using square brackets. You have to add anything between square brackets to the Payload list.
Click the Responses view tab and enter two responses. Use the screenshot below as a guide. You can skip the Field, Business Service and Method fields for now.
Make a note of the Message Type name, you will need it later.
2. Add/verify business object components
In Siebel Tools, navigate to the Account business object and ensure that the following business components are listed.
- UMF Active Message Virtual BusComp
- UMF File Handler
- UMF Passive Message Virtual BusComp
Compile the business object if necessary.
3. Create a wrapper business service to call the Unified Messaging Service
Document 757843.1 includes sample eScript code which can be used as a starting point to create a custom business service which acts as a wrapper. As the input for the Unified Messaging Service methods is quite complex, the custom business service helps us to pass parameters to the Unified Messaging Service.
The purpose of the code is to read a flat input property set and pass the values to a hierachical structure which is needed by the Unified Messaging Service's AddMessages method.
This is the hierarchy of property sets to be generated:
The script below (click to enlarge) accomplishes this task and invokes the UMS method.
4. Create a workflow to invoke the wrapper business service
We can use a workflow process to enable easy invocation of the wrapper business service. The following is a prototype which passes the values to the business service.
To invoke the workflow we can use one of the well known techniques such as a button (using the Named Method user property) or runtime event.
I have placed a simple button on the account list applet. When i click the button, the workflow is invoked and the message is displayed as specified.
Note that [Account] (as defined in the message type) has been replaced by the account's real name. Now let's click the Continue button and verify that a response for the account has been created in the Responses screen.
We have successfully used the Siebel Unified Messaging Framework to display a custom dialog with response buttons to the user and to capture the users response as a response record. In the final post of this series we will see how to capture the users responses using custom business services. The above prototype has been implemented on Siebel SIA 22.214.171.124 using the sample database.
Continue to part 3.
Continue to part 3.
have a nice day