Print Post Displaying the history of a Notification

A thread on OTN recently (which I missed while I was ill) asked about displaying the history of a notification, and when I got round to it, I recalled the same thing being asked in September on Metalink here.

However, I knew that I’d addressed the problem somewhere, but didn’t know whether it was on OTN, WorkflowFAQ or on Metalink.  So, to make sure that I can find it again, here’s the contents of the post from Metalink:

From:  Dmitry Lidvansky  18-Sep-08 09:29
Subject: how to select notification history (?)

I need a select statement that returns notification history as it shown in notification:

http://www.4freeimagehost.com/show.php?i=b2d4948a2dbf.png (see image)

please help

it seems that WF_ITEM_ACTIVITY_STATUSES/WF_ITEM_ACTIVITY_STATUSES_H does not contain all neccessary information for example, Delegate action


From: Matthew Searle 18-Sep-08 10:39
Subject: Re : how to select notification history (?)

Hi,

This should do the trick:

1 CREATE OR REPLACE FUNCTION get_hist ( p_nid IN PLS_INTEGER
2                                     , p_disp_type IN VARCHAR2 DEFAULT
                                           WF_NOTIFICATION.doc_text )
                    RETURN VARCHAR2 AS
3   v_hist VARCHAR2(32767);
4 BEGIN
5   Wf_Notification.GetComments2 ( p_nid => p_nid
6                                , p_display_type => NVL(p_disp_type
                                      , WF_NOTIFICATION.doc_text)
7                                , p_hide_reassign => 'Y'
8                                , p_hide_requestinfo => 'Y'
9                                , p_action_history => v_hist );
10
11   RETURN v_hist;
12
13 END get_hist;
14*

APPS@SOLDEV2 on 18-SEP-2008 10:43:34> select get_hist(1574024) from dual;

GET_HIST(1574024)
————————————————————————————————————————
Action History
Num : Action Date : Action : From : To : Details
1 : 17-JUL-2008 12:03:45 : Submit : SYSADMIN : Searle, Matthew :
2 : 18-SEP-2008 10:21:00 : Request Information : Searle, Matthew : SEARLEM4B : Hello


From: Dmitry Lidvansky 19-Sep-08 10:10
Subject: Re : Re : how to select notification history (?)

3 v_hist VARCHAR2(32767);

that means notification history cannot be longer than 32767 ?
what if it will be so ?


From: Matthew Searle 22-Sep-08 11:50
Subject: Re : Re : Re : how to select notification history (?)

If it’s over 32767, then it will error :)

The API returns a VARCHAR2, so that’s the limit – I’ve not tested it to see what happens if it’s too long.

If you want something that will cater for something bigger than 32K then you will need to look at the underlying code and pick out the cursor(s) it uses, then use that instead.


So, if you need to know how to display the full history of a notification from the notification ID, that’s how to do it.

This entry was posted on Thursday, December 18th, 2008 at 7:24 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.

« The importance of spellchecking your code
ANSI Join Syntax »

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.