SetNotifyService method: ProcessRequest class

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

Parameter Description

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;