In 8.44, when you schedule a process, you are returned a ProcessRequest object which has as a property - ProcessInstance. Here is the entry from PeopleBooks:
--- ProcessInstance 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.
--- ProcessInstance 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 starts *>
&RQST = CreateProcessRequest();
&rec = GetRecord();
&RQST.RunControlID = ;
&RQST.ProcessType = "Application Engine";
&RQST.ProcessName = ;
&RQST.RunDateTime = &rec.STARTDATETIME.Value;
/* Schedule the Process - get the instance and change the runstatus to HOLD*/
&RQST.Schedule();
If &RQST.Status = 0 then
/* process successfully scheduled, ***get the instance*** */
&ProcInst = &RQST.ProcessInstance;
/* change the runstatus to HOLD */
If All(&rec.CS_DEPEND_NAME.Value) Then
&RQST.RunStatus = "4";
&RQST.UpdateRunStatus();
End-If;
Else
/* do error processing */
End-If;
<* Example Ends *>
End-If;
No comments:
Post a Comment