Using the POSTRPT_DMN Application Engine Daemon Program

Using the PostReport PeopleCode class object implies that a PeopleCode function has been written using this class and is invoked either from an Application Engine or an Application Server.

Sending a single request through an Application Engine can incur a large overhead; therefore, we recommend running the program from PSDAEMON using the POSTRPT_DMN Application Engine program.

The POSTRPT_DMN program monitors for any requests to post by searching for new XML files in a designated directory. The XML file contains all the parameters required by the PostReport PeopleCode class object to post the request to the Report Repository. The program reads the parameters using the POST_REPORT_XML file layout. The following table shows a listing of these parameters:

XML Attribute Tag

Corresponding PostReport Attribute

Description

Data Type

Required

Notes

PRCSINSTANCE

ProcessInstance

Process instance

Integer

No

If no process instance is specified, the system assigns a new instance.

CONTENTID

ReportId

Content ID

Integer

No

A unique content ID is assigned for each valid request.

PRCSNAME

PrcsName

Process name

Character (12)

Yes

The process name must be defined in the Process Definition table.

PRCSTYPE

PrcsType

Process type

Character (30)

Yes

The process type must be defined in the Process Type Definition table.

REPORTPATH

SourceReportPath

Report directory

Character (254)

Yes

The full absolute path where files and reports are retrieved.

Note: After the Distribution Agent has transferred the files to the Report Repository, this directory is deleted.

CONTENT_DESCR

ReportDescr

Report description

Character (254)

Yes

The description that appears in Report Manager.

EXPIRATION_DATE

ExpirationDate

Expiration date

Date

No

In YYYYMMDD format. If not specified, the system uses the Retention Days value from System Settings.

FOLDER

ReportFolder

Folder name

Character (18)

No

If not specified, the system uses the default from the Report Folder Administration.

SERVER

ServerName

Process Scheduler server name

Character (8)

Yes

You must define the server name specified in the Server Definition table.

OUTDESTFORMAT

OutDestFormat

Output destination format

Character (3)

No

See the following tablefor valid values.

DISTIDTYPE

Passed as the first parameter of the AddDistributionOption method of the PostReport class

Identifier specified if the DISTID value is either User or Role.

Character (30)

Yes

The value is either USER, which indicates a user ID, or ROLE, which indicates a role ID.

DISTID

Passed as the second parameter of the AddDistributionOption method of the PostReport class

User or Role authorized to view the report

Character (30)

Yes

For the POSTRPT_DMN program to process a request using the PostReport PeopleCode class example above, you must create an XML file using the following content:

<?xml version="1.0"?>
<CONTENTINFO>
   <PRCSNAME>XRFWIN</PRCSNAME>
   <PRCSTYPE>SQR REPORT</PRCSTYPE>
   <CONTENT_DESCR>New SQR Report</CONTENT_DESCR>
   <REPORTPATH>\\server9000\report\sqr_xrfwin</REPORTPATH>
   <OUTDESTFORMAT>PDF</OUTDESTFORMAT>
   <FOLDER>SQR Reports</FOLDER>
   <SERVER>PSNT</SERVER>
   <AUTHORIZED_LIST>
       <DISTID>VP1</DISTID>
       <DISTIDTYPE>USER</DISTIDTYPE>
		</AUTHORIZED_LIST>
		<AUTHORIZED_LIST>
       <DISTID>Managers</DISTID>
       <DISTIDTYPE>ROLE</DISTIDTYPE>
   </AUTHORIZED_LIST>
</CONTENTINFO>

Output Destination Format Values

The OUTDESTFORMAT attribute can contain either the value of the file extension or the numeric value of the format, as shown in the following table:

Format

Format Extension

Numeric Value

Acrobat PDF

PDF

2

Delimited Files

CSV

3

HP Format

HP

4

HTML

HTM

5

Line Printer

LP

6

MS Excel Spreadsheet

XLS

8

MS WinWord Document

DOC

9

PostScript

PS

10

Rich Text Format

RTF

12

SQR Format

SPF

13

Text

TXT

14

XML

XML

17

DataMover Data File

DAT

18

Other

OTHER

14