Print Post Determining Notification Response Values

If you are using email or the standard web pages to respond to notifications, then the system will automatically prompt you to let you know what the possible values for a response are. However, there are certain circumstances where this isn’t appropriate – a customer I worked with last year wanted all their notifications to be handled via an Oracle Form, which needed to dynamically create a drop-down list for each notification.

Since the Workflow Data Model isn’t really available anywhere yet (it’ll be in the book though!), it’s not immediately apparent to determine where you need to look to find out what the result is, so here’s how.

In order for a notification to use conditional routing, there needs to be an attribute called RESULT. This attribute has a type of LOOKUP and a subtype of RESPOND – i.e. this is something coming back into the Workflow process and the value corresponds to a lookup type. The FORMAT of this attribute contains the internal name of the lookup. All this information is stored in the WF_MESSAGE_ATTRIBUTES table.

In order to get to this table, we need to know what the message is that is linked to the notification. The WF_MESSAGE_ATTRIBUTES table is joined to the WF_MESSAGES table using the MESSAGE_NAME and MESSAGE_TYPE columns on the attributes table to join to the NAME and TYPE columns in the messages table.

Finally, the message needs to be linked to the notification, which is stored in the WF_NOTIFICATIONS table, which joins using the same columns as the join from the messages table to the attributes table. This way, for any notification that you are using, you can fetch a list of what possible responses to the notification are.

Here’s the code:
SELECT wfl.lookup_code
,      wfl.meaning
FROM wf_notifications        wfn
,    wf_messages             wfm
,    wf_message_attributes   wfma
,    wf_lookups              wfl
WHERE wfn.notification_id = 1035
AND   wfn.message_name = wfm.name
AND   wfn.message_type = wfm.type
AND   wfn.message_name = wfma.message_name
AND   wfn.message_type = wfma.message_type
AND   wfma.name = 'RESULT'
AND   wfl.lookup_type = wfma.format

Enjoy!

This entry was posted on Thursday, July 24th, 2008 at 9:33 pm and is filed under Oracle, Technical. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

« Delegating or Transferring Notifications
Oracle as a Legacy technology »

Leave a Reply

  • Pages

    • About Us
    • Services From WorkflowFAQ
    • Training
    • Workflow Book
    • Careers
    • Forum
    • Blog
  • Oracle 11i Workflow Certified Expert
    Oracle 11i System Administrator Certified Expert

  • Search


  • Blog

    Archives

    • January 2012
    • November 2011
    • October 2011
    • September 2011
    • August 2011
    • July 2011
    • June 2011
    • April 2011
    • February 2011
    • January 2011
    • December 2010
    • October 2010
    • September 2010
    • April 2010
    • March 2010
    • February 2010
    • January 2010
    • December 2009
    • October 2009
    • August 2009
    • July 2009
    • March 2009
    • February 2009
    • January 2009
    • December 2008
    • November 2008
    • October 2008
    • September 2008
    • August 2008
    • July 2008
    • June 2008
    • May 2008
  • Categories

    • General Computing (30)
    • Non-Oracle (18)
    • Oracle (77)
      • Functional (20)
      • Technical (68)
    • Personal (2)

  • Links

  • General Computing

    • Computing Magazine
    • Download.com
    • SourceForge.net
    • The Daily WTF
    • The Register
  • Non-Computing

    • BBC News
    • Burnley-based professional photography
    • Cuteable
    • My wife’s shop
  • Oracle Related

    • AppsDBA
    • Oracle
    • Oracle Apps Blog
    • Oracle Magazine Interactive
    • Oracle Support
    • Oracle Technology Network
    • Oracle UK
    • Oracle Workflow Forum on OTN
    • Oracle WTF
    • OraFAQ
    • Steven Chan
    • Steven Feuerstein


Copyright © 2012 TS Fifteen Ltd. All rights reserved.