Process Request Classes

This chapter provides an overview of the process request classes and discusses the following topics:

Click to jump to parent topicUnderstanding Process Request Classes

The ProcessRequest class provides properties and a method for scheduling a pre-defined process or job. You must define the process or the job (using Process Scheduler Manager) before you can schedule it using the ProcessRequest class.

The properties of this class contain the same values as those required by Process Scheduler Manager for scheduling a process or job. Values you provide for these properties may override the equivalent values set in Process Scheduler Manager, depending on the override settings you make in PeopleSoft Process Scheduler pages.

Starting with PeopleSoft 8.4, PeopleSoft supports only the ProcessRequest class to schedule a process or a job in PeopleCode. The ScheduleProcess PeopleCode function is no longer supported. Any existing PeopleCode functions containing this deprecated function must be modified to use the ProcessRequest class to schedule a request.

This chapter assumes that the reader has working knowledge of PeopleSoft Process Scheduler.

See Also

PeopleTools 8.52: PeopleSoft Process Scheduler

Click to jump to parent topicData Type of a ProcessRequest Object

A ProcessRequest object is declared using the ProcessRequest data type. For example:

Local ProcessRequest &RQST;

Click to jump to parent topicScope of a ProcessRequest Object

A ProcessRequest object can be instantiated only from PeopleCode. However, if you need to access the Process Schedule Manager from outside of PeopleCode, for example, in a Visual Basic program, you can use the Process Schedule Manager API.

This object can be used anywhere you have PeopleCode, that is, in an application class, Component Interface PeopleCode, record field PeopleCode, and so on.

See Also

PeopleTools 8.52: PeopleSoft Process Scheduler

Click to jump to parent topicOptions for Items In Jobs and Jobsets

A key feature of PeopleSoft Process Scheduler is the option to create a Job Definition consisting of other jobs. A job containing a job is called a jobset. Process Scheduler Server schedules the items within these jobs according to how the jobset is defined through the Process Scheduler Manager.

The ProcessRequest class requires the following properties to handle jobsets:

The following is a simple example of a job containing only a single process:

Process

PrcsItemLevel

JobName

JobSeqNo

3SQR

0

 

0

XRFAPFL

1

3SQR

1

XRFPANEL

2

3SQR

2

XRFPCFL

3

3SQR

3

The following is an example of a jobset containing multiple jobs:

Process

PrcsItemLevel

JobName

JobSeqNo

MULTIJOB

0

 

0

AP_APY2015

1

MULTIJOB

1

AP_PSTPYMNT

1

MULTIJOB

2

BI JOBS

1

MULTIJOB

3

BIJOB01

2

BI JOBS

1

BIIVC000

3

BIJOB01

1

BIIVCLN

3

BIJOB01

2

BIIVCPN

3

BIJOB01

3

BIIVCEN

3

BIJOB01

4

BIJOB02

2

MULTIJOB

2

BIIVC000

3

BIJOB02

1

BIIVCLC

3

BIJOB02

2

BIIVCPC

3

BIJOB02

3

BIIVCEN

3

BIJOB02

4

BIJOB03

2

MULTIJOB

3

BIIVC000

3

BIJOB03

1

BIIVCLN

3

BIJOB03

2

BIIVCPN

3

BIJOB03

3

BIIVCEN

3

BIJOB03

4

BICURCNV

3

BIJOB03

5

BILDAR01

3

BIJOB03

6

BILDGL01

3

BIJOB03

7

BIGNAP01

3

BIJOB03

8

All the class methods that are used to change options for items within a job or jobset, use these attributes as optional parameters.

If a method is used without specifying any of these parameters, the system assumes the changes apply to all items within a jobset.

If one or more of these attributes are specified, the method applies the changes to items matching the value of these attributes.

In the case where a JobName is specified, the changes apply to all items within the specified job.

Specific methods used to manipulate options within a job or jobset include:

When manipulating the options within a job or jobset, you must specify the process type and process name in the CreateProcessRequest function when instantiating a ProcessRequest object. This is required as the class needs to retrieve the job item information from the job definition for a specific job or jobset. The class uses this information to alter items within the job or jobset based on subsequent method calls made prior to scheduling the request. If the process type and process name are not specified when instantiating the ProcessRequest object, all PeopleCode programs trying to use any of the methods return an error message:

The method can not be used because the ProcessRequest is not properly initialized

In the previous jobset example, the ProcessRequest must be instantiated as follows:

Local ProcessRequest &RQST; &RQST = CreateProcessRequest("PSJob", "MULTIJOB");

The following code examples use the previous example MULTIJOB, and show how items can be altered within a job or jobset:

Click to jump to parent topicValues for Output Type and Format

The values for output type and format are based on the generic process type assigned to a process type definition. The following table provides a cross-reference listing for all delivered process type definitions.

Generic Process Type

Process Type

AppEngine

Application Engine, Optimization Engine

COBOL

COBOL SQL

Crystal

Crystal, Crystal Check

Cube

CubeBuilder, HyperCube Builder

SQR

SQR Process, SQR Report

Winword

Winword

nVision

nVision, nVision-Report, nVision-ReportBook

Data Mover

Data Mover

Other

Essbase

The following table lists all the values for OutDestType delivered with PeopleTools.

However, the values and defaults can be customized through Process Scheduler Manager. Please refer to the PeopleSoft Process Scheduler documentation for additional information on how to accurately determine the values for your system.

Generic ProcessType

Valid OutDestTypes

Defaults

AppEngine

FILE, WEB, WINDOW

WEB

COBOL

NONE, WINDOW, WEB

NONE

Crystal

WEB, WINDOW, EMAIL, FILE, PRINTER

WEB

Cube

NONE

NONE

nVision

WEB, WINDOW, EMAIL, FILE, PRINTER, DEFAULT

DEFAULT

SQR

WEB, WINDOW, EMAIL, FILE, PRINTER

WEB

WinWord

WINDOW, WEB

WEB

Data Mover

WEB,WINDOW, FILE

WEB

OTHER

WEB, WINDOW, EMAIL, FILE, PRINTER, NONE

NONE

Similar to the OutDestType, the formats and defaults for a generic process type can be customized through Process Scheduler Manager. The following table lists the values and defaults as delivered.

Generic ProcessType

OutDestType

Valid OutDestFormats

Default

AppEngine

WINDOW

PDF, XLS, TXT, HTM

TXT

AppEngine

FILE

PDF, XLS, TXT, HTM

TXT

AppEngine

WEB

PDF, XLS, TXT, HTM

TXT

COBOL

NONE

NONE

NONE

COBOL

WEB

TXT

TXT

COBOL

WINDOW

TXT

TXT

Crystal

PRINTER

RPT

RPT

Crystal

FILE

RPT, RTF, TXT, PDF, HTM, XLS, DOC

PDF

Crystal

WINDOW

RPT, RTF, TXT, PDF, HTM, XLS, DOC

PDF

Crystal

WEB

RPT, RTF, TXT, PDF, HTM, XLS, DOC

PDF

Crystal

EMAIL

RPT, RTF, TXT, PDF, HTM, XLS, DOC

PDF

Cube

NONE

NONE

NONE

Data Mover

FILE

TXT

TXT

Data Mover

WINDOW

TXT

TXT

Data Mover

WEB

TXT

TXT

nVision

EMAIL

HTM, XLS

XLS

nVision

FILE

HTM, XLS

XLS

nVision

PRINTER

HTM, XLS

XLS

nVision

WINDOW

HTM, XLS

XLS

nVision

WEB

HTM, XLS

XLS

nVision

DEFAULT

DEFAULT

DEFAULT

SQR

EMAIL

CSV, HP, HTM, LP, PDF, PS, SPF,OTHER

PDF

SQR

FILE

CSV, HP, HTM, LP, PDF, PS, SPF,OTHER

PDF

SQR

PRINTER

HP, LP, PS, WP

PS

SQR

WEB

CSV, HP, HTM, LP, PDF, PS, SPF,OTHER

WEB

SQR

WINDOW

CSV, HP, HTM, LP, PDF, PS, SPF,OTHER

WEB

WinWord

NONE

NONE

NONE

WinWord

WEB

DOC

DOC

WinWord

WINDOW

DOC

DOC

OTHER

NONE

NONE

NONE

Click to jump to parent topicAlternative Options to Specify Email or Web Attributes

To set the email or web attributes in PeopleTools versions prior to release 8.4, your PeopleCode program was similar to the following:

To Set Attributes for Web (Prior to 8.4)

The following example shows how to set web attributes in PeopleTools versions prior to release 8.4:

&RQST.OutDestType = "Web"; &RQST.OutDestFormat = "PDF"; &RQST.OutDest = "User : VP1,Role :Managers";

Set Attributes for Email (Prior to 8.4)

The following example shows how to set email attributes in PeopleTools versions prior to release 8.4:

Local string &Subject ; Local string &Text; &Subject = "SQR Report: Cross Reference Listing"; &Text = "This text will be displayed as the text of this email "; &RQST.OutDestType = "Email"; &RQST.OutDestFormat = "PDF"; &RQST.OutDest = "User : VP1,Role : MANAGERS"; &RQST.EmailSubject = &Subject; &RQST.EmailText = &Text; &RQST.EmailAttachLog = False;

Set Attribute for Web (8.4 and Later)

The following example shows how to set web attributes in PeopleTools versions release 8.4 and later:

&RQST.SetOutputOption("Web", "PDF", ""); &RQST.AddDistributionOption("User", "QEDMO"); &RQST.AddDistributionOption("Role", "MANAGERS");

Set Attribute for Email (8.4 and Later)

The following example shows how to set web attributes in PeopleTools versions release 8.4 and later:

Local string &Subject ; Local string &Text; &Subject = "SQR Report: Cross Reference Listing"; &Text = "This text will be displayed as the text of this email "; &RQST.SetOutputOption("Email", "PDF", ""); &RQST.SetEmailOption(&Subject, &Text, "abc@xyz.com", "False", "False"); &RQST.AddDistributionOption("User", "QEDMO"); &RQST.AddDistributionOption("Role", "MANAGERS");

Click to jump to parent topicFile Dependant Processing

You can define a process to be file dependent, which means associating a file with a process that gets scheduled once the system detects the presence of the file.

You can use the PrcsApi class methods for detecting files associated with a process, as well as for displaying additional messages about the process as it's running.

The PrcsApi class is an Application Package class that you must import into your PeopleCode in order to use its methods.

For example, you could use the PrcsApi class with a Application Engine program. In the Application Engine process PROCESS_EDI, you could create a file dependency (using the FileName ProcessRequest property) and make the process dependent on the file /vendor/edi*.data.

On 10/23, the system detects the file /vendor/edi_1023.data and schedules the process PROCESS_EDI. In the Application Engine program, you can refer to the file that started the process using the getAllFileNames PrcsApi class method.

On 10/24, the system detects the file /vendor/edi_1024.data and schedules the process PROCESS_EDI. The process is started from a different file, and can access that file, so duplicate processing doesn't occur.

See Also

PrcsApi Class

Click to jump to parent topicProcessRequest Class Built-in Functions

CreateProcessRequest

GetNextProcessInstance

SetupScheduleDefnItem

Click to jump to parent topicProcessRequest Class Methods

In this section, we discuss the ProcessRequest class methods. The methods are discussed in alphabetical order.

Click to jump to top of pageClick to jump to parent topicAddDistributionOption

Syntax

AddDistributionOption(DistIdType, DistId [, JobName] [, PrcsItemLevel] [, JobSeqNo] [, ItemJobSeq])

Description

Use the AddDistributionOption method to set the distribution options for any job item in the main job. Distribution options enable you to distribute output in different formats (HTML, PDF, Excel, and so on) to other users based on their user ID or role ID.

This function is valid only if the output destination for the request is routed either to Web or Email.

Parameters

DistIdType

Specify the distribution ID type as a string. This identifies if the value passed in the DistID is either a user or role. Values for this parameter are:

  • User

  • Role

DistID

Specify the distribution ID as a string.

JobName

Specify the name of the job that this item belongs to as a string.

PrcsItemLevel

Specify the job item's process item level within the main job as a number.

JobSeqNo

Specify the job item's job sequence number within the process item level as a number.

ItemJobSeq

Specify the job item’s sequence within its parent job as a number

Returns

Returns a number: 0 if successful, 1 if system detected an error in the parameter passed.

Example

The following example grants access to the QEDMO user all reports in MULTIJOB from the Web, while users with role of MANAGERS have access to reports created in the BIJOB03 job.

&RQST.SetOutputOption("Web", "PDF", ""); &RQST.AddDistributionOption("User", "QEDMO", "MULTIJOB" ); &RQST.AddDistributionOption("Role", "MANAGERS", "BIJOB03");

See Also

ProcessRequest class: SetEmailOption method, SetOutputOption method.

Click to jump to top of pageClick to jump to parent topicAddNotifyInfo

Syntax

AddNotifyInfo(field_name, field_value [, JobName] [, PrcsItemLevel] [, JobSeqNo])

Description

Use the AddNotifyInfo method to specify name-value pair data to be included in the process status notification message.

Parameters

field_name

Specify the field name data as a string.

field_value

Specify the field value data as a string.

JobName

Specify the name of the job that this item belongs to as a string.

PrcsItemLevel

Specify the job item's process item level within the main job as a number.

JobSeqNo

Specify the job item's job sequence number within the process item level as a number.

Returns

None.

Example

&RQST.AddNotifyInfo("AEMINITEST Name", "Status"); &RQST.AddNotifyInfo("AEMINITEST Descr", "Status Notify"); &RQST.AddNotifyInfo("AEMINITEST OutType", "EMAIL");

See Also

SetNotifyAppMethod, SetNotifyService.

Click to jump to top of pageClick to jump to parent topicPrintJobHTMLRpt

Syntax

PrintJobHTMLRpt()

Description

Use the PrintJobHTMLRpt method to generate an HTML report file displaying all items in a job or jobset in a tree as defined in the Job Definition component.

Parameters

None.

Returns

An HTML report as a string

Example

The following code:

Local ProcessRequest &JobRQST; Local string &sHTML; &JobRQST = CreateProcessRequest("PSJob", "SQRXRF"); &sHTML = &JobRQST.PrintJobHTMLRpt();

generates the following HTML file:

Example HTML file

See Also

ProcessRequest class: PrintJobRqstRpt method, PrintSchdlHTMLRpt method.

Click to jump to top of pageClick to jump to parent topicPrintJobRqstRpt

Syntax

PrintJobRqstRpt(ProcessInstance, ItemInstance [, PrintJobTree] [, PrintDistList] [, PrintNotifyList] [, PrintSystemMessage] [, PrintApplicationMessage] [, PrintParamList])

Description

Use the PrintJobRqstRpt method to generate an HTML report file displaying the current status of a specific process, job, or jobset.

Parameters

ProcessInstance

Specify the ProcessInstance number assigned to the process, job, or jobset

ItemInstance

Specify either to display all items in a job or jobset, or just a specific item.

  • To display all items, specify 0.

  • To display a specific item, specify the ProcessInstance number assigned to that item.

    For a process, set this parameter to 0.

PrintJobTree

Specify whether to have the job tree displayed in the HTML report. This parameter takes a string value:

  • "1" to display the tree.

  • "0" to not display the tree.

    Default value is "1".

PrintDistList

Specify whether you want the list of Users and Roles who will be the recipient of a report generated for a job item displayed in the HTML report. This parameter takes a string value:

  • "1" to display the list.

  • "0" to not display the list.

    Default value is "0".

PrintSystemMessage

Specify whether you want to have the message specified from the Process Definition or Job Definition page displayed in the HTML report. This parameter takes a string value:

  • "1" to display the system message.

  • "0" to not display the system message.

    Default value is "0".

PrintApplicationMessage

Specify whether you want the application messages displayed in the HTML report. These are the application messages that can be viewed from the Message Log subpage of the Process Monitor Detail page. This parameter takes a string value:

  • "1" to display application messages.

  • "0" to not display application messages.

    Default value is "0".

PrintParamList

Specify whether you want the parameter list for a job item displayed in the HTML report. This parameter takes a string value:

  • "1" to display the parameter list.

  • "0" to display the parameter list.

    Default value is "0".

Returns

An HTML report as a string.

Example

The following PeopleCode program:

Local ProcessRequest &JobRQST; Local string &sHTML; Local string &sPRINT_JOBTREE; Local string &sPRINT_DISTLIST; Local string &sPRINT_SYSMESSAGE; Local string &sPRINT_APPLMESSAGE; Local string &sPRINT_PARAMLIST; &sPRINT_JOBTREE = "0"; &sPRINT_DISTLIST = "1"; &sPRINT_SYSMESSAGE = "1"; &sPRINT_APPLMESSAGE = "1"; &sPRINT_PARAMLIST = "1"; &JobRQST = CreateProcessRequest(); &sHTML = &JobRQST.PrintJobRqstRpt(PMN_PRCSLIST.PRCSINSTANCE, 0, &sPRINT_JOBTREE,⇒ &sPRINT_DISTLIST, &sPRINT_SYSMESSAGE, &sPRINT_APPLMESSAGE, &sPRINT_PARAMLIST);

Creates the following HTML report:

Example HTML report

See Also

ProcessRequest class: PrintJobHTMLRpt method, PrintSchdlHTMLRpt method.

Click to jump to top of pageClick to jump to parent topicPrintSchdlHTMLRpt

Syntax

PrintSchdlHTMLRpt([PrintJobTree] [, PrintDistList] [, PrintNotifyList] [, PrintMessageList] [, PrintParamList])

Description

Use the PrintSchdlHTMLRpt method to generate an HTML report file displaying all items in a job or jobset as defined in the Scheduled Jobset Definition component.

Parameters

PrintJobTree

Specify whether to have the job tree displayed in the HTML report. This parameter takes a string value:

  • "1" to display the tree.

  • "0" to not display the tree.

    Default value is "1".

PrintDistList

Specify whether you want the list of Users and Roles who will be the recipient of a report generated for a job item displayed in the HTML report. This parameter takes a string value:

  • "1" to display the list.

  • "0" to not display the list.

    Default value is "0".

PrintNotifyList

Specify whether you want the list of Users and Roles who will be notified for the status of a job item displayed in the HTML report. This parameter takes a string value:

  • "1" to display the list.

  • "0" to not display the list.

    Default value is "0".

PrintMessageList

Specify whether you want the messages that will be emailed upon completion of a job item displayed in the HTML report. This parameter takes a string value:

  • "1" to display messages.

  • "0" to not display messages.

    Default value is "0".

PrintParamList

Specify whether you want the parameter list for a job item displayed in the HTML report. This parameter takes a string value:

  • "1" to display the parameter list.

  • "0" to display the parameter list.

    Default value is "0".

Returns

An HTML report as a string

Example

The following code:

Local string &sHTML; Local string &sPRINT_JOBTREE; Local string &sPRINT_DISTLIST; Local string &sPRINT_NOTIFYLIST; Local string &sPRINT_MESSAGELIST; Local string &sPRINT_PARAMLIST; &sPRINT_JOBTREE = "1"; &sPRINT_DISTLIST = "0"; &sPRINT_NOTIFYLIST = "0"; &sPRINT_MESSAGELIST = "0"; &sPRINT_PARAMLIST = "0"; &JobRQST = SetupScheduleDefnItem("Sample", "MULTIJOB"); &sHTML = &JobRQST.PrintSchdlHTMLRpt(&sPRINT_JOBTREE, &sPRINT_DISTLIST, &sPRINT_⇒ NOTIFYLIST, &sPRINT_MESSAGELIST, &sPRINT_PARAMLIST);

Creates the following HTML report:

Example HTML report

See Also

ProcessRequest class: PrintJobHTMLRpt method, PrintJobRqstRpt method.

Click to jump to top of pageClick to jump to parent topicRunJobSetNow

Syntax

RunJobSetNow()

Description

Use the RunJobSetNow method to schedule a jobset based on settings defined in the Scheduled Jobset Definition component.

Parameters

None.

Returns

None. To verify that the method executed successfully, check the value of the Status property.

Example

/* Create the ProcessRequest Object & Run the Scheduled JobSet Now */ Local ProcessRequest &JobRQST; Local integer &instanceList; &JobRQST = SetupScheduleDefnItem("Sample","MULTIJOB"); &JobRQST.RunJobSetNow(); &instanceList = &JobRQST.ProcessInstance;

See Also

ProcessRequest class: Status property.

Click to jump to top of pageClick to jump to parent topicSchedule

Syntax

Schedule()

Description

Use the Schedule method to insert a request in the Process Request table which runs according to the values in the properties of the ProcessRequest object. To successfully schedule a process or job, certain properties are required.

Parameters

None.

Returns

None. To verify that the method executed successfully, check the value of the Status property.

Example

&MYRQST.Schedule(); If &MYRQST.Status = 0 then /* Schedule succeeded. */ Else /* Process (job) not scheduled, do error processing */ End-If;

See Also

ProcessRequest class: RunControlID property, JobName property, ProcessName property, ProcessType property, Status property.

CreateProcessRequest

Click to jump to top of pageClick to jump to parent topicSetEmailOption

Syntax

SetEmailOption(EmailSubject, EmailText, EmailAddress, EmailWebReport, EmailAttachLog [, JobName] [, PrcsItemLevel] [, JobSeqNo] [, ItemJobSeq])

Description

Use the SetEmailOption method to set the email options for all job items in the main job.

Parameters

EmailSubject

Specify the text used in the subject of the email sent at completion of this job email subject as a string. You can specify a Null ("") for this parameter.

EmailText

Specify the email text sent at completion of this job as a string. You can specify a Null ("") for this parameter.

EmailAddress

Specify the email address of the person you want an email sent to at the completion of this job. To send more than one email address, separate the addresses with a semicolon.

EmailWebReport

Specify whether to attach the web report to the email sent at the completion of this job. This parameter takes a string value: "True", attach the web report, "False", don't attach the web report. This parameter can be set only to "True" when the OutDestType property for the request is "Web".

EmailAttachLog

Specify whether to attach the log file to the email sent at the completion of this job. This parameter takes a string value: "True", attach the log file, "False", don't attach the log file.

JobName

Specify the name of the job that this item belongs to as a string.

PrcsItemLevel

Specify the job item's process item level within the main job as a number.

JobSeqNo

Specify the job item's job sequence number within the process item level as a number.

ItemJobSeq

Specify the job item’s sequence within its parent job as a number

Returns

None.

See Also

ProcessRequest class: SetItemFolder method, SetOutputOption method, AddDistributionOption method.

Click to jump to top of pageClick to jump to parent topicSetItemFolder

Syntax

SetItemFolder(PortalFolder [, JobName] [, PrcsItemLevel] [, JobSeqNo] [, ItemJobSeq])

Description

Use the SetItemFolder method to associate a report folder with any job items jobset.

The folder that you specify must have already been created using the System Settings component in Process Scheduler Manager.

Parameters

PortalFolder

Specify the name of the report folder to use for the job item as a string. The folder that you specify must have already been created using Report Manager.

JobName

Specify the name of the job that this item belongs to as a string.

PrcsItemLevel

Specify the job item's process item level within the main job as a number.

JobSeqNo

Specify the job item's job sequence number within the process item level as a number.

ItemJobSeq

Specify the job item’s sequence within its parent job as a number

Returns

None.

Example

&RQST.SetItemFolder("GENERAL", "MULTIJOB", 1, 2);

See Also

ProcessRequest class: AddDistributionOption method.

Click to jump to top of pageClick to jump to parent topicSetNotifyAppMethod

Syntax

SetNotifyAppMethod(app_class_name, app_class_method [, JobName] [, PrcsItemLevel] [, JobSeqNo])

Description

Use the SetNotifyAppMethod method to invoke your own custom application class and method to handle process status notification and the information you want to send. This method triggers the delivered PRCS_STATUS_OPER service operation, which invokes the custom method.

Important! The constructor for the application class cannot require parameters.

Note. Alternatively, you can create a custom service operation and trigger that service operation using the SetNotifyService method. Your PeopleCode program should call only one of these methods: either SetNotifyAppMethod or SetNotifyService. If both methods are used, the last method called takes precedence over the former.

Parameters

app_class_name

Specify the fully qualified application class name to be invoked on the target system as a string.

app_class_method

Specify the name of the method to be invoked on the target system as a string.

JobName

Specify the name of the job that this item belongs to as a string.

PrcsItemLevel

Specify the job item's process item level within the main job as a number.

JobSeqNo

Specify the job item's job sequence number within the process item level as a number.

Returns

None.

Example

The following example contains two programs. The first program generates the process request setting process status notification through the SetNotifyAppMethod method. The second program defines the application class and method that does additional processing after the status notification has been received by the subscribing system.

Setting process status notification:

/*********************************************************************** * Construct a ProcessRequest Object. * ***********************************************************************/ &RQST = CreateProcessRequest(); &RQST.ProcessType = "Application Engine"; &RQST.Processname = "AEMINITEST"; &RQST.RunControlID = "AEMINI"; &RQST.OutDestType = "WEB"; &RQST.OutDestFormat = "PDF"; &RQST.NotifyTextMsgSet = 65; &RQST.NotifyTextMsgNum = 237; &RQST.RunDateTime = %Datetime; &RQST.TimeZone = %ServerTimeZone; &RQST.SetNotifyAppMethod("RECEIVE_NOTIFICATION:ProcessNotification", ⇒ "ReceiveNotification"); &RQST.AddNotifyInfo("AEMINITEST Name", "Status"); &RQST.AddNotifyInfo("AEMINITEST Descr", "Status Notify"); &RQST.AddNotifyInfo("AEMINITEST OutType", "EMAIL"); &RQST.Schedule(); &PRCSSTATUS = &RQST.Status; &PRCSINSTANCE = &RQST.ProcessInstance; If &PRCSSTATUS = 0 Then MessageBox(%MsgStyle_OK, "", 65, 366, "Process Instance", ⇒ "AEMINITEST", &PRCSINSTANCE); Else MessageBox(%MsgStyle_OK, "", 65, 0, "Process Instance", ⇒ "Process Not submitted"); End-If;

Application class and method definition:

class ProcessNotification method ProcessNotification(); method ReceiveNotification(&_MSG As Message); end-class; /* Class constructor can have no parameters */ method ProcessNotification end-method; method ReceiveNotification /+ &_MSG as Message +/ Local Rowset &rs_msg, &NotifyInfo; Local Message &message; Local string &sName, &sValue, &sName2, &sValue2; &rs_msg = &_MSG.GetRowset(); /*************************************************************/ /* Add logic you want to execute upon receiving notification */ /* For example : */ /* &RQST.SetNotifyAppMethod("RECEIVE_NOTIFICATION: */ /* ProcessNotification", "ReceiveNotification"); */ /* &RQST.AddNotifyInfo("SQR Report", "XRFMENU"); */ If &rs_msg(1).PRCS_STATUS.RUNSTATUS.Value = "9" Then /* process ran to success */ &NotifyInfo = &rs_msg.GetRow(1).GetRowset(Scroll.PRCSNOTIFYATTR); /* if you have more name-value pairs */ /* add code to traverse the rows from the PRCSNOTIFYATTR rowset*/ /* e.g. Get the first name-value pair */ &sName = &NotifyInfo(1).PRCSNOTIFYATTR.PRCS_ATTRIBUT_NAME.Value; &sValue = &NotifyInfo(1).PRCSNOTIFYATTR.PRCS_ATTRIBUT_VALU.Value; /* e.g. submit a process request */ Local number &PrcsInstance; Local ProcessRequest &RQST; &RQST = CreateProcessRequest(); &RQST.ProcessType = &sName; &RQST.ProcessName = &sValue; &RQST.RunControlID = "test"; &RQST.RunLocation = "PSNT"; &RQST.OutDestType = "WEB"; &RQST.OutDestFormat = "PDF"; &RQST.RunDateTime = %Datetime; &RQST.TimeZone = %ServerTimeZone; &RQST.Schedule(); Else /* other processing */ End-If; /*************************************************************/ end-method

See Also

AddNotifyInfo, SetNotifyService.

Application Classes

Using Process Status Notifications

Click to jump to top of pageClick to jump to parent topicSetNotifyService

Syntax

SetNotifyService(srvc_op_name[, JobName] [, PrcsItemLevel] [, JobSeqNo])

Description

Use the SetNotifyService method to invoke your own custom service operation to handle process status notification and the information you want to send. Your custom service operation must use the PRCS_STATUS_MSG message definition.

Note. Alternatively, you can create a custom application class and method and invoke that method using the SetNotifyAppMethod method. Your PeopleCode program should call only one of these methods: either SetNotifyAppMethod or SetNotifyService. If both methods are used, the last method called takes precedence over the former.

Parameters

srvc_op_name

Specify the name of the custom service operation as a string.

JobName

Specify the name of the job that this item belongs to as a string.

PrcsItemLevel

Specify the job item's process item level within the main job as a number.

JobSeqNo

Specify the job item's job sequence number within the process item level as a number.

Returns

None.

Example

/*********************************************************************** * Construct a ProcessRequest Object. * ***********************************************************************/ &RQST = CreateProcessRequest(); &RQST.ProcessType = "Application Engine"; &RQST.Processname = "AEMINITEST"; &RQST.RunControlID = "AEMINI"; &RQST.OutDestType = "WEB"; &RQST.OutDestFormat = "PDF"; &RQST.NotifyTextMsgSet = 65; &RQST.NotifyTextMsgNum = 237; &RQST.RunDateTime = %Datetime; &RQST.TimeZone = %ServerTimeZone; &RQST.SetNotifyService("PRCS_STATUS_OPER_TEST"); &RQST.AddNotifyInfo("AEMINITEST Name", "Status"); &RQST.AddNotifyInfo("AEMINITEST Descr", "Status Notify"); &RQST.AddNotifyInfo("AEMINITEST OutType", "EMAIL"); &RQST.Schedule(); &PRCSSTATUS = &RQST.Status; &PRCSINSTANCE = &RQST.ProcessInstance; If &PRCSSTATUS = 0 Then MessageBox(%MsgStyle_OK, "", 65, 366, "Process Instance", ⇒ "AEMINITEST", &PRCSINSTANCE); Else MessageBox(%MsgStyle_OK, "", 65, 0, "Process Instance", ⇒ "Process Not submitted"); End-If;

See Also

AddNotifyInfo, SetNotifyAppMethod.

Implementing Handlers Using Application Classes, Adding Service Operation Definitions.

Using Process Status Notifications

Click to jump to top of pageClick to jump to parent topicSetOutputOption

Syntax

SetOutputOption(OutputType, OutputFormat, OutputDest [, JobName] [, PrcsItemLevel] [, JobSeqNo] [, ItemJobSeq])

Description

Use the SetOutputOption method to modify the output option of one or more job items in the main job.

Note. This method can also be used for a single process.

The job sequence number and job level are optional. They are required only when the same process name is referenced more than once in a job and the user intends to modify the output option of only one item.

If the ProcessRequest object contains an invalid output type for a process, you won't be able to successfully schedule a process or job.

The values for OutputType, OutDestFormat, and OutputDestination are dependent upon each other as well as on other values.

See Values for Output Type and Format.

Parameters

OutputType

Specify the output type as a string.

OutputFormat

Specify the output format as a string.

OutputDestination

Specify the output destination as a string.

JobName

Specify the name of the job that this item belongs to as a string.

PrcsItemLevel

Specify the job item's process item level within the main job as a number.

JobSeqNo

Specify the job item's job sequence number within the process item level as a number.

ItemJobSeq

Specify the job item’s sequence within its parent job as a number

Returns

None.

Example

&RQST.SetOutputOption("Email", "HTM", "", "MULTIJOB", 1, 2);

See Also

ProcessRequest class: OutDest property, OutDestFormat property, OutDestType property.

Click to jump to top of pageClick to jump to parent topicUpdateRunStatus

Syntax

UpdateRunStatus()

Description

Use the UpdateRunStatus method to change the RunStatus for a specific process, job, or jobset.

Parameters

None.

Returns

None.

Example

Local ProcessRequest &RQST; &RQST = CreateProcessRequest(); &RQST.ProcessInstance = 5; &RQST.RunStatus = 1; /* Cancel the request */ &RQST.UpdateRunSttus();

See Also

ProcessRequest class: RunStatus property.

Click to jump to parent topicProcessRequest Class Properties

In this section, we discuss the ProcessRequest class properties. The properties are discussed in alphabetical order.

Click to jump to top of pageClick to jump to parent topicEmailAttachLog

Description

This property specifies whether or not a log file is attached to the email sent at completion of this job (or process). This property takes a Boolean value.

This property is read-write.

Example

&RQST.EmailAttachLog = False; /* Do not attach Log File */

Click to jump to top of pageClick to jump to parent topicEmailSubject

Description

This property specifies the text used in the subject of the email sent at completion of this job (or process). This property takes a string value.

This property is read-write.

Example

&RQST.EmailSubject = "SQR Report: Cross Reference Listing";

Click to jump to top of pageClick to jump to parent topicEmailText

Description

This property specifies the text of the email sent at the completion of this job (or process). This property takes a string value.

This property is read-write.

Example

&RQST.EmailText = "This text will be displayed as the text of this email ";

You can also use the text from a message in the message catalog for this property.

&RQST.EmailText = MsgGetText(65, 117, "Sample text for email with two parameters",⇒ &MessageParm1, &MessageParm2);

Click to jump to top of pageClick to jump to parent topicEmailWebReport

Description

This property specifies whether an email is sent to recipients of the report after it is posted to the report repository. The URL for the report is included in the email. This option is applicable only when the OutDesType for the request is Web. This property takes a Boolean value: True, the web report should be attached, False otherwise.

This property is read-write.

Click to jump to top of pageClick to jump to parent topicFileName

Description

This property contains the name of a file to be used with file dependant processing, that is, processes which are initiated only after a file becomes available.

For a file dependent process, the FileName property is set to override the file name specified in the process definition. You must specify the complete file path and extension for the file, as a string.

This property works with the RunLocation property. If you don't specify a run location, any value assigned to this property is ignored.

This property is read-write.

Example

The following code example initiates QE_AETESTPRG once the c:\import\ediData.dat file becomes available on PSNT server.

Local ProcessRequest &rqst1; &rqst1 = CreateProcessRequest(); &rqst1.RunControlId = "2"; &rqst1.ProcessType = "Application Engine"; &rqst1.ProcessName = "QE_AETESTPRG"; &rqst1.RunLocation = "PSNT"; &rqst1.FileName="c:\import\ediData.dat"; &rqst1.Schedule();

See Also

ProcessRequest class: RunLocation property.

Setting Process Definition Options

Click to jump to top of pageClick to jump to parent topicJobName

Description

This property contains the name of a job that you’ve defined in PeopleSoft Process Scheduler.

To schedule a job, you must assign values to JobName and RunControlID for the Schedule method to succeed.

If you’re scheduling a job, you don’t need to set the ProcessType property.

This property is read-write.

Example

&MYRQST.JobName = "3SQR";

See Also

ProcessRequest class: RunControlID property.

Click to jump to top of pageClick to jump to parent topicLanguageCd

Description

This property enables you to specify a language code for the process or job. If you don't specify a language code, PeopleSoft Process Scheduler first looks in the process run control table to retrieve a language code. If there isn't a value there, PeopleSoft Process Scheduler uses the user's language code specified in the User Definition table.

This property takes a string value.

This property is read-write.

Example

&MYRQST.LanguageCd = "ESP" /* Spanish */

Click to jump to top of pageClick to jump to parent topicNotifyTextMsgNum

Description

Use the NotifyTextMsgNum property to specify the message that should be displayed to the end user in the Event Notification popup display. This property takes a numeric value.

Note. You must specify both the message set and message number for the message to be displayed to the end user.

This property is read-write.

Example

&RQST.NotifyTextMsgSet = 65; &RQST.NotifyTextMsgNum = 237;

See Also

NotifyTextMsgSet

Click to jump to top of pageClick to jump to parent topicNotifyTextMsgSet

Description

Use this property to specify the message set of the text message to be displayed to the end user in the Event Notification popup display. This property takes a numeric value.

Note. You must specify both the message set and message number for the message to be displayed to the end user.

This property is read-write.

Example

&RQST.NotifyTextMsgSet = 65; &RQST.NotifyTextMsgNum = 237;

See Also

NotifyTextMsgNum

Click to jump to top of pageClick to jump to parent topicOutDest

Description

This property specifies the output destination for the process or job to be scheduled as a string.

Values depend on the setting for the OutDestType property:

You can specify directory and printer names using the UNC (Uniform Naming Convention) protocol.

This property is read-write.

Example

&MYRQST.OutDest = "C:\TEMP";

See Also

ProcessRequest class: OutDestType property.

Managing PeopleSoft Process Scheduler

Click to jump to top of pageClick to jump to parent topicOutDestFormat

Description

This property specifies the output format for the process or job to be scheduled as a string. Values depend on your settings for the ProcessType and OutDestType properties:

The values for OutDestType, OutDestFormat, and OutDest are dependent upon each other as well as on other values.

See Values for Output Type and Format.

This property is read-write.

Example

&MYRQST.OutDestFormat = "RTF";

See Also

ProcessRequest class: ProcessType property, OutDestType property.

Click to jump to top of pageClick to jump to parent topicOutDestType

Description

This property specifies the type of output for the process or job to be scheduled as a string.

If the ProcessRequest object contains an invalid output type for a process, you won't be able to able to successfully schedule a process or job.

The value specified for this property is used only if the Output Destination Type for the defined process or job defined in PeopleSoft Process Scheduler is specified as Any. Otherwise any value specified for this property is ignored.

The values for OutDestType, OutDestFormat, and OutDest are dependent upon each other as well as on other values.

See Values for Output Type and Format.

This property is read-write.

Example

&MYRQST.OutDestType = "FILE";

See Also

ProcessRequest class: ProcessType property, RunControlID property.

Click to jump to top of pageClick to jump to parent topicPortalFolder

Description

This property specifies the name of the report folder associated with a job item as a string. If you're specifying a folder, the folder that you specify must have already been created using Report Manager.

This property is read-write.

Click to jump to top of pageClick to jump to parent topicProcessInstance

Description

This property is a system-generated identification number. PeopleSoft Process Scheduler assigns a ProcessInstance at runtime to each process or job it successfully schedules.

This property is read-write.

Example

&MYRQST.Schedule(); If &MYRQST.Status = 0 then /* process successfully scheduled */ &ProcInst = &MYRQST.ProcessInstance; Else /* do error processing */ End-If;

Click to jump to top of pageClick to jump to parent topicProcessName

Description

This property specifies the name of a predefined process as a string.

To successfully schedule a process, you must assign values to ProcessName, ProcessType, and RunControlID (that is, for the Schedule method to succeed.)

This property is read-write.

Example

&MYRQST.ProcessName = "XRFWIN";

See Also

ProcessRequest class: ProcessType property, RunControlID property.

Click to jump to top of pageClick to jump to parent topicProcessType

Description

This property specifies the name of a predefined process type as a string.

To successfully schedule a process, you must assign values to ProcessName, ProcessType, and RunControlID (that is, for the Schedule method to succeed.)

The values for ProcessType depend on the types of processes you have defined in your system. There are generic process types that are delivered with your installation of PeopleSoft. These process types may include the following:

If you define your own processes, you can use the name of that process with the ProcessType property. For example, suppose you create a custom process named "Custom CBL Programs." You could use this as follows:

&MyRqst.ProcessType = "Custom CBL Programs";

Note that spaces are included in the string for ProcessType.

This property is read-write.

Example

Note that spaces are included in the string for ProcessType.

&MYRQST.ProcessType = "Application Engine";

See Also

ProcessRequest class: ProcessName property, RunControlID property.

Click to jump to top of pageClick to jump to parent topicRunControlID

Description

This property returns a string that serves, along with the user ID, as a key that identifies a predefined group of parameters to be used by a process or a job at runtime.

To successfully schedule a process, you must provide values for RunControlID, ProcessName, and ProcessType.

To successfully schedule a job, you must provide values for RunControlID and JobName.

This property is read-write.

Example

&MYRQST.RunControlID = "MYRUNCONTROLID"; or &MYRQST.RunControlID = PRCSSAMPLEREC.RUN_CNTL_ID;

See Also

ProcessRequest class: JobName property, ProcessName property, ProcessType property.

Click to jump to top of pageClick to jump to parent topicRunDateTime

Description

This property contains a DateTime value that specifies when the scheduled process or job will run.

If you don’t specify a value for this property, and there is no date time set for the pre-defined process or job, the process or job runs as soon as the Schedule method is executed.

This property is read-write.

Example

The following example schedules the process or job to run as soon as the Schedule method is executed:

&MYRQST.RunDateTime = %Datetime;

Click to jump to top of pageClick to jump to parent topicRunLocation

Description

This property specifies the Process Scheduler Server name the request should be scheduled on. This property takes a string value. Values for RunLocation is a specific server name, such as PSNT.

If no RunLocation is specified, the request is scheduled based on both the default operating system and load balancing options set in the System Settings page.

This property is read-write.

Example

&MYRQST.RunLocation = "SERVER"; or &MYRQST.RunLocation = "PSNT";

See Also

Viewing the Status of Processes.

Click to jump to top of pageClick to jump to parent topicRunRecurrence

Description

This property specifies the frequency with which a process or job is to be run as a string. The RunRecurrence value you use must be the name of a Recurrence Definition defined in Process Scheduler Manager to successfully schedule a job or process (that is, for the Schedule method to succeed.)

This property is read-write.

Example

&MYRQST.RunRecurrence = "M-F at 5pm";

Click to jump to top of pageClick to jump to parent topicRunStatus

Description

This property specifies the run status of a process request as a number. This property is used with the UpdateRunStatus method to change the status of a request. Values are:

RunStatus

Description

1

Cancel

2

Delete

3

Error

4

Hold

5

Queued

6

Initiated

7

Processing

8

Cancelled

9

Success

10

Not Successful

11

Posted

12

Unable to post

13

Resend

14

Posting

15

Generated

16

Pending

This property is read-write.

Example

&MYRQST.RunStatus = 1;

See Also

ProcessRequest class: UpdateRunStatus method.

Click to jump to top of pageClick to jump to parent topicStatus

Description

This property returns a number based on the result of the last execution of the Schedule method.

Valid returns are:

This property is read-only.

Example

&MYRQST.Schedule(); If &MYRQST.Status = 0 then /* Schedule succeeded. */ Else /* Process (job) not scheduled, do error processing */ End-If;

Click to jump to top of pageClick to jump to parent topicTimeZone

Description

This property contains a timezone value that specifies when the scheduled process or job will run. If no value is used for this property, the server timezone is used. This property takes a string value.

This property is read-write.

Example

&MyRqst.TimeZone = "EST";

Click to jump to parent topicProcessRequest Class Examples

The following section contains the following examples:

Click to jump to top of pageClick to jump to parent topicScheduling a Single Process

The following example is when you're scheduling a single process:

Local ProcessRequest &RQST; /* Create the ProcessRequest Object */ &RQST = CreateProcessRequest(); /* Set all the Required Properties */ &RQST.RunControlID = &sRunCntlId; &RQST.ProcessType = &sProcessType; &RQST.ProcessName = &sProcessName; /* Set any Optional Properties for this Process */ &RQST.RunLocation = &sRunLocation; &RQST.RunDateTime = &dttmRunDateTime; &RQST.TimeZone = &sTimeZone; &RQST.PortalFolder = &sPortalFolder; &RQST.RunRecurrence = &sRecurrence; &RQST.OutDestType = &sOutDestType; &RQST.OutDestFormat = &sOutDestFormat; &RQST.OutDest = &sOutputDirectory; &RQST.EmailAttachLog = &bEmailAttachLog; &RQST.EmailWebReport = &bEmailWebReport; &RQST.EmailSubject = &sEmailSubject; &RQST.EmailText = &sEmailText; /* Schedule the Process */ &RQST.Schedule();

Click to jump to top of pageClick to jump to parent topicScheduling a Job Where Job Item Changes Are Not Made

The following example is when job item changes aren't made.

Local ProcessRequest &RQST; /* Create the ProcessRequest Object */ &RQST = CreateProcessRequest(); /* Set all the Required Properties */ &RQST.RunControlID = &sRunCntlId; &RQST.JobName = &sJobName; /* Set any Optional Main Job Properties */ &RQST.RunLocation = &sRunLocation; &RQST.RunDateTime = &dttmRunDateTime; &RQST.TimeZone = &sTimeZone; &RQST.PortalFolder = &sPortalFolder; &RQST.RunRecurrence = &sRecurrence; &RQST.OutDestType = &sOutDestType; &RQST.OutDestFormat = &sOutDestFormat; &RQST.OutDest = &sOutputDirectory; &RQST.EmailAttachLog = &bEmailAttachLog; &RQST.EmailWebReport = &bEmailWebReport; &RQST.EmailSubject = &sEmailSubject; &RQST.EmailText = &sEmailText; /* Schedule the Job */ &RQST.Schedule();

Click to jump to top of pageClick to jump to parent topicScheduling a Job Where Job Item Changes Are Made

The following example is when job item changes are made.

Local ProcessRequest &RQST; /* Create the ProcessRequest Object */ &RQST = CreateProcessRequest("PSJob", &sJobName); /* Set all the Required Properties */ /* Note: the JobName Property has already */ /* been set in the call above, so you don’t */ /* have to set it here */ &RQST.RunControlID = &sRunCntlId; /* Set any Optional Job Item Properties */ &RQST.SetOutputOption(&sOutputType, &sOutputFormat, &sOutputDest, &sJobName, &n⇒ PrcsItemLevel, &nJobSeqNo); &RQST.SetEmailOption(&sEmailSubject, &sEmailText, &sEmailAddress, ⇒ &sEmailWebReport, &sEmailAttachLog, &sJobName, &nPrcsItemLevel, &nJobSeqNo); &RQST.SetItemFolder(&sPortalFolder, &sJobName, &nPrcsItemLevel, &nJobSeqNo); &RQST.AddDistributionOption(&sDistIdType, &sDistId, &sJobName, &nPrcsItemLevel, &n⇒ JobSeqNo); /* Set any additional Optional Main Job Properties */ &RQST.RunLocation = &sRunLocation; &RQST.RunDateTime = &dttmRunDateTime; &RQST.TimeZone = &sTimeZone; &RQST.PortalFolder = &sPortalFolder; &RQST.RunRecurrence = &sRecurrence; &RQST.OutDestType = &sOutDestType; &RQST.OutDestFormat = &sOutDestFormat; &RQST.OutDest = &sOutputDirectory; &RQST.EmailAttachLog = &bEmailAttachLog; &RQST.EmailWebReport = &bEmailWebReport; &RQST.EmailSubject = &sEmailSubject; &RQST.EmailText = &sEmailText; /* Schedule the Job */ &RQST.Schedule();

Click to jump to parent topicPrcsApi Class

Use the PrcsApi class with file dependant processing. This section includes:

See File Dependant Processing.

Click to jump to parent topicScope of a PrcsApi Object

A PrcsApi object can be instantiated only from PeopleCode.

A PrcsApi object can be called from a component, an internet script, or an Application Engine program.

PrcsApi class objects can be of Local, Global, or Component scope.

Click to jump to parent topicData Type of a PrcsApi Object

PrcsApi objects are of type PrcsApi.

Local PrcsApi &api = create PrcsApi();

Click to jump to parent topicHow to Import the PrcsApi Class

The PrcsApi class is not a built-in class, like Rowset, Field, Record, and so on. It is an Application Class. Before you can use this class in your PeopleCode program, you must import it to your program.

An import statement names either all the classes in a package or one particular application class. For importing the PrcsApi class, PeopleSoft recommends that you import the API class.

The import statement you should use is as follows:

import PT_PRCS:API:*;

Using the asterisks after the package name makes all the application classes directly contained in the named package available.

See Also

Application Classes

Click to jump to parent topicHow to Create a PrcsApi Object

After you've imported the PrcsApi class, you instantiate an object of that class using the constructor for the class and the Create function.

The following example creates a new instance of the PrcsApi class, as the variable &api, with local scope:

import PT_PRCS:API:*; Local PrcsApi &api = create PrcsApi();

Click to jump to parent topicPrcsApi Class Constructor

You must use the constructor for the PrcsApi class to instantiate an instance of that class. The following is the constructor for the PrcsApi class.

Click to jump to top of pageClick to jump to parent topicPrcsApi

Syntax

PrcsApi()

Description

Use the PrcsApi constructor to create an instance of the PrcsApi class.

Parameters

None.

Returns

A reference to a PrcsApi object.

Click to jump to parent topicPrcsApi Class Methods

In this section, we discuss the PrcsApi class methods. The methods are discussed in alphabetical order.

Click to jump to top of pageClick to jump to parent topicgetAllFileNames

Syntax

getAllFileNames(PrcsInstance)

Description

Use the getAllFileNames method to return a list of all the files names detected by the scheduler to intiate this process. The names are returned in an array of string, as full path names.

Parameters

PrcsInstance

Specify the process instance for which you want to get all the associated file names, as a number.

Returns

An array of string containing all the files names associated with the specified process.

Example

The following example returns a list of file names.

/* QE_OPT_AET is the state record for the application engine program in this⇒ example */ import PT_PRCS:API:*; Local PrcsApi &api = create PrcsApi(); Local File &FileIO, &FileLog; Local array of string &strList = &api.getAllFileNames(QE_OPT_AET.PROCESS_⇒ INSTANCE); /* api call needs process instance as parameter */ /* the api returns list of file names matched by the scheduler for this instance */ For &i = 1 To &strList.Len &IOFilename = &strList [&i]; &FileIO = GetFile(&IOFilename, "r", "a", %FilePath_Absolute); &FileIO.Delete(); &FileIO.Close(); End-For;

Click to jump to top of pageClick to jump to parent topicnotifyToWindow

Syntax

notifyToWindow(PrcsInstance, Message)

Description

Use the notifyToWindow method to display additional messages to the window.

If a process is not defined as going to Window, using this method has no effect. The purpose of this method is to display additional messages to the window when an Application Engine process (no other process type) is run to Window.

Parameters

PrcsInstance

Specify the process instance for which you want to display messages, as a number.

Message

Specify the message you want displayed, as a string.

Returns

A number: 0 if method failed.

Example

The following PeopleCode would be in a step in an application engine program.

import PT_PRCS:API:*; Local PrcsApi &api = create PrcsApi(); /* QE_AESTATUS_AET is the sate record for this Application Engine program */ &nret = &api.notifyToWindow(QE_AESTATUS_AET.PROCESS_INSTANCE, "Hi There! this is⇒ First step."); /* this displays the message on the window */