I can't remember but did 5.1 have the Alert Events form?  If so you could 
change your Perl to just do a submit to the Alert Events form and that will 
trigger the Alert to the user.  You don't have to actually call the 
NotificationServer call.

-----Original Message-----
From: Action Request System discussion list(ARSList) 
[mailto:[email protected]] On Behalf Of L G Robinson
Sent: Wednesday, June 02, 2010 9:08 AM
To: [email protected]
Subject: Trouble with ARSPerl ars_NTNotificationServer

Hi Folks,

I have run into a problem using the ARSPerl ars_NTNotificationServer
function. This function is used to forward a notification (Alert) for
the specified user to the indicated server. This has been working
correctly for me for years on my ARS 5.01.02 P1313 Solaris server
running against Sybase.

Last week I completed a migration to Oracle 10.2... same version of
ARS server. Now my ars_NTNotificationServer notifications are not
working correctly.

The notifications are getting created correctly and the user does
get the notification. The problem comes when the user attempts to
open the form entry from within the Remedy Windows Alert tool. The
indicated form entry is "not found".

Suspecting a database problem, I checked the SQL logs and I can see
what the problem is:

   SELECT C1,C2,C3,C4,C5,... FROM T233 WHERE C1 = '01373823       '

Note the additional blanks appended to the entry-id.

For this particular form, C1 has been redefined to have a length of
8, not the traditional 15 (I know, I know...). However, I confirmed
that this was working correctly when we were using Sybase. From the
Sybase SQL log:

   SELECT C1,C2,C3,C4,C5,... FROM T60 WHERE C1 = '01254551'

So it appears that the ARS server is generating incorrect SQL when
trying to access the relevant entry from the form. Every other SQL
reference to C1 on this form appears to be correct... only when
trying to load the record from the Alert tool does the problem
manifest itself.

For this Notification type (2) there is an additional string of
"notifyCodeText" that specifies the details of the form entry. The
format of the notifyCodeText (from the C-API programmer's Guide) is
as follows:

   A formatted character string identifying the form entry that
   triggered the notification (fixed-size fields).

   Entry-Id:
   The ID of the entry (padded to AR_MAX_ENTRYID_SIZE).The first two
   bytes of this string indicate the number of Entry IDs, and the
   Entry ID immediately follows this number. (For example, a single
   Entry ID of 0000000000000006 will have an Entry ID of
   010000000000000006 in the notifyCodeText). Join forms will have
   multiple Entry IDs, and the number of Entry IDs will be indicated
   in the first two bytes of this string.

[Note: In the example above (from the C-API Programmer's Guide)
there appears to be an "inconsistency". ar.h defines
AR_MAX_ENTRYID_SIZE as 15 while the example above shows an
entry-id of length 16! Very confusing. I am using 15]

   Schema:
   The name of the form containing the entry (padded to
   AR_MAX_NAME_SIZE).

   Server:
   The name of the server where the form is located.

I have tried left-adjusting and right-adjusting the Entry-Id within
the 15 character zone (AR_MAX_ENTRYID_SIZE), but neither works... it
just puts blanks on one side or the other, which fails as it gets to
the database server.

My notifyCodeText:

01       01373823X-Calls                       remedy.ncsu.edu
0101373823       X-Calls                       remedy.ncsu.edu

Here is a snippet of the XML export of the field definition of field
ID-1:

   <field>
      <definition xsi:type="character">
         <fieldName>Call-Id</fieldName>
         <fieldID>1</fieldID>
         <owner>Demo</owner>
         <lastModifiedBy>Demo</lastModifiedBy>
         <modifiedDate>2009-11-23T13:50:43-05:00</modifiedDate>
         <helpText>The system supplied unique call number (character 
format).</helpText>
         <changeHistory>
      <changeEntry userName="Demo" modifiedDate="1998-10-12T14:21:06-05:00">
         <entry>Added help text</entry>
      </changeEntry>
         </changeHistory>
         <entryMode>system</entryMode>
         <createMode>protected</createMode>
         <fieldMapping>
      <regular/>
         </fieldMapping>
         <modifyPermissionList>
      <modifyPermission>
         <groupID>0</groupID>
         <modifyRights>readOnly</modifyRights>
      </modifyPermission>
      <modifyPermission>
         <groupID>7</groupID>
         <modifyRights>readWrite</modifyRights>
      </modifyPermission>
      <modifyPermission>
         <groupID>11</groupID>
         <modifyRights>readWrite</modifyRights>
      </modifyPermission>
      <modifyPermission>
         <groupID>1074</groupID>
         <modifyRights>readWrite</modifyRights>
      </modifyPermission>
         </modifyPermissionList>
         <limits>

      [stuff removed]

      <maximumLength>8</maximumLength>
      <fullTextOption>none</fullTextOption>
      <queryByExample>leadingMatch</queryByExample>
      <menuStyle>overwrite</menuStyle>
         </limits>
      </definition>
   </field>

I realize that all of the NT* API calls have been replaced with Alert
stuff, but the ARSPerl API doesn't provide any way to use those
functions (that I know of).

Anyone have any suggestions?

Thanks.
Larry

Larry Robinson                                   [email protected]
Office of Information Technology
NC State University                              919-515-5432 Voice
Raleigh, NC  27695-7109                          919-513-0877 FAX

_______________________________________________________________________________
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org
attend wwrug10 www.wwrug.com ARSlist: "Where the Answers Are"

_______________________________________________________________________________
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org
attend wwrug10 www.wwrug.com ARSlist: "Where the Answers Are"

Reply via email to