Code to create App Engine Process (Example)

See below the example to create process and schedule it as well ….

Function ScheduleNotification(&sRunCntl As string, &nMinuteOffset As number)

&RQST = CreateProcessRequest();
&RQST.ProcessType = “Application Engine”;

&RQST.ProcessName = “MRKCEM_WF_AE”;
&RQST.RunControlID = &sRunCntl;
SQLExec(”SELECT SERVERNAME FROM PS_RB_WF_DEFAULTS”, &WFACTIONSERVER);
If None(&WFACTIONSERVER) Then
&WFACTIONSERVER = “SERVER”;
End-If;


&RQST.RunLocation = &WFACTIONSERVER;
&RQST.OutDestType = “%OutputDirectory%”;
&RQST.OutDestFormat = “SPF”;
&RQST.OutDest = “C:\TEMP\”;
&RQST.RunDateTime = AddToDateTime(%Datetime, 0, 0, 0, 0, &nMinuteOffset, 0);
&RQST.TimeZone = %ServerTimeZone;
&RQST.Schedule();
&PRCSSTATUS = &RQST.Status;

End-Function;

admin posted at 2009-1-15 Category: PeopleCode Tips | Tags: , ,

One Response Leave a comment

  1. #1Mike @ 2009-2-4 09:54

    You know I had never tried this functionality thru code. It works very well. Thanks for putting such tips.

    -Mike

Leave a Reply

(Ctrl + Enter)