import PROCESSREQUEST:*;
Declare Function CleanUp PeopleCode
NTT_PC_UP_RNCTL.REFRESH FieldFormula;
Component number Π
SQLExec("Select PROCESS_INSTANCE from
PS_NTT_PC_UP_RNCTL WHERE OPRID = :1 AND RUNCNTLID = :2", %OperatorId, NTT_PC_UP_RNCTL.RUNCNTLID.Value,
&PrcsInstance);
If &PrcsInstance <> 0 Then
MessageBox(0, "", 0, 0, "Data loaded during the Previous
Process Instance: " | &PrcsInstance | "will be flushed for a
Fresh Load.");
CleanUp();
End-If;
&processRqst = CreateProcessRequest();
&processRqst.RunControlID =
NTT_PC_UP_RNCTL.RUNCNTLID.Value;
&processRqst.ProcessType =
"Application Engine";
&processRqst.ProcessName =
"NTT_PCUPLD";
&processRqst.RunDateTime = %Datetime;
&processRqst.Schedule();
If &processRqst.Status = 0 Then
&PI = &processRqst.ProcessInstance;
NTT_PC_UP_RNCTL.DESCR254.Value = "PC Upload process
started....";
NTT_PC_UP_RNCTL.REFRESH.Enabled = True;
NTT_PC_UP_RNCTL.ATTACHADD.Enabled = False;
NTT_PC_UP_RNCTL.VALIDATE_BTN.Enabled = False;
NTT_PC_UP_RNCTL.LOAD_BTN.Enabled = False;
&Rec = CreateRecord(Record.NTT_PC_UP_RNCTL);
&Rec.Oprid.value = %OperatorId;
&Rec.RUNCNTLID.Value = NTT_PC_UP_RNCTL.RUNCNTLID.Value;
&Rec.PROCESS_INSTANCE.VALUE = &PI;
&Rec.Update();
Else
NTT_PC_UP_RNCTL.DESCR254.Value = "PC Upload process failed to
start.";
End-If;
SetSaveWarningFilter( True);
No comments:
Post a Comment