Adding your own alert messages

If you've installed WebCenter Content (UCM) or have made changes such as switching the search engine, you may have noticed an alert message at the top of the pages letting you know if there is a specific task that needs to be done such as a restart or rebuild of the search collection.

Well, these alerts are open for administrators to set as well.  So for instance, if you have a planned outage you can set a message letting users know the system is going to be down for a certain amount of time.  


Adding and managing alerts is very simple.  There are three primary services that are used:  SET_USER_ALERT, GET_USER_ALERTS, DELETE_USER_ALERT.   With SET_USER_ALERT, you simply need to pass in alertId (a unique identifier you give the alert) and alertMsg with the message you want to display.   And because it's just a service, you can simply call it in a URL to set it (as an administrator):  

http://myserver:16200/cs/idcplg?IdcService=SET_USER_ALERT&alertId=maint&alertMsg=My message.  

You can get fancy with the message by including HTML as well as Idoc Script.  That will be processed on the page as it's being rendered.  Optionally, you can pass in alertUrl which would be a URL that the message would lead to.  This value is appended to the "/cs/idcplg" path.  

To know what alerts are set, you can run the GET_USER_ALERTS service and pass in IsJava=1 to display the values back:  

http://myserver:16200/cs/idcplg?IdcService=GET_USER_ALERTS&IsJava=1.  

It will then display the alerts in the USER_ALERTS result set.

To remove the alert, simply run the DELETE_USER_ALERT service and pass in alertId to identify which alert to remove.  Optionally, you can pass in isTempAlert=1 when you first create the alert and it will be removed the next time the server restarts.

Comments:

Hi Kyle, i saw in the picture that same as csportal component.
is there csportal for 11g?

Posted by Hadi Purnomo on September 12, 2011 at 01:35 AM CDT #

Hey Hadi,

This is actually a new OOTB feature in 11g called Dashboards. I cover it in this blog post: http://blogs.oracle.com/kyle/entry/using_dashboards_in_ucm_and_ur . The 'User Profile' widget you see in the graphic is a custom dashboard widget though. We use it in demonstrations to help indicate what user you are when doing workflows and such.

Thanks,
-Kyle

Posted by guest on September 12, 2011 at 03:16 AM CDT #

When I try to set an alert I get an error message "The authorization token is invalid." I can retrieve alerts ok.

What version of 11g did this feature first appear in? I haven't found any documentation.

Posted by webmonkeymagic on September 12, 2011 at 02:27 PM CDT #

Hi Kyle, can i get recent document dashboard panel
Thanks

Posted by guest on September 12, 2011 at 11:24 PM CDT #

Doh! I forgot about the idcToken. This is a new security feature in 11g in which each HTML form get or post must pass in an idcToken value which is a uniquely generated ID for your session available up to a certain amount of time. So what you can do is view the source on the page and search for 'idcToken'. You should see it within the javascript. Then you just need to add that value to your URL request. For example: http://server:16200/cs/idcplg?IdcService=SET_USER_ALERT&alertId=maint&alertMsg=message&idcToken=1316170641048:65476E18EB326221E9EE840C009D0FA8

The reason I didn't notice it is because I have it disabled in my instance. You can add the configuration flag 'DisableAuthorizationTokenCheck=true' and the form actions won't require that value passed. It is a security feature, so I wouldn't recommend disabling it in a production instance.

The other way to run these services is through IdcCommand. In that context, the idcToken is not needed.

Thanks,
-Kyle

Posted by guest on September 14, 2011 at 06:19 AM CDT #

Setting the alert worked great as does getting the list but when using "http://myserver:16200/cs/idcplg?IdcService=DELETE_USER_MESSAGE&alertId=maint" all that displays is a blank screen and the alert stays in affect.

Is there another option for removing alerts?

Posted by guest on September 14, 2011 at 10:40 AM CDT #

My mistake...I wrote DELETE_USER_MESSAGE when the service is actually DELETE_USER_ALERT. Sorry for the confusion. I've now updated the blog post with the correct service name.

Thanks,
-Kyle

Posted by Kyle Hatlestad on September 14, 2011 at 10:54 AM CDT #

Hi Kyle
Its been a while. I hope all is well.

Its nice to see they added the token for security.

I am curious what does Oracle use for there blog software?

Dan Kozlowski

Posted by Dan Kozlowski on September 22, 2011 at 07:16 AM CDT #

Hey Dan,

Oracle uses Apache Roller as its external facing blog software.

Thanks,
-Kyle

Posted by Kyle Hatlestad on September 22, 2011 at 11:26 AM CDT #

Hey Kyle,

We need this functionality for our Spaces interface. Any suggestions?

Carla

Posted by guest on November 21, 2011 at 05:16 AM CST #

Hey Carla,

The mechanism that WebCenter Content uses for the functionality and interface is much different then WebCenter Spaces. I don't believe there is anything built into Spaces like this.

But since Spaces allows for run time changes, you could modify the Page Template resource and post a message that would appear on all the pages.

Thanks,
-Kyle

Posted by Kyle Hatlestad on November 21, 2011 at 07:47 AM CST #

Post a Comment:
  • HTML Syntax: NOT allowed
About

Kyle Hatlestad is a Solution Architect in the WebCenter Architecture group (A-Team) who works with WebCenter Content and other products in the WebCenter & Fusion Middleware portfolios. The WebCenter A-Team blog can be found at: https://blogs.oracle.com/ ateam_webcenter/

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today