fixed material track report, Mona_Services HTTP call, and COC file generation
This commit is contained in:
parent
7762b129af
commit
a8a9e91d04
@ -1,12 +1,12 @@
|
||||
{
|
||||
"header": {
|
||||
"version": 1,
|
||||
"type": "record",
|
||||
"approw-key": "ENGINE_HEALTH_THRESHOLD_MINUTES"
|
||||
},
|
||||
"body": {
|
||||
"record1": {
|
||||
"<1>": "15"
|
||||
}
|
||||
}
|
||||
{
|
||||
"header": {
|
||||
"version": 1,
|
||||
"type": "record",
|
||||
"approw-key": "ENGINE_HEALTH_THRESHOLD_MINUTES"
|
||||
},
|
||||
"body": {
|
||||
"record1": {
|
||||
"<1>": "60"
|
||||
}
|
||||
}
|
||||
}
|
@ -25,75 +25,71 @@
|
||||
"<1,16>": "TENCOR1",
|
||||
"<1,17>": "TENCOR2",
|
||||
"<1,18>": "TENCOR3",
|
||||
"<1,19>": "ASET",
|
||||
"<1,20>": "BIORAD2",
|
||||
"<1,21>": "BIORAD3",
|
||||
"<1,22>": "BIORAD4",
|
||||
"<1,23>": "BIORAD5",
|
||||
"<1,24>": "CDE2",
|
||||
"<1,25>": "CDE3",
|
||||
"<1,26>": "CDE4",
|
||||
"<1,27>": "CDE5",
|
||||
"<1,28>": "CDE6",
|
||||
"<1,29>": "FLEXUS",
|
||||
"<1,30>": "HGCV1",
|
||||
"<1,31>": "HGCV2",
|
||||
"<1,32>": "HGCV3",
|
||||
"<1,33>": "SPV",
|
||||
"<1,34>": "SRP",
|
||||
"<1,35>": "BELLJAR",
|
||||
"<1,36>": "6INLESS",
|
||||
"<1,37>": "6INLESS2",
|
||||
"<1,38>": "6MACTRONIX #1",
|
||||
"<1,39>": "6MACTRONIX #2",
|
||||
"<1,40>": "6MACTRONIX #3",
|
||||
"<1,41>": "6MACTRONIX #4",
|
||||
"<1,42>": "8INLESS",
|
||||
"<1,43>": "8INLESS2",
|
||||
"<1,44>": "BAGGER1",
|
||||
"<1,45>": "BAGGER2",
|
||||
"<1,46>": "BAGGER3",
|
||||
"<1,47>": "BAGGER4",
|
||||
"<1,48>": "6INFF01",
|
||||
"<1,49>": "6INFF02",
|
||||
"<1,50>": "6INFF03",
|
||||
"<1,51>": "6INFF04",
|
||||
"<1,52>": "6INFF05",
|
||||
"<1,53>": "6INFF06",
|
||||
"<1,54>": "6INFF07",
|
||||
"<1,55>": "6INFF08",
|
||||
"<1,56>": "6INFF09",
|
||||
"<1,57>": "6INFF10",
|
||||
"<1,58>": "8INNF01",
|
||||
"<1,59>": "8INNF02",
|
||||
"<1,60>": "8INNF03",
|
||||
"<1,61>": "8INNF04",
|
||||
"<1,62>": "8INNF05",
|
||||
"<1,63>": "8INFF01",
|
||||
"<1,64>": "8INFF02",
|
||||
"<1,65>": "8INFF03",
|
||||
"<1,66>": "8INFF04",
|
||||
"<1,67>": "MACTRONIX #1",
|
||||
"<1,68>": "MACTRONIX #2 ",
|
||||
"<1,69>": "MACTRONIX #3",
|
||||
"<1,70>": "MACTRONIX #4",
|
||||
"<1,71>": "MACTRONIX #5",
|
||||
"<1,72>": "MACTRONIX #6",
|
||||
"<1,73>": "MACTRONIX #7",
|
||||
"<1,74>": "TALL_PITCH1",
|
||||
"<1,75>": "TALL_PITCH2",
|
||||
"<1,76>": "TALL_PITCH3",
|
||||
"<1,77>": "TALL_PITCH4",
|
||||
"<1,78>": "WC6INCH1",
|
||||
"<1,79>": "WC6INCH2",
|
||||
"<1,80>": "WC6INCH3",
|
||||
"<1,81>": "WC6INCH4",
|
||||
"<1,82>": "WC8INCH1",
|
||||
"<1,83>": "WC8INCH2",
|
||||
"<1,84>": "WC8INCH3",
|
||||
"<1,85>": "ELLP01",
|
||||
"<1,86>": "LEAKCHK01",
|
||||
"<1,87>": "LEAKCHK02"
|
||||
"<1,19>": "BIORAD2",
|
||||
"<1,20>": "BIORAD3",
|
||||
"<1,21>": "BIORAD4",
|
||||
"<1,22>": "BIORAD5",
|
||||
"<1,23>": "CDE4",
|
||||
"<1,24>": "CDE5",
|
||||
"<1,25>": "CDE6",
|
||||
"<1,26>": "HGCV1",
|
||||
"<1,27>": "HGCV2",
|
||||
"<1,28>": "HGCV3",
|
||||
"<1,29>": "SPV",
|
||||
"<1,30>": "SRP",
|
||||
"<1,31>": "BELLJAR",
|
||||
"<1,32>": "6INLESS",
|
||||
"<1,33>": "6INLESS2",
|
||||
"<1,34>": "6MACTRONIX #1",
|
||||
"<1,35>": "6MACTRONIX #2",
|
||||
"<1,36>": "6MACTRONIX #3",
|
||||
"<1,37>": "6MACTRONIX #4",
|
||||
"<1,38>": "8INLESS",
|
||||
"<1,39>": "8INLESS2",
|
||||
"<1,40>": "BAGGER1",
|
||||
"<1,41>": "BAGGER2",
|
||||
"<1,42>": "BAGGER3",
|
||||
"<1,43>": "BAGGER4",
|
||||
"<1,44>": "6INFF01",
|
||||
"<1,45>": "6INFF02",
|
||||
"<1,46>": "6INFF03",
|
||||
"<1,47>": "6INFF04",
|
||||
"<1,48>": "6INFF05",
|
||||
"<1,49>": "6INFF06",
|
||||
"<1,50>": "6INFF07",
|
||||
"<1,51>": "6INFF08",
|
||||
"<1,52>": "6INFF09",
|
||||
"<1,53>": "6INFF10",
|
||||
"<1,54>": "8INNF01",
|
||||
"<1,55>": "8INNF02",
|
||||
"<1,56>": "8INNF03",
|
||||
"<1,57>": "8INNF04",
|
||||
"<1,58>": "8INNF05",
|
||||
"<1,59>": "8INFF01",
|
||||
"<1,60>": "8INFF02",
|
||||
"<1,61>": "8INFF03",
|
||||
"<1,62>": "8INFF04",
|
||||
"<1,63>": "MACTRONIX #1",
|
||||
"<1,64>": "MACTRONIX #2 ",
|
||||
"<1,65>": "MACTRONIX #3",
|
||||
"<1,66>": "MACTRONIX #4",
|
||||
"<1,67>": "MACTRONIX #5",
|
||||
"<1,68>": "MACTRONIX #6",
|
||||
"<1,69>": "MACTRONIX #7",
|
||||
"<1,70>": "TALL_PITCH1",
|
||||
"<1,71>": "TALL_PITCH2",
|
||||
"<1,72>": "TALL_PITCH3",
|
||||
"<1,73>": "TALL_PITCH4",
|
||||
"<1,74>": "WC6INCH1",
|
||||
"<1,75>": "WC6INCH2",
|
||||
"<1,76>": "WC6INCH3",
|
||||
"<1,77>": "WC6INCH4",
|
||||
"<1,78>": "WC8INCH1",
|
||||
"<1,79>": "WC8INCH2",
|
||||
"<1,80>": "WC8INCH3",
|
||||
"<1,81>": "ELLP01",
|
||||
"<1,82>": "LEAKCHK01",
|
||||
"<1,83>": "LEAKCHK02"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,33 +1,33 @@
|
||||
{
|
||||
"header": {
|
||||
"version": 1,
|
||||
"type": "record"
|
||||
},
|
||||
"body": {
|
||||
"record1": {
|
||||
"<1>": "%2%",
|
||||
"<2>": "BO",
|
||||
"<3>": "A",
|
||||
"<4>": "B",
|
||||
"<5>": "1",
|
||||
"<6>": "-2",
|
||||
"<7>": "-2",
|
||||
"<8>": "T",
|
||||
"<9>": "12632256",
|
||||
"<10>": "",
|
||||
"<11>": "",
|
||||
"<12>": "%1%",
|
||||
"<13>": "",
|
||||
"<14>": "",
|
||||
"<15>": "0",
|
||||
"<16>": "IQS",
|
||||
"<17>": "1",
|
||||
"<18>": "",
|
||||
"<19>": "0",
|
||||
"<20>": "",
|
||||
"<21>": "0",
|
||||
"<22>": "",
|
||||
"<23>": ""
|
||||
}
|
||||
}
|
||||
{
|
||||
"header": {
|
||||
"version": 1,
|
||||
"type": "record"
|
||||
},
|
||||
"body": {
|
||||
"record1": {
|
||||
"<1>": "%2%",
|
||||
"<2>": "BO",
|
||||
"<3>": "A",
|
||||
"<4>": "B",
|
||||
"<5>": "1",
|
||||
"<6>": "-2",
|
||||
"<7>": "-2",
|
||||
"<8>": "T",
|
||||
"<9>": "12632256",
|
||||
"<10>": "",
|
||||
"<11>": "",
|
||||
"<12>": "%1%",
|
||||
"<13>": "",
|
||||
"<14>": "",
|
||||
"<15>": "0",
|
||||
"<16>": "IQS",
|
||||
"<17>": "1",
|
||||
"<18>": "",
|
||||
"<19>": "0",
|
||||
"<20>": "",
|
||||
"<21>": "0",
|
||||
"<22>": "",
|
||||
"<23>": ""
|
||||
}
|
||||
}
|
||||
}
|
@ -1,11 +1,11 @@
|
||||
{
|
||||
"header": {
|
||||
"version": 1,
|
||||
"type": "record"
|
||||
},
|
||||
"body": {
|
||||
"record1": {
|
||||
"<1>": "Declare Subroutine Set_Property\r\nDeclare Function Get_Property\r\nThisRec = Get_Property(@Window,'ATRECORD')\r\nInitrnd Time()\r\nMyVar = Rnd(200)\r\nThisRec<28, -1> = MyVar\r\nSet_Property(@Window,'ATRECORD', ThisRec) \r\n\r\nreturn 1"
|
||||
}
|
||||
}
|
||||
{
|
||||
"header": {
|
||||
"version": 1,
|
||||
"type": "record"
|
||||
},
|
||||
"body": {
|
||||
"record1": {
|
||||
"<1>": "Declare Subroutine Set_Property\r\nDeclare Function Get_Property\r\nThisRec = Get_Property(@Window,'ATRECORD')\r\nInitrnd Time()\r\nMyVar = Rnd(200)\r\nThisRec<28, -1> = MyVar\r\nSet_Property(@Window,'ATRECORD', ThisRec) \r\n\r\nreturn 1"
|
||||
}
|
||||
}
|
||||
}
|
@ -1,11 +1,11 @@
|
||||
{
|
||||
"header": {
|
||||
"version": 1,
|
||||
"type": "record"
|
||||
},
|
||||
"body": {
|
||||
"record1": {
|
||||
"<1>": "DECLARE FUNCTION Comm_Reactor_Log\r\nRETURN Comm_Reactor_Log(CtrlEntId,'DELETE')"
|
||||
}
|
||||
}
|
||||
{
|
||||
"header": {
|
||||
"version": 1,
|
||||
"type": "record"
|
||||
},
|
||||
"body": {
|
||||
"record1": {
|
||||
"<1>": "DECLARE FUNCTION Comm_Reactor_Log\r\nRETURN Comm_Reactor_Log(CtrlEntId,'DELETE')"
|
||||
}
|
||||
}
|
||||
}
|
@ -1,11 +1,11 @@
|
||||
{
|
||||
"header": {
|
||||
"version": 1,
|
||||
"type": "record"
|
||||
},
|
||||
"body": {
|
||||
"record1": {
|
||||
"<1>": "\r\nDeclare function DCount\r\nDeclare subroutine Set_Property\r\n\r\nRDSNo = Get_Property(CtrlEntID, 'TEXT')\r\n\r\nIf DCount(RDSNo, '|') EQ 8 then\r\n\tRDSNo = Field(RDSNo, '|', 3)\r\nend\r\nIf RDSNo[1, 2] EQ '1T' then RDSNo[1, 2] = ''\r\n\r\nSet_Property(CtrlEntID, 'TEXT', RDSNo)\r\n\r\nRETURN 1"
|
||||
}
|
||||
}
|
||||
{
|
||||
"header": {
|
||||
"version": 1,
|
||||
"type": "record"
|
||||
},
|
||||
"body": {
|
||||
"record1": {
|
||||
"<1>": "\r\nDeclare function DCount\r\nDeclare subroutine Set_Property\r\n\r\nRDSNo = Get_Property(CtrlEntID, 'TEXT')\r\n\r\nIf DCount(RDSNo, '|') EQ 8 then\r\n\tRDSNo = Field(RDSNo, '|', 3)\r\nend\r\nIf RDSNo[1, 2] EQ '1T' then RDSNo[1, 2] = ''\r\n\r\nSet_Property(CtrlEntID, 'TEXT', RDSNo)\r\n\r\nRETURN 1"
|
||||
}
|
||||
}
|
||||
}
|
@ -1,11 +1,11 @@
|
||||
{
|
||||
"header": {
|
||||
"version": 1,
|
||||
"type": "record"
|
||||
},
|
||||
"body": {
|
||||
"record1": {
|
||||
"<1>": "declare function get_property, rowexists, msg, dialog_box\r\n$insert msg_equates\r\n\r\nRLNo = .reactor_log_no->text\r\nif RLNo then\r\n if rowexists( 'REACTOR_LOG', RLNo ) then\r\n Qbf = get_property( @window, 'QBFLIST' )\r\n if Qbf then\r\n convert @fm to @vm in Qbf\r\n end else\r\n Qbf = ''\r\n end\r\n RetVal = dialog_box( 'NOTES_ATTACH', @window, 'REACTOR_LOG*':RLNo:'*':Qbf )\r\n end else\r\n MsgInfo = ''\r\n MsgInfo<mtext$> = 'You must save this Reactor Log record first...' \r\n MsgInfo<micon$> = 'H'\r\n Void = msg( '', MsgInfo )\r\n end\r\nend else\r\n MsgInfo = ''\r\n MsgInfo<mtext$> = 'You must have a Reactor Log record present...' \r\n MsgInfo<micon$> = 'H'\r\n Void = msg( '', MsgInfo )\r\nend\r\nRETURN 0"
|
||||
}
|
||||
}
|
||||
{
|
||||
"header": {
|
||||
"version": 1,
|
||||
"type": "record"
|
||||
},
|
||||
"body": {
|
||||
"record1": {
|
||||
"<1>": "declare function get_property, rowexists, msg, dialog_box\r\n$insert msg_equates\r\n\r\nRLNo = .reactor_log_no->text\r\nif RLNo then\r\n if rowexists( 'REACTOR_LOG', RLNo ) then\r\n Qbf = get_property( @window, 'QBFLIST' )\r\n if Qbf then\r\n convert @fm to @vm in Qbf\r\n end else\r\n Qbf = ''\r\n end\r\n RetVal = dialog_box( 'NOTES_ATTACH', @window, 'REACTOR_LOG*':RLNo:'*':Qbf )\r\n end else\r\n MsgInfo = ''\r\n MsgInfo<mtext$> = 'You must save this Reactor Log record first...' \r\n MsgInfo<micon$> = 'H'\r\n Void = msg( '', MsgInfo )\r\n end\r\nend else\r\n MsgInfo = ''\r\n MsgInfo<mtext$> = 'You must have a Reactor Log record present...' \r\n MsgInfo<micon$> = 'H'\r\n Void = msg( '', MsgInfo )\r\nend\r\nRETURN 0"
|
||||
}
|
||||
}
|
||||
}
|
@ -1,11 +1,11 @@
|
||||
{
|
||||
"header": {
|
||||
"version": 1,
|
||||
"type": "record"
|
||||
},
|
||||
"body": {
|
||||
"record1": {
|
||||
"<1>": "Declare subroutine WO_DAILY_SCHED_ALL_COMM\r\n\r\nIf Index(CtrlEntId, 'IQS', 1) GT 0 then \r\n\tWO_DAILY_SCHED_ALL_COMM('IQSViolButton', CtrlEntId) \r\nend else\r\n\tWO_DAILY_SCHED_ALL_COMM('ChecklistButton', CtrlEntId) \r\nend\r\n\r\nRETURN 0"
|
||||
}
|
||||
}
|
||||
{
|
||||
"header": {
|
||||
"version": 1,
|
||||
"type": "record"
|
||||
},
|
||||
"body": {
|
||||
"record1": {
|
||||
"<1>": "Declare subroutine WO_DAILY_SCHED_ALL_COMM\r\n\r\nIf Index(CtrlEntId, 'IQS', 1) GT 0 then \r\n\tWO_DAILY_SCHED_ALL_COMM('IQSViolButton', CtrlEntId) \r\nend else\r\n\tWO_DAILY_SCHED_ALL_COMM('ChecklistButton', CtrlEntId) \r\nend\r\n\r\nRETURN 0"
|
||||
}
|
||||
}
|
||||
}
|
@ -1,11 +1,11 @@
|
||||
{
|
||||
"header": {
|
||||
"version": 1,
|
||||
"type": "record"
|
||||
},
|
||||
"body": {
|
||||
"record1": {
|
||||
"<1>": "Declare subroutine WO_DAILY_SCHED_ALL_COMM\r\n\r\nIf Index(CtrlEntId, 'IQS', 1) GT 0 then \r\n\tWO_DAILY_SCHED_ALL_COMM('IQSViolButton', CtrlEntId) \r\nend else\r\n\tWO_DAILY_SCHED_ALL_COMM('ChecklistButton', CtrlEntId) \r\nend\r\n\r\nRETURN 0"
|
||||
}
|
||||
}
|
||||
{
|
||||
"header": {
|
||||
"version": 1,
|
||||
"type": "record"
|
||||
},
|
||||
"body": {
|
||||
"record1": {
|
||||
"<1>": "Declare subroutine WO_DAILY_SCHED_ALL_COMM\r\n\r\nIf Index(CtrlEntId, 'IQS', 1) GT 0 then \r\n\tWO_DAILY_SCHED_ALL_COMM('IQSViolButton', CtrlEntId) \r\nend else\r\n\tWO_DAILY_SCHED_ALL_COMM('ChecklistButton', CtrlEntId) \r\nend\r\n\r\nRETURN 0"
|
||||
}
|
||||
}
|
||||
}
|
@ -1,11 +1,11 @@
|
||||
{
|
||||
"header": {
|
||||
"version": 1,
|
||||
"type": "record"
|
||||
},
|
||||
"body": {
|
||||
"record1": {
|
||||
"<1>": "Declare Subroutine Send_Event, Set_Property\r\n\r\nListVals = Get_Property(@Window : '.ET_REACT_PROB_ID', 'DEFPROP')\r\nSet_Property(@Window : '.ET_REACT_PROB_ID', 'DEFPROP', ListVals)\r\n\r\nSend_Event(@Window : '.ET_REACT_PROB_ID', 'CALCULATE')\r\n\r\nreturn 1"
|
||||
}
|
||||
}
|
||||
{
|
||||
"header": {
|
||||
"version": 1,
|
||||
"type": "record"
|
||||
},
|
||||
"body": {
|
||||
"record1": {
|
||||
"<1>": "Declare Subroutine Send_Event, Set_Property\r\n\r\nListVals = Get_Property(@Window : '.ET_REACT_PROB_ID', 'DEFPROP')\r\nSet_Property(@Window : '.ET_REACT_PROB_ID', 'DEFPROP', ListVals)\r\n\r\nSend_Event(@Window : '.ET_REACT_PROB_ID', 'CALCULATE')\r\n\r\nreturn 1"
|
||||
}
|
||||
}
|
||||
}
|
@ -1,11 +1,11 @@
|
||||
{
|
||||
"header": {
|
||||
"version": 1,
|
||||
"type": "record"
|
||||
},
|
||||
"body": {
|
||||
"record1": {
|
||||
"<1>": "Declare Function Comm_Reactor_Log\r\n\r\nReturn Comm_Reactor_Log(CtrlEntID,'WRITE')"
|
||||
}
|
||||
}
|
||||
{
|
||||
"header": {
|
||||
"version": 1,
|
||||
"type": "record"
|
||||
},
|
||||
"body": {
|
||||
"record1": {
|
||||
"<1>": "Declare Function Comm_Reactor_Log\r\n\r\nReturn Comm_Reactor_Log(CtrlEntID,'WRITE')"
|
||||
}
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,145 +1,145 @@
|
||||
{
|
||||
"header": {
|
||||
"version": 1,
|
||||
"type": "record"
|
||||
},
|
||||
"body": {
|
||||
"record1": {
|
||||
"<1>": "-1",
|
||||
"<2>": "-1",
|
||||
"<3>": "-1",
|
||||
"<4>": "-1",
|
||||
"<5>": "16777215",
|
||||
"<6>": {
|
||||
"<6,1>": {
|
||||
"<6,1,1>": "Tahoma",
|
||||
"<6,1,2>": "-11",
|
||||
"<6,1,3>": "400",
|
||||
"<6,1,4>": "0",
|
||||
"<6,1,5>": "0",
|
||||
"<6,1,6>": "5",
|
||||
"<6,1,7>": "0",
|
||||
"<6,1,8>": "39",
|
||||
"<6,1,9>": "0",
|
||||
"<6,1,10>": "0",
|
||||
"<6,1,11>": "0",
|
||||
"<6,1,12>": "0",
|
||||
"<6,1,13>": "11",
|
||||
"<6,1,14>": "2",
|
||||
"<6,1,15>": "0",
|
||||
"<6,1,16>": "21"
|
||||
}
|
||||
},
|
||||
"<7>": "",
|
||||
"<8>": "",
|
||||
"<9>": {
|
||||
"<9,1>": {
|
||||
"<9,1,1>": "1",
|
||||
"<9,1,2>": "11",
|
||||
"<9,1,3>": "R",
|
||||
"<9,1,4>": "C",
|
||||
"<9,1,5>": "<<none>>",
|
||||
"<9,1,6>": "ID"
|
||||
},
|
||||
"<9,2>": {
|
||||
"<9,2,1>": "2",
|
||||
"<9,2,2>": "13",
|
||||
"<9,2,3>": "L",
|
||||
"<9,2,4>": "C",
|
||||
"<9,2,5>": "DT2/^H",
|
||||
"<9,2,6>": "Run Time"
|
||||
},
|
||||
"<9,3>": {
|
||||
"<9,3,1>": "3",
|
||||
"<9,3,2>": "6",
|
||||
"<9,3,3>": "L",
|
||||
"<9,3,4>": "C",
|
||||
"<9,3,5>": "<<none>>",
|
||||
"<9,3,6>": "Test Run Type"
|
||||
},
|
||||
"<9,4>": {
|
||||
"<9,4,1>": "4",
|
||||
"<9,4,2>": "6",
|
||||
"<9,4,3>": "C",
|
||||
"<9,4,4>": "C",
|
||||
"<9,4,5>": "<<none>>",
|
||||
"<9,4,6>": "Equipment ID"
|
||||
},
|
||||
"<9,5>": {
|
||||
"<9,5,1>": "5",
|
||||
"<9,5,2>": "6",
|
||||
"<9,5,3>": "C",
|
||||
"<9,5,4>": "C",
|
||||
"<9,5,5>": "<<none>>",
|
||||
"<9,5,6>": "Equipment Type"
|
||||
},
|
||||
"<9,6>": {
|
||||
"<9,6,1>": "6",
|
||||
"<9,6,2>": "5",
|
||||
"<9,6,3>": "R",
|
||||
"<9,6,4>": "C",
|
||||
"<9,6,5>": "<<none>>",
|
||||
"<9,6,6>": "PSN"
|
||||
},
|
||||
"<9,7>": {
|
||||
"<9,7,1>": "7",
|
||||
"<9,7,2>": "15",
|
||||
"<9,7,3>": "L",
|
||||
"<9,7,4>": "C",
|
||||
"<9,7,5>": "<<none>>",
|
||||
"<9,7,6>": "User"
|
||||
},
|
||||
"<9,8>": {
|
||||
"<9,8,1>": "8",
|
||||
"<9,8,2>": "7",
|
||||
"<9,8,3>": "R",
|
||||
"<9,8,4>": "C",
|
||||
"<9,8,5>": "<<none>>",
|
||||
"<9,8,6>": "RDS"
|
||||
},
|
||||
"<9,9>": {
|
||||
"<9,9,1>": "9",
|
||||
"<9,9,2>": "9",
|
||||
"<9,9,3>": "L",
|
||||
"<9,9,4>": "C",
|
||||
"<9,9,5>": "<<none>>",
|
||||
"<9,9,6>": "Test Wafer Type"
|
||||
},
|
||||
"<9,10>": {
|
||||
"<9,10,1>": "10",
|
||||
"<9,10,2>": "3",
|
||||
"<9,10,3>": "R",
|
||||
"<9,10,4>": "C",
|
||||
"<9,10,5>": "<<none>>",
|
||||
"<9,10,6>": "Wfr Qty"
|
||||
}
|
||||
},
|
||||
"<10>": "L",
|
||||
"<11>": "0",
|
||||
"<12>": "Test Wafer Report",
|
||||
"<13>": "",
|
||||
"<14>": "R",
|
||||
"<15>": "1",
|
||||
"<16>": "1",
|
||||
"<17>": "1",
|
||||
"<18>": "1",
|
||||
"<19>": "1",
|
||||
"<20>": "1",
|
||||
"<21>": "1",
|
||||
"<22>": "1",
|
||||
"<23>": "1",
|
||||
"<24>": "1",
|
||||
"<25>": "0",
|
||||
"<26>": "",
|
||||
"<27>": "",
|
||||
"<28>": "",
|
||||
"<29>": "0",
|
||||
"<30>": "1",
|
||||
"<31>": "0",
|
||||
"<32>": "0",
|
||||
"<33>": "0",
|
||||
"<34>": "16777215",
|
||||
"<35>": "16777215"
|
||||
}
|
||||
}
|
||||
{
|
||||
"header": {
|
||||
"version": 1,
|
||||
"type": "record"
|
||||
},
|
||||
"body": {
|
||||
"record1": {
|
||||
"<1>": "-1",
|
||||
"<2>": "-1",
|
||||
"<3>": "-1",
|
||||
"<4>": "-1",
|
||||
"<5>": "16777215",
|
||||
"<6>": {
|
||||
"<6,1>": {
|
||||
"<6,1,1>": "Tahoma",
|
||||
"<6,1,2>": "-11",
|
||||
"<6,1,3>": "400",
|
||||
"<6,1,4>": "0",
|
||||
"<6,1,5>": "0",
|
||||
"<6,1,6>": "5",
|
||||
"<6,1,7>": "0",
|
||||
"<6,1,8>": "39",
|
||||
"<6,1,9>": "0",
|
||||
"<6,1,10>": "0",
|
||||
"<6,1,11>": "0",
|
||||
"<6,1,12>": "0",
|
||||
"<6,1,13>": "11",
|
||||
"<6,1,14>": "2",
|
||||
"<6,1,15>": "0",
|
||||
"<6,1,16>": "21"
|
||||
}
|
||||
},
|
||||
"<7>": "",
|
||||
"<8>": "",
|
||||
"<9>": {
|
||||
"<9,1>": {
|
||||
"<9,1,1>": "1",
|
||||
"<9,1,2>": "11",
|
||||
"<9,1,3>": "R",
|
||||
"<9,1,4>": "C",
|
||||
"<9,1,5>": "<<none>>",
|
||||
"<9,1,6>": "ID"
|
||||
},
|
||||
"<9,2>": {
|
||||
"<9,2,1>": "2",
|
||||
"<9,2,2>": "13",
|
||||
"<9,2,3>": "L",
|
||||
"<9,2,4>": "C",
|
||||
"<9,2,5>": "DT2/^H",
|
||||
"<9,2,6>": "Run Time"
|
||||
},
|
||||
"<9,3>": {
|
||||
"<9,3,1>": "3",
|
||||
"<9,3,2>": "6",
|
||||
"<9,3,3>": "L",
|
||||
"<9,3,4>": "C",
|
||||
"<9,3,5>": "<<none>>",
|
||||
"<9,3,6>": "Test Run Type"
|
||||
},
|
||||
"<9,4>": {
|
||||
"<9,4,1>": "4",
|
||||
"<9,4,2>": "6",
|
||||
"<9,4,3>": "C",
|
||||
"<9,4,4>": "C",
|
||||
"<9,4,5>": "<<none>>",
|
||||
"<9,4,6>": "Equipment ID"
|
||||
},
|
||||
"<9,5>": {
|
||||
"<9,5,1>": "5",
|
||||
"<9,5,2>": "6",
|
||||
"<9,5,3>": "C",
|
||||
"<9,5,4>": "C",
|
||||
"<9,5,5>": "<<none>>",
|
||||
"<9,5,6>": "Equipment Type"
|
||||
},
|
||||
"<9,6>": {
|
||||
"<9,6,1>": "6",
|
||||
"<9,6,2>": "5",
|
||||
"<9,6,3>": "R",
|
||||
"<9,6,4>": "C",
|
||||
"<9,6,5>": "<<none>>",
|
||||
"<9,6,6>": "PSN"
|
||||
},
|
||||
"<9,7>": {
|
||||
"<9,7,1>": "7",
|
||||
"<9,7,2>": "15",
|
||||
"<9,7,3>": "L",
|
||||
"<9,7,4>": "C",
|
||||
"<9,7,5>": "<<none>>",
|
||||
"<9,7,6>": "User"
|
||||
},
|
||||
"<9,8>": {
|
||||
"<9,8,1>": "8",
|
||||
"<9,8,2>": "7",
|
||||
"<9,8,3>": "R",
|
||||
"<9,8,4>": "C",
|
||||
"<9,8,5>": "<<none>>",
|
||||
"<9,8,6>": "RDS"
|
||||
},
|
||||
"<9,9>": {
|
||||
"<9,9,1>": "9",
|
||||
"<9,9,2>": "9",
|
||||
"<9,9,3>": "L",
|
||||
"<9,9,4>": "C",
|
||||
"<9,9,5>": "<<none>>",
|
||||
"<9,9,6>": "Test Wafer Type"
|
||||
},
|
||||
"<9,10>": {
|
||||
"<9,10,1>": "10",
|
||||
"<9,10,2>": "3",
|
||||
"<9,10,3>": "R",
|
||||
"<9,10,4>": "C",
|
||||
"<9,10,5>": "<<none>>",
|
||||
"<9,10,6>": "Wfr Qty"
|
||||
}
|
||||
},
|
||||
"<10>": "L",
|
||||
"<11>": "0",
|
||||
"<12>": "Test Wafer Report",
|
||||
"<13>": "",
|
||||
"<14>": "R",
|
||||
"<15>": "1",
|
||||
"<16>": "1",
|
||||
"<17>": "1",
|
||||
"<18>": "1",
|
||||
"<19>": "1",
|
||||
"<20>": "1",
|
||||
"<21>": "1",
|
||||
"<22>": "1",
|
||||
"<23>": "1",
|
||||
"<24>": "1",
|
||||
"<25>": "0",
|
||||
"<26>": "",
|
||||
"<27>": "",
|
||||
"<28>": "",
|
||||
"<29>": "0",
|
||||
"<30>": "1",
|
||||
"<31>": "0",
|
||||
"<32>": "0",
|
||||
"<33>": "0",
|
||||
"<34>": "16777215",
|
||||
"<35>": "16777215"
|
||||
}
|
||||
}
|
||||
}
|
@ -1,57 +1,57 @@
|
||||
Function Admin_API(@API)
|
||||
/***********************************************************************************************************************
|
||||
|
||||
This program is proprietary and is not to be used by or disclosed to others, nor is it to be copied without written
|
||||
permission from SRP Computer Solutions, Inc.
|
||||
|
||||
Name : Admin_API
|
||||
|
||||
Description : API logic for the Admin resource.
|
||||
|
||||
Notes : All web APIs should include the API_SETUP insert. This will provide several useful variables:
|
||||
|
||||
HTTPMethod - The HTTP Method (Verb) submitted by the client (e.g., GET, POST, etc.)
|
||||
APIURL - The URL for the API entry point (e.g., api.mysite.com/v1).
|
||||
FullEndpointURL - The URL submitted by the client, including query params.
|
||||
FullEndpointURLNoQuery - The URL submitted by the client, excluding query params.
|
||||
EndpointSegment - The URL endpoint segment.
|
||||
ParentURL - The URL path preceeding the current endpoint.
|
||||
CurrentAPI - The name of this stored procedure.
|
||||
|
||||
Parameters :
|
||||
API [in] -- Web API to process. Format is [APIPattern].[HTTPMethod]:
|
||||
- APIPattern must follow this structure Admin[.ID.[<Property>]]
|
||||
- HTTPMethod can be any valid HTTP method, e.g., GET, POST, PUT, DELETE, etc.
|
||||
Examples:
|
||||
- Admin.POST
|
||||
- Admin.ID.PUT
|
||||
- Admin.ID.firstName.GET
|
||||
Response [out] -- Response to be sent back to the Controller (HTTP_MCP) or requesting procedure. Web API
|
||||
services do not rely upon anything being returned in the response. This is what the
|
||||
various services like SetResponseBody and SetResponseStatus services are for. A response
|
||||
value is only helpful if the developers want to use it for debug purposes.
|
||||
|
||||
History : (Date, Initials, Notes)
|
||||
03/14/24 xxx Original programmer.
|
||||
|
||||
***********************************************************************************************************************/
|
||||
|
||||
#pragma precomp SRP_PreCompiler
|
||||
|
||||
$insert APP_INSERTS
|
||||
$insert API_SETUP
|
||||
$insert HTTP_INSERTS
|
||||
|
||||
GoToAPI else
|
||||
// The specific resource endpoint doesn't have a API handler yet.
|
||||
HTTP_Services('SetResponseStatus', 204, 'This is a valid endpoint but a web API handler has not yet been created.')
|
||||
end
|
||||
|
||||
Return Response OR ''
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Endpoint Handlers
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
Function Admin_API(@API)
|
||||
/***********************************************************************************************************************
|
||||
|
||||
This program is proprietary and is not to be used by or disclosed to others, nor is it to be copied without written
|
||||
permission from SRP Computer Solutions, Inc.
|
||||
|
||||
Name : Admin_API
|
||||
|
||||
Description : API logic for the Admin resource.
|
||||
|
||||
Notes : All web APIs should include the API_SETUP insert. This will provide several useful variables:
|
||||
|
||||
HTTPMethod - The HTTP Method (Verb) submitted by the client (e.g., GET, POST, etc.)
|
||||
APIURL - The URL for the API entry point (e.g., api.mysite.com/v1).
|
||||
FullEndpointURL - The URL submitted by the client, including query params.
|
||||
FullEndpointURLNoQuery - The URL submitted by the client, excluding query params.
|
||||
EndpointSegment - The URL endpoint segment.
|
||||
ParentURL - The URL path preceeding the current endpoint.
|
||||
CurrentAPI - The name of this stored procedure.
|
||||
|
||||
Parameters :
|
||||
API [in] -- Web API to process. Format is [APIPattern].[HTTPMethod]:
|
||||
- APIPattern must follow this structure Admin[.ID.[<Property>]]
|
||||
- HTTPMethod can be any valid HTTP method, e.g., GET, POST, PUT, DELETE, etc.
|
||||
Examples:
|
||||
- Admin.POST
|
||||
- Admin.ID.PUT
|
||||
- Admin.ID.firstName.GET
|
||||
Response [out] -- Response to be sent back to the Controller (HTTP_MCP) or requesting procedure. Web API
|
||||
services do not rely upon anything being returned in the response. This is what the
|
||||
various services like SetResponseBody and SetResponseStatus services are for. A response
|
||||
value is only helpful if the developers want to use it for debug purposes.
|
||||
|
||||
History : (Date, Initials, Notes)
|
||||
03/14/24 xxx Original programmer.
|
||||
|
||||
***********************************************************************************************************************/
|
||||
|
||||
#pragma precomp SRP_PreCompiler
|
||||
|
||||
$insert APP_INSERTS
|
||||
$insert API_SETUP
|
||||
$insert HTTP_INSERTS
|
||||
|
||||
GoToAPI else
|
||||
// The specific resource endpoint doesn't have a API handler yet.
|
||||
HTTP_Services('SetResponseStatus', 204, 'This is a valid endpoint but a web API handler has not yet been created.')
|
||||
end
|
||||
|
||||
Return Response OR ''
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Endpoint Handlers
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
|
@ -1,85 +1,85 @@
|
||||
Compile function Archive_Services(@Service, @Params)
|
||||
#pragma precomp SRP_PreCompiler
|
||||
$insert LOGICAL
|
||||
$insert APP_INSERTS
|
||||
EQU COMMA$ To ','
|
||||
|
||||
Declare subroutine Change_Log_Services, Logging_Services
|
||||
Declare function SRP_Datetime, Logging_Services, Environment_Services, Datetime
|
||||
|
||||
LogPath = Environment_Services('GetApplicationRootPath') : '\LogFiles\Archive'
|
||||
LogDate = Oconv(Date(), 'D4/')
|
||||
LogTime = Oconv(Time(), 'MTS')
|
||||
LogFileName = LogDate[7, 4] : '-' : LogDate[1, 2] : '-' : LogDate[4, 2] : ' ArchiveService.csv'
|
||||
Headers = 'Logging DTM' : @FM : 'Message' : @FM : 'Cutoff Date'
|
||||
objLogArchiveService = Logging_Services('NewLog', LogPath, LogFileName, CRLF$, Comma$, Headers, '', False$, False$)
|
||||
LoggingDTM = LogDate : ' ' : LogTime ; // Logging DTM
|
||||
|
||||
GoToService
|
||||
|
||||
Return Response or ""
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// SERVICES
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
Service ArchiveRecords()
|
||||
Errors = ''
|
||||
StatusMessage = 'Starting Archive Script.'
|
||||
LogData = ''
|
||||
LogData<1> = LoggingDTM
|
||||
LogData<2> = StatusMessage
|
||||
Logging_Services('AppendLog', objLogArchiveService, LogData, @RM, @FM)
|
||||
|
||||
//Archive Change Log Records
|
||||
GoSub ChangeLogArchive
|
||||
|
||||
//Finish
|
||||
Locate True$ in Errors using @FM setting ePos then
|
||||
StatusMessage = 'Archive script complete. Errors detected. Check individual archive logs for more info.'
|
||||
LogData = ''
|
||||
LogData<1> = LoggingDTM
|
||||
LogData<2> = StatusMessage
|
||||
Logging_Services('AppendLog', objLogArchiveService, LogData, @RM, @FM)
|
||||
end else
|
||||
StatusMessage = 'Archive script complete. No errors detected.'
|
||||
LogData = ''
|
||||
LogData<1> = LoggingDTM
|
||||
LogData<2> = StatusMessage
|
||||
Logging_Services('AppendLog', objLogArchiveService, LogData, @RM, @FM)
|
||||
end
|
||||
|
||||
End Service
|
||||
|
||||
Service DearchiveRecord(Table, ID)
|
||||
|
||||
end service
|
||||
|
||||
ChangeLogArchive:
|
||||
StatusMessage = 'Starting Change_Log Archive Script.'
|
||||
LogData = ''
|
||||
LogData<1> = LoggingDTM
|
||||
LogData<2> = StatusMessage
|
||||
Logging_Services('AppendLog', objLogArchiveService, LogData, @RM, @FM)
|
||||
ChangeLogArchiveDate = SRP_Datetime('AddYears', Datetime(), -1)
|
||||
Change_Log_Services('ArchiveChangeLogRecByDate', ChangeLogArchiveDate)
|
||||
If Error_Services('NoError') then
|
||||
StatusMessage = 'Starting Change_Log Archive Script.'
|
||||
LogData = ''
|
||||
LogData<1> = LoggingDTM
|
||||
LogData<2> = StatusMessage
|
||||
Logging_Services('AppendLog', objLogArchiveService, LogData, @RM, @FM)
|
||||
end else
|
||||
StatusMessage = 'Error in Change_Log Archive Script.'
|
||||
LogData = ''
|
||||
LogData<1> = LoggingDTM
|
||||
LogData<2> = StatusMessage
|
||||
Logging_Services('AppendLog', objLogArchiveService, LogData, @RM, @FM)
|
||||
Errors<-1> = True$
|
||||
end
|
||||
return
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Compile function Archive_Services(@Service, @Params)
|
||||
#pragma precomp SRP_PreCompiler
|
||||
$insert LOGICAL
|
||||
$insert APP_INSERTS
|
||||
EQU COMMA$ To ','
|
||||
|
||||
Declare subroutine Change_Log_Services, Logging_Services
|
||||
Declare function SRP_Datetime, Logging_Services, Environment_Services, Datetime
|
||||
|
||||
LogPath = Environment_Services('GetApplicationRootPath') : '\LogFiles\Archive'
|
||||
LogDate = Oconv(Date(), 'D4/')
|
||||
LogTime = Oconv(Time(), 'MTS')
|
||||
LogFileName = LogDate[7, 4] : '-' : LogDate[1, 2] : '-' : LogDate[4, 2] : ' ArchiveService.csv'
|
||||
Headers = 'Logging DTM' : @FM : 'Message' : @FM : 'Cutoff Date'
|
||||
objLogArchiveService = Logging_Services('NewLog', LogPath, LogFileName, CRLF$, Comma$, Headers, '', False$, False$)
|
||||
LoggingDTM = LogDate : ' ' : LogTime ; // Logging DTM
|
||||
|
||||
GoToService
|
||||
|
||||
Return Response or ""
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// SERVICES
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
Service ArchiveRecords()
|
||||
Errors = ''
|
||||
StatusMessage = 'Starting Archive Script.'
|
||||
LogData = ''
|
||||
LogData<1> = LoggingDTM
|
||||
LogData<2> = StatusMessage
|
||||
Logging_Services('AppendLog', objLogArchiveService, LogData, @RM, @FM)
|
||||
|
||||
//Archive Change Log Records
|
||||
GoSub ChangeLogArchive
|
||||
|
||||
//Finish
|
||||
Locate True$ in Errors using @FM setting ePos then
|
||||
StatusMessage = 'Archive script complete. Errors detected. Check individual archive logs for more info.'
|
||||
LogData = ''
|
||||
LogData<1> = LoggingDTM
|
||||
LogData<2> = StatusMessage
|
||||
Logging_Services('AppendLog', objLogArchiveService, LogData, @RM, @FM)
|
||||
end else
|
||||
StatusMessage = 'Archive script complete. No errors detected.'
|
||||
LogData = ''
|
||||
LogData<1> = LoggingDTM
|
||||
LogData<2> = StatusMessage
|
||||
Logging_Services('AppendLog', objLogArchiveService, LogData, @RM, @FM)
|
||||
end
|
||||
|
||||
End Service
|
||||
|
||||
Service DearchiveRecord(Table, ID)
|
||||
|
||||
end service
|
||||
|
||||
ChangeLogArchive:
|
||||
StatusMessage = 'Starting Change_Log Archive Script.'
|
||||
LogData = ''
|
||||
LogData<1> = LoggingDTM
|
||||
LogData<2> = StatusMessage
|
||||
Logging_Services('AppendLog', objLogArchiveService, LogData, @RM, @FM)
|
||||
ChangeLogArchiveDate = SRP_Datetime('AddYears', Datetime(), -1)
|
||||
Change_Log_Services('ArchiveChangeLogRecByDate', ChangeLogArchiveDate)
|
||||
If Error_Services('NoError') then
|
||||
StatusMessage = 'Starting Change_Log Archive Script.'
|
||||
LogData = ''
|
||||
LogData<1> = LoggingDTM
|
||||
LogData<2> = StatusMessage
|
||||
Logging_Services('AppendLog', objLogArchiveService, LogData, @RM, @FM)
|
||||
end else
|
||||
StatusMessage = 'Error in Change_Log Archive Script.'
|
||||
LogData = ''
|
||||
LogData<1> = LoggingDTM
|
||||
LogData<2> = StatusMessage
|
||||
Logging_Services('AppendLog', objLogArchiveService, LogData, @RM, @FM)
|
||||
Errors<-1> = True$
|
||||
end
|
||||
return
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -1,152 +1,152 @@
|
||||
Function Authentication_API(@API)
|
||||
/***********************************************************************************************************************
|
||||
|
||||
This program is proprietary and is not to be used by or disclosed to others, nor is it to be copied without written
|
||||
permission from SRP Computer Solutions, Inc.
|
||||
|
||||
Name : Authentication_API
|
||||
|
||||
Description : API logic for the Authentication resource.
|
||||
|
||||
Notes : All web APIs should include the API_SETUP insert. This will provide several useful variables:
|
||||
|
||||
HTTPMethod - The HTTP Method (Verb) submitted by the client (e.g., GET, POST, etc.)
|
||||
APIURL - The URL for the API entry point (e.g., api.mysite.com/v1).
|
||||
FullEndpointURL - The URL submitted by the client, including query params.
|
||||
FullEndpointURLNoQuery - The URL submitted by the client, excluding query params.
|
||||
EndpointSegment - The URL endpoint segment.
|
||||
ParentURL - The URL path preceeding the current endpoint.
|
||||
CurrentAPI - The name of this stored procedure.
|
||||
|
||||
Parameters :
|
||||
API [in] -- Web API to process. Format is [APIPattern].[HTTPMethod]:
|
||||
- APIPattern must follow this structure Authentication[.ID.[<Property>]]
|
||||
- HTTPMethod can be any valid HTTP method, e.g., GET, POST, PUT, DELETE, etc.
|
||||
Examples:
|
||||
- Authentication.POST
|
||||
- Authentication.ID.PUT
|
||||
- Authentication.ID.firstName.GET
|
||||
Response [out] -- Response to be sent back to the Controller (HTTP_MCP) or requesting procedure. Web API
|
||||
services do not rely upon anything being returned in the response. This is what the
|
||||
various services like SetResponseBody and SetResponseStatus services are for. A response
|
||||
value is only helpful if the developers want to use it for debug purposes.
|
||||
|
||||
History : (Date, Initials, Notes)
|
||||
07/17/24 djs Original programmer.
|
||||
|
||||
***********************************************************************************************************************/
|
||||
|
||||
#pragma precomp SRP_PreCompiler
|
||||
|
||||
$insert APP_INSERTS
|
||||
$insert API_SETUP
|
||||
$insert HTTP_INSERTS
|
||||
$insert LSL_USERS_EQUATES
|
||||
|
||||
Equ USERNAME$ To 1
|
||||
Equ GROUP$ To 2
|
||||
Equ PASSWORD$ To 3
|
||||
Equ CONTEXT$ To 4
|
||||
|
||||
Declare function Database_Services, MemberOf
|
||||
|
||||
GoToAPI else
|
||||
// The specific resource endpoint doesn't have a API handler yet.
|
||||
HTTP_Services('SetResponseStatus', 204, 'This is a valid endpoint but a web API handler has not yet been created.')
|
||||
end
|
||||
|
||||
Return Response OR ''
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Endpoint Handlers
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
API authentication.POST
|
||||
|
||||
Body = HTTP_Services('GetHTTPPostString')
|
||||
If Body NE '' then
|
||||
// The POST string will have been encoded so use percent (URL) decoding
|
||||
AuthJson = HTTP_Services('DecodePercentString', Body)
|
||||
hAuthJson = ''
|
||||
ParseResponse = SRP_JSON(hAuthJson, 'PARSE', AuthJson)
|
||||
If (ParseResponse EQ '') then
|
||||
Username = SRP_JSON(hAuthJson, 'GetValue', 'Username')
|
||||
Password = SRP_JSON(hAuthJson, 'GetValue', 'Password')
|
||||
Groups = ''
|
||||
hGroups = SRP_JSON(hAuthJson, 'get', 'Groups')
|
||||
If hGroups then
|
||||
ElementHandles = SRP_JSON(hGroups, 'GetElements', @VM)
|
||||
If ElementHandles NE '' then
|
||||
For each ElementHandle in ElementHandles using @VM
|
||||
Groups<0, -1> = SRP_JSON(ElementHandle, 'GetValue')
|
||||
SRP_JSON(ElementHandle, 'Release')
|
||||
Next ElementHandle
|
||||
end
|
||||
SRP_JSON(hGroups, 'Release')
|
||||
end
|
||||
SRP_JSON(hAuthJson, 'Release')
|
||||
// Validate Credentials
|
||||
UserRec = Database_Services('ReadDataRow', 'LSL_USERS', Username)
|
||||
If Error_Services('NoError') then
|
||||
Credentials = ''
|
||||
Credentials<USERNAME$> = Username
|
||||
Credentials<PASSWORD$> = UserRec<LSL_USERS_PASSWORD$>
|
||||
Credentials<GROUP$> = UserRec<LSL_USERS_GROUPS$>
|
||||
|
||||
Member = False$
|
||||
Group = ''
|
||||
If Groups NE '' then
|
||||
For each Group in Groups using @VM
|
||||
Member = MemberOf(Credentials<USERNAME$>, Group)
|
||||
Until Member EQ True$
|
||||
Next Group
|
||||
end else
|
||||
Member = True$
|
||||
end
|
||||
|
||||
Begin Case
|
||||
|
||||
Case (Password EQ Credentials<PASSWORD$>) AND (Member EQ True$)
|
||||
// Return 200, authentication successful
|
||||
StatusCode = 200
|
||||
Message = 'Authentication successful'
|
||||
HTTP_Services('SetResponseStatus', 200, Message)
|
||||
Case (Password EQ Credentials<PASSWORD$>) AND (Member EQ False$)
|
||||
// Return 401, not a member of required groups
|
||||
NumGroups = DCount(Groups, @VM)
|
||||
If NumGroups GT 1 then
|
||||
Swap @VM with ' or ' in Groups
|
||||
Message = 'User is not a member of the ' : Groups : ' groups.'
|
||||
end else
|
||||
Message = 'User is not a member of the ' : Group : ' group.'
|
||||
end
|
||||
HTTP_Services('SetResponseStatus', 401, 'Authentication failed. ':Message)
|
||||
|
||||
Case Password NE Credentials<PASSWORD$>
|
||||
// Return 401, unable to validate password
|
||||
Message = 'Unable to validate username. Please re-enter.'
|
||||
HTTP_Services('SetResponseStatus', 401, 'Authentication failed. ':Message)
|
||||
Case Otherwise$
|
||||
HTTP_Services('SetResponseStatus', 500, 'Error in the ' : CurrentAPI : ' API. Unhandled case.')
|
||||
End Case
|
||||
end else
|
||||
// Error reading user record
|
||||
ErrorMsg = Error_Services('GetMessage')
|
||||
HTTP_Services('SetResponseStatus', 500, 'Error in the ' : CurrentAPI : ' API. Message: ': ErrorMsg)
|
||||
end
|
||||
end else
|
||||
HTTP_Services('SetResponseStatus', 400, 'Error in the ' : CurrentAPI : ' API. Error parsing JSON.')
|
||||
end
|
||||
end else
|
||||
HTTP_Services('SetResponseStatus', 400, 'Error in the ' : CurrentAPI : ' API. Empty request.')
|
||||
end
|
||||
|
||||
end api
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Internal GoSubs
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
Function Authentication_API(@API)
|
||||
/***********************************************************************************************************************
|
||||
|
||||
This program is proprietary and is not to be used by or disclosed to others, nor is it to be copied without written
|
||||
permission from SRP Computer Solutions, Inc.
|
||||
|
||||
Name : Authentication_API
|
||||
|
||||
Description : API logic for the Authentication resource.
|
||||
|
||||
Notes : All web APIs should include the API_SETUP insert. This will provide several useful variables:
|
||||
|
||||
HTTPMethod - The HTTP Method (Verb) submitted by the client (e.g., GET, POST, etc.)
|
||||
APIURL - The URL for the API entry point (e.g., api.mysite.com/v1).
|
||||
FullEndpointURL - The URL submitted by the client, including query params.
|
||||
FullEndpointURLNoQuery - The URL submitted by the client, excluding query params.
|
||||
EndpointSegment - The URL endpoint segment.
|
||||
ParentURL - The URL path preceeding the current endpoint.
|
||||
CurrentAPI - The name of this stored procedure.
|
||||
|
||||
Parameters :
|
||||
API [in] -- Web API to process. Format is [APIPattern].[HTTPMethod]:
|
||||
- APIPattern must follow this structure Authentication[.ID.[<Property>]]
|
||||
- HTTPMethod can be any valid HTTP method, e.g., GET, POST, PUT, DELETE, etc.
|
||||
Examples:
|
||||
- Authentication.POST
|
||||
- Authentication.ID.PUT
|
||||
- Authentication.ID.firstName.GET
|
||||
Response [out] -- Response to be sent back to the Controller (HTTP_MCP) or requesting procedure. Web API
|
||||
services do not rely upon anything being returned in the response. This is what the
|
||||
various services like SetResponseBody and SetResponseStatus services are for. A response
|
||||
value is only helpful if the developers want to use it for debug purposes.
|
||||
|
||||
History : (Date, Initials, Notes)
|
||||
07/17/24 djs Original programmer.
|
||||
|
||||
***********************************************************************************************************************/
|
||||
|
||||
#pragma precomp SRP_PreCompiler
|
||||
|
||||
$insert APP_INSERTS
|
||||
$insert API_SETUP
|
||||
$insert HTTP_INSERTS
|
||||
$insert LSL_USERS_EQUATES
|
||||
|
||||
Equ USERNAME$ To 1
|
||||
Equ GROUP$ To 2
|
||||
Equ PASSWORD$ To 3
|
||||
Equ CONTEXT$ To 4
|
||||
|
||||
Declare function Database_Services, MemberOf
|
||||
|
||||
GoToAPI else
|
||||
// The specific resource endpoint doesn't have a API handler yet.
|
||||
HTTP_Services('SetResponseStatus', 204, 'This is a valid endpoint but a web API handler has not yet been created.')
|
||||
end
|
||||
|
||||
Return Response OR ''
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Endpoint Handlers
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
API authentication.POST
|
||||
|
||||
Body = HTTP_Services('GetHTTPPostString')
|
||||
If Body NE '' then
|
||||
// The POST string will have been encoded so use percent (URL) decoding
|
||||
AuthJson = HTTP_Services('DecodePercentString', Body)
|
||||
hAuthJson = ''
|
||||
ParseResponse = SRP_JSON(hAuthJson, 'PARSE', AuthJson)
|
||||
If (ParseResponse EQ '') then
|
||||
Username = SRP_JSON(hAuthJson, 'GetValue', 'Username')
|
||||
Password = SRP_JSON(hAuthJson, 'GetValue', 'Password')
|
||||
Groups = ''
|
||||
hGroups = SRP_JSON(hAuthJson, 'get', 'Groups')
|
||||
If hGroups then
|
||||
ElementHandles = SRP_JSON(hGroups, 'GetElements', @VM)
|
||||
If ElementHandles NE '' then
|
||||
For each ElementHandle in ElementHandles using @VM
|
||||
Groups<0, -1> = SRP_JSON(ElementHandle, 'GetValue')
|
||||
SRP_JSON(ElementHandle, 'Release')
|
||||
Next ElementHandle
|
||||
end
|
||||
SRP_JSON(hGroups, 'Release')
|
||||
end
|
||||
SRP_JSON(hAuthJson, 'Release')
|
||||
// Validate Credentials
|
||||
UserRec = Database_Services('ReadDataRow', 'LSL_USERS', Username)
|
||||
If Error_Services('NoError') then
|
||||
Credentials = ''
|
||||
Credentials<USERNAME$> = Username
|
||||
Credentials<PASSWORD$> = UserRec<LSL_USERS_PASSWORD$>
|
||||
Credentials<GROUP$> = UserRec<LSL_USERS_GROUPS$>
|
||||
|
||||
Member = False$
|
||||
Group = ''
|
||||
If Groups NE '' then
|
||||
For each Group in Groups using @VM
|
||||
Member = MemberOf(Credentials<USERNAME$>, Group)
|
||||
Until Member EQ True$
|
||||
Next Group
|
||||
end else
|
||||
Member = True$
|
||||
end
|
||||
|
||||
Begin Case
|
||||
|
||||
Case (Password EQ Credentials<PASSWORD$>) AND (Member EQ True$)
|
||||
// Return 200, authentication successful
|
||||
StatusCode = 200
|
||||
Message = 'Authentication successful'
|
||||
HTTP_Services('SetResponseStatus', 200, Message)
|
||||
Case (Password EQ Credentials<PASSWORD$>) AND (Member EQ False$)
|
||||
// Return 401, not a member of required groups
|
||||
NumGroups = DCount(Groups, @VM)
|
||||
If NumGroups GT 1 then
|
||||
Swap @VM with ' or ' in Groups
|
||||
Message = 'User is not a member of the ' : Groups : ' groups.'
|
||||
end else
|
||||
Message = 'User is not a member of the ' : Group : ' group.'
|
||||
end
|
||||
HTTP_Services('SetResponseStatus', 401, 'Authentication failed. ':Message)
|
||||
|
||||
Case Password NE Credentials<PASSWORD$>
|
||||
// Return 401, unable to validate password
|
||||
Message = 'Unable to validate username. Please re-enter.'
|
||||
HTTP_Services('SetResponseStatus', 401, 'Authentication failed. ':Message)
|
||||
Case Otherwise$
|
||||
HTTP_Services('SetResponseStatus', 500, 'Error in the ' : CurrentAPI : ' API. Unhandled case.')
|
||||
End Case
|
||||
end else
|
||||
// Error reading user record
|
||||
ErrorMsg = Error_Services('GetMessage')
|
||||
HTTP_Services('SetResponseStatus', 500, 'Error in the ' : CurrentAPI : ' API. Message: ': ErrorMsg)
|
||||
end
|
||||
end else
|
||||
HTTP_Services('SetResponseStatus', 400, 'Error in the ' : CurrentAPI : ' API. Error parsing JSON.')
|
||||
end
|
||||
end else
|
||||
HTTP_Services('SetResponseStatus', 400, 'Error in the ' : CurrentAPI : ' API. Empty request.')
|
||||
end
|
||||
|
||||
end api
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Internal GoSubs
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
@ -1,415 +1,415 @@
|
||||
Compile function Automated_Workflow_Services(@Service, @Params)
|
||||
|
||||
/*
|
||||
Initial Author: Jonathan Ouellette
|
||||
This service module has a catalogued list of functions to quickly and easily perform certain functions related to lot
|
||||
processing.
|
||||
|
||||
1. CreateAWO - Imitates the process of getting data from SAP and processing the WO start in OI.
|
||||
2. RouteWO - Imitates routing of a WO, AKA selecting a ProdVer and Assigning the WO to a reactor Type
|
||||
3. PrescribeWafers - Imitates creating the child lots for a WO, AKA creating WO_MAT records
|
||||
4. ReleaseCassettes - Assigns raw substrates to the WO_MAT records. RDS for non-epipro is created at this point.
|
||||
5. PerformPTI - Imitates Receiving operator moving the lot into the fab.
|
||||
6. Perform1VER - Performs the 1VER operation for an RDS.
|
||||
7. PerformLoad - Performs the load operation for an RDS.
|
||||
8. PerformUnload - Performs the unload operation for a non-epipro RDS.
|
||||
9. EnterRecipeParms - Used in conjunction with PerformLoad. Used to enter the parameters for the Reactor Recipe upon load
|
||||
typically this is the first load of a Work Order.
|
||||
10. VerifyRecipeParms - Used in conjunction with PerformLoad. Used to verify the current recipe setpoints for an RDS load.
|
||||
|
||||
|
||||
*/
|
||||
#pragma precomp SRP_PreCompiler
|
||||
Declare function Gan_Services, Obj_Notes_Sent, msg, Check_Notes, Jonathan_Services, Database_Services, SRP_Datetime
|
||||
Declare function Lsl_Users_Services, SRP_Time, RList, Error_Services, Obj_Wo_Mat, Pm_Services, Date_Services, Test_Run_Services
|
||||
Declare function Reactor_Services, Reactor_Log_Services, obj_react_item, Utility, Environment_Services, obj_wo_log, Qa_Services
|
||||
Declare subroutine Start_Window, RList, Set_Status, Database_Services, Obj_Sap, Sap_Services, Btree.Extract, Qa_Services
|
||||
Declare subroutine Reactor_Services, Obj_Wo_Log, obj_wo_mat, Work_Order_Services, Material_Movement_Services, Automated_Workflow_Services
|
||||
Declare subroutine Override_Services, Obj_Wo_Mat_Log, obj_post_log, Obj_Sap
|
||||
|
||||
$insert LOGICAL
|
||||
$insert NOTE_PTRS_EQU
|
||||
$insert MSG_EQUATES
|
||||
$Insert APP_INSERTS
|
||||
$Insert RLIST_EQUATES
|
||||
$Insert WO_LOG_EQUATES
|
||||
$Insert RDS_EQUATES
|
||||
$Insert WO_STEP_EQUATES
|
||||
$Insert WO_MAT_QA_EQUATES
|
||||
$Insert REACT_RUN_EQUATES
|
||||
$Insert RDS_LAYER_EQUATES
|
||||
$Insert RDS_TEST_EQUATES
|
||||
$Insert PM_EQUATES
|
||||
$Insert PM_SPEC_EQUATES
|
||||
$Insert WO_MAT_EQUATES
|
||||
$Insert WM_OUT_EQUATES
|
||||
$Insert TEST_RUN_EQUATES
|
||||
$Insert TEST_RUN_WAFER_EQUATES
|
||||
$Insert TEST_WAFER_PROD_EQUATES
|
||||
$Insert TEST_RUN_TYPE_EQUATES
|
||||
$Insert EPI_PART_EQUATES
|
||||
$Insert POPUP_EQUATES
|
||||
$Insert REACTOR_EQUATES
|
||||
|
||||
GoToService
|
||||
|
||||
Return Response or ""
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// SERVICES
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
Service CreatAWO()
|
||||
|
||||
//Step 1: Start a WO WOLogFileIn variable emulates what an SAP file would have
|
||||
/*
|
||||
ProdOrdNo = FileIn<1,1>
|
||||
CustPONo = FileIn<1,2>
|
||||
PromiseShipDt = FileIn<1,3>
|
||||
EpiPartNo = FileIn<1,4>
|
||||
SubPartNo = FileIn<1,5>
|
||||
SubRevNo = FileIn<1,6>
|
||||
WOQty = FileIn<1,7>
|
||||
VendCd = FileIn<1,8>
|
||||
*/
|
||||
WOLogFileIn = 'M124567.1':@VM:'NA':@VM:'02/29/2024':@VM:'400149S':@VM:'827906':@VM:'1.0':@VM:'150':@VM:'NA'
|
||||
RetVal = obj_WO_LOG('SAPCreate',WOLogFileIn)
|
||||
Response = RetVal
|
||||
end service
|
||||
|
||||
Service RouteWO(WO_No)
|
||||
//Step 2: Route a WO with a Product Version
|
||||
|
||||
WOLogRec = Database_Services('ReadDataRow', 'WO_LOG', WO_No)
|
||||
EpiPartNo = WOLogRec<WO_LOG_EPI_PART_NO$>
|
||||
If EpiPartNo NE '' then
|
||||
AllProdVerNos = XLATE('EPI_PART',EpiPartNo,EPI_PART_PROD_VER_NO$,'X')
|
||||
TypeOver = ''
|
||||
TypeOver<PDISPLAY$> = AllProdVerNos
|
||||
TypeOver<PSELECT$> = 1
|
||||
TypeOver<PMODE$> = 'K'
|
||||
SelectedProdVerNo = Popup(@WINDOW,TypeOver,'PROD_VER')
|
||||
If SelectedProdVerNo NE '' then
|
||||
obj_WO_Log('Route',WO_No:@RM:SelectedProdVerNo)
|
||||
end
|
||||
end
|
||||
end service
|
||||
|
||||
Service PrescribeWafers(WONo, AmountToRX)
|
||||
//Step 3: prescribe wafers. This is the same as assigning lot numbers to individual lots of raw material. AKA creating WO_MAT records
|
||||
/*
|
||||
a. User clicks the PUB_RX button on the WO_LOG form.
|
||||
b. Opens WO Receipt form
|
||||
c. Users clicks on WO's Due in
|
||||
d. User selects or enters a WO.
|
||||
e. User clicks scan codes, opens
|
||||
*/
|
||||
debug
|
||||
ProdVerNo = XLATE('WO_LOG', WONo, 'PROD_VER_NO', 'X')
|
||||
ReactType = XLATE('WO_LOG', WONo, 'REACT_TYPE', 'X')
|
||||
CassLotNo = '123456789'
|
||||
CustPartNo = XLATE('WO_LOG', WONo, 'CUST_PART_NO', 'X')
|
||||
CassQty = 25
|
||||
NumCassToRX = AmountToRX / 25
|
||||
ExistingWOMatList = XLATE('WO_LOG', WONo, 'WO_MAT_KEY', 'X')
|
||||
LastCassNo = 0
|
||||
for each cass in ExistingWOMatList using @VM setting iPos
|
||||
thisCassNo = FIELD(cass, '*', 2)
|
||||
if thisCassNo GT LastCassNo then LastCassNo = thisCassNo
|
||||
Next cass
|
||||
for i = 1 to NumCassToRX
|
||||
NextCassNo = LastCassNo + 1
|
||||
LastCassNo = nextCassNo
|
||||
Parms = WONo:@RM
|
||||
Parms := NextCassNo:@RM
|
||||
Parms := ProdVerNo:@RM
|
||||
Parms := CassLotNo:@RM
|
||||
Parms := CassQty:@RM
|
||||
Parms := CustPartNo:@RM ;* This is the CUSTOMER part No
|
||||
Parms := 1:@RM
|
||||
Parms := ReactType:@RM ;* 3 character Reactor Type Code
|
||||
Parms := '':@RM
|
||||
Parms := 'SR':@RM ;* Warehouse = 'SR' - Shipping/Receiving Area
|
||||
Parms := 'RB':@RM ;* Location = 'RB' - Receiving Bench
|
||||
Parms := OCONV(SRP_Datetime('Now'), 'DT/4'):@RM
|
||||
Parms := 'JONATHAN_O':@RM
|
||||
Parms := '':@RM
|
||||
Parms := '':@RM
|
||||
Parms := '':@RM ;* Added 8/18/2009 JCH
|
||||
Parms := '':@RM ;* Added 12/16/2009 JCH
|
||||
Parms := 25:@RM ;* Added 11/4/2009 JCH
|
||||
Parms := 0:@RM ;* Added 05/14/2010 JCH
|
||||
Parms := '':@RM ;* Added 07/14/2011 for SAP Project JCH
|
||||
Parms := 25 ; // Added 02/01/2018 dmb
|
||||
obj_WO_Mat('Create',Parms)
|
||||
If Error_Services('NoError') then
|
||||
WOLogRec = Database_Services('ReadDataRow', 'WO_LOG', WONo)
|
||||
WOLogRec<WO_LOG_WO_MAT_KEY$, -1> = WONo : '*' : LastCassNo
|
||||
Database_Services('WriteDataRow', 'WO_LOG', WONo, WOLogRec, 1, 0, 1)
|
||||
end
|
||||
Next i
|
||||
Work_Order_Services('UpdateReceivedQty', WONo)
|
||||
|
||||
|
||||
end service
|
||||
|
||||
Service ReleaseCassettes(WONo)
|
||||
|
||||
//Step 4: User clicks release cassettes(PUB_RELEASE) from WO_LOG form
|
||||
Work_Order_Services('ReleaseCassettes', WONo)
|
||||
//Can get RDS number at this point
|
||||
end service
|
||||
|
||||
Service PerformPTI(CassID)
|
||||
//Step 5: User performs a PTI scan to tag lot into the fab.
|
||||
Warehouse = '1K'
|
||||
Location = 'PTI'
|
||||
Material_Movement_Services('SaveRecord', CassID, Warehouse, Location, @USER4)
|
||||
end service
|
||||
|
||||
* Service BatchProcessLotList()
|
||||
* RDSList = ''
|
||||
*
|
||||
* RDSList<1> = 627134
|
||||
* RDSList<2> = 627135
|
||||
* RDSList<3> = 627136
|
||||
* RDSList<4> = 627132
|
||||
* RDSList<5> = 627133
|
||||
*
|
||||
* for each rds in RDSList using @FM
|
||||
* //Automated_Workflow_Services('Perform1VER', rds, 63, 25)
|
||||
* Automated_Workflow_Services('PerformUnload', rds)
|
||||
* Next rds
|
||||
* end service
|
||||
|
||||
Service Perform1VER(CassID, ReactorID, WfrQty)
|
||||
|
||||
//Step 6
|
||||
If RowExists('RDS', CassID) AND ReactorID NE '' then
|
||||
ReadyToSign = QA_Services('PreEpiSignatureReady', CassID, @User4, WfrQty, ReactorID)
|
||||
If (ReadyToSign EQ True$) then
|
||||
QA_Services('SignPreEpiStage', CassID, @USER4, WfrQty, ReactorID)
|
||||
end
|
||||
end
|
||||
|
||||
end service
|
||||
|
||||
Service PerformLoad(CassID, WfrInQty, LorRLL)
|
||||
|
||||
//Step 7
|
||||
If RowExists('RDS', CassID) then
|
||||
ReadyToSign = Qa_Services('LoadSignatureReady', CassID, @User4, WfrInQty, LorRLL, 0)
|
||||
If ReadyToSign then
|
||||
Qa_Services('SignLoadStage', CassID, @User4, WfrInQty, LorRLL, 0)
|
||||
end else
|
||||
ErrorReason = Error_Services('GetMessage')
|
||||
Begin Case
|
||||
Case ErrorReason EQ 'Process Error: Recipe parameters have not been entered.'
|
||||
//Get the expected parameters and enter them. This is in the RDS_Layer Record
|
||||
//First lets get limits from the RDS Layer Record(s)
|
||||
RDSLayerKeys = XLATE('RDS', CassID, RDS_RDS_LAYER_KEYS$, 'X')
|
||||
for each RDSLayerKey in RDSLayerKeys using @VM setting rlPos
|
||||
Automated_Workflow_Services('EnterRecipeParams', RDSLayerKey)
|
||||
If Error_Services('NoError') then
|
||||
Automated_Workflow_Services('PerformLoad', CassID, WfrInQty, LorRLL)
|
||||
end else
|
||||
//Die
|
||||
Return
|
||||
end
|
||||
Next RDSLayerKey
|
||||
Case ErrorReason EQ 'RDS layer parameters must be reviewed for accuracy and acknowledged before the load operation can be signed.'
|
||||
Automated_Workflow_Services('VerifyRecipeParams', CassID)
|
||||
If Error_Services('NoError') then
|
||||
Automated_Workflow_Services('PerformLoad', CassID, WfrInQty, LorRLL)
|
||||
end else
|
||||
//Die
|
||||
Return
|
||||
end
|
||||
End Case
|
||||
end
|
||||
end
|
||||
end service
|
||||
|
||||
Service PerformUnload(RDSNo)
|
||||
//Step 8
|
||||
|
||||
If RDSNo NE '' then
|
||||
Reactor = XLATE('RDS', RDSNo, 'REACTOR', 'X')
|
||||
If Reactor NE '' then
|
||||
ReadyToSign = QA_Services('UnloadSignatureReady', RDSNo, @User4, Reactor)
|
||||
If Error_Services('HasError') then
|
||||
If ErrorMsg EQ 'Cassette runtime exceeds three days! An override by a LEAD or SUPERVISOR is required.' then
|
||||
Override_Services('SetOverride', 'RDS', RDSNo, 'UNLOAD_DTM', @USER4)
|
||||
ReadyToSign = True$
|
||||
end
|
||||
end
|
||||
If ReadyToSign then
|
||||
QA_Services('SignUnloadStage', RDSNo, @User4)
|
||||
end
|
||||
end else
|
||||
Error_Services('Add', 'No Reactor assigned to RDS!')
|
||||
end
|
||||
end else
|
||||
Error_Services('Add', 'No RDS No. Supplied!')
|
||||
end
|
||||
end service
|
||||
|
||||
Service PerformFQA(RDSNo)
|
||||
|
||||
ToolID = ''
|
||||
WHCd = 'CR'
|
||||
LocCD = 'QA'
|
||||
Tag = ''
|
||||
SigDt = Date()
|
||||
SigTm = Time()
|
||||
WONo = XLATE('RDS', RDSNo, RDS_WO$, 'X')
|
||||
CassNo = XLATE('RDS', RDSNo, RDS_CASS_NO$, 'X')
|
||||
|
||||
Equ COL$LOG_FILE to 1
|
||||
Equ COL$LOG_DTM to 2
|
||||
Equ COL$ACTION to 3
|
||||
Equ COL$WH_CD to 4
|
||||
Equ COL$LOC_CD to 5
|
||||
Equ COL$WO_NOS to 6
|
||||
Equ COL$CASS_NOS to 7
|
||||
Equ COL$USER_ID to 8
|
||||
Equ COL$TAGS to 9
|
||||
Equ COL$TOOL_ID to 10
|
||||
EventParms = ''
|
||||
EventParms<COL$LOG_FILE> = 'WO_MAT'
|
||||
EventParms<COL$LOG_DTM> = SigDt:' ':SigTm
|
||||
EventParms<COL$ACTION> = 1:'QA'
|
||||
EventParms<COL$WH_CD> = 'CR'
|
||||
EventParms<COL$LOC_CD> = 'QA'
|
||||
EventParms<COL$WO_NOS> = WONo
|
||||
EventParms<COL$CASS_NOS> = CassNo
|
||||
EventParms<COL$USER_ID> = @USER4
|
||||
EventParms<COL$TAGS> = ''
|
||||
EventParms<COL$TOOL_ID> = ''
|
||||
|
||||
CONVERT @FM TO @RM IN EventParms
|
||||
|
||||
obj_WO_Mat_Log('Create',EventParms) ;* * * * * INV EVENT LOG * * * * *
|
||||
Obj_Post_Log('POST')
|
||||
|
||||
Qa_Services('SignFQAStage', RDSNo, @USER4)
|
||||
end service
|
||||
|
||||
|
||||
Service EnterRecipeParams(RDSLayerKey)
|
||||
|
||||
RDSLayerRec = Database_Services('ReadDataRow', 'RDS_LAYER', RDSLayerKey)
|
||||
If RDSLayerRec NE '' then
|
||||
If RDSLayerRec<RDS_LAYER_EPI_TIME_MIN$> NE '' AND RDSLayerRec<RDS_LAYER_EPI_TIME_MAX$> NE '' then
|
||||
//Epi Deposit Time
|
||||
RDSLayerRec<RDS_LAYER_EPI_TIME$> = ((RDSLayerRec<RDS_LAYER_EPI_TIME_MAX$> - RDSLayerRec<RDS_LAYER_EPI_TIME_MIN$>) / 2) + RDSLayerRec<RDS_LAYER_EPI_TIME_MIN$>
|
||||
end
|
||||
|
||||
If RDSLayerRec<RDS_LAYER_DILUENT_MIN$> NE '' AND RDSLayerRec<RDS_LAYER_DILUENT_MAX$> NE '' then
|
||||
//Diluent
|
||||
RDSLayerRec<RDS_LAYER_DILUENT_ADJ_PARAM$> = ((RDSLayerRec<RDS_LAYER_DILUENT_MAX$> - RDSLayerRec<RDS_LAYER_DILUENT_MIN$>) / 2) + RDSLayerRec<RDS_LAYER_DILUENT_MIN$>
|
||||
end
|
||||
|
||||
If RDSLayerRec<RDS_LAYER_DOPANT_FLOW_MIN$> NE '' AND RDSLayerRec<RDS_LAYER_DOPANT_FLOW_MAX$> NE '' then
|
||||
//Dopant Flow
|
||||
RDSLayerRec<RDS_LAYER_DOPANT_FLOW$> = ((RDSLayerRec<RDS_LAYER_DOPANT_FLOW_MAX$> - RDSLayerRec<RDS_LAYER_DOPANT_FLOW_MIN$>) / 2) + RDSLayerRec<RDS_LAYER_DOPANT_FLOW_MIN$>
|
||||
end
|
||||
|
||||
If RDSLayerRec<RDS_LAYER_HCL_FLOW_MIN$> NE '' AND RDSLayerRec<RDS_LAYER_HCL_FLOW_MAX$> NE '' then
|
||||
//HCL Flow
|
||||
RDSLayerRec<RDS_LAYER_HCL_FLOW$> = ((RDSLayerRec<RDS_LAYER_HCL_FLOW_MAX$> - RDSLayerRec<RDS_LAYER_HCL_FLOW_MIN$>) / 2) + RDSLayerRec<RDS_LAYER_HCL_FLOW_MIN$>
|
||||
end
|
||||
|
||||
If RDSLayerRec<RDS_LAYER_BAKE_TIME_MIN$> NE '' AND RDSLayerRec<RDS_LAYER_BAKE_TIME_MAX$> NE '' then
|
||||
//Bake Time
|
||||
RDSLayerRec<RDS_LAYER_BAKE_TIME$> = ((RDSLayerRec<RDS_LAYER_BAKE_TIME_MAX$> - RDSLayerRec<RDS_LAYER_BAKE_TIME_MIN$>) / 2) + RDSLayerRec<RDS_LAYER_BAKE_TIME_MIN$>
|
||||
end
|
||||
|
||||
If RDSLayerRec<RDS_LAYER_EPI_H2_FLOW_MIN$> NE '' AND RDSLayerRec<RDS_LAYER_EPI_H2_FLOW_MAX$> NE '' then
|
||||
//H2 Flow
|
||||
RDSLayerRec<RDS_LAYER_EPI_H2_FLOW$> = ((RDSLayerRec<RDS_LAYER_EPI_H2_FLOW_MAX$> - RDSLayerRec<RDS_LAYER_EPI_H2_FLOW_MIN$>) / 2) + RDSLayerRec<RDS_LAYER_EPI_H2_FLOW_MIN$>
|
||||
end
|
||||
|
||||
If RDSLayerRec<RDS_LAYER_TCS_FLOW_MIN$> NE '' AND RDSLayerRec<RDS_LAYER_TCS_FLOW_MAX$> NE '' then
|
||||
//TCS Flow
|
||||
RDSLayerRec<RDS_LAYER_TCS_FLOW$> = ((RDSLayerRec<RDS_LAYER_TCS_FLOW_MAX$> - RDSLayerRec<RDS_LAYER_TCS_FLOW_MIN$>) / 2) + RDSLayerRec<RDS_LAYER_TCS_FLOW_MIN$>
|
||||
end
|
||||
|
||||
If RDSLayerRec<RDS_LAYER_DCS_FLOW_MIN$> NE '' AND RDSLayerRec<RDS_LAYER_DCS_FLOW_MAX$> NE '' then
|
||||
//DCS Flow
|
||||
RDSLayerRec<RDS_LAYER_DCS_FLOW$> = ((RDSLayerRec<RDS_LAYER_DCS_FLOW_MAX$> - RDSLayerRec<RDS_LAYER_DCS_FLOW_MIN$>) / 2) + RDSLayerRec<RDS_LAYER_DCS_FLOW_MIN$>
|
||||
end
|
||||
|
||||
If RDSLayerRec<RDS_LAYER_AUX1_MIN$> NE '' AND RDSLayerRec<RDS_LAYER_AUX1_MAX$> NE '' then
|
||||
//AUX 1
|
||||
RDSLayerRec<RDS_LAYER_AUX1$> = ((RDSLayerRec<RDS_LAYER_AUX1_MAX$> - RDSLayerRec<RDS_LAYER_AUX1_MIN$>) / 2) + RDSLayerRec<RDS_LAYER_AUX1_MIN$>
|
||||
end
|
||||
|
||||
If RDSLayerRec<RDS_LAYER_AUX2_MIN$> NE '' AND RDSLayerRec<RDS_LAYER_AUX2_MAX$> NE '' then
|
||||
//AUX2
|
||||
RDSLayerRec<RDS_LAYER_AUX2$> = ((RDSLayerRec<RDS_LAYER_AUX2_MAX$> - RDSLayerRec<RDS_LAYER_AUX2_MIN$>) / 2) + RDSLayerRec<RDS_LAYER_AUX2_MIN$>
|
||||
end
|
||||
|
||||
If RDSLayerRec<RDS_LAYER_F_OFFSET_MIN$> NE '' AND RDSLayerRec<RDS_LAYER_F_OFFSET_MAX$> NE '' then
|
||||
//F_OFFSET
|
||||
RDSLayerRec<RDS_LAYER_F_OFFSET$> = ((RDSLayerRec<RDS_LAYER_F_OFFSET_MAX$> - RDSLayerRec<RDS_LAYER_F_OFFSET_MIN$>) / 2) + RDSLayerRec<RDS_LAYER_F_OFFSET_MIN$>
|
||||
end
|
||||
|
||||
If RDSLayerRec<RDS_LAYER_S_OFFSET_MIN$> NE '' AND RDSLayerRec<RDS_LAYER_S_OFFSET_MAX$> NE '' then
|
||||
//S_OFFSET
|
||||
RDSLayerRec<RDS_LAYER_S_OFFSET$> = ((RDSLayerRec<RDS_LAYER_S_OFFSET_MAX$> - RDSLayerRec<RDS_LAYER_S_OFFSET_MIN$>) / 2) + RDSLayerRec<RDS_LAYER_S_OFFSET_MIN$>
|
||||
end
|
||||
|
||||
If RDSLayerRec<RDS_LAYER_R_OFFSET_MIN$> NE '' AND RDSLayerRec<RDS_LAYER_R_OFFSET_MAX$> NE '' then
|
||||
//R OFFSET
|
||||
RDSLayerRec<RDS_LAYER_R_OFFSET$> = ((RDSLayerRec<RDS_LAYER_R_OFFSET_MAX$> - RDSLayerRec<RDS_LAYER_R_OFFSET_MIN$>) / 2) + RDSLayerRec<RDS_LAYER_R_OFFSET_MIN$>
|
||||
end
|
||||
|
||||
If RDSLayerRec<RDS_LAYER_ETCH1_MIN$> NE '' AND RDSLayerRec<RDS_LAYER_ETCH1_MAX$> NE '' then
|
||||
//ETCH 1
|
||||
RDSLayerRec<RDS_LAYER_ETCH1$> = ((RDSLayerRec<RDS_LAYER_ETCH1_MAX$> - RDSLayerRec<RDS_LAYER_ETCH1_MIN$>) / 2) + RDSLayerRec<RDS_LAYER_ETCH1_MIN$>
|
||||
end
|
||||
|
||||
If RDSLayerRec<RDS_LAYER_ETCH2_MIN$> NE '' AND RDSLayerRec<RDS_LAYER_ETCH2_MAX$> NE '' then
|
||||
//ETCH 2
|
||||
RDSLayerRec<RDS_LAYER_ETCH2$> = ((RDSLayerRec<RDS_LAYER_ETCH2_MAX$> - RDSLayerRec<RDS_LAYER_ETCH2_MIN$>) / 2) + RDSLayerRec<RDS_LAYER_ETCH2_MIN$>
|
||||
end
|
||||
|
||||
If RDSLayerRec<RDS_LAYER_ETCH3_MIN$> NE '' AND RDSLayerRec<RDS_LAYER_ETCH3_MAX$> NE '' then
|
||||
//ETCH 3
|
||||
RDSLayerRec<RDS_LAYER_ETCH3$> = ((RDSLayerRec<RDS_LAYER_ETCH3_MAX$> - RDSLayerRec<RDS_LAYER_ETCH3_MIN$>) / 2) + RDSLayerRec<RDS_LAYER_ETCH3_MIN$>
|
||||
end
|
||||
|
||||
If RDSLayerRec<RDS_LAYER_UL_TEMP_MIN$> NE '' AND RDSLayerRec<RDS_LAYER_UL_TEMP_MAX$> NE '' then
|
||||
//UL_TEMP
|
||||
RDSLayerRec<RDS_LAYER_UL_TEMP$> = ((RDSLayerRec<RDS_LAYER_UL_TEMP_MAX$> - RDSLayerRec<RDS_LAYER_UL_TEMP_MIN$>) / 2) + RDSLayerRec<RDS_LAYER_UL_TEMP_MIN$>
|
||||
end
|
||||
|
||||
If RDSLayerRec<RDS_LAYER_SUSC_ETCH_MIN$> NE '' AND RDSLayerRec<RDS_LAYER_SUSC_ETCH_MAX$> NE '' then
|
||||
//Susceptor Etch
|
||||
RDSLayerRec<RDS_LAYER_SUSC_ETCH$> = ((RDSLayerRec<RDS_LAYER_SUSC_ETCH_MAX$> - RDSLayerRec<RDS_LAYER_SUSC_ETCH_MIN$>) / 2) + RDSLayerRec<RDS_LAYER_SUSC_ETCH_MIN$>
|
||||
end
|
||||
Database_Services('WriteDataRow', 'RDS_LAYER', RDSLayerKey, RDSLayerRec, True$, False$, True$)
|
||||
end
|
||||
|
||||
end service
|
||||
|
||||
Service VerifyRecipeParams(RDSNo)
|
||||
//Used to verify exisiting recipe params. This is if they are already set.
|
||||
IF RDSNo NE '' then
|
||||
RDSRec = Database_Services('ReadDataRow', 'RDS', RDSNo)
|
||||
RDSRec<RDS_RDS_LAYER_ACK$> = True$
|
||||
Database_Services('WriteDataRow', 'RDS', RDSNo, RDSRec, True$, False$, True$)
|
||||
end else
|
||||
Error_Services('Add', 'RDS No was blank!!!')
|
||||
end
|
||||
end service
|
||||
|
||||
Service SendCassComp(WoMatKey)
|
||||
Sap_Services('RetransmitCassComp', WoMatKey)
|
||||
obj_sap('SendOutbound')
|
||||
end service
|
||||
|
||||
|
||||
|
||||
|
||||
Compile function Automated_Workflow_Services(@Service, @Params)
|
||||
|
||||
/*
|
||||
Initial Author: Jonathan Ouellette
|
||||
This service module has a catalogued list of functions to quickly and easily perform certain functions related to lot
|
||||
processing.
|
||||
|
||||
1. CreateAWO - Imitates the process of getting data from SAP and processing the WO start in OI.
|
||||
2. RouteWO - Imitates routing of a WO, AKA selecting a ProdVer and Assigning the WO to a reactor Type
|
||||
3. PrescribeWafers - Imitates creating the child lots for a WO, AKA creating WO_MAT records
|
||||
4. ReleaseCassettes - Assigns raw substrates to the WO_MAT records. RDS for non-epipro is created at this point.
|
||||
5. PerformPTI - Imitates Receiving operator moving the lot into the fab.
|
||||
6. Perform1VER - Performs the 1VER operation for an RDS.
|
||||
7. PerformLoad - Performs the load operation for an RDS.
|
||||
8. PerformUnload - Performs the unload operation for a non-epipro RDS.
|
||||
9. EnterRecipeParms - Used in conjunction with PerformLoad. Used to enter the parameters for the Reactor Recipe upon load
|
||||
typically this is the first load of a Work Order.
|
||||
10. VerifyRecipeParms - Used in conjunction with PerformLoad. Used to verify the current recipe setpoints for an RDS load.
|
||||
|
||||
|
||||
*/
|
||||
#pragma precomp SRP_PreCompiler
|
||||
Declare function Gan_Services, Obj_Notes_Sent, msg, Check_Notes, Jonathan_Services, Database_Services, SRP_Datetime
|
||||
Declare function Lsl_Users_Services, SRP_Time, RList, Error_Services, Obj_Wo_Mat, Pm_Services, Date_Services, Test_Run_Services
|
||||
Declare function Reactor_Services, Reactor_Log_Services, obj_react_item, Utility, Environment_Services, obj_wo_log, Qa_Services
|
||||
Declare subroutine Start_Window, RList, Set_Status, Database_Services, Obj_Sap, Sap_Services, Btree.Extract, Qa_Services
|
||||
Declare subroutine Reactor_Services, Obj_Wo_Log, obj_wo_mat, Work_Order_Services, Material_Movement_Services, Automated_Workflow_Services
|
||||
Declare subroutine Override_Services, Obj_Wo_Mat_Log, obj_post_log, Obj_Sap
|
||||
|
||||
$insert LOGICAL
|
||||
$insert NOTE_PTRS_EQU
|
||||
$insert MSG_EQUATES
|
||||
$Insert APP_INSERTS
|
||||
$Insert RLIST_EQUATES
|
||||
$Insert WO_LOG_EQUATES
|
||||
$Insert RDS_EQUATES
|
||||
$Insert WO_STEP_EQUATES
|
||||
$Insert WO_MAT_QA_EQUATES
|
||||
$Insert REACT_RUN_EQUATES
|
||||
$Insert RDS_LAYER_EQUATES
|
||||
$Insert RDS_TEST_EQUATES
|
||||
$Insert PM_EQUATES
|
||||
$Insert PM_SPEC_EQUATES
|
||||
$Insert WO_MAT_EQUATES
|
||||
$Insert WM_OUT_EQUATES
|
||||
$Insert TEST_RUN_EQUATES
|
||||
$Insert TEST_RUN_WAFER_EQUATES
|
||||
$Insert TEST_WAFER_PROD_EQUATES
|
||||
$Insert TEST_RUN_TYPE_EQUATES
|
||||
$Insert EPI_PART_EQUATES
|
||||
$Insert POPUP_EQUATES
|
||||
$Insert REACTOR_EQUATES
|
||||
|
||||
GoToService
|
||||
|
||||
Return Response or ""
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// SERVICES
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
Service CreatAWO()
|
||||
|
||||
//Step 1: Start a WO WOLogFileIn variable emulates what an SAP file would have
|
||||
/*
|
||||
ProdOrdNo = FileIn<1,1>
|
||||
CustPONo = FileIn<1,2>
|
||||
PromiseShipDt = FileIn<1,3>
|
||||
EpiPartNo = FileIn<1,4>
|
||||
SubPartNo = FileIn<1,5>
|
||||
SubRevNo = FileIn<1,6>
|
||||
WOQty = FileIn<1,7>
|
||||
VendCd = FileIn<1,8>
|
||||
*/
|
||||
WOLogFileIn = 'M124567.1':@VM:'NA':@VM:'02/29/2024':@VM:'400149S':@VM:'827906':@VM:'1.0':@VM:'150':@VM:'NA'
|
||||
RetVal = obj_WO_LOG('SAPCreate',WOLogFileIn)
|
||||
Response = RetVal
|
||||
end service
|
||||
|
||||
Service RouteWO(WO_No)
|
||||
//Step 2: Route a WO with a Product Version
|
||||
|
||||
WOLogRec = Database_Services('ReadDataRow', 'WO_LOG', WO_No)
|
||||
EpiPartNo = WOLogRec<WO_LOG_EPI_PART_NO$>
|
||||
If EpiPartNo NE '' then
|
||||
AllProdVerNos = XLATE('EPI_PART',EpiPartNo,EPI_PART_PROD_VER_NO$,'X')
|
||||
TypeOver = ''
|
||||
TypeOver<PDISPLAY$> = AllProdVerNos
|
||||
TypeOver<PSELECT$> = 1
|
||||
TypeOver<PMODE$> = 'K'
|
||||
SelectedProdVerNo = Popup(@WINDOW,TypeOver,'PROD_VER')
|
||||
If SelectedProdVerNo NE '' then
|
||||
obj_WO_Log('Route',WO_No:@RM:SelectedProdVerNo)
|
||||
end
|
||||
end
|
||||
end service
|
||||
|
||||
Service PrescribeWafers(WONo, AmountToRX)
|
||||
//Step 3: prescribe wafers. This is the same as assigning lot numbers to individual lots of raw material. AKA creating WO_MAT records
|
||||
/*
|
||||
a. User clicks the PUB_RX button on the WO_LOG form.
|
||||
b. Opens WO Receipt form
|
||||
c. Users clicks on WO's Due in
|
||||
d. User selects or enters a WO.
|
||||
e. User clicks scan codes, opens
|
||||
*/
|
||||
debug
|
||||
ProdVerNo = XLATE('WO_LOG', WONo, 'PROD_VER_NO', 'X')
|
||||
ReactType = XLATE('WO_LOG', WONo, 'REACT_TYPE', 'X')
|
||||
CassLotNo = '123456789'
|
||||
CustPartNo = XLATE('WO_LOG', WONo, 'CUST_PART_NO', 'X')
|
||||
CassQty = 25
|
||||
NumCassToRX = AmountToRX / 25
|
||||
ExistingWOMatList = XLATE('WO_LOG', WONo, 'WO_MAT_KEY', 'X')
|
||||
LastCassNo = 0
|
||||
for each cass in ExistingWOMatList using @VM setting iPos
|
||||
thisCassNo = FIELD(cass, '*', 2)
|
||||
if thisCassNo GT LastCassNo then LastCassNo = thisCassNo
|
||||
Next cass
|
||||
for i = 1 to NumCassToRX
|
||||
NextCassNo = LastCassNo + 1
|
||||
LastCassNo = nextCassNo
|
||||
Parms = WONo:@RM
|
||||
Parms := NextCassNo:@RM
|
||||
Parms := ProdVerNo:@RM
|
||||
Parms := CassLotNo:@RM
|
||||
Parms := CassQty:@RM
|
||||
Parms := CustPartNo:@RM ;* This is the CUSTOMER part No
|
||||
Parms := 1:@RM
|
||||
Parms := ReactType:@RM ;* 3 character Reactor Type Code
|
||||
Parms := '':@RM
|
||||
Parms := 'SR':@RM ;* Warehouse = 'SR' - Shipping/Receiving Area
|
||||
Parms := 'RB':@RM ;* Location = 'RB' - Receiving Bench
|
||||
Parms := OCONV(SRP_Datetime('Now'), 'DT/4'):@RM
|
||||
Parms := 'JONATHAN_O':@RM
|
||||
Parms := '':@RM
|
||||
Parms := '':@RM
|
||||
Parms := '':@RM ;* Added 8/18/2009 JCH
|
||||
Parms := '':@RM ;* Added 12/16/2009 JCH
|
||||
Parms := 25:@RM ;* Added 11/4/2009 JCH
|
||||
Parms := 0:@RM ;* Added 05/14/2010 JCH
|
||||
Parms := '':@RM ;* Added 07/14/2011 for SAP Project JCH
|
||||
Parms := 25 ; // Added 02/01/2018 dmb
|
||||
obj_WO_Mat('Create',Parms)
|
||||
If Error_Services('NoError') then
|
||||
WOLogRec = Database_Services('ReadDataRow', 'WO_LOG', WONo)
|
||||
WOLogRec<WO_LOG_WO_MAT_KEY$, -1> = WONo : '*' : LastCassNo
|
||||
Database_Services('WriteDataRow', 'WO_LOG', WONo, WOLogRec, 1, 0, 1)
|
||||
end
|
||||
Next i
|
||||
Work_Order_Services('UpdateReceivedQty', WONo)
|
||||
|
||||
|
||||
end service
|
||||
|
||||
Service ReleaseCassettes(WONo)
|
||||
|
||||
//Step 4: User clicks release cassettes(PUB_RELEASE) from WO_LOG form
|
||||
Work_Order_Services('ReleaseCassettes', WONo)
|
||||
//Can get RDS number at this point
|
||||
end service
|
||||
|
||||
Service PerformPTI(CassID)
|
||||
//Step 5: User performs a PTI scan to tag lot into the fab.
|
||||
Warehouse = '1K'
|
||||
Location = 'PTI'
|
||||
Material_Movement_Services('SaveRecord', CassID, Warehouse, Location, @USER4)
|
||||
end service
|
||||
|
||||
* Service BatchProcessLotList()
|
||||
* RDSList = ''
|
||||
*
|
||||
* RDSList<1> = 627134
|
||||
* RDSList<2> = 627135
|
||||
* RDSList<3> = 627136
|
||||
* RDSList<4> = 627132
|
||||
* RDSList<5> = 627133
|
||||
*
|
||||
* for each rds in RDSList using @FM
|
||||
* //Automated_Workflow_Services('Perform1VER', rds, 63, 25)
|
||||
* Automated_Workflow_Services('PerformUnload', rds)
|
||||
* Next rds
|
||||
* end service
|
||||
|
||||
Service Perform1VER(CassID, ReactorID, WfrQty)
|
||||
|
||||
//Step 6
|
||||
If RowExists('RDS', CassID) AND ReactorID NE '' then
|
||||
ReadyToSign = QA_Services('PreEpiSignatureReady', CassID, @User4, WfrQty, ReactorID)
|
||||
If (ReadyToSign EQ True$) then
|
||||
QA_Services('SignPreEpiStage', CassID, @USER4, WfrQty, ReactorID)
|
||||
end
|
||||
end
|
||||
|
||||
end service
|
||||
|
||||
Service PerformLoad(CassID, WfrInQty, LorRLL)
|
||||
|
||||
//Step 7
|
||||
If RowExists('RDS', CassID) then
|
||||
ReadyToSign = Qa_Services('LoadSignatureReady', CassID, @User4, WfrInQty, LorRLL, 0)
|
||||
If ReadyToSign then
|
||||
Qa_Services('SignLoadStage', CassID, @User4, WfrInQty, LorRLL, 0)
|
||||
end else
|
||||
ErrorReason = Error_Services('GetMessage')
|
||||
Begin Case
|
||||
Case ErrorReason EQ 'Process Error: Recipe parameters have not been entered.'
|
||||
//Get the expected parameters and enter them. This is in the RDS_Layer Record
|
||||
//First lets get limits from the RDS Layer Record(s)
|
||||
RDSLayerKeys = XLATE('RDS', CassID, RDS_RDS_LAYER_KEYS$, 'X')
|
||||
for each RDSLayerKey in RDSLayerKeys using @VM setting rlPos
|
||||
Automated_Workflow_Services('EnterRecipeParams', RDSLayerKey)
|
||||
If Error_Services('NoError') then
|
||||
Automated_Workflow_Services('PerformLoad', CassID, WfrInQty, LorRLL)
|
||||
end else
|
||||
//Die
|
||||
Return
|
||||
end
|
||||
Next RDSLayerKey
|
||||
Case ErrorReason EQ 'RDS layer parameters must be reviewed for accuracy and acknowledged before the load operation can be signed.'
|
||||
Automated_Workflow_Services('VerifyRecipeParams', CassID)
|
||||
If Error_Services('NoError') then
|
||||
Automated_Workflow_Services('PerformLoad', CassID, WfrInQty, LorRLL)
|
||||
end else
|
||||
//Die
|
||||
Return
|
||||
end
|
||||
End Case
|
||||
end
|
||||
end
|
||||
end service
|
||||
|
||||
Service PerformUnload(RDSNo)
|
||||
//Step 8
|
||||
|
||||
If RDSNo NE '' then
|
||||
Reactor = XLATE('RDS', RDSNo, 'REACTOR', 'X')
|
||||
If Reactor NE '' then
|
||||
ReadyToSign = QA_Services('UnloadSignatureReady', RDSNo, @User4, Reactor)
|
||||
If Error_Services('HasError') then
|
||||
If ErrorMsg EQ 'Cassette runtime exceeds three days! An override by a LEAD or SUPERVISOR is required.' then
|
||||
Override_Services('SetOverride', 'RDS', RDSNo, 'UNLOAD_DTM', @USER4)
|
||||
ReadyToSign = True$
|
||||
end
|
||||
end
|
||||
If ReadyToSign then
|
||||
QA_Services('SignUnloadStage', RDSNo, @User4)
|
||||
end
|
||||
end else
|
||||
Error_Services('Add', 'No Reactor assigned to RDS!')
|
||||
end
|
||||
end else
|
||||
Error_Services('Add', 'No RDS No. Supplied!')
|
||||
end
|
||||
end service
|
||||
|
||||
Service PerformFQA(RDSNo)
|
||||
|
||||
ToolID = ''
|
||||
WHCd = 'CR'
|
||||
LocCD = 'QA'
|
||||
Tag = ''
|
||||
SigDt = Date()
|
||||
SigTm = Time()
|
||||
WONo = XLATE('RDS', RDSNo, RDS_WO$, 'X')
|
||||
CassNo = XLATE('RDS', RDSNo, RDS_CASS_NO$, 'X')
|
||||
|
||||
Equ COL$LOG_FILE to 1
|
||||
Equ COL$LOG_DTM to 2
|
||||
Equ COL$ACTION to 3
|
||||
Equ COL$WH_CD to 4
|
||||
Equ COL$LOC_CD to 5
|
||||
Equ COL$WO_NOS to 6
|
||||
Equ COL$CASS_NOS to 7
|
||||
Equ COL$USER_ID to 8
|
||||
Equ COL$TAGS to 9
|
||||
Equ COL$TOOL_ID to 10
|
||||
EventParms = ''
|
||||
EventParms<COL$LOG_FILE> = 'WO_MAT'
|
||||
EventParms<COL$LOG_DTM> = SigDt:' ':SigTm
|
||||
EventParms<COL$ACTION> = 1:'QA'
|
||||
EventParms<COL$WH_CD> = 'CR'
|
||||
EventParms<COL$LOC_CD> = 'QA'
|
||||
EventParms<COL$WO_NOS> = WONo
|
||||
EventParms<COL$CASS_NOS> = CassNo
|
||||
EventParms<COL$USER_ID> = @USER4
|
||||
EventParms<COL$TAGS> = ''
|
||||
EventParms<COL$TOOL_ID> = ''
|
||||
|
||||
CONVERT @FM TO @RM IN EventParms
|
||||
|
||||
obj_WO_Mat_Log('Create',EventParms) ;* * * * * INV EVENT LOG * * * * *
|
||||
Obj_Post_Log('POST')
|
||||
|
||||
Qa_Services('SignFQAStage', RDSNo, @USER4)
|
||||
end service
|
||||
|
||||
|
||||
Service EnterRecipeParams(RDSLayerKey)
|
||||
|
||||
RDSLayerRec = Database_Services('ReadDataRow', 'RDS_LAYER', RDSLayerKey)
|
||||
If RDSLayerRec NE '' then
|
||||
If RDSLayerRec<RDS_LAYER_EPI_TIME_MIN$> NE '' AND RDSLayerRec<RDS_LAYER_EPI_TIME_MAX$> NE '' then
|
||||
//Epi Deposit Time
|
||||
RDSLayerRec<RDS_LAYER_EPI_TIME$> = ((RDSLayerRec<RDS_LAYER_EPI_TIME_MAX$> - RDSLayerRec<RDS_LAYER_EPI_TIME_MIN$>) / 2) + RDSLayerRec<RDS_LAYER_EPI_TIME_MIN$>
|
||||
end
|
||||
|
||||
If RDSLayerRec<RDS_LAYER_DILUENT_MIN$> NE '' AND RDSLayerRec<RDS_LAYER_DILUENT_MAX$> NE '' then
|
||||
//Diluent
|
||||
RDSLayerRec<RDS_LAYER_DILUENT_ADJ_PARAM$> = ((RDSLayerRec<RDS_LAYER_DILUENT_MAX$> - RDSLayerRec<RDS_LAYER_DILUENT_MIN$>) / 2) + RDSLayerRec<RDS_LAYER_DILUENT_MIN$>
|
||||
end
|
||||
|
||||
If RDSLayerRec<RDS_LAYER_DOPANT_FLOW_MIN$> NE '' AND RDSLayerRec<RDS_LAYER_DOPANT_FLOW_MAX$> NE '' then
|
||||
//Dopant Flow
|
||||
RDSLayerRec<RDS_LAYER_DOPANT_FLOW$> = ((RDSLayerRec<RDS_LAYER_DOPANT_FLOW_MAX$> - RDSLayerRec<RDS_LAYER_DOPANT_FLOW_MIN$>) / 2) + RDSLayerRec<RDS_LAYER_DOPANT_FLOW_MIN$>
|
||||
end
|
||||
|
||||
If RDSLayerRec<RDS_LAYER_HCL_FLOW_MIN$> NE '' AND RDSLayerRec<RDS_LAYER_HCL_FLOW_MAX$> NE '' then
|
||||
//HCL Flow
|
||||
RDSLayerRec<RDS_LAYER_HCL_FLOW$> = ((RDSLayerRec<RDS_LAYER_HCL_FLOW_MAX$> - RDSLayerRec<RDS_LAYER_HCL_FLOW_MIN$>) / 2) + RDSLayerRec<RDS_LAYER_HCL_FLOW_MIN$>
|
||||
end
|
||||
|
||||
If RDSLayerRec<RDS_LAYER_BAKE_TIME_MIN$> NE '' AND RDSLayerRec<RDS_LAYER_BAKE_TIME_MAX$> NE '' then
|
||||
//Bake Time
|
||||
RDSLayerRec<RDS_LAYER_BAKE_TIME$> = ((RDSLayerRec<RDS_LAYER_BAKE_TIME_MAX$> - RDSLayerRec<RDS_LAYER_BAKE_TIME_MIN$>) / 2) + RDSLayerRec<RDS_LAYER_BAKE_TIME_MIN$>
|
||||
end
|
||||
|
||||
If RDSLayerRec<RDS_LAYER_EPI_H2_FLOW_MIN$> NE '' AND RDSLayerRec<RDS_LAYER_EPI_H2_FLOW_MAX$> NE '' then
|
||||
//H2 Flow
|
||||
RDSLayerRec<RDS_LAYER_EPI_H2_FLOW$> = ((RDSLayerRec<RDS_LAYER_EPI_H2_FLOW_MAX$> - RDSLayerRec<RDS_LAYER_EPI_H2_FLOW_MIN$>) / 2) + RDSLayerRec<RDS_LAYER_EPI_H2_FLOW_MIN$>
|
||||
end
|
||||
|
||||
If RDSLayerRec<RDS_LAYER_TCS_FLOW_MIN$> NE '' AND RDSLayerRec<RDS_LAYER_TCS_FLOW_MAX$> NE '' then
|
||||
//TCS Flow
|
||||
RDSLayerRec<RDS_LAYER_TCS_FLOW$> = ((RDSLayerRec<RDS_LAYER_TCS_FLOW_MAX$> - RDSLayerRec<RDS_LAYER_TCS_FLOW_MIN$>) / 2) + RDSLayerRec<RDS_LAYER_TCS_FLOW_MIN$>
|
||||
end
|
||||
|
||||
If RDSLayerRec<RDS_LAYER_DCS_FLOW_MIN$> NE '' AND RDSLayerRec<RDS_LAYER_DCS_FLOW_MAX$> NE '' then
|
||||
//DCS Flow
|
||||
RDSLayerRec<RDS_LAYER_DCS_FLOW$> = ((RDSLayerRec<RDS_LAYER_DCS_FLOW_MAX$> - RDSLayerRec<RDS_LAYER_DCS_FLOW_MIN$>) / 2) + RDSLayerRec<RDS_LAYER_DCS_FLOW_MIN$>
|
||||
end
|
||||
|
||||
If RDSLayerRec<RDS_LAYER_AUX1_MIN$> NE '' AND RDSLayerRec<RDS_LAYER_AUX1_MAX$> NE '' then
|
||||
//AUX 1
|
||||
RDSLayerRec<RDS_LAYER_AUX1$> = ((RDSLayerRec<RDS_LAYER_AUX1_MAX$> - RDSLayerRec<RDS_LAYER_AUX1_MIN$>) / 2) + RDSLayerRec<RDS_LAYER_AUX1_MIN$>
|
||||
end
|
||||
|
||||
If RDSLayerRec<RDS_LAYER_AUX2_MIN$> NE '' AND RDSLayerRec<RDS_LAYER_AUX2_MAX$> NE '' then
|
||||
//AUX2
|
||||
RDSLayerRec<RDS_LAYER_AUX2$> = ((RDSLayerRec<RDS_LAYER_AUX2_MAX$> - RDSLayerRec<RDS_LAYER_AUX2_MIN$>) / 2) + RDSLayerRec<RDS_LAYER_AUX2_MIN$>
|
||||
end
|
||||
|
||||
If RDSLayerRec<RDS_LAYER_F_OFFSET_MIN$> NE '' AND RDSLayerRec<RDS_LAYER_F_OFFSET_MAX$> NE '' then
|
||||
//F_OFFSET
|
||||
RDSLayerRec<RDS_LAYER_F_OFFSET$> = ((RDSLayerRec<RDS_LAYER_F_OFFSET_MAX$> - RDSLayerRec<RDS_LAYER_F_OFFSET_MIN$>) / 2) + RDSLayerRec<RDS_LAYER_F_OFFSET_MIN$>
|
||||
end
|
||||
|
||||
If RDSLayerRec<RDS_LAYER_S_OFFSET_MIN$> NE '' AND RDSLayerRec<RDS_LAYER_S_OFFSET_MAX$> NE '' then
|
||||
//S_OFFSET
|
||||
RDSLayerRec<RDS_LAYER_S_OFFSET$> = ((RDSLayerRec<RDS_LAYER_S_OFFSET_MAX$> - RDSLayerRec<RDS_LAYER_S_OFFSET_MIN$>) / 2) + RDSLayerRec<RDS_LAYER_S_OFFSET_MIN$>
|
||||
end
|
||||
|
||||
If RDSLayerRec<RDS_LAYER_R_OFFSET_MIN$> NE '' AND RDSLayerRec<RDS_LAYER_R_OFFSET_MAX$> NE '' then
|
||||
//R OFFSET
|
||||
RDSLayerRec<RDS_LAYER_R_OFFSET$> = ((RDSLayerRec<RDS_LAYER_R_OFFSET_MAX$> - RDSLayerRec<RDS_LAYER_R_OFFSET_MIN$>) / 2) + RDSLayerRec<RDS_LAYER_R_OFFSET_MIN$>
|
||||
end
|
||||
|
||||
If RDSLayerRec<RDS_LAYER_ETCH1_MIN$> NE '' AND RDSLayerRec<RDS_LAYER_ETCH1_MAX$> NE '' then
|
||||
//ETCH 1
|
||||
RDSLayerRec<RDS_LAYER_ETCH1$> = ((RDSLayerRec<RDS_LAYER_ETCH1_MAX$> - RDSLayerRec<RDS_LAYER_ETCH1_MIN$>) / 2) + RDSLayerRec<RDS_LAYER_ETCH1_MIN$>
|
||||
end
|
||||
|
||||
If RDSLayerRec<RDS_LAYER_ETCH2_MIN$> NE '' AND RDSLayerRec<RDS_LAYER_ETCH2_MAX$> NE '' then
|
||||
//ETCH 2
|
||||
RDSLayerRec<RDS_LAYER_ETCH2$> = ((RDSLayerRec<RDS_LAYER_ETCH2_MAX$> - RDSLayerRec<RDS_LAYER_ETCH2_MIN$>) / 2) + RDSLayerRec<RDS_LAYER_ETCH2_MIN$>
|
||||
end
|
||||
|
||||
If RDSLayerRec<RDS_LAYER_ETCH3_MIN$> NE '' AND RDSLayerRec<RDS_LAYER_ETCH3_MAX$> NE '' then
|
||||
//ETCH 3
|
||||
RDSLayerRec<RDS_LAYER_ETCH3$> = ((RDSLayerRec<RDS_LAYER_ETCH3_MAX$> - RDSLayerRec<RDS_LAYER_ETCH3_MIN$>) / 2) + RDSLayerRec<RDS_LAYER_ETCH3_MIN$>
|
||||
end
|
||||
|
||||
If RDSLayerRec<RDS_LAYER_UL_TEMP_MIN$> NE '' AND RDSLayerRec<RDS_LAYER_UL_TEMP_MAX$> NE '' then
|
||||
//UL_TEMP
|
||||
RDSLayerRec<RDS_LAYER_UL_TEMP$> = ((RDSLayerRec<RDS_LAYER_UL_TEMP_MAX$> - RDSLayerRec<RDS_LAYER_UL_TEMP_MIN$>) / 2) + RDSLayerRec<RDS_LAYER_UL_TEMP_MIN$>
|
||||
end
|
||||
|
||||
If RDSLayerRec<RDS_LAYER_SUSC_ETCH_MIN$> NE '' AND RDSLayerRec<RDS_LAYER_SUSC_ETCH_MAX$> NE '' then
|
||||
//Susceptor Etch
|
||||
RDSLayerRec<RDS_LAYER_SUSC_ETCH$> = ((RDSLayerRec<RDS_LAYER_SUSC_ETCH_MAX$> - RDSLayerRec<RDS_LAYER_SUSC_ETCH_MIN$>) / 2) + RDSLayerRec<RDS_LAYER_SUSC_ETCH_MIN$>
|
||||
end
|
||||
Database_Services('WriteDataRow', 'RDS_LAYER', RDSLayerKey, RDSLayerRec, True$, False$, True$)
|
||||
end
|
||||
|
||||
end service
|
||||
|
||||
Service VerifyRecipeParams(RDSNo)
|
||||
//Used to verify exisiting recipe params. This is if they are already set.
|
||||
IF RDSNo NE '' then
|
||||
RDSRec = Database_Services('ReadDataRow', 'RDS', RDSNo)
|
||||
RDSRec<RDS_RDS_LAYER_ACK$> = True$
|
||||
Database_Services('WriteDataRow', 'RDS', RDSNo, RDSRec, True$, False$, True$)
|
||||
end else
|
||||
Error_Services('Add', 'RDS No was blank!!!')
|
||||
end
|
||||
end service
|
||||
|
||||
Service SendCassComp(WoMatKey)
|
||||
Sap_Services('RetransmitCassComp', WoMatKey)
|
||||
obj_sap('SendOutbound')
|
||||
end service
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -1,139 +1,139 @@
|
||||
Function Changelog_API(@API)
|
||||
/***********************************************************************************************************************
|
||||
|
||||
This program is proprietary and is not to be used by or disclosed to others, nor is it to be copied without written
|
||||
permission from SRP Computer Solutions, Inc.
|
||||
|
||||
Name : Changelog_API
|
||||
|
||||
Description : API logic for the Changelog resource.
|
||||
|
||||
Notes : All web APIs should include the API_SETUP insert. This will provide several useful variables:
|
||||
|
||||
HTTPMethod - The HTTP Method (Verb) submitted by the client (e.g., GET, POST, etc.)
|
||||
APIURL - The URL for the API entry point (e.g., api.mysite.com/v1).
|
||||
FullEndpointURL - The URL submitted by the client, including query params.
|
||||
FullEndpointURLNoQuery - The URL submitted by the client, excluding query params.
|
||||
EndpointSegment - The URL endpoint segment.
|
||||
ParentURL - The URL path preceeding the current endpoint.
|
||||
CurrentAPI - The name of this stored procedure.
|
||||
|
||||
Parameters :
|
||||
API [in] -- Web API to process. Format is [APIPattern].[HTTPMethod]:
|
||||
- APIPattern must follow this structure Changelog[.ID.[<Property>]]
|
||||
- HTTPMethod can be any valid HTTP method, e.g., GET, POST, PUT, DELETE, etc.
|
||||
Examples:
|
||||
- Changelog.POST
|
||||
- Changelog.ID.PUT
|
||||
- Changelog.ID.firstName.GET
|
||||
Response [out] -- Response to be sent back to the Controller (HTTP_MCP) or requesting procedure. Web API
|
||||
services do not rely upon anything being returned in the response. This is what the
|
||||
various services like SetResponseBody and SetResponseStatus services are for. A response
|
||||
value is only helpful if the developers want to use it for debug purposes.
|
||||
|
||||
History : (Date, Initials, Notes)
|
||||
07/24/24 xxx Original programmer.
|
||||
|
||||
***********************************************************************************************************************/
|
||||
|
||||
#pragma precomp SRP_PreCompiler
|
||||
|
||||
Declare function Datetime, SRP_Datetime, Change_Log_Services, Environment_Services, Logging_Services
|
||||
Declare subroutine Logging_Services
|
||||
|
||||
$insert APP_INSERTS
|
||||
$insert API_SETUP
|
||||
$insert HTTP_INSERTS
|
||||
EQU Comma$ to ','
|
||||
|
||||
LogPath = Environment_Services('GetApplicationRootPath') : '\LogFiles\API\Admin\ChangeLog'
|
||||
LogDate = Oconv(Date(), 'D4/')
|
||||
LogTime = Oconv(Time(), 'MTS')
|
||||
LogFileName = LogDate[7, 4] : '-' : LogDate[1, 2] : '-' : LogDate[4, 2] : ' ChangeLogArchiveService.csv'
|
||||
Headers = 'Logging DTM' : @FM : 'From IP Address' : @FM : 'Message'
|
||||
objLogChangeLogAPI = Logging_Services('NewLog', LogPath, LogFileName, CRLF$, Comma$, Headers, '', False$, False$)
|
||||
LoggingDTM = LogDate : ' ' : LogTime ; // Logging DTM
|
||||
RequesterIPAddr = HTTP_Services('GetHTTPRemoteAddr')
|
||||
|
||||
GoToAPI else
|
||||
// The specific resource endpoint doesn't have a API handler yet.
|
||||
HTTP_Services('SetResponseStatus', 200, 'This is a valid endpoint but a web API handler has not yet been created.')
|
||||
end
|
||||
|
||||
Return Response OR ''
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Endpoint Handlers
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
API changelog.HEAD
|
||||
API changelog.GET
|
||||
StartDtm = Http_Services('GetQueryField', 'FromDatetime')
|
||||
ToDtm = Http_Services('GetQueryField', 'ToDatetime')
|
||||
|
||||
StartDtm = IConv(StartDtm, 'DT')
|
||||
ToDtm = IConv(ToDtm, 'DT')
|
||||
|
||||
If StartDtm EQ '' then
|
||||
StartDtm = SRP_Datetime('AddDays', Datetime(), -60)
|
||||
end
|
||||
If ToDtm EQ '' then
|
||||
ToDtm = Datetime()
|
||||
end
|
||||
|
||||
EntityName = Http_Services('GetQueryField', 'EntityName')
|
||||
UserId = Http_Services('GetQueryField', 'UserID')
|
||||
|
||||
ChangeLogIDs = Change_Log_Services('GetChangeLogRecIDs', EntityName, StartDtm, ToDtm, UserId)
|
||||
If Error_Services('NoError') then
|
||||
GoSub CreateHALCollection
|
||||
end else
|
||||
ErrorMsg = Error_Services('GetMessage')
|
||||
LogData = ''
|
||||
LogData<1> = LoggingDTM
|
||||
LogData<2> = RequesterIPAddr
|
||||
LogData<3> = ErrorMsg
|
||||
Logging_Services('AppendLog', objLogChangeLogAPI, LogData, @RM, @FM)
|
||||
HTTP_Services('SetResponseStatus', 500, 'Error Getting change log records from change_log table.')
|
||||
end
|
||||
|
||||
end api
|
||||
|
||||
CreateHALCollection:
|
||||
hJsonCollection = ''
|
||||
hChangeLogArray = ''
|
||||
hChangeLogObj = ''
|
||||
hChangeLog = ''
|
||||
hChangeLogJson = ''
|
||||
Abort = False$
|
||||
If SRP_JSON(hJSONCollection, 'New', 'Object') then
|
||||
If SRP_JSON(hChangeLogArray, 'New', 'Array') then
|
||||
For each ChangeLogID in ChangeLogIDs using @VM setting fPos
|
||||
//rdsJSON = Rds_Services('ConvertRecordToJSON', rds, '' ,FullEndpointURL:'/':rds)
|
||||
ChangeLogJson = Change_Log_Services('ConvertRecordToJSON', ChangeLogID)
|
||||
If Error_Services('NoError') then
|
||||
If (SRP_JSON(hChangeLog, 'Parse', ChangeLogJson) EQ '') then
|
||||
SRP_JSON(hChangeLogArray, 'Add', hChangeLog)
|
||||
SRP_JSON(hChangeLog, 'Release')
|
||||
end
|
||||
end else
|
||||
Abort = True$
|
||||
end
|
||||
Until Abort
|
||||
Next rds
|
||||
If Abort EQ False$ then
|
||||
SRP_JSON(hJSONCollection, 'Set', 'ChangeLogRecords', hChangeLogArray)
|
||||
end
|
||||
SRP_JSON(hChangeLogArray, 'Release')
|
||||
end
|
||||
JSONCollection = SRP_JSON(hJSONCollection, 'Stringify', 'Styled')
|
||||
SRP_JSON(hJSONCollection, 'Release')
|
||||
HTTP_Services('SetResponseHeaderField', 'Content-Location', FullEndpointURL)
|
||||
HTTP_Services('SetResponseBody', JSONCollection, False$, 'application/hal+json')
|
||||
HTTP_Services('SetResponseStatus', 200)
|
||||
end
|
||||
|
||||
return
|
||||
|
||||
Function Changelog_API(@API)
|
||||
/***********************************************************************************************************************
|
||||
|
||||
This program is proprietary and is not to be used by or disclosed to others, nor is it to be copied without written
|
||||
permission from SRP Computer Solutions, Inc.
|
||||
|
||||
Name : Changelog_API
|
||||
|
||||
Description : API logic for the Changelog resource.
|
||||
|
||||
Notes : All web APIs should include the API_SETUP insert. This will provide several useful variables:
|
||||
|
||||
HTTPMethod - The HTTP Method (Verb) submitted by the client (e.g., GET, POST, etc.)
|
||||
APIURL - The URL for the API entry point (e.g., api.mysite.com/v1).
|
||||
FullEndpointURL - The URL submitted by the client, including query params.
|
||||
FullEndpointURLNoQuery - The URL submitted by the client, excluding query params.
|
||||
EndpointSegment - The URL endpoint segment.
|
||||
ParentURL - The URL path preceeding the current endpoint.
|
||||
CurrentAPI - The name of this stored procedure.
|
||||
|
||||
Parameters :
|
||||
API [in] -- Web API to process. Format is [APIPattern].[HTTPMethod]:
|
||||
- APIPattern must follow this structure Changelog[.ID.[<Property>]]
|
||||
- HTTPMethod can be any valid HTTP method, e.g., GET, POST, PUT, DELETE, etc.
|
||||
Examples:
|
||||
- Changelog.POST
|
||||
- Changelog.ID.PUT
|
||||
- Changelog.ID.firstName.GET
|
||||
Response [out] -- Response to be sent back to the Controller (HTTP_MCP) or requesting procedure. Web API
|
||||
services do not rely upon anything being returned in the response. This is what the
|
||||
various services like SetResponseBody and SetResponseStatus services are for. A response
|
||||
value is only helpful if the developers want to use it for debug purposes.
|
||||
|
||||
History : (Date, Initials, Notes)
|
||||
07/24/24 xxx Original programmer.
|
||||
|
||||
***********************************************************************************************************************/
|
||||
|
||||
#pragma precomp SRP_PreCompiler
|
||||
|
||||
Declare function Datetime, SRP_Datetime, Change_Log_Services, Environment_Services, Logging_Services
|
||||
Declare subroutine Logging_Services
|
||||
|
||||
$insert APP_INSERTS
|
||||
$insert API_SETUP
|
||||
$insert HTTP_INSERTS
|
||||
EQU Comma$ to ','
|
||||
|
||||
LogPath = Environment_Services('GetApplicationRootPath') : '\LogFiles\API\Admin\ChangeLog'
|
||||
LogDate = Oconv(Date(), 'D4/')
|
||||
LogTime = Oconv(Time(), 'MTS')
|
||||
LogFileName = LogDate[7, 4] : '-' : LogDate[1, 2] : '-' : LogDate[4, 2] : ' ChangeLogArchiveService.csv'
|
||||
Headers = 'Logging DTM' : @FM : 'From IP Address' : @FM : 'Message'
|
||||
objLogChangeLogAPI = Logging_Services('NewLog', LogPath, LogFileName, CRLF$, Comma$, Headers, '', False$, False$)
|
||||
LoggingDTM = LogDate : ' ' : LogTime ; // Logging DTM
|
||||
RequesterIPAddr = HTTP_Services('GetHTTPRemoteAddr')
|
||||
|
||||
GoToAPI else
|
||||
// The specific resource endpoint doesn't have a API handler yet.
|
||||
HTTP_Services('SetResponseStatus', 200, 'This is a valid endpoint but a web API handler has not yet been created.')
|
||||
end
|
||||
|
||||
Return Response OR ''
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Endpoint Handlers
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
API changelog.HEAD
|
||||
API changelog.GET
|
||||
StartDtm = Http_Services('GetQueryField', 'FromDatetime')
|
||||
ToDtm = Http_Services('GetQueryField', 'ToDatetime')
|
||||
|
||||
StartDtm = IConv(StartDtm, 'DT')
|
||||
ToDtm = IConv(ToDtm, 'DT')
|
||||
|
||||
If StartDtm EQ '' then
|
||||
StartDtm = SRP_Datetime('AddDays', Datetime(), -60)
|
||||
end
|
||||
If ToDtm EQ '' then
|
||||
ToDtm = Datetime()
|
||||
end
|
||||
|
||||
EntityName = Http_Services('GetQueryField', 'EntityName')
|
||||
UserId = Http_Services('GetQueryField', 'UserID')
|
||||
|
||||
ChangeLogIDs = Change_Log_Services('GetChangeLogRecIDs', EntityName, StartDtm, ToDtm, UserId)
|
||||
If Error_Services('NoError') then
|
||||
GoSub CreateHALCollection
|
||||
end else
|
||||
ErrorMsg = Error_Services('GetMessage')
|
||||
LogData = ''
|
||||
LogData<1> = LoggingDTM
|
||||
LogData<2> = RequesterIPAddr
|
||||
LogData<3> = ErrorMsg
|
||||
Logging_Services('AppendLog', objLogChangeLogAPI, LogData, @RM, @FM)
|
||||
HTTP_Services('SetResponseStatus', 500, 'Error Getting change log records from change_log table.')
|
||||
end
|
||||
|
||||
end api
|
||||
|
||||
CreateHALCollection:
|
||||
hJsonCollection = ''
|
||||
hChangeLogArray = ''
|
||||
hChangeLogObj = ''
|
||||
hChangeLog = ''
|
||||
hChangeLogJson = ''
|
||||
Abort = False$
|
||||
If SRP_JSON(hJSONCollection, 'New', 'Object') then
|
||||
If SRP_JSON(hChangeLogArray, 'New', 'Array') then
|
||||
For each ChangeLogID in ChangeLogIDs using @VM setting fPos
|
||||
//rdsJSON = Rds_Services('ConvertRecordToJSON', rds, '' ,FullEndpointURL:'/':rds)
|
||||
ChangeLogJson = Change_Log_Services('ConvertRecordToJSON', ChangeLogID)
|
||||
If Error_Services('NoError') then
|
||||
If (SRP_JSON(hChangeLog, 'Parse', ChangeLogJson) EQ '') then
|
||||
SRP_JSON(hChangeLogArray, 'Add', hChangeLog)
|
||||
SRP_JSON(hChangeLog, 'Release')
|
||||
end
|
||||
end else
|
||||
Abort = True$
|
||||
end
|
||||
Until Abort
|
||||
Next rds
|
||||
If Abort EQ False$ then
|
||||
SRP_JSON(hJSONCollection, 'Set', 'ChangeLogRecords', hChangeLogArray)
|
||||
end
|
||||
SRP_JSON(hChangeLogArray, 'Release')
|
||||
end
|
||||
JSONCollection = SRP_JSON(hJSONCollection, 'Stringify', 'Styled')
|
||||
SRP_JSON(hJSONCollection, 'Release')
|
||||
HTTP_Services('SetResponseHeaderField', 'Content-Location', FullEndpointURL)
|
||||
HTTP_Services('SetResponseBody', JSONCollection, False$, 'application/hal+json')
|
||||
HTTP_Services('SetResponseStatus', 200)
|
||||
end
|
||||
|
||||
return
|
||||
|
||||
|
@ -1,140 +1,140 @@
|
||||
Function Dakota_Test_Events(CtrlEntId, Event, @PARAMS)
|
||||
/***********************************************************************************************************************
|
||||
|
||||
This program is proprietary and is not to be used by or disclosed to others, nor is it to be copied without written
|
||||
permission from Infineon.
|
||||
|
||||
Name : NDW_Main_Events
|
||||
|
||||
Description : This function acts as a commuter module for all events related to this window.
|
||||
|
||||
Notes : Commuter Modules are automatically called from the Promoted_Events function which is called by the
|
||||
application-specific promoted event handler. This makes it possible to add QuickEvents that need to
|
||||
execute Basic+ logic without having use the Form Designer to make the association, although this is
|
||||
limited to the events which are currently promoted.
|
||||
|
||||
If the form needs to call the commuter module directly then the QuickEvent parameters should be
|
||||
formatted like this:
|
||||
|
||||
'@SELF','@EVENT',['@PARAM1','@PARAMx']
|
||||
|
||||
Parameters :
|
||||
CtrlEntId [in] -- The fully qualified name of the control calling the promoted event
|
||||
Event [in] -- The event being executed. See the Notes section regarding "PRE" events
|
||||
Param1-15 [in] -- Additional event parameter holders
|
||||
EventFlow [out] -- Set to 1 or 0 so the calling event knows whether or not to chain forward. See comments in
|
||||
EVENT_SETUP insert
|
||||
|
||||
History : (Date, Initials, Notes)
|
||||
05/08/18 dmb Created initial commuter module.
|
||||
|
||||
***********************************************************************************************************************/
|
||||
|
||||
#pragma precomp SRP_PreCompiler
|
||||
#Window DAKOTA_TEST
|
||||
|
||||
$insert APP_INSERTS
|
||||
$insert EVENT_SETUP
|
||||
|
||||
|
||||
SubclassInfo = Form_Services('FindSubclassControl')
|
||||
Subclass = SubclassInfo<1>
|
||||
|
||||
// Update the arguments so that the OpenInsight OLE event will treate the ActiveX event as a native event handler.
|
||||
If Event EQ 'OLE' then
|
||||
Transfer Event to OIEvent
|
||||
Transfer Param1 to Event
|
||||
Transfer Param2 to Param1
|
||||
Transfer Param3 to Param2
|
||||
Transfer Param4 to Param3
|
||||
Transfer Param5 to Param4
|
||||
Transfer Param6 to Param5
|
||||
Transfer Param7 to Param6
|
||||
Transfer Param8 to Param7
|
||||
end
|
||||
|
||||
|
||||
GoToEvent Event for CtrlEntID
|
||||
|
||||
Return EventFlow else EVENT_CONTINUE$
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Events
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
Event WINDOW.CREATE(CreateParam)
|
||||
|
||||
Gosub Setup_OLE_Controls
|
||||
|
||||
end event
|
||||
|
||||
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Internal GoSubs
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
Setup_OLE_Controls:
|
||||
|
||||
Qualify = ''
|
||||
Qualify<1> = 1
|
||||
Qualify<4> = 0
|
||||
|
||||
FontArray = ''
|
||||
ColorFill = ''
|
||||
FontArray<1, 1, 2> = 11
|
||||
Send_Message(@Window : '.OLE_WIP_STATUS', 'QUALIFY_EVENT', 'OLE.OnClick', Qualify)
|
||||
Set_Property(@Window:".OLE_WIP_STATUS", "OLE.Font", FontArray)
|
||||
ColorFill<1> = "White"
|
||||
ColorFill<2> = "White"
|
||||
ColorFill<3> = "White"
|
||||
ColorFill<5> = "White"
|
||||
Set_Property(@Window:".OLE_WIP_STATUS", "OLE.ForeColor", ColorFill)
|
||||
ColorFill = ''
|
||||
ColorFill<1> = "Vertical(Gradient(RGB(10, 130, 118), (10, 130, 118)),Border(RGB(10, 130, 118)),Rounded(1))"
|
||||
ColorFill<2> = "Vertical(Gradient(RGB(10, 130, 118) L=40, RGB(10, 130, 118) L=40), Border(RGB(10, 130, 118)),Rounded(1))"
|
||||
ColorFill<3> = "Vertical(Gradient(RGB(10, 130, 118) L=20, RGB(10, 130, 118) L=20), Border(RGB(10, 130, 118)),Rounded(1))"
|
||||
ColorFill<5> = "Vertical(Gradient(RGB(10, 130, 118), (10, 130, 118)),Border(RGB(10, 130, 118)),Rounded(1))"
|
||||
Set_Property(@Window : '.OLE_WIP_STATUS', "OLE.Background", ColorFill)
|
||||
Set_Property(@Window:".OLE_WIP_STATUS", "OLE.Caption", "WIP Status")
|
||||
|
||||
ColorFill = ''
|
||||
Send_Message(@Window : '.OLE_RDS', 'QUALIFY_EVENT', 'OLE.OnClick', Qualify)
|
||||
Set_Property(@Window:".OLE_RDS", "OLE.Font", FontArray)
|
||||
ColorFill<1> = "White"
|
||||
ColorFill<2> = "White"
|
||||
ColorFill<3> = "White"
|
||||
ColorFill<5> = "White"
|
||||
Set_Property(@Window:".OLE_RDS", "OLE.ForeColor", ColorFill)
|
||||
ColorFill = ''
|
||||
ColorFill<1> = "Vertical(Gradient(RGB(10, 130, 118), (10, 130, 118)),Border(RGB(10, 130, 118)),Rounded(1))"
|
||||
ColorFill<2> = "Vertical(Gradient(RGB(10, 130, 118) L=40, RGB(10, 130, 118) L=40), Border(RGB(10, 130, 118)),Rounded(1))"
|
||||
ColorFill<3> = "Vertical(Gradient(RGB(10, 130, 118) L=20, RGB(10, 130, 118) L=20), Border(RGB(10, 130, 118)),Rounded(1))"
|
||||
ColorFill<5> = "Vertical(Gradient(RGB(10, 130, 118), (10, 130, 118)),Border(RGB(10, 130, 118)),Rounded(1))"
|
||||
Set_Property(@Window : '.OLE_RDS', "OLE.Background", ColorFill)
|
||||
Set_Property(@Window:".OLE_RDS", "OLE.Caption", "RDS")
|
||||
|
||||
ColorFill = ''
|
||||
Send_Message(@Window : '.OLE_WM_OUT', 'QUALIFY_EVENT', 'OLE.OnClick', Qualify)
|
||||
Set_Property(@Window:".OLE_WM_OUT", "OLE.Font", FontArray)
|
||||
ColorFill<1> = "White"
|
||||
ColorFill<2> = "White"
|
||||
ColorFill<3> = "White"
|
||||
ColorFill<5> = "White"
|
||||
Set_Property(@Window:".OLE_WM_OUT", "OLE.ForeColor", ColorFill)
|
||||
ColorFill = ''
|
||||
ColorFill<1> = "Vertical(Gradient(RGB(10, 130, 118), (10, 130, 118)),Border(RGB(10, 130, 118)),Rounded(1))"
|
||||
ColorFill<2> = "Vertical(Gradient(RGB(10, 130, 118) L=40, RGB(10, 130, 118) L=40), Border(RGB(10, 130, 118)),Rounded(1))"
|
||||
ColorFill<3> = "Vertical(Gradient(RGB(10, 130, 118) L=20, RGB(10, 130, 118) L=20), Border(RGB(10, 130, 118)),Rounded(1))"
|
||||
ColorFill<5> = "Vertical(Gradient(RGB(10, 130, 118), (10, 130, 118)),Border(RGB(10, 130, 118)),Rounded(1))"
|
||||
Set_Property(@Window : '.OLE_WM_OUT', "OLE.Background", ColorFill)
|
||||
Set_Property(@Window:".OLE_WM_OUT", "OLE.Caption", "WM Out")
|
||||
|
||||
return
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Function Dakota_Test_Events(CtrlEntId, Event, @PARAMS)
|
||||
/***********************************************************************************************************************
|
||||
|
||||
This program is proprietary and is not to be used by or disclosed to others, nor is it to be copied without written
|
||||
permission from Infineon.
|
||||
|
||||
Name : NDW_Main_Events
|
||||
|
||||
Description : This function acts as a commuter module for all events related to this window.
|
||||
|
||||
Notes : Commuter Modules are automatically called from the Promoted_Events function which is called by the
|
||||
application-specific promoted event handler. This makes it possible to add QuickEvents that need to
|
||||
execute Basic+ logic without having use the Form Designer to make the association, although this is
|
||||
limited to the events which are currently promoted.
|
||||
|
||||
If the form needs to call the commuter module directly then the QuickEvent parameters should be
|
||||
formatted like this:
|
||||
|
||||
'@SELF','@EVENT',['@PARAM1','@PARAMx']
|
||||
|
||||
Parameters :
|
||||
CtrlEntId [in] -- The fully qualified name of the control calling the promoted event
|
||||
Event [in] -- The event being executed. See the Notes section regarding "PRE" events
|
||||
Param1-15 [in] -- Additional event parameter holders
|
||||
EventFlow [out] -- Set to 1 or 0 so the calling event knows whether or not to chain forward. See comments in
|
||||
EVENT_SETUP insert
|
||||
|
||||
History : (Date, Initials, Notes)
|
||||
05/08/18 dmb Created initial commuter module.
|
||||
|
||||
***********************************************************************************************************************/
|
||||
|
||||
#pragma precomp SRP_PreCompiler
|
||||
#Window DAKOTA_TEST
|
||||
|
||||
$insert APP_INSERTS
|
||||
$insert EVENT_SETUP
|
||||
|
||||
|
||||
SubclassInfo = Form_Services('FindSubclassControl')
|
||||
Subclass = SubclassInfo<1>
|
||||
|
||||
// Update the arguments so that the OpenInsight OLE event will treate the ActiveX event as a native event handler.
|
||||
If Event EQ 'OLE' then
|
||||
Transfer Event to OIEvent
|
||||
Transfer Param1 to Event
|
||||
Transfer Param2 to Param1
|
||||
Transfer Param3 to Param2
|
||||
Transfer Param4 to Param3
|
||||
Transfer Param5 to Param4
|
||||
Transfer Param6 to Param5
|
||||
Transfer Param7 to Param6
|
||||
Transfer Param8 to Param7
|
||||
end
|
||||
|
||||
|
||||
GoToEvent Event for CtrlEntID
|
||||
|
||||
Return EventFlow else EVENT_CONTINUE$
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Events
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
Event WINDOW.CREATE(CreateParam)
|
||||
|
||||
Gosub Setup_OLE_Controls
|
||||
|
||||
end event
|
||||
|
||||
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Internal GoSubs
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
Setup_OLE_Controls:
|
||||
|
||||
Qualify = ''
|
||||
Qualify<1> = 1
|
||||
Qualify<4> = 0
|
||||
|
||||
FontArray = ''
|
||||
ColorFill = ''
|
||||
FontArray<1, 1, 2> = 11
|
||||
Send_Message(@Window : '.OLE_WIP_STATUS', 'QUALIFY_EVENT', 'OLE.OnClick', Qualify)
|
||||
Set_Property(@Window:".OLE_WIP_STATUS", "OLE.Font", FontArray)
|
||||
ColorFill<1> = "White"
|
||||
ColorFill<2> = "White"
|
||||
ColorFill<3> = "White"
|
||||
ColorFill<5> = "White"
|
||||
Set_Property(@Window:".OLE_WIP_STATUS", "OLE.ForeColor", ColorFill)
|
||||
ColorFill = ''
|
||||
ColorFill<1> = "Vertical(Gradient(RGB(10, 130, 118), (10, 130, 118)),Border(RGB(10, 130, 118)),Rounded(1))"
|
||||
ColorFill<2> = "Vertical(Gradient(RGB(10, 130, 118) L=40, RGB(10, 130, 118) L=40), Border(RGB(10, 130, 118)),Rounded(1))"
|
||||
ColorFill<3> = "Vertical(Gradient(RGB(10, 130, 118) L=20, RGB(10, 130, 118) L=20), Border(RGB(10, 130, 118)),Rounded(1))"
|
||||
ColorFill<5> = "Vertical(Gradient(RGB(10, 130, 118), (10, 130, 118)),Border(RGB(10, 130, 118)),Rounded(1))"
|
||||
Set_Property(@Window : '.OLE_WIP_STATUS', "OLE.Background", ColorFill)
|
||||
Set_Property(@Window:".OLE_WIP_STATUS", "OLE.Caption", "WIP Status")
|
||||
|
||||
ColorFill = ''
|
||||
Send_Message(@Window : '.OLE_RDS', 'QUALIFY_EVENT', 'OLE.OnClick', Qualify)
|
||||
Set_Property(@Window:".OLE_RDS", "OLE.Font", FontArray)
|
||||
ColorFill<1> = "White"
|
||||
ColorFill<2> = "White"
|
||||
ColorFill<3> = "White"
|
||||
ColorFill<5> = "White"
|
||||
Set_Property(@Window:".OLE_RDS", "OLE.ForeColor", ColorFill)
|
||||
ColorFill = ''
|
||||
ColorFill<1> = "Vertical(Gradient(RGB(10, 130, 118), (10, 130, 118)),Border(RGB(10, 130, 118)),Rounded(1))"
|
||||
ColorFill<2> = "Vertical(Gradient(RGB(10, 130, 118) L=40, RGB(10, 130, 118) L=40), Border(RGB(10, 130, 118)),Rounded(1))"
|
||||
ColorFill<3> = "Vertical(Gradient(RGB(10, 130, 118) L=20, RGB(10, 130, 118) L=20), Border(RGB(10, 130, 118)),Rounded(1))"
|
||||
ColorFill<5> = "Vertical(Gradient(RGB(10, 130, 118), (10, 130, 118)),Border(RGB(10, 130, 118)),Rounded(1))"
|
||||
Set_Property(@Window : '.OLE_RDS', "OLE.Background", ColorFill)
|
||||
Set_Property(@Window:".OLE_RDS", "OLE.Caption", "RDS")
|
||||
|
||||
ColorFill = ''
|
||||
Send_Message(@Window : '.OLE_WM_OUT', 'QUALIFY_EVENT', 'OLE.OnClick', Qualify)
|
||||
Set_Property(@Window:".OLE_WM_OUT", "OLE.Font", FontArray)
|
||||
ColorFill<1> = "White"
|
||||
ColorFill<2> = "White"
|
||||
ColorFill<3> = "White"
|
||||
ColorFill<5> = "White"
|
||||
Set_Property(@Window:".OLE_WM_OUT", "OLE.ForeColor", ColorFill)
|
||||
ColorFill = ''
|
||||
ColorFill<1> = "Vertical(Gradient(RGB(10, 130, 118), (10, 130, 118)),Border(RGB(10, 130, 118)),Rounded(1))"
|
||||
ColorFill<2> = "Vertical(Gradient(RGB(10, 130, 118) L=40, RGB(10, 130, 118) L=40), Border(RGB(10, 130, 118)),Rounded(1))"
|
||||
ColorFill<3> = "Vertical(Gradient(RGB(10, 130, 118) L=20, RGB(10, 130, 118) L=20), Border(RGB(10, 130, 118)),Rounded(1))"
|
||||
ColorFill<5> = "Vertical(Gradient(RGB(10, 130, 118), (10, 130, 118)),Border(RGB(10, 130, 118)),Rounded(1))"
|
||||
Set_Property(@Window : '.OLE_WM_OUT', "OLE.Background", ColorFill)
|
||||
Set_Property(@Window:".OLE_WM_OUT", "OLE.Caption", "WM Out")
|
||||
|
||||
return
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -258,6 +258,7 @@ RETURN
|
||||
TxShipments:
|
||||
* * * * * * *
|
||||
|
||||
|
||||
CtrlEntID = @WINDOW:'.TX_SHIP'
|
||||
|
||||
ShipNos = Get_Property(@WINDOW:'.TX_SHIP','DEFPROP')<COL$SHIP_NO>
|
||||
|
@ -1,97 +1,97 @@
|
||||
Function Engineinfo_API(@API)
|
||||
/***********************************************************************************************************************
|
||||
|
||||
This program is proprietary and is not to be used by or disclosed to others, nor is it to be copied without written
|
||||
permission from SRP Computer Solutions, Inc.
|
||||
|
||||
Name : Engineinfo_API
|
||||
|
||||
Description : API logic for the Engineinfo resource.
|
||||
|
||||
Notes : All web APIs should include the API_SETUP insert. This will provide several useful variables:
|
||||
|
||||
HTTPMethod - The HTTP Method (Verb) submitted by the client (e.g., GET, POST, etc.)
|
||||
APIURL - The URL for the API entry point (e.g., api.mysite.com/v1).
|
||||
FullEndpointURL - The URL submitted by the client, including query params.
|
||||
FullEndpointURLNoQuery - The URL submitted by the client, excluding query params.
|
||||
EndpointSegment - The URL endpoint segment.
|
||||
ParentURL - The URL path preceeding the current endpoint.
|
||||
CurrentAPI - The name of this stored procedure.
|
||||
|
||||
Parameters :
|
||||
API [in] -- Web API to process. Format is [APIPattern].[HTTPMethod]:
|
||||
- APIPattern must follow this structure Engineinfo[.ID.[<Property>]]
|
||||
- HTTPMethod can be any valid HTTP method, e.g., GET, POST, PUT, DELETE, etc.
|
||||
Examples:
|
||||
- Engineinfo.POST
|
||||
- Engineinfo.ID.PUT
|
||||
- Engineinfo.ID.firstName.GET
|
||||
Response [out] -- Response to be sent back to the Controller (HTTP_MCP) or requesting procedure. Web API
|
||||
services do not rely upon anything being returned in the response. This is what the
|
||||
various services like SetResponseBody and SetResponseStatus services are for. A response
|
||||
value is only helpful if the developers want to use it for debug purposes.
|
||||
|
||||
History : (Date, Initials, Notes)
|
||||
07/17/24 xxx Original programmer.
|
||||
|
||||
***********************************************************************************************************************/
|
||||
|
||||
#pragma precomp SRP_PreCompiler
|
||||
|
||||
$insert APP_INSERTS
|
||||
$insert API_SETUP
|
||||
$insert HTTP_INSERTS
|
||||
$insert ENGINE_HEALTH_EQUATES
|
||||
|
||||
Declare function System_Healthcheck_Services
|
||||
|
||||
GoToAPI else
|
||||
// The specific resource endpoint doesn't have a API handler yet.
|
||||
HTTP_Services('SetResponseStatus', 200, 'This is a valid endpoint but a web API handler has not yet been created.')
|
||||
end
|
||||
|
||||
Return Response OR ''
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Endpoint Handlers
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
API remotehealthcheck.HEAD
|
||||
API remotehealthcheck.GET
|
||||
|
||||
HTTP_Resource_Services('LoremIpsum')
|
||||
|
||||
end api
|
||||
|
||||
|
||||
API engineinfo.HEAD
|
||||
API engineinfo.GET
|
||||
|
||||
HTTP_Resource_Services('LoremIpsum')
|
||||
|
||||
end api
|
||||
|
||||
|
||||
API engineinfo.ID.HEAD
|
||||
API engineinfo.ID.GET
|
||||
|
||||
EngineID = EndpointSegment
|
||||
If RowExists('APP_INFO', EngineID) then
|
||||
EngineHealthInfo = System_Healthcheck_Services('GetEngineHealthInfo', EngineID)
|
||||
If Error_Services('NoError') then
|
||||
EngineJSON = System_Healthcheck_Services('ConvertEngineHealthInfoToJSON', EngineHealthInfo, FullEndpointURL)
|
||||
ResponseCode = 200
|
||||
HTTP_Services('SetResponseHeaderField', 'Content-Location', FullEndpointURL)
|
||||
HTTP_Services('SetResponseBody', EngineJSON, False$, 'application/hal+json')
|
||||
HTTP_Services('SetResponseStatus', ResponseCode)
|
||||
end else
|
||||
HTTP_Services('SetResponseStatus', 500, Error_Services('GetMessage'))
|
||||
end
|
||||
end else
|
||||
HTTP_Services('SetResponseStatus', 401, 'Invalid Engine ID.')
|
||||
end
|
||||
|
||||
end api
|
||||
|
||||
Function Engineinfo_API(@API)
|
||||
/***********************************************************************************************************************
|
||||
|
||||
This program is proprietary and is not to be used by or disclosed to others, nor is it to be copied without written
|
||||
permission from SRP Computer Solutions, Inc.
|
||||
|
||||
Name : Engineinfo_API
|
||||
|
||||
Description : API logic for the Engineinfo resource.
|
||||
|
||||
Notes : All web APIs should include the API_SETUP insert. This will provide several useful variables:
|
||||
|
||||
HTTPMethod - The HTTP Method (Verb) submitted by the client (e.g., GET, POST, etc.)
|
||||
APIURL - The URL for the API entry point (e.g., api.mysite.com/v1).
|
||||
FullEndpointURL - The URL submitted by the client, including query params.
|
||||
FullEndpointURLNoQuery - The URL submitted by the client, excluding query params.
|
||||
EndpointSegment - The URL endpoint segment.
|
||||
ParentURL - The URL path preceeding the current endpoint.
|
||||
CurrentAPI - The name of this stored procedure.
|
||||
|
||||
Parameters :
|
||||
API [in] -- Web API to process. Format is [APIPattern].[HTTPMethod]:
|
||||
- APIPattern must follow this structure Engineinfo[.ID.[<Property>]]
|
||||
- HTTPMethod can be any valid HTTP method, e.g., GET, POST, PUT, DELETE, etc.
|
||||
Examples:
|
||||
- Engineinfo.POST
|
||||
- Engineinfo.ID.PUT
|
||||
- Engineinfo.ID.firstName.GET
|
||||
Response [out] -- Response to be sent back to the Controller (HTTP_MCP) or requesting procedure. Web API
|
||||
services do not rely upon anything being returned in the response. This is what the
|
||||
various services like SetResponseBody and SetResponseStatus services are for. A response
|
||||
value is only helpful if the developers want to use it for debug purposes.
|
||||
|
||||
History : (Date, Initials, Notes)
|
||||
07/17/24 xxx Original programmer.
|
||||
|
||||
***********************************************************************************************************************/
|
||||
|
||||
#pragma precomp SRP_PreCompiler
|
||||
|
||||
$insert APP_INSERTS
|
||||
$insert API_SETUP
|
||||
$insert HTTP_INSERTS
|
||||
$insert ENGINE_HEALTH_EQUATES
|
||||
|
||||
Declare function System_Healthcheck_Services
|
||||
|
||||
GoToAPI else
|
||||
// The specific resource endpoint doesn't have a API handler yet.
|
||||
HTTP_Services('SetResponseStatus', 200, 'This is a valid endpoint but a web API handler has not yet been created.')
|
||||
end
|
||||
|
||||
Return Response OR ''
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Endpoint Handlers
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
API remotehealthcheck.HEAD
|
||||
API remotehealthcheck.GET
|
||||
|
||||
HTTP_Resource_Services('LoremIpsum')
|
||||
|
||||
end api
|
||||
|
||||
|
||||
API engineinfo.HEAD
|
||||
API engineinfo.GET
|
||||
|
||||
HTTP_Resource_Services('LoremIpsum')
|
||||
|
||||
end api
|
||||
|
||||
|
||||
API engineinfo.ID.HEAD
|
||||
API engineinfo.ID.GET
|
||||
|
||||
EngineID = EndpointSegment
|
||||
If RowExists('APP_INFO', EngineID) then
|
||||
EngineHealthInfo = System_Healthcheck_Services('GetEngineHealthInfo', EngineID)
|
||||
If Error_Services('NoError') then
|
||||
EngineJSON = System_Healthcheck_Services('ConvertEngineHealthInfoToJSON', EngineHealthInfo, FullEndpointURL)
|
||||
ResponseCode = 200
|
||||
HTTP_Services('SetResponseHeaderField', 'Content-Location', FullEndpointURL)
|
||||
HTTP_Services('SetResponseBody', EngineJSON, False$, 'application/hal+json')
|
||||
HTTP_Services('SetResponseStatus', ResponseCode)
|
||||
end else
|
||||
HTTP_Services('SetResponseStatus', 500, Error_Services('GetMessage'))
|
||||
end
|
||||
end else
|
||||
HTTP_Services('SetResponseStatus', 401, 'Invalid Engine ID.')
|
||||
end
|
||||
|
||||
end api
|
||||
|
||||
|
@ -1,72 +1,72 @@
|
||||
Function Healthinfo_API(@API)
|
||||
/***********************************************************************************************************************
|
||||
|
||||
This program is proprietary and is not to be used by or disclosed to others, nor is it to be copied without written
|
||||
permission from SRP Computer Solutions, Inc.
|
||||
|
||||
Name : Healthinfo_API
|
||||
|
||||
Description : API logic for the Healthinfo resource.
|
||||
|
||||
Notes : All web APIs should include the API_SETUP insert. This will provide several useful variables:
|
||||
|
||||
HTTPMethod - The HTTP Method (Verb) submitted by the client (e.g., GET, POST, etc.)
|
||||
APIURL - The URL for the API entry point (e.g., api.mysite.com/v1).
|
||||
FullEndpointURL - The URL submitted by the client, including query params.
|
||||
FullEndpointURLNoQuery - The URL submitted by the client, excluding query params.
|
||||
EndpointSegment - The URL endpoint segment.
|
||||
ParentURL - The URL path preceeding the current endpoint.
|
||||
CurrentAPI - The name of this stored procedure.
|
||||
|
||||
Parameters :
|
||||
API [in] -- Web API to process. Format is [APIPattern].[HTTPMethod]:
|
||||
- APIPattern must follow this structure Healthinfo[.ID.[<Property>]]
|
||||
- HTTPMethod can be any valid HTTP method, e.g., GET, POST, PUT, DELETE, etc.
|
||||
Examples:
|
||||
- Healthinfo.POST
|
||||
- Healthinfo.ID.PUT
|
||||
- Healthinfo.ID.firstName.GET
|
||||
Response [out] -- Response to be sent back to the Controller (HTTP_MCP) or requesting procedure. Web API
|
||||
services do not rely upon anything being returned in the response. This is what the
|
||||
various services like SetResponseBody and SetResponseStatus services are for. A response
|
||||
value is only helpful if the developers want to use it for debug purposes.
|
||||
|
||||
History : (Date, Initials, Notes)
|
||||
07/17/24 xxx Original programmer.
|
||||
|
||||
***********************************************************************************************************************/
|
||||
|
||||
#pragma precomp SRP_PreCompiler
|
||||
|
||||
$insert APP_INSERTS
|
||||
$insert API_SETUP
|
||||
$insert HTTP_INSERTS
|
||||
|
||||
GoToAPI else
|
||||
// The specific resource endpoint doesn't have a API handler yet.
|
||||
HTTP_Services('SetResponseStatus', 200, 'This is a valid endpoint but a web API handler has not yet been created.')
|
||||
end
|
||||
|
||||
Return Response OR ''
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Endpoint Handlers
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
API remotehealthcheck.HEAD
|
||||
API remotehealthcheck.GET
|
||||
|
||||
HTTP_Resource_Services('LoremIpsum')
|
||||
|
||||
end api
|
||||
|
||||
|
||||
API healthinfo.HEAD
|
||||
API healthinfo.GET
|
||||
|
||||
HTTP_Resource_Services('LoremIpsum')
|
||||
|
||||
end api
|
||||
|
||||
Function Healthinfo_API(@API)
|
||||
/***********************************************************************************************************************
|
||||
|
||||
This program is proprietary and is not to be used by or disclosed to others, nor is it to be copied without written
|
||||
permission from SRP Computer Solutions, Inc.
|
||||
|
||||
Name : Healthinfo_API
|
||||
|
||||
Description : API logic for the Healthinfo resource.
|
||||
|
||||
Notes : All web APIs should include the API_SETUP insert. This will provide several useful variables:
|
||||
|
||||
HTTPMethod - The HTTP Method (Verb) submitted by the client (e.g., GET, POST, etc.)
|
||||
APIURL - The URL for the API entry point (e.g., api.mysite.com/v1).
|
||||
FullEndpointURL - The URL submitted by the client, including query params.
|
||||
FullEndpointURLNoQuery - The URL submitted by the client, excluding query params.
|
||||
EndpointSegment - The URL endpoint segment.
|
||||
ParentURL - The URL path preceeding the current endpoint.
|
||||
CurrentAPI - The name of this stored procedure.
|
||||
|
||||
Parameters :
|
||||
API [in] -- Web API to process. Format is [APIPattern].[HTTPMethod]:
|
||||
- APIPattern must follow this structure Healthinfo[.ID.[<Property>]]
|
||||
- HTTPMethod can be any valid HTTP method, e.g., GET, POST, PUT, DELETE, etc.
|
||||
Examples:
|
||||
- Healthinfo.POST
|
||||
- Healthinfo.ID.PUT
|
||||
- Healthinfo.ID.firstName.GET
|
||||
Response [out] -- Response to be sent back to the Controller (HTTP_MCP) or requesting procedure. Web API
|
||||
services do not rely upon anything being returned in the response. This is what the
|
||||
various services like SetResponseBody and SetResponseStatus services are for. A response
|
||||
value is only helpful if the developers want to use it for debug purposes.
|
||||
|
||||
History : (Date, Initials, Notes)
|
||||
07/17/24 xxx Original programmer.
|
||||
|
||||
***********************************************************************************************************************/
|
||||
|
||||
#pragma precomp SRP_PreCompiler
|
||||
|
||||
$insert APP_INSERTS
|
||||
$insert API_SETUP
|
||||
$insert HTTP_INSERTS
|
||||
|
||||
GoToAPI else
|
||||
// The specific resource endpoint doesn't have a API handler yet.
|
||||
HTTP_Services('SetResponseStatus', 200, 'This is a valid endpoint but a web API handler has not yet been created.')
|
||||
end
|
||||
|
||||
Return Response OR ''
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Endpoint Handlers
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
API remotehealthcheck.HEAD
|
||||
API remotehealthcheck.GET
|
||||
|
||||
HTTP_Resource_Services('LoremIpsum')
|
||||
|
||||
end api
|
||||
|
||||
|
||||
API healthinfo.HEAD
|
||||
API healthinfo.GET
|
||||
|
||||
HTTP_Resource_Services('LoremIpsum')
|
||||
|
||||
end api
|
||||
|
||||
|
@ -39,6 +39,27 @@ Return Response or ""
|
||||
// SERVICES
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
Service UpdateYesterdayAvail()
|
||||
Today = 20702
|
||||
DataArray = ''
|
||||
//ASM Reactors
|
||||
ASMRecordKey = 'ASM*': Today
|
||||
ASMUptimeRec = Reactor_Services('GetReactorUptimeMetricsByTypeAndTimeSpan', Today, Today + 1, 'ASM')
|
||||
Database_Services('WriteDataRow', 'REACTOR_DAILY_UPTIME', ASMRecordKey, ASMUptimeRec, True$, False$, True$)
|
||||
//HTR Reactors
|
||||
HTRRecordKey = 'HTR*': Today
|
||||
HTRUptimeRec = Reactor_Services('GetReactorUptimeMetricsByTypeAndTimeSpan', Today, Today + 1, 'HTR')
|
||||
Database_Services('WriteDataRow', 'REACTOR_DAILY_UPTIME', HTRRecordKey, HTRUptimeRec, True$, False$, True$)
|
||||
//EPP Reactors
|
||||
EPPRecordKey = 'EPP*': Today
|
||||
EPPUptimeRec = Reactor_Services('GetReactorUptimeMetricsByTypeAndTimeSpan', Today, Today + 1, 'EPP')
|
||||
Database_Services('WriteDataRow', 'REACTOR_DAILY_UPTIME', EPPRecordKey, EPPUptimeRec, True$, False$, True$)
|
||||
//All Reactors
|
||||
ALLRecordKey = 'ALL*': Today
|
||||
ALLUptimeRec = Reactor_Services('GetReactorUptimeMetricsByTypeAndTimeSpan', Today, Today + 1, 'ALL')
|
||||
Database_Services('WriteDataRow', 'REACTOR_DAILY_UPTIME', ALLRecordKey, ALLUptimeRec, True$, False$, True$)
|
||||
end service
|
||||
|
||||
Service GetReactorNumbersByType()
|
||||
Debug
|
||||
test = Reactor_Services('GetReactorNumbers', 'ASM')
|
||||
|
@ -1,167 +1,167 @@
|
||||
Function Lock_API(@API)
|
||||
/***********************************************************************************************************************
|
||||
|
||||
This program is proprietary and is not to be used by or disclosed to others, nor is it to be copied without written
|
||||
permission from SRP Computer Solutions, Inc.
|
||||
|
||||
Name : Lock_API
|
||||
|
||||
Description : API logic for the Lock resource.
|
||||
|
||||
Notes : All web APIs should include the API_SETUP insert. This will provide several useful variables:
|
||||
|
||||
HTTPMethod - The HTTP Method (Verb) submitted by the client (e.g., GET, POST, etc.)
|
||||
APIURL - The URL for the API entry point (e.g., api.mysite.com/v1).
|
||||
FullEndpointURL - The URL submitted by the client, including query params.
|
||||
FullEndpointURLNoQuery - The URL submitted by the client, excluding query params.
|
||||
EndpointSegment - The URL endpoint segment.
|
||||
ParentURL - The URL path preceeding the current endpoint.
|
||||
CurrentAPI - The name of this stored procedure.
|
||||
|
||||
Parameters :
|
||||
API [in] -- Web API to process. Format is [APIPattern].[HTTPMethod]:
|
||||
- APIPattern must follow this structure Lock[.ID.[<Property>]]
|
||||
- HTTPMethod can be any valid HTTP method, e.g., GET, POST, PUT, DELETE, etc.
|
||||
Examples:
|
||||
- Lock.POST
|
||||
- Lock.ID.PUT
|
||||
- Lock.ID.firstName.GET
|
||||
Response [out] -- Response to be sent back to the Controller (HTTP_MCP) or requesting procedure. Web API
|
||||
services do not rely upon anything being returned in the response. This is what the
|
||||
various services like SetResponseBody and SetResponseStatus services are for. A response
|
||||
value is only helpful if the developers want to use it for debug purposes.
|
||||
|
||||
History : (Date, Initials, Notes)
|
||||
03/14/24 djm Original programmer.
|
||||
|
||||
***********************************************************************************************************************/
|
||||
|
||||
#pragma precomp SRP_PreCompiler
|
||||
|
||||
$insert APP_INSERTS
|
||||
$insert API_SETUP
|
||||
$insert HTTP_INSERTS
|
||||
|
||||
Declare function Database_Services, Oi_Wizard_Services, Memberof, Lock_Services
|
||||
Declare subroutine Lock_Services
|
||||
|
||||
GoToAPI else
|
||||
// The specific resource endpoint doesn't have a API handler yet.
|
||||
HTTP_Services('SetResponseStatus', 204, 'This is a valid endpoint but a web API handler has not yet been created.')
|
||||
end
|
||||
|
||||
Return Response OR ''
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Endpoint Handlers
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
API Lock.HEAD
|
||||
|
||||
|
||||
// GET Method removed until RTI_LH_Info(CMD_LOCKS_INFO$, '') is fixed ////////////////////////////////
|
||||
|
||||
* API Lock.GET
|
||||
*
|
||||
* OIWizardID = ''
|
||||
* Cookies = HTTP_Services('GetHTTPCookie')
|
||||
* For each Cookie in Cookies using ';'
|
||||
* Key = Trim(Field(Cookie, '=', 1))
|
||||
* If Key EQ 'sessionID' then
|
||||
* OIWizardID = Field(Cookie, '=', 2)
|
||||
* end
|
||||
* If Key EQ 'userID' then
|
||||
* CurrUser = Field(Cookie, '=', 2)
|
||||
* end
|
||||
* Next Cookie
|
||||
*
|
||||
* ValidSession = OI_Wizard_Services('ValidateSession', OIWizardID)
|
||||
*
|
||||
* If ValidSession then
|
||||
*
|
||||
* Allowed = Lock_Services("GetLockPermissions", CurrUser)
|
||||
*
|
||||
* If Allowed NE FALSE$ then
|
||||
*
|
||||
* StatusCode = 200
|
||||
* LockJSON = Lock_Services("GetAllowedLocks", CurrUser)
|
||||
*
|
||||
* If Error_Services('NoError') then
|
||||
* HTTP_Services('SetResponseHeaderField', 'Content-Location', FullEndpointURL)
|
||||
* HTTP_Services('SetResponseBody', LockJSON, False$, 'application/hal+json')
|
||||
* If Assigned(Message) then
|
||||
* HTTP_Services('SetResponseStatus', StatusCode, Message)
|
||||
* end else
|
||||
* HTTP_Services('SetResponseStatus', StatusCode)
|
||||
* end
|
||||
* end else
|
||||
* Message = Error_Services('GetMessage')
|
||||
* HTTP_Services('SetResponseStatus', 500, 'Error in the ' : CurrentAPI : ' API. Message: ': Message)
|
||||
* end
|
||||
* End Else
|
||||
* HTTP_Services('SetResponseStatus', 403, 'User is not permitted to access this resource.')
|
||||
* end
|
||||
* End else
|
||||
* HTTP_Services('SetResponseStatus', 401, 'User must be signed in to access this resource.')
|
||||
* end
|
||||
*
|
||||
* end api
|
||||
|
||||
|
||||
API Lock.POST
|
||||
|
||||
OIWizardID = ''
|
||||
Cookies = HTTP_Services('GetHTTPCookie')
|
||||
For each Cookie in Cookies using ';'
|
||||
Key = Trim(Field(Cookie, '=', 1))
|
||||
If Key EQ 'sessionID' then
|
||||
OIWizardID = Field(Cookie, '=', 2)
|
||||
end
|
||||
If Key EQ 'userID' then
|
||||
CurrUser = Field(Cookie, '=', 2)
|
||||
end
|
||||
Next Cookie
|
||||
|
||||
ValidSession = OI_Wizard_Services('ValidateSession', OIWizardID)
|
||||
|
||||
If ValidSession then
|
||||
Allowed = Lock_Services("GetLockPermissions", CurrUser)
|
||||
|
||||
If Allowed NE FALSE$ then
|
||||
StatusCode = ''
|
||||
Body = HTTP_Services('GetHTTPPostString', True$)
|
||||
// The POST string will have been encoded so use percent (URL) decoding.
|
||||
DecodedJSON = HTTP_Services('DecodePercentString', Body)
|
||||
If SRP_JSON(objBody, 'Parse', Body) EQ '' then
|
||||
Table = SRP_JSON(objBody, 'GetValue', 'table')
|
||||
Key = SRP_JSON(objBody, 'GetValue', 'key')
|
||||
SRP_JSON(objBody, 'Release')
|
||||
end
|
||||
|
||||
If (Table NE '') AND (Key NE '') then
|
||||
Result = Lock_Services("AttemptUnlock",CurrUser, Table, Key)
|
||||
If Result EQ TRUE$ then
|
||||
HTTP_Services('SetResponseStatus', 200, 'Record successfully unlocked.')
|
||||
Lock_Services("LogUnlockRequest", Table, Key, CurrUser, TRUE$)
|
||||
end else
|
||||
ErrCode = Error_Services('GetMessage')
|
||||
HTTP_Services('SetResponseStatus', 500, ErrCode)
|
||||
Lock_Services("LogUnlockRequest", Table, Key, CurrUser, FALSE$)
|
||||
end
|
||||
end else
|
||||
HTTP_Services('SetResponseStatus', 400, 'The table or key property is missing.')
|
||||
end
|
||||
End Else
|
||||
HTTP_Services('SetResponseStatus', 403, 'User is not permitted to access this resource.')
|
||||
end
|
||||
End else
|
||||
HTTP_Services('SetResponseStatus', 401, 'User must be signed in to access this resource.')
|
||||
end
|
||||
|
||||
end api
|
||||
|
||||
|
||||
|
||||
|
||||
Function Lock_API(@API)
|
||||
/***********************************************************************************************************************
|
||||
|
||||
This program is proprietary and is not to be used by or disclosed to others, nor is it to be copied without written
|
||||
permission from SRP Computer Solutions, Inc.
|
||||
|
||||
Name : Lock_API
|
||||
|
||||
Description : API logic for the Lock resource.
|
||||
|
||||
Notes : All web APIs should include the API_SETUP insert. This will provide several useful variables:
|
||||
|
||||
HTTPMethod - The HTTP Method (Verb) submitted by the client (e.g., GET, POST, etc.)
|
||||
APIURL - The URL for the API entry point (e.g., api.mysite.com/v1).
|
||||
FullEndpointURL - The URL submitted by the client, including query params.
|
||||
FullEndpointURLNoQuery - The URL submitted by the client, excluding query params.
|
||||
EndpointSegment - The URL endpoint segment.
|
||||
ParentURL - The URL path preceeding the current endpoint.
|
||||
CurrentAPI - The name of this stored procedure.
|
||||
|
||||
Parameters :
|
||||
API [in] -- Web API to process. Format is [APIPattern].[HTTPMethod]:
|
||||
- APIPattern must follow this structure Lock[.ID.[<Property>]]
|
||||
- HTTPMethod can be any valid HTTP method, e.g., GET, POST, PUT, DELETE, etc.
|
||||
Examples:
|
||||
- Lock.POST
|
||||
- Lock.ID.PUT
|
||||
- Lock.ID.firstName.GET
|
||||
Response [out] -- Response to be sent back to the Controller (HTTP_MCP) or requesting procedure. Web API
|
||||
services do not rely upon anything being returned in the response. This is what the
|
||||
various services like SetResponseBody and SetResponseStatus services are for. A response
|
||||
value is only helpful if the developers want to use it for debug purposes.
|
||||
|
||||
History : (Date, Initials, Notes)
|
||||
03/14/24 djm Original programmer.
|
||||
|
||||
***********************************************************************************************************************/
|
||||
|
||||
#pragma precomp SRP_PreCompiler
|
||||
|
||||
$insert APP_INSERTS
|
||||
$insert API_SETUP
|
||||
$insert HTTP_INSERTS
|
||||
|
||||
Declare function Database_Services, Oi_Wizard_Services, Memberof, Lock_Services
|
||||
Declare subroutine Lock_Services
|
||||
|
||||
GoToAPI else
|
||||
// The specific resource endpoint doesn't have a API handler yet.
|
||||
HTTP_Services('SetResponseStatus', 204, 'This is a valid endpoint but a web API handler has not yet been created.')
|
||||
end
|
||||
|
||||
Return Response OR ''
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Endpoint Handlers
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
API Lock.HEAD
|
||||
|
||||
|
||||
// GET Method removed until RTI_LH_Info(CMD_LOCKS_INFO$, '') is fixed ////////////////////////////////
|
||||
|
||||
* API Lock.GET
|
||||
*
|
||||
* OIWizardID = ''
|
||||
* Cookies = HTTP_Services('GetHTTPCookie')
|
||||
* For each Cookie in Cookies using ';'
|
||||
* Key = Trim(Field(Cookie, '=', 1))
|
||||
* If Key EQ 'sessionID' then
|
||||
* OIWizardID = Field(Cookie, '=', 2)
|
||||
* end
|
||||
* If Key EQ 'userID' then
|
||||
* CurrUser = Field(Cookie, '=', 2)
|
||||
* end
|
||||
* Next Cookie
|
||||
*
|
||||
* ValidSession = OI_Wizard_Services('ValidateSession', OIWizardID)
|
||||
*
|
||||
* If ValidSession then
|
||||
*
|
||||
* Allowed = Lock_Services("GetLockPermissions", CurrUser)
|
||||
*
|
||||
* If Allowed NE FALSE$ then
|
||||
*
|
||||
* StatusCode = 200
|
||||
* LockJSON = Lock_Services("GetAllowedLocks", CurrUser)
|
||||
*
|
||||
* If Error_Services('NoError') then
|
||||
* HTTP_Services('SetResponseHeaderField', 'Content-Location', FullEndpointURL)
|
||||
* HTTP_Services('SetResponseBody', LockJSON, False$, 'application/hal+json')
|
||||
* If Assigned(Message) then
|
||||
* HTTP_Services('SetResponseStatus', StatusCode, Message)
|
||||
* end else
|
||||
* HTTP_Services('SetResponseStatus', StatusCode)
|
||||
* end
|
||||
* end else
|
||||
* Message = Error_Services('GetMessage')
|
||||
* HTTP_Services('SetResponseStatus', 500, 'Error in the ' : CurrentAPI : ' API. Message: ': Message)
|
||||
* end
|
||||
* End Else
|
||||
* HTTP_Services('SetResponseStatus', 403, 'User is not permitted to access this resource.')
|
||||
* end
|
||||
* End else
|
||||
* HTTP_Services('SetResponseStatus', 401, 'User must be signed in to access this resource.')
|
||||
* end
|
||||
*
|
||||
* end api
|
||||
|
||||
|
||||
API Lock.POST
|
||||
|
||||
OIWizardID = ''
|
||||
Cookies = HTTP_Services('GetHTTPCookie')
|
||||
For each Cookie in Cookies using ';'
|
||||
Key = Trim(Field(Cookie, '=', 1))
|
||||
If Key EQ 'sessionID' then
|
||||
OIWizardID = Field(Cookie, '=', 2)
|
||||
end
|
||||
If Key EQ 'userID' then
|
||||
CurrUser = Field(Cookie, '=', 2)
|
||||
end
|
||||
Next Cookie
|
||||
|
||||
ValidSession = OI_Wizard_Services('ValidateSession', OIWizardID)
|
||||
|
||||
If ValidSession then
|
||||
Allowed = Lock_Services("GetLockPermissions", CurrUser)
|
||||
|
||||
If Allowed NE FALSE$ then
|
||||
StatusCode = ''
|
||||
Body = HTTP_Services('GetHTTPPostString', True$)
|
||||
// The POST string will have been encoded so use percent (URL) decoding.
|
||||
DecodedJSON = HTTP_Services('DecodePercentString', Body)
|
||||
If SRP_JSON(objBody, 'Parse', Body) EQ '' then
|
||||
Table = SRP_JSON(objBody, 'GetValue', 'table')
|
||||
Key = SRP_JSON(objBody, 'GetValue', 'key')
|
||||
SRP_JSON(objBody, 'Release')
|
||||
end
|
||||
|
||||
If (Table NE '') AND (Key NE '') then
|
||||
Result = Lock_Services("AttemptUnlock",CurrUser, Table, Key)
|
||||
If Result EQ TRUE$ then
|
||||
HTTP_Services('SetResponseStatus', 200, 'Record successfully unlocked.')
|
||||
Lock_Services("LogUnlockRequest", Table, Key, CurrUser, TRUE$)
|
||||
end else
|
||||
ErrCode = Error_Services('GetMessage')
|
||||
HTTP_Services('SetResponseStatus', 500, ErrCode)
|
||||
Lock_Services("LogUnlockRequest", Table, Key, CurrUser, FALSE$)
|
||||
end
|
||||
end else
|
||||
HTTP_Services('SetResponseStatus', 400, 'The table or key property is missing.')
|
||||
end
|
||||
End Else
|
||||
HTTP_Services('SetResponseStatus', 403, 'User is not permitted to access this resource.')
|
||||
end
|
||||
End else
|
||||
HTTP_Services('SetResponseStatus', 401, 'User must be signed in to access this resource.')
|
||||
end
|
||||
|
||||
end api
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -1,372 +1,372 @@
|
||||
Compile function Lock_Services(@Service, @Params)
|
||||
/***********************************************************************************************************************
|
||||
|
||||
Name : Lock_Services
|
||||
|
||||
Description : Handler program for all Lock services.
|
||||
|
||||
Notes : Application errors should be logged using the Error Services module. There are a few methodological
|
||||
assumptions built into way errors are managed which are important to understand in order to properly
|
||||
work with Error Services:
|
||||
|
||||
- The term 'top' refers to the originating procedure of a call stack and the term 'bottom' refers to
|
||||
the last routine (or the current routine) within a call stack. Within the OpenInsight Debugger
|
||||
this will appear backwards since the originating procedure always appears at the bottom of the
|
||||
list and the current routine appears at the top of the list. We are using this orientation because
|
||||
it is common to refer to the process of calling other procedures as 'drilling down'.
|
||||
|
||||
- The reason for defining the orientation of the call stack is because Error_Services allows for
|
||||
multiple error conditions to be appended to an original error. In most cases this will happen when
|
||||
a procedure at the bottom of the stack generates an error condition and then returns to its
|
||||
calling procedure. This higher level procedure can optionally add more information relevant to
|
||||
itself. This continues as the call stack 'bubbles' its way back to the top to where the
|
||||
originating procedure is waiting.
|
||||
|
||||
- Native OpenInsight commands that handle errors (e.g., Set_Status, Set_FSError, Set_EventStatus)
|
||||
preserve their error state until explicitly cleared. This can hinder the normal execution of code
|
||||
since subsequent procedures (usually SSPs) will fail if a pre-existing error condition exists.
|
||||
Our philosophy is that error conditions should automatically be cleared before a new procedure
|
||||
is executed to avoid this problem. However, the nature of Basic+ does not make this easy to
|
||||
automate for any given stored procedure. Therefore, if a stored procedure wants to conform to our
|
||||
philosophy then it should include a call into the 'Clear' service request at the top of the
|
||||
program. Alternatively this can be done through a common insert (see SERVICE_SETUP for example.)
|
||||
|
||||
- Service modules will use the SERVICE_SETUP insert and therefore automatically clear out any
|
||||
error conditions that were set before.
|
||||
|
||||
Parameters :
|
||||
Service [in] -- Name of the service being requested
|
||||
Param1-10 [in/out] -- Additional request parameter holders
|
||||
Response [out] -- Response to be sent back to the Controller (MCP) or requesting procedure
|
||||
|
||||
Metadata :
|
||||
|
||||
History : (Date, Initials, Notes)
|
||||
3/18/24 djm Original programmer.
|
||||
|
||||
***********************************************************************************************************************/
|
||||
#pragma precomp SRP_PreCompiler
|
||||
$insert LOGICAL
|
||||
$Insert SERVICE_SETUP
|
||||
$Insert UNLOCK_REQUESTS_EQUATES
|
||||
$Insert REACT_RUN_EQUATES
|
||||
$Insert WO_MAT_EQUATES
|
||||
$Insert WM_OUT_EQUATES
|
||||
$Insert RDS_EQUATES
|
||||
$Insert RDS_LAYER_EQUATES
|
||||
|
||||
Declare function Database_Services, Oi_Wizard_Services, Memberof, Lock_Services, SRP_Json, List_Volume_Sub, Datetime
|
||||
Declare subroutine SRP_Json, Database_Services
|
||||
|
||||
|
||||
GoToService
|
||||
|
||||
Return Response or ""
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// SERVICES
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------------------------------------------------
|
||||
// GetLockPermissions
|
||||
//
|
||||
// CurrUser - [Required]
|
||||
//
|
||||
// Returns LockPermissionLevel 0 - No lock access, 1 - Lock access to unprotected tables, or 2 - Lock access to all tables.
|
||||
//
|
||||
//----------------------------------------------------------------------------------------------------------------------
|
||||
Service GetLockPermissions(CurrUser)
|
||||
|
||||
LockPermissionLevel = 0
|
||||
OIAdmin = Memberof(CurrUser, 'OI_ADMIN')
|
||||
SupervisorLead = MemberOf(CurrUser, 'LEAD') OR MemberOf(CurrUser, 'SUPERVISOR')
|
||||
If OIAdmin then
|
||||
LockPermissionLevel = 2
|
||||
end else
|
||||
If SupervisorLead then
|
||||
LockPermissionLevel = 1
|
||||
end
|
||||
end
|
||||
Response = LockPermissionLevel
|
||||
|
||||
End Service
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------------------------------------------------
|
||||
// GetAllowedLocks
|
||||
//
|
||||
// CurrUser - [Required]
|
||||
//
|
||||
// Returns an array of accessible locks based on user LockPermissionLevel
|
||||
//
|
||||
//----------------------------------------------------------------------------------------------------------------------
|
||||
Service GetAllowedLocks(CurrUser)
|
||||
|
||||
LockPermissionLevel = Lock_Services('GetLockPermissions', CurrUser)
|
||||
LockJSON = ''
|
||||
|
||||
If LockPermissionLevel NE 0 then
|
||||
|
||||
LockList = Database_Services('GetUserLocks')
|
||||
If Error_Services('NoError') then
|
||||
If SRP_JSON(objJSON, 'New', 'Object') then
|
||||
If SRP_JSON(LockArray, 'New', 'Array') then
|
||||
For each Row in LockList using @FM setting fPos
|
||||
If Row<0,3> = "Rev30536" then Row<0,3> = 'RDS*LSL2'
|
||||
If Field(Row<0,3>, "*", 2) EQ 'LSL2' OR LockPermissionLevel EQ 2 then
|
||||
If SRP_JSON(objRow, 'New', 'Object') then
|
||||
SRP_JSON(objRow, 'SetValue', 'ComputerName', Row<0, 1>)
|
||||
SRP_JSON(objRow, 'SetValue', 'Volume', Row<0, 2>)
|
||||
If Field(Row<0,3>, "*", 2) EQ 'LSL2' then Row<0,3> = Field(Row<0,3>, "*", 1)
|
||||
SRP_JSON(objRow, 'SetValue', 'OSFile', Row<0, 3>)
|
||||
SRP_JSON(objRow, 'SetValue', 'RecordKey', Row<0, 4>, "String")
|
||||
SRP_JSON(objRow, 'SetValue', 'Exclusive', Row<0, 5>)
|
||||
SRP_JSON(objRow, 'SetValue', 'REVFile', Row<0, 6>)
|
||||
SRP_JSON(LockArray, 'Add', objRow)
|
||||
SRP_JSON(objRow, 'Release')
|
||||
end
|
||||
End
|
||||
Next Row
|
||||
SRP_JSON(objJSON, 'Set', 'Locks', LockArray)
|
||||
SRP_JSON(LockArray, 'Release')
|
||||
end
|
||||
LockJSON = SRP_JSON(objJSON, 'Stringify', 'Styled')
|
||||
SRP_JSON(objJSON, 'Release')
|
||||
end
|
||||
end
|
||||
End
|
||||
|
||||
Response = LockJSON
|
||||
|
||||
End Service
|
||||
|
||||
//----------------------------------------------------------------------------------------------------------------------
|
||||
// AttemptUnlock
|
||||
//
|
||||
// CurrUser - [Required]
|
||||
// LotType - [Required]
|
||||
// Key - [Required]
|
||||
//
|
||||
// Returns either 1 for success, or error message
|
||||
//
|
||||
//----------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
Service AttemptUnlock(CurrUser, LotType, Key)
|
||||
|
||||
LockPermissionLevel = Lock_Services('GetLockPermissions', CurrUser)
|
||||
If LockPermissionLevel NE 0 then
|
||||
If LotType EQ 'RDS' or LotType EQ 'WM_OUT' then
|
||||
If Xlate(LotType, Key, '', 'X', '') NE '' then
|
||||
LockArray = Lock_Services('GetChildRecords', LotType, Key)
|
||||
LockCount = DCount(LockArray<1>, @VM)
|
||||
For I = 1 to LockCount
|
||||
Table = LockArray<1,I>
|
||||
KeyID = LockArray<2,I>
|
||||
Resp = Database_Services('UnlockKeyID', Table, KeyID)
|
||||
Next I
|
||||
If Error_Services('NoError') Then
|
||||
Response = TRUE$
|
||||
end else
|
||||
Response = FALSE$
|
||||
Error_Services('Add', 'Records failed to unlock.')
|
||||
end
|
||||
end else
|
||||
Response = FALSE$
|
||||
Error_Services('Add', 'This record does not exist.')
|
||||
end
|
||||
End Else
|
||||
Response = FALSE$
|
||||
Error_Services('Add', 'LotType must be either RDS or WM_OUT.')
|
||||
end
|
||||
end else
|
||||
Response = FALSE$
|
||||
Error_Services('Add', 'User is not permitted to access this resource.')
|
||||
end
|
||||
|
||||
End Service
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------------------------------------------------
|
||||
// GetChildRecords
|
||||
//
|
||||
// LotType - [Required]
|
||||
// Key - [Required]
|
||||
//
|
||||
// Returns an array of associated child records for unlocking
|
||||
//
|
||||
//----------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
Service GetChildRecords(LotType, Key)
|
||||
|
||||
RecordArray = ''
|
||||
|
||||
Begin Case
|
||||
|
||||
Case LotType EQ 'RDS'
|
||||
RDSRec = Xlate('RDS', Key, '', 'X', '')
|
||||
If RDSRec NE '' then
|
||||
//Add RDS key
|
||||
RecordArray<1> = LotType
|
||||
RecordArray<2> = Key
|
||||
//Get REACT_RUN record
|
||||
ReactRunRec = Xlate('REACT_RUN', Key, '', 'X', '')
|
||||
//Get and Add CLEAN_INSP keys
|
||||
CINos = ReactRunRec<REACT_RUN_CI_NO$>
|
||||
If CINos NE '' then
|
||||
CICount = Dcount(CINos, @VM)
|
||||
For I = 1 to CICount
|
||||
If CINos<I> NE '' then
|
||||
RecordArray<1,-1> = 'CLEAN_INSP'
|
||||
RecordArray<2,-1> = CINos<I>
|
||||
end
|
||||
Next I
|
||||
end
|
||||
//Get and Add RDS_TEST keys
|
||||
RDSLayerKeys = ReactRunRec<REACT_RUN_RDS_LAYER_KEYS$>
|
||||
If RDSLayerKeys NE '' then
|
||||
LayerKeyCount = DCount(RDSLayerKeys, @VM)
|
||||
For K = 1 to LayerKeyCount
|
||||
RDSTestKeys = Xlate('RDS_LAYER', RDSLayerKeys<K>, 'RDS_TEST_KEYS', 'X', '')
|
||||
If RDSTestKeys NE '' then
|
||||
RDSTestCount = DCount(RDSTestKeys, @VM)
|
||||
For L = 1 to RDSTestCount
|
||||
If RDSTestKeys<K,L> NE '' then
|
||||
RecordArray<1,-1> = 'RDS_TEST'
|
||||
RecordArray<2,-1> = RDSTestKeys<K,L>
|
||||
end
|
||||
Next L
|
||||
end
|
||||
Next K
|
||||
end
|
||||
//Get WO_MAT key
|
||||
WONo = RDSRec<RDS_WO$>
|
||||
CassNo = RDSRec<RDS_CASS_NO$>
|
||||
WOMatKey = WONo : '*' : CassNo
|
||||
//Get and Add WO_MAT_QA
|
||||
WOMatQA = Xlate('WO_MAT_QA', WOMatKey, '', 'X', '')
|
||||
If WOMatQA NE '' then
|
||||
RecordArray<1,-1> = 'WO_MAT_QA'
|
||||
RecordArray<2,-1> = WOMatKey
|
||||
End
|
||||
//Get and Add NCR keys
|
||||
NCRKeys = Xlate('WO_MAT', WOMatKey, 'NCR_KEYS', 'X', '')
|
||||
If NCRKeys NE '' then
|
||||
NCRCount = Dcount(NCRKeys, @VM)
|
||||
For J = 1 to NCRCount
|
||||
If NCRKeys<J> NE '' then
|
||||
RecordArray<1,-1> = 'NCR'
|
||||
RecordArray<2,-1> = NCRKeys<J>
|
||||
end
|
||||
Next J
|
||||
end
|
||||
end else
|
||||
Error_Services('Add', 'This RDS does not exist.')
|
||||
Return
|
||||
end
|
||||
|
||||
Case LotType EQ 'WM_OUT'
|
||||
WMOutRec = Xlate('WM_OUT', Key, '', 'X', '')
|
||||
If WMOutRec NE '' then
|
||||
//Add WM_OUT key
|
||||
RecordArray<1> = LotType
|
||||
RecordArray<2> = Key
|
||||
//Get and Add CLEAN_INSP keys
|
||||
CINos = WMOutRec<WM_OUT_CI_NO$>
|
||||
If CINos NE '' then
|
||||
CICount = Dcount(CINos, @VM)
|
||||
For I = 1 to CICount
|
||||
If CINos<I> NE '' then
|
||||
RecordArray<1,-1> = 'CLEAN_INSP'
|
||||
RecordArray<2,-1> = CINos<I>
|
||||
end
|
||||
Next I
|
||||
end
|
||||
//Get WO_MAT key
|
||||
WONo = FIELD(Key,'*',1)
|
||||
CassNo = FIELD(Key,'*',3)
|
||||
WOMatKey = WONo : '*' : CassNo
|
||||
//Get and Add WO_MAT_QA key
|
||||
WOMatQA = Xlate('WO_MAT_QA', WOMatKey, '', 'X', '')
|
||||
If WOMatQA NE '' then
|
||||
RecordArray<1,-1> = 'WO_MAT_QA'
|
||||
RecordArray<2,-1> = WOMatKey
|
||||
End
|
||||
//Get and Add NCR keys
|
||||
NCRKeys = Xlate('WO_MAT', WOMatKey, 'NCR_KEYS', 'X', '')
|
||||
If NCRKeys NE '' then
|
||||
NCRCount = Dcount(NCRKeys, @VM)
|
||||
For J = 1 to NCRCount
|
||||
If NCRKeys<J> NE '' then
|
||||
RecordArray<1,-1> = 'NCR'
|
||||
RecordArray<2,-1> = NCRKeys<J>
|
||||
end
|
||||
Next J
|
||||
end
|
||||
end else
|
||||
Error_Services('Add', 'This WM_OUT does not exist.')
|
||||
end
|
||||
|
||||
Case OTHERWISE$
|
||||
Error_Services('Add', 'LotType must be either RDS or WM_OUT.')
|
||||
return
|
||||
|
||||
End Case
|
||||
|
||||
If RecordArray NE '' then
|
||||
Response = RecordArray
|
||||
end
|
||||
|
||||
End Service
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------------------------------------------------
|
||||
// GetUnprotectedTables
|
||||
//
|
||||
// Returns an array of unprotected tables
|
||||
//
|
||||
//----------------------------------------------------------------------------------------------------------------------
|
||||
Service GetUnprotectedTables()
|
||||
|
||||
TableArray = List_Volume_Sub('LSL', '', 'TABLE_NAME', 'TABLE_NAME')
|
||||
UnprotectedArray = ''
|
||||
For Each Table in TableArray Using @FM
|
||||
If Table[1,1] NE '!' AND Table[1,5] NE 'DICT.' then
|
||||
UnprotectedArray<-1> = Table
|
||||
end
|
||||
Next Table
|
||||
|
||||
Response = UnprotectedArray
|
||||
|
||||
End Service
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------------------------------------------------
|
||||
// LogUnlockRequest
|
||||
//
|
||||
// CurrUser - [Required]
|
||||
// TableName - [Required]
|
||||
// RecordKey - [Required]
|
||||
// Success - [Required]
|
||||
//
|
||||
// Creates an UNLOCK_REQUESTS record to log unlock attempts.
|
||||
//
|
||||
//----------------------------------------------------------------------------------------------------------------------
|
||||
Service LogUnlockRequest(TableName, RecordKey, CurrUser, Success)
|
||||
|
||||
NewRequestRec = ''
|
||||
CurrDateTime = Datetime()
|
||||
RecordID = CurrDateTime :'*': TableName
|
||||
NewRequestRec<UNLOCK_REQUESTS_RECORD_KEY$> = RecordKey
|
||||
NewRequestRec<UNLOCK_REQUESTS_USER_NAME$> = CurrUser
|
||||
NewRequestRec<UNLOCK_REQUESTS_SUCCESS$> = Success
|
||||
Database_Services('WriteDataRow', 'UNLOCK_REQUESTS', RecordID, NewRequestRec, 1, 0, 0)
|
||||
|
||||
End Service
|
||||
|
||||
|
||||
|
||||
|
||||
Compile function Lock_Services(@Service, @Params)
|
||||
/***********************************************************************************************************************
|
||||
|
||||
Name : Lock_Services
|
||||
|
||||
Description : Handler program for all Lock services.
|
||||
|
||||
Notes : Application errors should be logged using the Error Services module. There are a few methodological
|
||||
assumptions built into way errors are managed which are important to understand in order to properly
|
||||
work with Error Services:
|
||||
|
||||
- The term 'top' refers to the originating procedure of a call stack and the term 'bottom' refers to
|
||||
the last routine (or the current routine) within a call stack. Within the OpenInsight Debugger
|
||||
this will appear backwards since the originating procedure always appears at the bottom of the
|
||||
list and the current routine appears at the top of the list. We are using this orientation because
|
||||
it is common to refer to the process of calling other procedures as 'drilling down'.
|
||||
|
||||
- The reason for defining the orientation of the call stack is because Error_Services allows for
|
||||
multiple error conditions to be appended to an original error. In most cases this will happen when
|
||||
a procedure at the bottom of the stack generates an error condition and then returns to its
|
||||
calling procedure. This higher level procedure can optionally add more information relevant to
|
||||
itself. This continues as the call stack 'bubbles' its way back to the top to where the
|
||||
originating procedure is waiting.
|
||||
|
||||
- Native OpenInsight commands that handle errors (e.g., Set_Status, Set_FSError, Set_EventStatus)
|
||||
preserve their error state until explicitly cleared. This can hinder the normal execution of code
|
||||
since subsequent procedures (usually SSPs) will fail if a pre-existing error condition exists.
|
||||
Our philosophy is that error conditions should automatically be cleared before a new procedure
|
||||
is executed to avoid this problem. However, the nature of Basic+ does not make this easy to
|
||||
automate for any given stored procedure. Therefore, if a stored procedure wants to conform to our
|
||||
philosophy then it should include a call into the 'Clear' service request at the top of the
|
||||
program. Alternatively this can be done through a common insert (see SERVICE_SETUP for example.)
|
||||
|
||||
- Service modules will use the SERVICE_SETUP insert and therefore automatically clear out any
|
||||
error conditions that were set before.
|
||||
|
||||
Parameters :
|
||||
Service [in] -- Name of the service being requested
|
||||
Param1-10 [in/out] -- Additional request parameter holders
|
||||
Response [out] -- Response to be sent back to the Controller (MCP) or requesting procedure
|
||||
|
||||
Metadata :
|
||||
|
||||
History : (Date, Initials, Notes)
|
||||
3/18/24 djm Original programmer.
|
||||
|
||||
***********************************************************************************************************************/
|
||||
#pragma precomp SRP_PreCompiler
|
||||
$insert LOGICAL
|
||||
$Insert SERVICE_SETUP
|
||||
$Insert UNLOCK_REQUESTS_EQUATES
|
||||
$Insert REACT_RUN_EQUATES
|
||||
$Insert WO_MAT_EQUATES
|
||||
$Insert WM_OUT_EQUATES
|
||||
$Insert RDS_EQUATES
|
||||
$Insert RDS_LAYER_EQUATES
|
||||
|
||||
Declare function Database_Services, Oi_Wizard_Services, Memberof, Lock_Services, SRP_Json, List_Volume_Sub, Datetime
|
||||
Declare subroutine SRP_Json, Database_Services
|
||||
|
||||
|
||||
GoToService
|
||||
|
||||
Return Response or ""
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// SERVICES
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------------------------------------------------
|
||||
// GetLockPermissions
|
||||
//
|
||||
// CurrUser - [Required]
|
||||
//
|
||||
// Returns LockPermissionLevel 0 - No lock access, 1 - Lock access to unprotected tables, or 2 - Lock access to all tables.
|
||||
//
|
||||
//----------------------------------------------------------------------------------------------------------------------
|
||||
Service GetLockPermissions(CurrUser)
|
||||
|
||||
LockPermissionLevel = 0
|
||||
OIAdmin = Memberof(CurrUser, 'OI_ADMIN')
|
||||
SupervisorLead = MemberOf(CurrUser, 'LEAD') OR MemberOf(CurrUser, 'SUPERVISOR')
|
||||
If OIAdmin then
|
||||
LockPermissionLevel = 2
|
||||
end else
|
||||
If SupervisorLead then
|
||||
LockPermissionLevel = 1
|
||||
end
|
||||
end
|
||||
Response = LockPermissionLevel
|
||||
|
||||
End Service
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------------------------------------------------
|
||||
// GetAllowedLocks
|
||||
//
|
||||
// CurrUser - [Required]
|
||||
//
|
||||
// Returns an array of accessible locks based on user LockPermissionLevel
|
||||
//
|
||||
//----------------------------------------------------------------------------------------------------------------------
|
||||
Service GetAllowedLocks(CurrUser)
|
||||
|
||||
LockPermissionLevel = Lock_Services('GetLockPermissions', CurrUser)
|
||||
LockJSON = ''
|
||||
|
||||
If LockPermissionLevel NE 0 then
|
||||
|
||||
LockList = Database_Services('GetUserLocks')
|
||||
If Error_Services('NoError') then
|
||||
If SRP_JSON(objJSON, 'New', 'Object') then
|
||||
If SRP_JSON(LockArray, 'New', 'Array') then
|
||||
For each Row in LockList using @FM setting fPos
|
||||
If Row<0,3> = "Rev30536" then Row<0,3> = 'RDS*LSL2'
|
||||
If Field(Row<0,3>, "*", 2) EQ 'LSL2' OR LockPermissionLevel EQ 2 then
|
||||
If SRP_JSON(objRow, 'New', 'Object') then
|
||||
SRP_JSON(objRow, 'SetValue', 'ComputerName', Row<0, 1>)
|
||||
SRP_JSON(objRow, 'SetValue', 'Volume', Row<0, 2>)
|
||||
If Field(Row<0,3>, "*", 2) EQ 'LSL2' then Row<0,3> = Field(Row<0,3>, "*", 1)
|
||||
SRP_JSON(objRow, 'SetValue', 'OSFile', Row<0, 3>)
|
||||
SRP_JSON(objRow, 'SetValue', 'RecordKey', Row<0, 4>, "String")
|
||||
SRP_JSON(objRow, 'SetValue', 'Exclusive', Row<0, 5>)
|
||||
SRP_JSON(objRow, 'SetValue', 'REVFile', Row<0, 6>)
|
||||
SRP_JSON(LockArray, 'Add', objRow)
|
||||
SRP_JSON(objRow, 'Release')
|
||||
end
|
||||
End
|
||||
Next Row
|
||||
SRP_JSON(objJSON, 'Set', 'Locks', LockArray)
|
||||
SRP_JSON(LockArray, 'Release')
|
||||
end
|
||||
LockJSON = SRP_JSON(objJSON, 'Stringify', 'Styled')
|
||||
SRP_JSON(objJSON, 'Release')
|
||||
end
|
||||
end
|
||||
End
|
||||
|
||||
Response = LockJSON
|
||||
|
||||
End Service
|
||||
|
||||
//----------------------------------------------------------------------------------------------------------------------
|
||||
// AttemptUnlock
|
||||
//
|
||||
// CurrUser - [Required]
|
||||
// LotType - [Required]
|
||||
// Key - [Required]
|
||||
//
|
||||
// Returns either 1 for success, or error message
|
||||
//
|
||||
//----------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
Service AttemptUnlock(CurrUser, LotType, Key)
|
||||
|
||||
LockPermissionLevel = Lock_Services('GetLockPermissions', CurrUser)
|
||||
If LockPermissionLevel NE 0 then
|
||||
If LotType EQ 'RDS' or LotType EQ 'WM_OUT' then
|
||||
If Xlate(LotType, Key, '', 'X', '') NE '' then
|
||||
LockArray = Lock_Services('GetChildRecords', LotType, Key)
|
||||
LockCount = DCount(LockArray<1>, @VM)
|
||||
For I = 1 to LockCount
|
||||
Table = LockArray<1,I>
|
||||
KeyID = LockArray<2,I>
|
||||
Resp = Database_Services('UnlockKeyID', Table, KeyID)
|
||||
Next I
|
||||
If Error_Services('NoError') Then
|
||||
Response = TRUE$
|
||||
end else
|
||||
Response = FALSE$
|
||||
Error_Services('Add', 'Records failed to unlock.')
|
||||
end
|
||||
end else
|
||||
Response = FALSE$
|
||||
Error_Services('Add', 'This record does not exist.')
|
||||
end
|
||||
End Else
|
||||
Response = FALSE$
|
||||
Error_Services('Add', 'LotType must be either RDS or WM_OUT.')
|
||||
end
|
||||
end else
|
||||
Response = FALSE$
|
||||
Error_Services('Add', 'User is not permitted to access this resource.')
|
||||
end
|
||||
|
||||
End Service
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------------------------------------------------
|
||||
// GetChildRecords
|
||||
//
|
||||
// LotType - [Required]
|
||||
// Key - [Required]
|
||||
//
|
||||
// Returns an array of associated child records for unlocking
|
||||
//
|
||||
//----------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
Service GetChildRecords(LotType, Key)
|
||||
|
||||
RecordArray = ''
|
||||
|
||||
Begin Case
|
||||
|
||||
Case LotType EQ 'RDS'
|
||||
RDSRec = Xlate('RDS', Key, '', 'X', '')
|
||||
If RDSRec NE '' then
|
||||
//Add RDS key
|
||||
RecordArray<1> = LotType
|
||||
RecordArray<2> = Key
|
||||
//Get REACT_RUN record
|
||||
ReactRunRec = Xlate('REACT_RUN', Key, '', 'X', '')
|
||||
//Get and Add CLEAN_INSP keys
|
||||
CINos = ReactRunRec<REACT_RUN_CI_NO$>
|
||||
If CINos NE '' then
|
||||
CICount = Dcount(CINos, @VM)
|
||||
For I = 1 to CICount
|
||||
If CINos<I> NE '' then
|
||||
RecordArray<1,-1> = 'CLEAN_INSP'
|
||||
RecordArray<2,-1> = CINos<I>
|
||||
end
|
||||
Next I
|
||||
end
|
||||
//Get and Add RDS_TEST keys
|
||||
RDSLayerKeys = ReactRunRec<REACT_RUN_RDS_LAYER_KEYS$>
|
||||
If RDSLayerKeys NE '' then
|
||||
LayerKeyCount = DCount(RDSLayerKeys, @VM)
|
||||
For K = 1 to LayerKeyCount
|
||||
RDSTestKeys = Xlate('RDS_LAYER', RDSLayerKeys<K>, 'RDS_TEST_KEYS', 'X', '')
|
||||
If RDSTestKeys NE '' then
|
||||
RDSTestCount = DCount(RDSTestKeys, @VM)
|
||||
For L = 1 to RDSTestCount
|
||||
If RDSTestKeys<K,L> NE '' then
|
||||
RecordArray<1,-1> = 'RDS_TEST'
|
||||
RecordArray<2,-1> = RDSTestKeys<K,L>
|
||||
end
|
||||
Next L
|
||||
end
|
||||
Next K
|
||||
end
|
||||
//Get WO_MAT key
|
||||
WONo = RDSRec<RDS_WO$>
|
||||
CassNo = RDSRec<RDS_CASS_NO$>
|
||||
WOMatKey = WONo : '*' : CassNo
|
||||
//Get and Add WO_MAT_QA
|
||||
WOMatQA = Xlate('WO_MAT_QA', WOMatKey, '', 'X', '')
|
||||
If WOMatQA NE '' then
|
||||
RecordArray<1,-1> = 'WO_MAT_QA'
|
||||
RecordArray<2,-1> = WOMatKey
|
||||
End
|
||||
//Get and Add NCR keys
|
||||
NCRKeys = Xlate('WO_MAT', WOMatKey, 'NCR_KEYS', 'X', '')
|
||||
If NCRKeys NE '' then
|
||||
NCRCount = Dcount(NCRKeys, @VM)
|
||||
For J = 1 to NCRCount
|
||||
If NCRKeys<J> NE '' then
|
||||
RecordArray<1,-1> = 'NCR'
|
||||
RecordArray<2,-1> = NCRKeys<J>
|
||||
end
|
||||
Next J
|
||||
end
|
||||
end else
|
||||
Error_Services('Add', 'This RDS does not exist.')
|
||||
Return
|
||||
end
|
||||
|
||||
Case LotType EQ 'WM_OUT'
|
||||
WMOutRec = Xlate('WM_OUT', Key, '', 'X', '')
|
||||
If WMOutRec NE '' then
|
||||
//Add WM_OUT key
|
||||
RecordArray<1> = LotType
|
||||
RecordArray<2> = Key
|
||||
//Get and Add CLEAN_INSP keys
|
||||
CINos = WMOutRec<WM_OUT_CI_NO$>
|
||||
If CINos NE '' then
|
||||
CICount = Dcount(CINos, @VM)
|
||||
For I = 1 to CICount
|
||||
If CINos<I> NE '' then
|
||||
RecordArray<1,-1> = 'CLEAN_INSP'
|
||||
RecordArray<2,-1> = CINos<I>
|
||||
end
|
||||
Next I
|
||||
end
|
||||
//Get WO_MAT key
|
||||
WONo = FIELD(Key,'*',1)
|
||||
CassNo = FIELD(Key,'*',3)
|
||||
WOMatKey = WONo : '*' : CassNo
|
||||
//Get and Add WO_MAT_QA key
|
||||
WOMatQA = Xlate('WO_MAT_QA', WOMatKey, '', 'X', '')
|
||||
If WOMatQA NE '' then
|
||||
RecordArray<1,-1> = 'WO_MAT_QA'
|
||||
RecordArray<2,-1> = WOMatKey
|
||||
End
|
||||
//Get and Add NCR keys
|
||||
NCRKeys = Xlate('WO_MAT', WOMatKey, 'NCR_KEYS', 'X', '')
|
||||
If NCRKeys NE '' then
|
||||
NCRCount = Dcount(NCRKeys, @VM)
|
||||
For J = 1 to NCRCount
|
||||
If NCRKeys<J> NE '' then
|
||||
RecordArray<1,-1> = 'NCR'
|
||||
RecordArray<2,-1> = NCRKeys<J>
|
||||
end
|
||||
Next J
|
||||
end
|
||||
end else
|
||||
Error_Services('Add', 'This WM_OUT does not exist.')
|
||||
end
|
||||
|
||||
Case OTHERWISE$
|
||||
Error_Services('Add', 'LotType must be either RDS or WM_OUT.')
|
||||
return
|
||||
|
||||
End Case
|
||||
|
||||
If RecordArray NE '' then
|
||||
Response = RecordArray
|
||||
end
|
||||
|
||||
End Service
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------------------------------------------------
|
||||
// GetUnprotectedTables
|
||||
//
|
||||
// Returns an array of unprotected tables
|
||||
//
|
||||
//----------------------------------------------------------------------------------------------------------------------
|
||||
Service GetUnprotectedTables()
|
||||
|
||||
TableArray = List_Volume_Sub('LSL', '', 'TABLE_NAME', 'TABLE_NAME')
|
||||
UnprotectedArray = ''
|
||||
For Each Table in TableArray Using @FM
|
||||
If Table[1,1] NE '!' AND Table[1,5] NE 'DICT.' then
|
||||
UnprotectedArray<-1> = Table
|
||||
end
|
||||
Next Table
|
||||
|
||||
Response = UnprotectedArray
|
||||
|
||||
End Service
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------------------------------------------------
|
||||
// LogUnlockRequest
|
||||
//
|
||||
// CurrUser - [Required]
|
||||
// TableName - [Required]
|
||||
// RecordKey - [Required]
|
||||
// Success - [Required]
|
||||
//
|
||||
// Creates an UNLOCK_REQUESTS record to log unlock attempts.
|
||||
//
|
||||
//----------------------------------------------------------------------------------------------------------------------
|
||||
Service LogUnlockRequest(TableName, RecordKey, CurrUser, Success)
|
||||
|
||||
NewRequestRec = ''
|
||||
CurrDateTime = Datetime()
|
||||
RecordID = CurrDateTime :'*': TableName
|
||||
NewRequestRec<UNLOCK_REQUESTS_RECORD_KEY$> = RecordKey
|
||||
NewRequestRec<UNLOCK_REQUESTS_USER_NAME$> = CurrUser
|
||||
NewRequestRec<UNLOCK_REQUESTS_SUCCESS$> = Success
|
||||
Database_Services('WriteDataRow', 'UNLOCK_REQUESTS', RecordID, NewRequestRec, 1, 0, 0)
|
||||
|
||||
End Service
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -1,206 +1,206 @@
|
||||
Function MAKEUP_WAFERS_Actions(Action, CalcColName, FSList, Handle, Name, FMC, Record, Status, OrigRecord, Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10)
|
||||
#pragma precomp SRP_PreCompiler
|
||||
|
||||
/***********************************************************************************************************************
|
||||
|
||||
This program is proprietary and is not to be used by or disclosed to others, nor is it to be copied without written
|
||||
permission from Infineon.
|
||||
|
||||
Name : Makeup_Wafers_Actions
|
||||
|
||||
Description : Handles calculated columns and MFS calls for the current table.
|
||||
|
||||
Notes : This function uses @ID, @RECORD, and @DICT to make sure {ColumnName} references work correctly.
|
||||
If called from outside of a calculated column these will need to be set and restored.
|
||||
|
||||
Parameters :
|
||||
Action [in] -- Name of the action to be taken
|
||||
CalcColName [in] -- Name of the calculated column that needs to be processed. Normally this should only be
|
||||
populated when the CalcField action is being used.
|
||||
FSList [in] -- The list of MFSs and the BFS name for the current file or volume. This is an @SVM
|
||||
delimited array, with the current MFS name as the first value in the array, and the BFS
|
||||
name as the last value. Normally set by a calling MFS.
|
||||
Handle [in] -- The file handle of the file or media map being accessed. Note, this does contain the
|
||||
entire handle structure that the Basic+ Open statement would provide. Normally set by a
|
||||
calling MFS.
|
||||
Name [in] -- The name (key) of the record or file being accessed. Normally set by a calling MFS.
|
||||
FMC [in] -- Various functions. Normally set by a calling MFS.
|
||||
Record [in] -- The entire record (for record-oriented functions) or a newly-created handle (for
|
||||
"get handle" functions). Normally set by a calling MFS.
|
||||
Status [in/out] -- Indicator of the success or failure of an action. Normally set by the calling MFS but
|
||||
for some actions can be set by the action handler to indicate failure.
|
||||
OrigRecord [in] -- Original content of the record being processed by the current action. This is
|
||||
automatically being assigned by the WRITE_RECORD and DELETE_RECORD actions within
|
||||
BASE_MFS.
|
||||
Param1-10 [in/out] -- Additional request parameter holders
|
||||
ActionFlow [out] -- Used to control the action chain (see the ACTION_SETUP insert for more information.)
|
||||
Can also be used to return a special value, such as the results of the CalcField
|
||||
method.
|
||||
|
||||
History : (Date, Initials, Notes)
|
||||
07/09/24 djs Original programmer.
|
||||
|
||||
***********************************************************************************************************************/
|
||||
|
||||
$insert APP_INSERTS
|
||||
$insert FILE.SYSTEM.EQUATES
|
||||
$insert ACTION_SETUP
|
||||
$insert MAKEUP_WAFERS_EQUATES
|
||||
|
||||
Declare function SRP_Date
|
||||
|
||||
If KeyID then GoSub Initialize_System_Variables
|
||||
|
||||
Begin Case
|
||||
|
||||
Case Action _EQC 'CalculateColumn' ; GoSub CalculateColumn
|
||||
Case Action _EQC 'READ_RECORD_PRE' ; GoSub READ_RECORD_PRE
|
||||
Case Action _EQC 'READ_RECORD' ; GoSub READ_RECORD
|
||||
Case Action _EQC 'READONLY_RECORD_PRE' ; GoSub READONLY_RECORD_PRE
|
||||
Case Action _EQC 'READONLY_RECORD' ; GoSub READONLY_RECORD
|
||||
Case Action _EQC 'WRITE_RECORD_PRE' ; GoSub WRITE_RECORD_PRE
|
||||
Case Action _EQC 'WRITE_RECORD' ; GoSub WRITE_RECORD
|
||||
Case Action _EQC 'DELETE_RECORD_PRE' ; GoSub DELETE_RECORD_PRE
|
||||
Case Action _EQC 'DELETE_RECORD' ; GoSub DELETE_RECORD
|
||||
Case Otherwise$ ; Status = 'Invalid Action'
|
||||
|
||||
End Case
|
||||
|
||||
If KeyID then GoSub Restore_System_Variables
|
||||
|
||||
If Assigned(ActionFlow) else ActionFlow = ACTION_CONTINUE$
|
||||
|
||||
Return ActionFlow
|
||||
|
||||
|
||||
// ----- Calculated Columns --------------------------------------------------------------------------------------------
|
||||
//
|
||||
// The typical structure of a calculated column will look like this:
|
||||
//
|
||||
// Declare function TableName_Actions
|
||||
//
|
||||
// A = {COL1} ; * Reference as many data columns in this way to ensure the dictionary dependency is generated.
|
||||
//
|
||||
// @ANS = TableName_Actions('CalcField', 'CalcColName')
|
||||
//
|
||||
// ---------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
CalculateColumn:
|
||||
|
||||
// Make sure the ActionFlow return variable is cleared in case nothing is calculated.
|
||||
ActionFlow = ''
|
||||
|
||||
Begin Case
|
||||
Case CalcColName EQ 'EXAMPLE' ; GoSub EXAMPLE
|
||||
End Case
|
||||
|
||||
return
|
||||
|
||||
|
||||
EXAMPLE:
|
||||
|
||||
ActionFlow = ''
|
||||
|
||||
return
|
||||
|
||||
|
||||
// ----- MFS calls -----------------------------------------------------------------------------------------------------
|
||||
|
||||
READ_RECORD_PRE:
|
||||
// In order to stop a record from being read in this action these lines of code must be used:
|
||||
//
|
||||
// OrigFileError = 100 : @FM : KeyID
|
||||
// Status = 0
|
||||
// Record = ''
|
||||
// ActionFlow = ACTION_STOP$
|
||||
return
|
||||
|
||||
|
||||
READ_RECORD:
|
||||
// In order to stop a record from being read in this action these lines of code must be used:
|
||||
//
|
||||
// OrigFileError = 100 : @FM : KeyID
|
||||
// Status = 0
|
||||
// Record = ''
|
||||
return
|
||||
|
||||
READONLY_RECORD_PRE:
|
||||
// In order to stop a record from being read in this action these lines of code must be used:
|
||||
//
|
||||
// OrigFileError = 100 : @FM : KeyID
|
||||
// Status = 0
|
||||
// Record = ''
|
||||
// ActionFlow = ACTION_STOP$
|
||||
return
|
||||
|
||||
READONLY_RECORD:
|
||||
// In order to stop a record from being read in this action these lines of code must be used:
|
||||
//
|
||||
// OrigFileError = 100 : @FM : KeyID
|
||||
// Status = 0
|
||||
// Record = ''
|
||||
return
|
||||
|
||||
WRITE_RECORD_PRE:
|
||||
|
||||
SaveRecord<MAKEUP_WAFERS.EXPIRED$> = ( {UNLOAD_DTM} LT SRP_Date('AddYears', Date(), -3) )
|
||||
|
||||
return
|
||||
|
||||
WRITE_RECORD:
|
||||
return
|
||||
|
||||
DELETE_RECORD_PRE:
|
||||
return
|
||||
|
||||
DELETE_RECORD:
|
||||
return
|
||||
|
||||
|
||||
// ----- Internal Methods ----------------------------------------------------------------------------------------------
|
||||
|
||||
Initialize_System_Variables:
|
||||
// Save these for restoration later
|
||||
SaveDict = @DICT
|
||||
SaveID = @ID
|
||||
SaveRecord = @RECORD
|
||||
OrigFileError = @FILE.ERROR
|
||||
|
||||
// Now make sure @DICT, ID, and @RECORD are populated
|
||||
CurrentDictName = ''
|
||||
If @DICT then
|
||||
DictHandle = @DICT<1, 2>
|
||||
Locate DictHandle in @TABLES(5) Using @FM Setting fPos then
|
||||
CurrentDictName = Field(@TABLES(0), @FM, fPos, 1)
|
||||
end
|
||||
end
|
||||
|
||||
If CurrentDictName NE DictName then
|
||||
Open DictName to @DICT else Status = 'Unable to initialize @DICT'
|
||||
end
|
||||
|
||||
@ID = KeyID
|
||||
If Record else
|
||||
// Record might not have been passed in. Read the record from the database table just to make sure.
|
||||
@FILE.ERROR = ''
|
||||
Open TableName to hTable then
|
||||
FullFSList = hTable[1, 'F' : @VM]
|
||||
BFS = FullFSList[-1, 'B' : @SVM]
|
||||
LastHandle = hTable[-1, 'B' : \0D\]
|
||||
FileHandle = \0D\ : LastHandle[1, @VM]
|
||||
|
||||
Call @BFS(READO.RECORD, BFS, FileHandle, KeyID, FMC, Record, ReadOStatus)
|
||||
end
|
||||
end
|
||||
@RECORD = Record
|
||||
return
|
||||
|
||||
Restore_System_Variables:
|
||||
Transfer SaveDict to @DICT
|
||||
Transfer SaveID to @ID
|
||||
Transfer SaveRecord to @RECORD
|
||||
@FILE.ERROR = OrigFileError
|
||||
return
|
||||
|
||||
|
||||
|
||||
Function MAKEUP_WAFERS_Actions(Action, CalcColName, FSList, Handle, Name, FMC, Record, Status, OrigRecord, Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10)
|
||||
#pragma precomp SRP_PreCompiler
|
||||
|
||||
/***********************************************************************************************************************
|
||||
|
||||
This program is proprietary and is not to be used by or disclosed to others, nor is it to be copied without written
|
||||
permission from Infineon.
|
||||
|
||||
Name : Makeup_Wafers_Actions
|
||||
|
||||
Description : Handles calculated columns and MFS calls for the current table.
|
||||
|
||||
Notes : This function uses @ID, @RECORD, and @DICT to make sure {ColumnName} references work correctly.
|
||||
If called from outside of a calculated column these will need to be set and restored.
|
||||
|
||||
Parameters :
|
||||
Action [in] -- Name of the action to be taken
|
||||
CalcColName [in] -- Name of the calculated column that needs to be processed. Normally this should only be
|
||||
populated when the CalcField action is being used.
|
||||
FSList [in] -- The list of MFSs and the BFS name for the current file or volume. This is an @SVM
|
||||
delimited array, with the current MFS name as the first value in the array, and the BFS
|
||||
name as the last value. Normally set by a calling MFS.
|
||||
Handle [in] -- The file handle of the file or media map being accessed. Note, this does contain the
|
||||
entire handle structure that the Basic+ Open statement would provide. Normally set by a
|
||||
calling MFS.
|
||||
Name [in] -- The name (key) of the record or file being accessed. Normally set by a calling MFS.
|
||||
FMC [in] -- Various functions. Normally set by a calling MFS.
|
||||
Record [in] -- The entire record (for record-oriented functions) or a newly-created handle (for
|
||||
"get handle" functions). Normally set by a calling MFS.
|
||||
Status [in/out] -- Indicator of the success or failure of an action. Normally set by the calling MFS but
|
||||
for some actions can be set by the action handler to indicate failure.
|
||||
OrigRecord [in] -- Original content of the record being processed by the current action. This is
|
||||
automatically being assigned by the WRITE_RECORD and DELETE_RECORD actions within
|
||||
BASE_MFS.
|
||||
Param1-10 [in/out] -- Additional request parameter holders
|
||||
ActionFlow [out] -- Used to control the action chain (see the ACTION_SETUP insert for more information.)
|
||||
Can also be used to return a special value, such as the results of the CalcField
|
||||
method.
|
||||
|
||||
History : (Date, Initials, Notes)
|
||||
07/09/24 djs Original programmer.
|
||||
|
||||
***********************************************************************************************************************/
|
||||
|
||||
$insert APP_INSERTS
|
||||
$insert FILE.SYSTEM.EQUATES
|
||||
$insert ACTION_SETUP
|
||||
$insert MAKEUP_WAFERS_EQUATES
|
||||
|
||||
Declare function SRP_Date
|
||||
|
||||
If KeyID then GoSub Initialize_System_Variables
|
||||
|
||||
Begin Case
|
||||
|
||||
Case Action _EQC 'CalculateColumn' ; GoSub CalculateColumn
|
||||
Case Action _EQC 'READ_RECORD_PRE' ; GoSub READ_RECORD_PRE
|
||||
Case Action _EQC 'READ_RECORD' ; GoSub READ_RECORD
|
||||
Case Action _EQC 'READONLY_RECORD_PRE' ; GoSub READONLY_RECORD_PRE
|
||||
Case Action _EQC 'READONLY_RECORD' ; GoSub READONLY_RECORD
|
||||
Case Action _EQC 'WRITE_RECORD_PRE' ; GoSub WRITE_RECORD_PRE
|
||||
Case Action _EQC 'WRITE_RECORD' ; GoSub WRITE_RECORD
|
||||
Case Action _EQC 'DELETE_RECORD_PRE' ; GoSub DELETE_RECORD_PRE
|
||||
Case Action _EQC 'DELETE_RECORD' ; GoSub DELETE_RECORD
|
||||
Case Otherwise$ ; Status = 'Invalid Action'
|
||||
|
||||
End Case
|
||||
|
||||
If KeyID then GoSub Restore_System_Variables
|
||||
|
||||
If Assigned(ActionFlow) else ActionFlow = ACTION_CONTINUE$
|
||||
|
||||
Return ActionFlow
|
||||
|
||||
|
||||
// ----- Calculated Columns --------------------------------------------------------------------------------------------
|
||||
//
|
||||
// The typical structure of a calculated column will look like this:
|
||||
//
|
||||
// Declare function TableName_Actions
|
||||
//
|
||||
// A = {COL1} ; * Reference as many data columns in this way to ensure the dictionary dependency is generated.
|
||||
//
|
||||
// @ANS = TableName_Actions('CalcField', 'CalcColName')
|
||||
//
|
||||
// ---------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
CalculateColumn:
|
||||
|
||||
// Make sure the ActionFlow return variable is cleared in case nothing is calculated.
|
||||
ActionFlow = ''
|
||||
|
||||
Begin Case
|
||||
Case CalcColName EQ 'EXAMPLE' ; GoSub EXAMPLE
|
||||
End Case
|
||||
|
||||
return
|
||||
|
||||
|
||||
EXAMPLE:
|
||||
|
||||
ActionFlow = ''
|
||||
|
||||
return
|
||||
|
||||
|
||||
// ----- MFS calls -----------------------------------------------------------------------------------------------------
|
||||
|
||||
READ_RECORD_PRE:
|
||||
// In order to stop a record from being read in this action these lines of code must be used:
|
||||
//
|
||||
// OrigFileError = 100 : @FM : KeyID
|
||||
// Status = 0
|
||||
// Record = ''
|
||||
// ActionFlow = ACTION_STOP$
|
||||
return
|
||||
|
||||
|
||||
READ_RECORD:
|
||||
// In order to stop a record from being read in this action these lines of code must be used:
|
||||
//
|
||||
// OrigFileError = 100 : @FM : KeyID
|
||||
// Status = 0
|
||||
// Record = ''
|
||||
return
|
||||
|
||||
READONLY_RECORD_PRE:
|
||||
// In order to stop a record from being read in this action these lines of code must be used:
|
||||
//
|
||||
// OrigFileError = 100 : @FM : KeyID
|
||||
// Status = 0
|
||||
// Record = ''
|
||||
// ActionFlow = ACTION_STOP$
|
||||
return
|
||||
|
||||
READONLY_RECORD:
|
||||
// In order to stop a record from being read in this action these lines of code must be used:
|
||||
//
|
||||
// OrigFileError = 100 : @FM : KeyID
|
||||
// Status = 0
|
||||
// Record = ''
|
||||
return
|
||||
|
||||
WRITE_RECORD_PRE:
|
||||
|
||||
SaveRecord<MAKEUP_WAFERS.EXPIRED$> = ( {UNLOAD_DTM} LT SRP_Date('AddYears', Date(), -3) )
|
||||
|
||||
return
|
||||
|
||||
WRITE_RECORD:
|
||||
return
|
||||
|
||||
DELETE_RECORD_PRE:
|
||||
return
|
||||
|
||||
DELETE_RECORD:
|
||||
return
|
||||
|
||||
|
||||
// ----- Internal Methods ----------------------------------------------------------------------------------------------
|
||||
|
||||
Initialize_System_Variables:
|
||||
// Save these for restoration later
|
||||
SaveDict = @DICT
|
||||
SaveID = @ID
|
||||
SaveRecord = @RECORD
|
||||
OrigFileError = @FILE.ERROR
|
||||
|
||||
// Now make sure @DICT, ID, and @RECORD are populated
|
||||
CurrentDictName = ''
|
||||
If @DICT then
|
||||
DictHandle = @DICT<1, 2>
|
||||
Locate DictHandle in @TABLES(5) Using @FM Setting fPos then
|
||||
CurrentDictName = Field(@TABLES(0), @FM, fPos, 1)
|
||||
end
|
||||
end
|
||||
|
||||
If CurrentDictName NE DictName then
|
||||
Open DictName to @DICT else Status = 'Unable to initialize @DICT'
|
||||
end
|
||||
|
||||
@ID = KeyID
|
||||
If Record else
|
||||
// Record might not have been passed in. Read the record from the database table just to make sure.
|
||||
@FILE.ERROR = ''
|
||||
Open TableName to hTable then
|
||||
FullFSList = hTable[1, 'F' : @VM]
|
||||
BFS = FullFSList[-1, 'B' : @SVM]
|
||||
LastHandle = hTable[-1, 'B' : \0D\]
|
||||
FileHandle = \0D\ : LastHandle[1, @VM]
|
||||
|
||||
Call @BFS(READO.RECORD, BFS, FileHandle, KeyID, FMC, Record, ReadOStatus)
|
||||
end
|
||||
end
|
||||
@RECORD = Record
|
||||
return
|
||||
|
||||
Restore_System_Variables:
|
||||
Transfer SaveDict to @DICT
|
||||
Transfer SaveID to @ID
|
||||
Transfer SaveRecord to @RECORD
|
||||
@FILE.ERROR = OrigFileError
|
||||
return
|
||||
|
||||
|
||||
|
||||
|
@ -1,46 +1,46 @@
|
||||
Compile Function MITCHEM_TEST_Events(CtrlEntId, Event, @PARAMS)
|
||||
#pragma precomp SRP_PreCompiler
|
||||
|
||||
#window MITCHEM_TEST
|
||||
|
||||
Declare function Get_Property, Reactor_Services, Database_Services
|
||||
Declare subroutine Set_Property, RList, Msg , Reactor_Services, End_Window, Post_Event
|
||||
|
||||
$Insert APP_INSERTS
|
||||
$Insert EVENT_SETUP
|
||||
$Insert REACTOR_EQUATES
|
||||
$insert logical
|
||||
$Insert RLIST_EQUATES
|
||||
$Insert REACTOR_MODES_EQUATES
|
||||
$Insert REACT_MODE_NG_EQUATES
|
||||
$Insert MSG_EQUATES
|
||||
|
||||
// Update the arguments so that the OpenInsight OLE event will treate the ActiveX event as a native event handler.
|
||||
If Event EQ 'OLE' then
|
||||
Transfer Event to OIEvent
|
||||
Transfer Param1 to Event
|
||||
Transfer Param2 to Param1
|
||||
Transfer Param3 to Param2
|
||||
Transfer Param4 to Param3
|
||||
Transfer Param5 to Param4
|
||||
Transfer Param6 to Param5
|
||||
Transfer Param7 to Param6
|
||||
Transfer Param8 to Param7
|
||||
end
|
||||
|
||||
GoToEvent Event for CtrlEntId else
|
||||
// Event not implemented
|
||||
end
|
||||
|
||||
Return EventFlow or 1
|
||||
|
||||
|
||||
Event WINDOW.CREATE(CreateParam)
|
||||
debug
|
||||
Set_Property(@Window, 'BACKCOLOR', -2)
|
||||
Color = Get_Property(@Window:'.EB_SPEC_SUBSTRATE', 'BACKCOLOR')
|
||||
//Set_Property(@Window:'.EB_SPEC_SUBSTRATE', 'BACKCOLOR', -2)
|
||||
Color = Get_Property(@Window:'.EB_SPEC_SUBSTRATE', 'BACKCOLOR')
|
||||
EventFlow = 1
|
||||
|
||||
End Event
|
||||
Compile Function MITCHEM_TEST_Events(CtrlEntId, Event, @PARAMS)
|
||||
#pragma precomp SRP_PreCompiler
|
||||
|
||||
#window MITCHEM_TEST
|
||||
|
||||
Declare function Get_Property, Reactor_Services, Database_Services
|
||||
Declare subroutine Set_Property, RList, Msg , Reactor_Services, End_Window, Post_Event
|
||||
|
||||
$Insert APP_INSERTS
|
||||
$Insert EVENT_SETUP
|
||||
$Insert REACTOR_EQUATES
|
||||
$insert logical
|
||||
$Insert RLIST_EQUATES
|
||||
$Insert REACTOR_MODES_EQUATES
|
||||
$Insert REACT_MODE_NG_EQUATES
|
||||
$Insert MSG_EQUATES
|
||||
|
||||
// Update the arguments so that the OpenInsight OLE event will treate the ActiveX event as a native event handler.
|
||||
If Event EQ 'OLE' then
|
||||
Transfer Event to OIEvent
|
||||
Transfer Param1 to Event
|
||||
Transfer Param2 to Param1
|
||||
Transfer Param3 to Param2
|
||||
Transfer Param4 to Param3
|
||||
Transfer Param5 to Param4
|
||||
Transfer Param6 to Param5
|
||||
Transfer Param7 to Param6
|
||||
Transfer Param8 to Param7
|
||||
end
|
||||
|
||||
GoToEvent Event for CtrlEntId else
|
||||
// Event not implemented
|
||||
end
|
||||
|
||||
Return EventFlow or 1
|
||||
|
||||
|
||||
Event WINDOW.CREATE(CreateParam)
|
||||
debug
|
||||
Set_Property(@Window, 'BACKCOLOR', -2)
|
||||
Color = Get_Property(@Window:'.EB_SPEC_SUBSTRATE', 'BACKCOLOR')
|
||||
//Set_Property(@Window:'.EB_SPEC_SUBSTRATE', 'BACKCOLOR', -2)
|
||||
Color = Get_Property(@Window:'.EB_SPEC_SUBSTRATE', 'BACKCOLOR')
|
||||
EventFlow = 1
|
||||
|
||||
End Event
|
||||
|
@ -1,138 +1,138 @@
|
||||
Function Monaengines_API(@API)
|
||||
/***********************************************************************************************************************
|
||||
|
||||
This program is proprietary and is not to be used by or disclosed to others, nor is it to be copied without written
|
||||
permission from SRP Computer Solutions, Inc.
|
||||
|
||||
Name : Monaengines_API
|
||||
|
||||
Description : API logic for the Monaengines resource.
|
||||
|
||||
Notes : All web APIs should include the API_SETUP insert. This will provide several useful variables:
|
||||
|
||||
HTTPMethod - The HTTP Method (Verb) submitted by the client (e.g., GET, POST, etc.)
|
||||
APIURL - The URL for the API entry point (e.g., api.mysite.com/v1).
|
||||
FullEndpointURL - The URL submitted by the client, including query params.
|
||||
FullEndpointURLNoQuery - The URL submitted by the client, excluding query params.
|
||||
EndpointSegment - The URL endpoint segment.
|
||||
ParentURL - The URL path preceeding the current endpoint.
|
||||
CurrentAPI - The name of this stored procedure.
|
||||
|
||||
Parameters :
|
||||
API [in] -- Web API to process. Format is [APIPattern].[HTTPMethod]:
|
||||
- APIPattern must follow this structure Monaengines[.ID.[<Property>]]
|
||||
- HTTPMethod can be any valid HTTP method, e.g., GET, POST, PUT, DELETE, etc.
|
||||
Examples:
|
||||
- Monaengines.POST
|
||||
- Monaengines.ID.PUT
|
||||
- Monaengines.ID.firstName.GET
|
||||
Response [out] -- Response to be sent back to the Controller (HTTP_MCP) or requesting procedure. Web API
|
||||
services do not rely upon anything being returned in the response. This is what the
|
||||
various services like SetResponseBody and SetResponseStatus services are for. A response
|
||||
value is only helpful if the developers want to use it for debug purposes.
|
||||
|
||||
History : (Date, Initials, Notes)
|
||||
07/17/24 xxx Original programmer.
|
||||
|
||||
***********************************************************************************************************************/
|
||||
|
||||
#pragma precomp SRP_PreCompiler
|
||||
|
||||
$insert APP_INSERTS
|
||||
$insert API_SETUP
|
||||
$insert HTTP_INSERTS
|
||||
$insert ENGINE_HEALTH_EQUATES
|
||||
|
||||
Equ Comma$ to ','
|
||||
|
||||
Declare function System_Healthcheck_Services, Environment_Services, Logging_Services
|
||||
Declare subroutine Logging_Services
|
||||
|
||||
LogPath = Environment_Services('GetApplicationRootPath') : '\LogFiles\Healthchecks\Engines\MonA'
|
||||
LogDate = Oconv(Date(), 'D4/')
|
||||
LogTime = Oconv(Time(), 'MTS')
|
||||
LogFileName = LogDate[7, 4] : '-' : LogDate[1, 2] : '-' : LogDate[4, 2] : ' Mona_Engine_Health_Check_Log.csv'
|
||||
Headers = 'Logging DTM' : @FM : 'EngineID' : @FM : 'ResponseCode' : @FM : 'Message' : @FM : 'Requester'
|
||||
objLogMonaEngines = Logging_Services('NewLog', LogPath, LogFileName, CRLF$, Comma$, Headers, '', False$, False$)
|
||||
LoggingDTM = LogDate : ' ' : LogTime ; // Logging DTM
|
||||
|
||||
GoToAPI else
|
||||
// The specific resource endpoint doesn't have a API handler yet.
|
||||
HTTP_Services('SetResponseStatus', 200, 'This is a valid endpoint but a web API handler has not yet been created.')
|
||||
end
|
||||
|
||||
Return Response OR ''
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Endpoint Handlers
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
API monaengines.HEAD
|
||||
API monaengines.GET
|
||||
|
||||
HTTP_Resource_Services('LoremIpsum')
|
||||
|
||||
end api
|
||||
|
||||
|
||||
API monaengines.ID.HEAD
|
||||
API monaengines.ID.GET
|
||||
|
||||
//Returns status of a defined engine
|
||||
EngineID = EndpointSegment
|
||||
If RowExists('APP_INFO', EngineID) then
|
||||
EngineHealthInfo = System_Healthcheck_Services('GetEngineHealthInfo', EngineID)
|
||||
If Error_Services('NoError') then
|
||||
Healthy = EngineHealthInfo<ENGINE_HEALTH_HEALTH_STATUS$>
|
||||
If Healthy then
|
||||
ResponseCode = 200
|
||||
Message = 'Engine is healthy'
|
||||
HTTP_Services('SetResponseStatus', ResponseCode, Message)
|
||||
LogData = ''
|
||||
LogData<1> = LoggingDTM
|
||||
LogData<2> = EngineID
|
||||
LogData<3> = ResponseCode
|
||||
LogData<4> = Message
|
||||
LogData<5> = FullEndpointURL
|
||||
Logging_Services('AppendLog', objLogMonaEngines, LogData, @RM, @FM)
|
||||
end else
|
||||
ResponseCode = 418
|
||||
Message = 'Engine is unhealthy.'
|
||||
HTTP_Services('SetResponseStatus', ResponseCode, Message)
|
||||
LogData = ''
|
||||
LogData<1> = LoggingDTM
|
||||
LogData<2> = EngineID
|
||||
LogData<3> = ResponseCode
|
||||
LogData<4> = Message
|
||||
LogData<5> = FullEndpointURL
|
||||
Logging_Services('AppendLog', objLogMonaEngines, LogData, @RM, @FM)
|
||||
end
|
||||
end else
|
||||
ResponseCode = 500
|
||||
Message = Error_Services('GetMessage')
|
||||
HTTP_Services('SetResponseStatus', ResponseCode, Message)
|
||||
LogData = ''
|
||||
LogData<1> = LoggingDTM
|
||||
LogData<2> = EngineID
|
||||
LogData<3> = ResponseCode
|
||||
LogData<4> = Message
|
||||
LogData<5> = FullEndpointURL
|
||||
Logging_Services('AppendLog', objLogMonaEngines, LogData, @RM, @FM)
|
||||
end
|
||||
end else
|
||||
ResponseCode = 404
|
||||
Message = 'Invalid Engine ID'
|
||||
HTTP_Services('SetResponseStatus', ResponseCode, 'Invalid Engine ID.')
|
||||
LogData = ''
|
||||
LogData<1> = LoggingDTM
|
||||
LogData<2> = EngineID
|
||||
LogData<3> = ResponseCode
|
||||
LogData<4> = Message
|
||||
LogData<5> = FullEndpointURL
|
||||
Logging_Services('AppendLog', objLogMonaEngines, LogData, @RM, @FM)
|
||||
end
|
||||
|
||||
end api
|
||||
|
||||
Function Monaengines_API(@API)
|
||||
/***********************************************************************************************************************
|
||||
|
||||
This program is proprietary and is not to be used by or disclosed to others, nor is it to be copied without written
|
||||
permission from SRP Computer Solutions, Inc.
|
||||
|
||||
Name : Monaengines_API
|
||||
|
||||
Description : API logic for the Monaengines resource.
|
||||
|
||||
Notes : All web APIs should include the API_SETUP insert. This will provide several useful variables:
|
||||
|
||||
HTTPMethod - The HTTP Method (Verb) submitted by the client (e.g., GET, POST, etc.)
|
||||
APIURL - The URL for the API entry point (e.g., api.mysite.com/v1).
|
||||
FullEndpointURL - The URL submitted by the client, including query params.
|
||||
FullEndpointURLNoQuery - The URL submitted by the client, excluding query params.
|
||||
EndpointSegment - The URL endpoint segment.
|
||||
ParentURL - The URL path preceeding the current endpoint.
|
||||
CurrentAPI - The name of this stored procedure.
|
||||
|
||||
Parameters :
|
||||
API [in] -- Web API to process. Format is [APIPattern].[HTTPMethod]:
|
||||
- APIPattern must follow this structure Monaengines[.ID.[<Property>]]
|
||||
- HTTPMethod can be any valid HTTP method, e.g., GET, POST, PUT, DELETE, etc.
|
||||
Examples:
|
||||
- Monaengines.POST
|
||||
- Monaengines.ID.PUT
|
||||
- Monaengines.ID.firstName.GET
|
||||
Response [out] -- Response to be sent back to the Controller (HTTP_MCP) or requesting procedure. Web API
|
||||
services do not rely upon anything being returned in the response. This is what the
|
||||
various services like SetResponseBody and SetResponseStatus services are for. A response
|
||||
value is only helpful if the developers want to use it for debug purposes.
|
||||
|
||||
History : (Date, Initials, Notes)
|
||||
07/17/24 xxx Original programmer.
|
||||
|
||||
***********************************************************************************************************************/
|
||||
|
||||
#pragma precomp SRP_PreCompiler
|
||||
|
||||
$insert APP_INSERTS
|
||||
$insert API_SETUP
|
||||
$insert HTTP_INSERTS
|
||||
$insert ENGINE_HEALTH_EQUATES
|
||||
|
||||
Equ Comma$ to ','
|
||||
|
||||
Declare function System_Healthcheck_Services, Environment_Services, Logging_Services
|
||||
Declare subroutine Logging_Services
|
||||
|
||||
LogPath = Environment_Services('GetApplicationRootPath') : '\LogFiles\Healthchecks\Engines\MonA'
|
||||
LogDate = Oconv(Date(), 'D4/')
|
||||
LogTime = Oconv(Time(), 'MTS')
|
||||
LogFileName = LogDate[7, 4] : '-' : LogDate[1, 2] : '-' : LogDate[4, 2] : ' Mona_Engine_Health_Check_Log.csv'
|
||||
Headers = 'Logging DTM' : @FM : 'EngineID' : @FM : 'ResponseCode' : @FM : 'Message' : @FM : 'Requester'
|
||||
objLogMonaEngines = Logging_Services('NewLog', LogPath, LogFileName, CRLF$, Comma$, Headers, '', False$, False$)
|
||||
LoggingDTM = LogDate : ' ' : LogTime ; // Logging DTM
|
||||
|
||||
GoToAPI else
|
||||
// The specific resource endpoint doesn't have a API handler yet.
|
||||
HTTP_Services('SetResponseStatus', 200, 'This is a valid endpoint but a web API handler has not yet been created.')
|
||||
end
|
||||
|
||||
Return Response OR ''
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Endpoint Handlers
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
API monaengines.HEAD
|
||||
API monaengines.GET
|
||||
|
||||
HTTP_Resource_Services('LoremIpsum')
|
||||
|
||||
end api
|
||||
|
||||
|
||||
API monaengines.ID.HEAD
|
||||
API monaengines.ID.GET
|
||||
|
||||
//Returns status of a defined engine
|
||||
EngineID = EndpointSegment
|
||||
If RowExists('APP_INFO', EngineID) then
|
||||
EngineHealthInfo = System_Healthcheck_Services('GetEngineHealthInfo', EngineID)
|
||||
If Error_Services('NoError') then
|
||||
Healthy = EngineHealthInfo<ENGINE_HEALTH_HEALTH_STATUS$>
|
||||
If Healthy then
|
||||
ResponseCode = 200
|
||||
Message = 'Engine is healthy'
|
||||
HTTP_Services('SetResponseStatus', ResponseCode, Message)
|
||||
LogData = ''
|
||||
LogData<1> = LoggingDTM
|
||||
LogData<2> = EngineID
|
||||
LogData<3> = ResponseCode
|
||||
LogData<4> = Message
|
||||
LogData<5> = FullEndpointURL
|
||||
Logging_Services('AppendLog', objLogMonaEngines, LogData, @RM, @FM)
|
||||
end else
|
||||
ResponseCode = 418
|
||||
Message = 'Engine is unhealthy.'
|
||||
HTTP_Services('SetResponseStatus', ResponseCode, Message)
|
||||
LogData = ''
|
||||
LogData<1> = LoggingDTM
|
||||
LogData<2> = EngineID
|
||||
LogData<3> = ResponseCode
|
||||
LogData<4> = Message
|
||||
LogData<5> = FullEndpointURL
|
||||
Logging_Services('AppendLog', objLogMonaEngines, LogData, @RM, @FM)
|
||||
end
|
||||
end else
|
||||
ResponseCode = 500
|
||||
Message = Error_Services('GetMessage')
|
||||
HTTP_Services('SetResponseStatus', ResponseCode, Message)
|
||||
LogData = ''
|
||||
LogData<1> = LoggingDTM
|
||||
LogData<2> = EngineID
|
||||
LogData<3> = ResponseCode
|
||||
LogData<4> = Message
|
||||
LogData<5> = FullEndpointURL
|
||||
Logging_Services('AppendLog', objLogMonaEngines, LogData, @RM, @FM)
|
||||
end
|
||||
end else
|
||||
ResponseCode = 404
|
||||
Message = 'Invalid Engine ID'
|
||||
HTTP_Services('SetResponseStatus', ResponseCode, 'Invalid Engine ID.')
|
||||
LogData = ''
|
||||
LogData<1> = LoggingDTM
|
||||
LogData<2> = EngineID
|
||||
LogData<3> = ResponseCode
|
||||
LogData<4> = Message
|
||||
LogData<5> = FullEndpointURL
|
||||
Logging_Services('AppendLog', objLogMonaEngines, LogData, @RM, @FM)
|
||||
end
|
||||
|
||||
end api
|
||||
|
||||
|
@ -1,64 +1,64 @@
|
||||
Function Mona_API(@API)
|
||||
/***********************************************************************************************************************
|
||||
|
||||
This program is proprietary and is not to be used by or disclosed to others, nor is it to be copied without written
|
||||
permission from SRP Computer Solutions, Inc.
|
||||
|
||||
Name : Mona_API
|
||||
|
||||
Description : API logic for the Mona resource.
|
||||
|
||||
Notes : All web APIs should include the API_SETUP insert. This will provide several useful variables:
|
||||
|
||||
HTTPMethod - The HTTP Method (Verb) submitted by the client (e.g., GET, POST, etc.)
|
||||
APIURL - The URL for the API entry point (e.g., api.mysite.com/v1).
|
||||
FullEndpointURL - The URL submitted by the client, including query params.
|
||||
FullEndpointURLNoQuery - The URL submitted by the client, excluding query params.
|
||||
EndpointSegment - The URL endpoint segment.
|
||||
ParentURL - The URL path preceeding the current endpoint.
|
||||
CurrentAPI - The name of this stored procedure.
|
||||
|
||||
Parameters :
|
||||
API [in] -- Web API to process. Format is [APIPattern].[HTTPMethod]:
|
||||
- APIPattern must follow this structure Mona[.ID.[<Property>]]
|
||||
- HTTPMethod can be any valid HTTP method, e.g., GET, POST, PUT, DELETE, etc.
|
||||
Examples:
|
||||
- Mona.POST
|
||||
- Mona.ID.PUT
|
||||
- Mona.ID.firstName.GET
|
||||
Response [out] -- Response to be sent back to the Controller (HTTP_MCP) or requesting procedure. Web API
|
||||
services do not rely upon anything being returned in the response. This is what the
|
||||
various services like SetResponseBody and SetResponseStatus services are for. A response
|
||||
value is only helpful if the developers want to use it for debug purposes.
|
||||
|
||||
History : (Date, Initials, Notes)
|
||||
07/17/24 xxx Original programmer.
|
||||
|
||||
***********************************************************************************************************************/
|
||||
|
||||
#pragma precomp SRP_PreCompiler
|
||||
|
||||
$insert APP_INSERTS
|
||||
$insert API_SETUP
|
||||
$insert HTTP_INSERTS
|
||||
|
||||
GoToAPI else
|
||||
// The specific resource endpoint doesn't have a API handler yet.
|
||||
HTTP_Services('SetResponseStatus', 200, 'This is a valid endpoint but a web API handler has not yet been created.')
|
||||
end
|
||||
|
||||
Return Response OR ''
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Endpoint Handlers
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
API mona.HEAD
|
||||
API mona.GET
|
||||
|
||||
HTTP_Resource_Services('LoremIpsum')
|
||||
|
||||
end api
|
||||
|
||||
Function Mona_API(@API)
|
||||
/***********************************************************************************************************************
|
||||
|
||||
This program is proprietary and is not to be used by or disclosed to others, nor is it to be copied without written
|
||||
permission from SRP Computer Solutions, Inc.
|
||||
|
||||
Name : Mona_API
|
||||
|
||||
Description : API logic for the Mona resource.
|
||||
|
||||
Notes : All web APIs should include the API_SETUP insert. This will provide several useful variables:
|
||||
|
||||
HTTPMethod - The HTTP Method (Verb) submitted by the client (e.g., GET, POST, etc.)
|
||||
APIURL - The URL for the API entry point (e.g., api.mysite.com/v1).
|
||||
FullEndpointURL - The URL submitted by the client, including query params.
|
||||
FullEndpointURLNoQuery - The URL submitted by the client, excluding query params.
|
||||
EndpointSegment - The URL endpoint segment.
|
||||
ParentURL - The URL path preceeding the current endpoint.
|
||||
CurrentAPI - The name of this stored procedure.
|
||||
|
||||
Parameters :
|
||||
API [in] -- Web API to process. Format is [APIPattern].[HTTPMethod]:
|
||||
- APIPattern must follow this structure Mona[.ID.[<Property>]]
|
||||
- HTTPMethod can be any valid HTTP method, e.g., GET, POST, PUT, DELETE, etc.
|
||||
Examples:
|
||||
- Mona.POST
|
||||
- Mona.ID.PUT
|
||||
- Mona.ID.firstName.GET
|
||||
Response [out] -- Response to be sent back to the Controller (HTTP_MCP) or requesting procedure. Web API
|
||||
services do not rely upon anything being returned in the response. This is what the
|
||||
various services like SetResponseBody and SetResponseStatus services are for. A response
|
||||
value is only helpful if the developers want to use it for debug purposes.
|
||||
|
||||
History : (Date, Initials, Notes)
|
||||
07/17/24 xxx Original programmer.
|
||||
|
||||
***********************************************************************************************************************/
|
||||
|
||||
#pragma precomp SRP_PreCompiler
|
||||
|
||||
$insert APP_INSERTS
|
||||
$insert API_SETUP
|
||||
$insert HTTP_INSERTS
|
||||
|
||||
GoToAPI else
|
||||
// The specific resource endpoint doesn't have a API handler yet.
|
||||
HTTP_Services('SetResponseStatus', 200, 'This is a valid endpoint but a web API handler has not yet been created.')
|
||||
end
|
||||
|
||||
Return Response OR ''
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Endpoint Handlers
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
API mona.HEAD
|
||||
API mona.GET
|
||||
|
||||
HTTP_Resource_Services('LoremIpsum')
|
||||
|
||||
end api
|
||||
|
||||
|
@ -159,7 +159,8 @@ Service SendBufferedAverageMetric(MonaResource, MetricName, MetricValue)
|
||||
|
||||
retries = retries - 1
|
||||
|
||||
response = Httpclient_Services('SendHTTPRequest', 'POST', ApiUrl, 'Content-Type':@VM:'application/json':@FM:'Accept':@VM:'*/*', RequestBodyJson, '', '', False$, True$, '')
|
||||
response = Httpclient_Services('SendHTTPRequest', 'POST', ApiUrl, 'Content-Type':@VM:'application/json':@FM:'Accept':@VM:'*/*', RequestBodyJson, '', '', False$, False$, '')
|
||||
|
||||
If response EQ '"Request queued for processing"' then
|
||||
isSuccessful = True$
|
||||
end
|
||||
@ -167,5 +168,3 @@ Service SendBufferedAverageMetric(MonaResource, MetricName, MetricValue)
|
||||
|
||||
end service
|
||||
|
||||
|
||||
|
||||
|
@ -1,187 +1,187 @@
|
||||
Compile function NDW_LOAD_UNLOAD_EXTRA_EVENTS(CtrlEntId, Event, @PARAMS)
|
||||
#pragma precomp SRP_PreCompiler
|
||||
#window NDW_LOAD_UNLOAD_EXTRA
|
||||
|
||||
Declare subroutine End_Dialog, Post_Event, Database_Services, Error_Services, Msg
|
||||
Declare subroutine Set_Property, Rds_Services
|
||||
Declare function Database_Services, Error_Services
|
||||
Declare function Get_Property
|
||||
|
||||
$Insert EVENT_SETUP
|
||||
$Insert LOGICAL
|
||||
$Insert RDS_EQUATES
|
||||
|
||||
GoToEvent Event for CtrlEntId else
|
||||
// Event not implemented
|
||||
end
|
||||
|
||||
Return EventFlow or 1
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// EVENT HANDLERS
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
Event WINDOW.CREATE(CreateParam)
|
||||
ResponseValue = Set_Property(@Window, '@responsevalue', 0)
|
||||
RDSNo = CreateParam
|
||||
If RowExists('RDS', RDSNo) then
|
||||
Set_Property(@Window : '.EDL_RDS', 'TEXT', RDSNo)
|
||||
GoSub Refresh
|
||||
end else
|
||||
ResponseValue = Set_Property(@Window, '@responsevalue', 0)
|
||||
Post_Event(@Window, 'CLOSE')
|
||||
end
|
||||
|
||||
End Event
|
||||
|
||||
Event WINDOW.CLOSE(CancelFlag)
|
||||
ResponseValue = Get_Property(@Window, '@responsevalue')
|
||||
End_Dialog(@Window, ResponseValue)
|
||||
end event
|
||||
|
||||
//Signature buttons
|
||||
|
||||
Event PUB_SIGN_UNLOAD_EX_1.CLICK()
|
||||
RDSNo = Get_Property(@Window : '.EDL_RDS', 'TEXT')
|
||||
Rds_Services('SignUnloadExtra1', RDSNo, @USER4)
|
||||
If Error_Services('NoError') then
|
||||
Msg(@Window, 'Unload Extra 1 Signed!')
|
||||
end else
|
||||
Msg(@Window, Error_Services('GetMessage'))
|
||||
end
|
||||
GoSub Refresh
|
||||
end event
|
||||
|
||||
Event PUB_SIGN_LOAD_EX_1.CLICK()
|
||||
RDSNo = Get_Property(@Window : '.EDL_RDS', 'TEXT')
|
||||
Rds_Services('SignLoadExtra1', RDSNo, @USER4)
|
||||
If Error_Services('NoError') then
|
||||
Msg(@Window, 'Load Extra 1 Signed!')
|
||||
end else
|
||||
Msg(@Window, Error_Services('GetMessage'))
|
||||
end
|
||||
GoSub Refresh
|
||||
end event
|
||||
|
||||
Event PUB_SIGN_UNLOAD_EX_2.CLICK()
|
||||
RDSNo = Get_Property(@Window : '.EDL_RDS', 'TEXT')
|
||||
Rds_Services('SignUnloadExtra2', RDSNo, @USER4)
|
||||
If Error_Services('NoError') then
|
||||
Msg(@Window, 'Unload Extra 2 Signed!')
|
||||
end else
|
||||
Msg(@Window, Error_Services('GetMessage'))
|
||||
end
|
||||
GoSub Refresh
|
||||
end event
|
||||
|
||||
Event PUB_SIGN_LOAD_EX_2.CLICK()
|
||||
RDSNo = Get_Property(@Window : '.EDL_RDS', 'TEXT')
|
||||
Rds_Services('SignLoadExtra2', RDSNo, @USER4)
|
||||
If Error_Services('NoError') then
|
||||
Msg(@Window, 'Load Extra 2 Signed!')
|
||||
end else
|
||||
Msg(@Window, Error_Services('GetMessage'))
|
||||
end
|
||||
GoSub Refresh
|
||||
end event
|
||||
|
||||
//Clear Signature Buttons
|
||||
|
||||
Event PUB_CLEAR_UNLOAD_EX_1.CLICK()
|
||||
RDSNo = Get_Property(@Window : '.EDL_RDS', 'TEXT')
|
||||
Rds_Services('UnsignUnloadExtra1', RDSNo, @User4)
|
||||
If Error_Services('NoError') then
|
||||
Msg(@Window, 'Unload Extra 1 unsigned!')
|
||||
end else
|
||||
Msg(@Window, Error_Services('GetMessage'))
|
||||
end
|
||||
GoSub Refresh
|
||||
end event
|
||||
|
||||
Event PUB_CLEAR_LOAD_EX_1.CLICK()
|
||||
RDSNo = Get_Property(@Window : '.EDL_RDS', 'TEXT')
|
||||
Rds_Services('UnsignLoadExtra1', RDSNo, @User4)
|
||||
If Error_Services('NoError') then
|
||||
Msg(@Window, 'Load Extra 1 unsigned!')
|
||||
end else
|
||||
Msg(@Window, Error_Services('GetMessage'))
|
||||
end
|
||||
GoSub Refresh
|
||||
end event
|
||||
|
||||
Event PUB_CLEAR_UNLOAD_EX_2.CLICK()
|
||||
RDSNo = Get_Property(@Window : '.EDL_RDS', 'TEXT')
|
||||
Rds_Services('UnsignUnloadExtra2', RDSNo, @User4)
|
||||
If Error_Services('NoError') then
|
||||
Msg(@Window, 'Unload Extra 2 unsigned!')
|
||||
end else
|
||||
Msg(@Window, Error_Services('GetMessage'))
|
||||
end
|
||||
GoSub Refresh
|
||||
end event
|
||||
|
||||
Event PUB_CLEAR_LOAD_EX_2.CLICK()
|
||||
RDSNo = Get_Property(@Window : '.EDL_RDS', 'TEXT')
|
||||
Rds_Services('UnsignLoadExtra2', RDSNo, @User4)
|
||||
If Error_Services('NoError') then
|
||||
Msg(@Window, 'Load Extra 2 unsigned!')
|
||||
end else
|
||||
Msg(@Window, Error_Services('GetMessage'))
|
||||
end
|
||||
GoSub Refresh
|
||||
end event
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// INTERNAL GO-SUBS
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
|
||||
***************
|
||||
Refresh:
|
||||
***************
|
||||
|
||||
RDSNo = Get_Property(@Window : '.EDL_RDS', 'TEXT')
|
||||
If RowExists('RDS', RDSNo) then
|
||||
RDSRec = Database_Services('ReadDataRow', 'RDS', RDSNo)
|
||||
//Unload Extra 1
|
||||
UnloadExtra1Signature = RDSRec<RDS_OP_OUT_EX1$>
|
||||
UnloadExtra1UserFirstLast = xlate( 'LSL_USERS', UnloadExtra1Signature, 'FIRST_LAST', 'X' )
|
||||
UnloadExtra1Date = OConv(RDSRec<RDS_OP_OUT_EX1_DATE$>, 'D')
|
||||
UnloadExtra1Time = Oconv(RDSRec<RDS_OP_OUT_EX1_TIME$>, 'MT')
|
||||
//Load Extra 1
|
||||
LoadExtra1Signature = RDSRec<RDS_OP_IN_EX2$>
|
||||
LoadExtra1UserFirstLast = xlate( 'LSL_USERS', LoadExtra1Signature, 'FIRST_LAST', 'X' )
|
||||
LoadExtra1Date = Oconv(RDSRec<RDS_OP_IN_EX2_DATE$>, 'D')
|
||||
LoadExtra1Time = Oconv(RDSRec<RDS_OP_IN_EX2_TIME$>, 'MT')
|
||||
//Unload Extra 2
|
||||
UnloadExtra2Signature = RDSRec<RDS_OP_OUT_EX2$>
|
||||
UnloadExtra2UserFirstLast = xlate( 'LSL_USERS', UnloadExtra2Signature, 'FIRST_LAST', 'X' )
|
||||
UnloadExtra2Date = Oconv(RDSRec<RDS_OP_OUT_EX2_DATE$>, 'D')
|
||||
UnloadExtra2Time = Oconv(RDSRec<RDS_OP_OUT_EX2_TIME$>, 'MT')
|
||||
//Load Extra 2
|
||||
LoadExtra2Signature = RDSRec<RDS_OP_IN_EX3$>
|
||||
LoadExtra2UserFirstLast = xlate( 'LSL_USERS', LoadExtra2Signature, 'FIRST_LAST', 'X' )
|
||||
LoadExtra2Date = Oconv(RDSRec<RDS_OP_IN_EX3_DATE$>, 'D')
|
||||
LoadExtra2Time = Oconv(RDSRec<RDS_OP_IN_EX3_TIME$>, 'MT')
|
||||
|
||||
//Populate text fields
|
||||
Set_Property(@Window : '.EDL_UNLOAD_EX_1_USER', 'TEXT', UnloadExtra1UserFirstLast)
|
||||
Set_Property(@Window : '.EDL_UNLOAD_EX_1_DATE', 'TEXT', UnloadExtra1Date)
|
||||
Set_Property(@Window : '.EDL_UNLOAD_EX_1_TIME', 'TEXT', UnloadExtra1Time)
|
||||
Set_Property(@Window : '.EDL_LOAD_EX_1_USER', 'TEXT', LoadExtra1UserFirstLast)
|
||||
Set_Property(@Window : '.EDL_LOAD_EX_1_DATE', 'TEXT', LoadExtra1Date)
|
||||
Set_Property(@Window : '.EDL_LOAD_EX_1_TIME', 'TEXT', LoadExtra1Time)
|
||||
Set_Property(@Window : '.EDL_UNLOAD_EX_2_USER', 'TEXT', UnloadExtra2UserFirstLast)
|
||||
Set_Property(@Window : '.EDL_UNLOAD_EX_2_DATE', 'TEXT', UnloadExtra2Date)
|
||||
Set_Property(@Window : '.EDL_UNLOAD_EX_2_TIME', 'TEXT', UnloadExtra2Time)
|
||||
Set_Property(@Window : '.EDL_LOAD_EX_2_USER', 'TEXT', LoadExtra2UserFirstLast)
|
||||
Set_Property(@Window : '.EDL_LOAD_EX_2_DATE', 'TEXT', LoadExtra2Date)
|
||||
Set_Property(@Window : '.EDL_LOAD_EX_2_TIME', 'TEXT', LoadExtra2Time)
|
||||
end else
|
||||
ResponseValue = Set_Property(@Window, '@responsevalue', 0)
|
||||
Post_Event(@Window, 'CLOSE')
|
||||
end
|
||||
|
||||
return
|
||||
|
||||
|
||||
Compile function NDW_LOAD_UNLOAD_EXTRA_EVENTS(CtrlEntId, Event, @PARAMS)
|
||||
#pragma precomp SRP_PreCompiler
|
||||
#window NDW_LOAD_UNLOAD_EXTRA
|
||||
|
||||
Declare subroutine End_Dialog, Post_Event, Database_Services, Error_Services, Msg
|
||||
Declare subroutine Set_Property, Rds_Services
|
||||
Declare function Database_Services, Error_Services
|
||||
Declare function Get_Property
|
||||
|
||||
$Insert EVENT_SETUP
|
||||
$Insert LOGICAL
|
||||
$Insert RDS_EQUATES
|
||||
|
||||
GoToEvent Event for CtrlEntId else
|
||||
// Event not implemented
|
||||
end
|
||||
|
||||
Return EventFlow or 1
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// EVENT HANDLERS
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
Event WINDOW.CREATE(CreateParam)
|
||||
ResponseValue = Set_Property(@Window, '@responsevalue', 0)
|
||||
RDSNo = CreateParam
|
||||
If RowExists('RDS', RDSNo) then
|
||||
Set_Property(@Window : '.EDL_RDS', 'TEXT', RDSNo)
|
||||
GoSub Refresh
|
||||
end else
|
||||
ResponseValue = Set_Property(@Window, '@responsevalue', 0)
|
||||
Post_Event(@Window, 'CLOSE')
|
||||
end
|
||||
|
||||
End Event
|
||||
|
||||
Event WINDOW.CLOSE(CancelFlag)
|
||||
ResponseValue = Get_Property(@Window, '@responsevalue')
|
||||
End_Dialog(@Window, ResponseValue)
|
||||
end event
|
||||
|
||||
//Signature buttons
|
||||
|
||||
Event PUB_SIGN_UNLOAD_EX_1.CLICK()
|
||||
RDSNo = Get_Property(@Window : '.EDL_RDS', 'TEXT')
|
||||
Rds_Services('SignUnloadExtra1', RDSNo, @USER4)
|
||||
If Error_Services('NoError') then
|
||||
Msg(@Window, 'Unload Extra 1 Signed!')
|
||||
end else
|
||||
Msg(@Window, Error_Services('GetMessage'))
|
||||
end
|
||||
GoSub Refresh
|
||||
end event
|
||||
|
||||
Event PUB_SIGN_LOAD_EX_1.CLICK()
|
||||
RDSNo = Get_Property(@Window : '.EDL_RDS', 'TEXT')
|
||||
Rds_Services('SignLoadExtra1', RDSNo, @USER4)
|
||||
If Error_Services('NoError') then
|
||||
Msg(@Window, 'Load Extra 1 Signed!')
|
||||
end else
|
||||
Msg(@Window, Error_Services('GetMessage'))
|
||||
end
|
||||
GoSub Refresh
|
||||
end event
|
||||
|
||||
Event PUB_SIGN_UNLOAD_EX_2.CLICK()
|
||||
RDSNo = Get_Property(@Window : '.EDL_RDS', 'TEXT')
|
||||
Rds_Services('SignUnloadExtra2', RDSNo, @USER4)
|
||||
If Error_Services('NoError') then
|
||||
Msg(@Window, 'Unload Extra 2 Signed!')
|
||||
end else
|
||||
Msg(@Window, Error_Services('GetMessage'))
|
||||
end
|
||||
GoSub Refresh
|
||||
end event
|
||||
|
||||
Event PUB_SIGN_LOAD_EX_2.CLICK()
|
||||
RDSNo = Get_Property(@Window : '.EDL_RDS', 'TEXT')
|
||||
Rds_Services('SignLoadExtra2', RDSNo, @USER4)
|
||||
If Error_Services('NoError') then
|
||||
Msg(@Window, 'Load Extra 2 Signed!')
|
||||
end else
|
||||
Msg(@Window, Error_Services('GetMessage'))
|
||||
end
|
||||
GoSub Refresh
|
||||
end event
|
||||
|
||||
//Clear Signature Buttons
|
||||
|
||||
Event PUB_CLEAR_UNLOAD_EX_1.CLICK()
|
||||
RDSNo = Get_Property(@Window : '.EDL_RDS', 'TEXT')
|
||||
Rds_Services('UnsignUnloadExtra1', RDSNo, @User4)
|
||||
If Error_Services('NoError') then
|
||||
Msg(@Window, 'Unload Extra 1 unsigned!')
|
||||
end else
|
||||
Msg(@Window, Error_Services('GetMessage'))
|
||||
end
|
||||
GoSub Refresh
|
||||
end event
|
||||
|
||||
Event PUB_CLEAR_LOAD_EX_1.CLICK()
|
||||
RDSNo = Get_Property(@Window : '.EDL_RDS', 'TEXT')
|
||||
Rds_Services('UnsignLoadExtra1', RDSNo, @User4)
|
||||
If Error_Services('NoError') then
|
||||
Msg(@Window, 'Load Extra 1 unsigned!')
|
||||
end else
|
||||
Msg(@Window, Error_Services('GetMessage'))
|
||||
end
|
||||
GoSub Refresh
|
||||
end event
|
||||
|
||||
Event PUB_CLEAR_UNLOAD_EX_2.CLICK()
|
||||
RDSNo = Get_Property(@Window : '.EDL_RDS', 'TEXT')
|
||||
Rds_Services('UnsignUnloadExtra2', RDSNo, @User4)
|
||||
If Error_Services('NoError') then
|
||||
Msg(@Window, 'Unload Extra 2 unsigned!')
|
||||
end else
|
||||
Msg(@Window, Error_Services('GetMessage'))
|
||||
end
|
||||
GoSub Refresh
|
||||
end event
|
||||
|
||||
Event PUB_CLEAR_LOAD_EX_2.CLICK()
|
||||
RDSNo = Get_Property(@Window : '.EDL_RDS', 'TEXT')
|
||||
Rds_Services('UnsignLoadExtra2', RDSNo, @User4)
|
||||
If Error_Services('NoError') then
|
||||
Msg(@Window, 'Load Extra 2 unsigned!')
|
||||
end else
|
||||
Msg(@Window, Error_Services('GetMessage'))
|
||||
end
|
||||
GoSub Refresh
|
||||
end event
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// INTERNAL GO-SUBS
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
|
||||
***************
|
||||
Refresh:
|
||||
***************
|
||||
|
||||
RDSNo = Get_Property(@Window : '.EDL_RDS', 'TEXT')
|
||||
If RowExists('RDS', RDSNo) then
|
||||
RDSRec = Database_Services('ReadDataRow', 'RDS', RDSNo)
|
||||
//Unload Extra 1
|
||||
UnloadExtra1Signature = RDSRec<RDS_OP_OUT_EX1$>
|
||||
UnloadExtra1UserFirstLast = xlate( 'LSL_USERS', UnloadExtra1Signature, 'FIRST_LAST', 'X' )
|
||||
UnloadExtra1Date = OConv(RDSRec<RDS_OP_OUT_EX1_DATE$>, 'D')
|
||||
UnloadExtra1Time = Oconv(RDSRec<RDS_OP_OUT_EX1_TIME$>, 'MT')
|
||||
//Load Extra 1
|
||||
LoadExtra1Signature = RDSRec<RDS_OP_IN_EX2$>
|
||||
LoadExtra1UserFirstLast = xlate( 'LSL_USERS', LoadExtra1Signature, 'FIRST_LAST', 'X' )
|
||||
LoadExtra1Date = Oconv(RDSRec<RDS_OP_IN_EX2_DATE$>, 'D')
|
||||
LoadExtra1Time = Oconv(RDSRec<RDS_OP_IN_EX2_TIME$>, 'MT')
|
||||
//Unload Extra 2
|
||||
UnloadExtra2Signature = RDSRec<RDS_OP_OUT_EX2$>
|
||||
UnloadExtra2UserFirstLast = xlate( 'LSL_USERS', UnloadExtra2Signature, 'FIRST_LAST', 'X' )
|
||||
UnloadExtra2Date = Oconv(RDSRec<RDS_OP_OUT_EX2_DATE$>, 'D')
|
||||
UnloadExtra2Time = Oconv(RDSRec<RDS_OP_OUT_EX2_TIME$>, 'MT')
|
||||
//Load Extra 2
|
||||
LoadExtra2Signature = RDSRec<RDS_OP_IN_EX3$>
|
||||
LoadExtra2UserFirstLast = xlate( 'LSL_USERS', LoadExtra2Signature, 'FIRST_LAST', 'X' )
|
||||
LoadExtra2Date = Oconv(RDSRec<RDS_OP_IN_EX3_DATE$>, 'D')
|
||||
LoadExtra2Time = Oconv(RDSRec<RDS_OP_IN_EX3_TIME$>, 'MT')
|
||||
|
||||
//Populate text fields
|
||||
Set_Property(@Window : '.EDL_UNLOAD_EX_1_USER', 'TEXT', UnloadExtra1UserFirstLast)
|
||||
Set_Property(@Window : '.EDL_UNLOAD_EX_1_DATE', 'TEXT', UnloadExtra1Date)
|
||||
Set_Property(@Window : '.EDL_UNLOAD_EX_1_TIME', 'TEXT', UnloadExtra1Time)
|
||||
Set_Property(@Window : '.EDL_LOAD_EX_1_USER', 'TEXT', LoadExtra1UserFirstLast)
|
||||
Set_Property(@Window : '.EDL_LOAD_EX_1_DATE', 'TEXT', LoadExtra1Date)
|
||||
Set_Property(@Window : '.EDL_LOAD_EX_1_TIME', 'TEXT', LoadExtra1Time)
|
||||
Set_Property(@Window : '.EDL_UNLOAD_EX_2_USER', 'TEXT', UnloadExtra2UserFirstLast)
|
||||
Set_Property(@Window : '.EDL_UNLOAD_EX_2_DATE', 'TEXT', UnloadExtra2Date)
|
||||
Set_Property(@Window : '.EDL_UNLOAD_EX_2_TIME', 'TEXT', UnloadExtra2Time)
|
||||
Set_Property(@Window : '.EDL_LOAD_EX_2_USER', 'TEXT', LoadExtra2UserFirstLast)
|
||||
Set_Property(@Window : '.EDL_LOAD_EX_2_DATE', 'TEXT', LoadExtra2Date)
|
||||
Set_Property(@Window : '.EDL_LOAD_EX_2_TIME', 'TEXT', LoadExtra2Time)
|
||||
end else
|
||||
ResponseValue = Set_Property(@Window, '@responsevalue', 0)
|
||||
Post_Event(@Window, 'CLOSE')
|
||||
end
|
||||
|
||||
return
|
||||
|
||||
|
||||
|
@ -148,8 +148,9 @@ Event WINDOW.CREATE(CreateParam)
|
||||
|
||||
If (AccessLevel EQ -1) OR (AccessLevel EQ '') then
|
||||
Set_Property(@Window, '@CLOSE', 1)
|
||||
Post_Event(@Window, 'CLOSE')
|
||||
// This prevents OI from throwing an error message if the cancel button is pressed on the LOGON form.
|
||||
If (Server EQ 'MESST5201') or (Server EQ 'MESST5202') then Utility("DESTROY", "SYSTEM")
|
||||
//If (Server EQ 'MESST5201') or (Server EQ 'MESST5202') then Utility("DESTROY", "SYSTEM")
|
||||
end
|
||||
|
||||
If AccessLevel GE 0 then
|
||||
|
@ -1,149 +1,149 @@
|
||||
Compile function NDW_MANUAL_WAFER_COUNT_EVENTS(CtrlEntId, Event, @PARAMS)
|
||||
/***********************************************************************************************************************
|
||||
|
||||
This program is proprietary and is not to be used by or disclosed to others, nor is it to be copied without written
|
||||
permission from Infineon.
|
||||
|
||||
Name : NDW_Manual_Wafer_Count_Events
|
||||
|
||||
Description : This function acts as a commuter module for all events related to this window.
|
||||
|
||||
Notes : Commuter Modules are automatically called from the Promoted_Events function which is called by the
|
||||
application-specific promoted event handler. This makes it possible to add QuickEvents that need to
|
||||
execute Basic+ logic without having use the Form Designer to make the association, although this is
|
||||
limited to the events which are currently promoted.
|
||||
|
||||
If the form needs to call the commuter module directly then the QuickEvent parameters should be
|
||||
formatted like this:
|
||||
|
||||
'@SELF','@EVENT',['@PARAM1','@PARAMx']
|
||||
|
||||
Parameters :
|
||||
CtrlEntId [in] -- The fully qualified name of the control calling the promoted event
|
||||
Event [in] -- The event being executed. See the Notes section regarding "PRE" events
|
||||
Param1-15 [in] -- Additional event parameter holders
|
||||
EventFlow [out] -- Set to 1 or 0 so the calling event knows whether or not to chain forward. See comments in
|
||||
EVENT_SETUP insert
|
||||
|
||||
History : (Date, Initials, Notes)
|
||||
04/12/24 djs Created initial commuter module.
|
||||
|
||||
***********************************************************************************************************************/
|
||||
|
||||
#pragma precomp SRP_PreCompiler
|
||||
#window NDW_MANUAL_WAFER_COUNT
|
||||
|
||||
$Insert EVENT_SETUP
|
||||
$Insert APP_INSERTS
|
||||
$Insert MSG_EQUATES
|
||||
|
||||
Equ MSG_WIDTH$ to 650
|
||||
Equ Comma$ to ','
|
||||
|
||||
Declare function Environment_Services, Logging_Services, Datetime
|
||||
Declare subroutine Set_Property, Logging_Services
|
||||
|
||||
LogPath = Environment_Services('GetApplicationRootPath') : '\LogFiles\WaferCounter'
|
||||
LogDate = Oconv(Date(), 'D4/')
|
||||
LogTime = Oconv(Time(), 'MTS')
|
||||
LogFileName = LogDate[7, 4] : '-' : LogDate[1, 2] : '-' : LogDate[4, 2] : ' Wafer Counter Verify Log.csv'
|
||||
Headers = 'Logging DTM':@FM:'Logging Text'
|
||||
objLog = Logging_Services('NewLog', LogPath, LogFileName, CRLF$, Comma$, Headers, '', False$, False$)
|
||||
LoggingDTM = LogDate : ' ' : LogTime ; // Logging DTM
|
||||
|
||||
// Update the arguments so that the OpenInsight OLE event will treate the ActiveX event as a native event handler.
|
||||
If Event EQ 'OLE' then
|
||||
Transfer Event to OIEvent
|
||||
Transfer Param1 to Event
|
||||
Transfer Param2 to Param1
|
||||
Transfer Param3 to Param2
|
||||
Transfer Param4 to Param3
|
||||
Transfer Param5 to Param4
|
||||
Transfer Param6 to Param5
|
||||
Transfer Param7 to Param6
|
||||
Transfer Param8 to Param7
|
||||
end
|
||||
|
||||
GoToEvent Event for CtrlEntID
|
||||
|
||||
Return EventFlow else EVENT_CONTINUE$
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// EVENT HANDLERS
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
Event WINDOW.CREATE(CreateParam)
|
||||
|
||||
If CreateParam NE '' then
|
||||
|
||||
Set_Property(@Window, '@EXPECTED_QTY', CreateParam)
|
||||
List = ''
|
||||
For SlotIndex = 0 to 25
|
||||
List<SlotIndex + 1> = SlotIndex
|
||||
Next SlotIndex
|
||||
Set_Property(@Window:'.CBO_WAFER_COUNT', 'LIST', List)
|
||||
|
||||
end else
|
||||
|
||||
ErrorMsg = 'Wafer counter error. Null expected quantity passed in.'
|
||||
LogData = ''
|
||||
LogData<1> = OConv(Datetime(), 'DT2/^H')
|
||||
LogData<2> = @User4
|
||||
LogData<3> = ErrorMsg
|
||||
Logging_Services('AppendLog', objLog, LogData, @RM, @FM)
|
||||
|
||||
MsgStruct = ''
|
||||
MsgStruct<MTEXTWIDTH$> = MSG_WIDTH$
|
||||
Msg(@Window, MsgStruct, 'PROCESS_ERROR', '', ErrorMsg)
|
||||
End_Dialog(@Window, '')
|
||||
end
|
||||
|
||||
End Event
|
||||
|
||||
|
||||
Event CBO_WAFER_COUNT.CHANGED(NewData)
|
||||
|
||||
Set_Property(@Window:'.PUB_OK', 'ENABLED', (NewData NE '') )
|
||||
|
||||
end event
|
||||
|
||||
|
||||
Event PUB_OK.CLICK()
|
||||
|
||||
ExpectedQty = Get_Property(@Window, '@EXPECTED_QTY')
|
||||
WaferCount = Get_Property(@Window:'.CBO_WAFER_COUNT', 'TEXT')
|
||||
If ExpectedQty EQ WaferCount then
|
||||
LogData = ''
|
||||
LogData<1> = OConv(Datetime(), 'DT2/^H')
|
||||
LogData<2> = @User4
|
||||
LogData<3> = 'Expected quantity equals entered quantity. Proceeding...'
|
||||
Logging_Services('AppendLog', objLog, LogData, @RM, @FM)
|
||||
|
||||
End_Dialog(@Window, WaferCount)
|
||||
end else
|
||||
ErrorMsg = 'Wafer counter error. Expected quantity "':ExpectedQty:'" does not match entered quantity "':WaferCount:'".'
|
||||
LogData = ''
|
||||
LogData<1> = OConv(Datetime(), 'DT2/^H')
|
||||
LogData<2> = @User4
|
||||
LogData<3> = ErrorMsg
|
||||
Logging_Services('AppendLog', objLog, LogData, @RM, @FM)
|
||||
MsgStruct = ''
|
||||
MsgStruct<MTEXTWIDTH$> = MSG_WIDTH$
|
||||
Msg(@Window, MsgStruct, 'PROCESS_ERROR', '', ErrorMsg)
|
||||
end
|
||||
|
||||
end event
|
||||
|
||||
|
||||
Event PUB_CANCEL.CLICK()
|
||||
|
||||
LogData = ''
|
||||
LogData<1> = OConv(Datetime(), 'DT2/^H')
|
||||
LogData<2> = @User4
|
||||
LogData<3> = 'Manual verification process canceled'
|
||||
Logging_Services('AppendLog', objLog, LogData, @RM, @FM)
|
||||
End_Dialog(@Window, '')
|
||||
|
||||
end event
|
||||
|
||||
|
||||
Compile function NDW_MANUAL_WAFER_COUNT_EVENTS(CtrlEntId, Event, @PARAMS)
|
||||
/***********************************************************************************************************************
|
||||
|
||||
This program is proprietary and is not to be used by or disclosed to others, nor is it to be copied without written
|
||||
permission from Infineon.
|
||||
|
||||
Name : NDW_Manual_Wafer_Count_Events
|
||||
|
||||
Description : This function acts as a commuter module for all events related to this window.
|
||||
|
||||
Notes : Commuter Modules are automatically called from the Promoted_Events function which is called by the
|
||||
application-specific promoted event handler. This makes it possible to add QuickEvents that need to
|
||||
execute Basic+ logic without having use the Form Designer to make the association, although this is
|
||||
limited to the events which are currently promoted.
|
||||
|
||||
If the form needs to call the commuter module directly then the QuickEvent parameters should be
|
||||
formatted like this:
|
||||
|
||||
'@SELF','@EVENT',['@PARAM1','@PARAMx']
|
||||
|
||||
Parameters :
|
||||
CtrlEntId [in] -- The fully qualified name of the control calling the promoted event
|
||||
Event [in] -- The event being executed. See the Notes section regarding "PRE" events
|
||||
Param1-15 [in] -- Additional event parameter holders
|
||||
EventFlow [out] -- Set to 1 or 0 so the calling event knows whether or not to chain forward. See comments in
|
||||
EVENT_SETUP insert
|
||||
|
||||
History : (Date, Initials, Notes)
|
||||
04/12/24 djs Created initial commuter module.
|
||||
|
||||
***********************************************************************************************************************/
|
||||
|
||||
#pragma precomp SRP_PreCompiler
|
||||
#window NDW_MANUAL_WAFER_COUNT
|
||||
|
||||
$Insert EVENT_SETUP
|
||||
$Insert APP_INSERTS
|
||||
$Insert MSG_EQUATES
|
||||
|
||||
Equ MSG_WIDTH$ to 650
|
||||
Equ Comma$ to ','
|
||||
|
||||
Declare function Environment_Services, Logging_Services, Datetime
|
||||
Declare subroutine Set_Property, Logging_Services
|
||||
|
||||
LogPath = Environment_Services('GetApplicationRootPath') : '\LogFiles\WaferCounter'
|
||||
LogDate = Oconv(Date(), 'D4/')
|
||||
LogTime = Oconv(Time(), 'MTS')
|
||||
LogFileName = LogDate[7, 4] : '-' : LogDate[1, 2] : '-' : LogDate[4, 2] : ' Wafer Counter Verify Log.csv'
|
||||
Headers = 'Logging DTM':@FM:'Logging Text'
|
||||
objLog = Logging_Services('NewLog', LogPath, LogFileName, CRLF$, Comma$, Headers, '', False$, False$)
|
||||
LoggingDTM = LogDate : ' ' : LogTime ; // Logging DTM
|
||||
|
||||
// Update the arguments so that the OpenInsight OLE event will treate the ActiveX event as a native event handler.
|
||||
If Event EQ 'OLE' then
|
||||
Transfer Event to OIEvent
|
||||
Transfer Param1 to Event
|
||||
Transfer Param2 to Param1
|
||||
Transfer Param3 to Param2
|
||||
Transfer Param4 to Param3
|
||||
Transfer Param5 to Param4
|
||||
Transfer Param6 to Param5
|
||||
Transfer Param7 to Param6
|
||||
Transfer Param8 to Param7
|
||||
end
|
||||
|
||||
GoToEvent Event for CtrlEntID
|
||||
|
||||
Return EventFlow else EVENT_CONTINUE$
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// EVENT HANDLERS
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
Event WINDOW.CREATE(CreateParam)
|
||||
|
||||
If CreateParam NE '' then
|
||||
|
||||
Set_Property(@Window, '@EXPECTED_QTY', CreateParam)
|
||||
List = ''
|
||||
For SlotIndex = 0 to 25
|
||||
List<SlotIndex + 1> = SlotIndex
|
||||
Next SlotIndex
|
||||
Set_Property(@Window:'.CBO_WAFER_COUNT', 'LIST', List)
|
||||
|
||||
end else
|
||||
|
||||
ErrorMsg = 'Wafer counter error. Null expected quantity passed in.'
|
||||
LogData = ''
|
||||
LogData<1> = OConv(Datetime(), 'DT2/^H')
|
||||
LogData<2> = @User4
|
||||
LogData<3> = ErrorMsg
|
||||
Logging_Services('AppendLog', objLog, LogData, @RM, @FM)
|
||||
|
||||
MsgStruct = ''
|
||||
MsgStruct<MTEXTWIDTH$> = MSG_WIDTH$
|
||||
Msg(@Window, MsgStruct, 'PROCESS_ERROR', '', ErrorMsg)
|
||||
End_Dialog(@Window, '')
|
||||
end
|
||||
|
||||
End Event
|
||||
|
||||
|
||||
Event CBO_WAFER_COUNT.CHANGED(NewData)
|
||||
|
||||
Set_Property(@Window:'.PUB_OK', 'ENABLED', (NewData NE '') )
|
||||
|
||||
end event
|
||||
|
||||
|
||||
Event PUB_OK.CLICK()
|
||||
|
||||
ExpectedQty = Get_Property(@Window, '@EXPECTED_QTY')
|
||||
WaferCount = Get_Property(@Window:'.CBO_WAFER_COUNT', 'TEXT')
|
||||
If ExpectedQty EQ WaferCount then
|
||||
LogData = ''
|
||||
LogData<1> = OConv(Datetime(), 'DT2/^H')
|
||||
LogData<2> = @User4
|
||||
LogData<3> = 'Expected quantity equals entered quantity. Proceeding...'
|
||||
Logging_Services('AppendLog', objLog, LogData, @RM, @FM)
|
||||
|
||||
End_Dialog(@Window, WaferCount)
|
||||
end else
|
||||
ErrorMsg = 'Wafer counter error. Expected quantity "':ExpectedQty:'" does not match entered quantity "':WaferCount:'".'
|
||||
LogData = ''
|
||||
LogData<1> = OConv(Datetime(), 'DT2/^H')
|
||||
LogData<2> = @User4
|
||||
LogData<3> = ErrorMsg
|
||||
Logging_Services('AppendLog', objLog, LogData, @RM, @FM)
|
||||
MsgStruct = ''
|
||||
MsgStruct<MTEXTWIDTH$> = MSG_WIDTH$
|
||||
Msg(@Window, MsgStruct, 'PROCESS_ERROR', '', ErrorMsg)
|
||||
end
|
||||
|
||||
end event
|
||||
|
||||
|
||||
Event PUB_CANCEL.CLICK()
|
||||
|
||||
LogData = ''
|
||||
LogData<1> = OConv(Datetime(), 'DT2/^H')
|
||||
LogData<2> = @User4
|
||||
LogData<3> = 'Manual verification process canceled'
|
||||
Logging_Services('AppendLog', objLog, LogData, @RM, @FM)
|
||||
End_Dialog(@Window, '')
|
||||
|
||||
end event
|
||||
|
||||
|
||||
|
@ -1,120 +1,120 @@
|
||||
Compile function NDW_PM_OVERRIDE_EVENTS(CtrlEntId, Event, @PARAMS)
|
||||
/***********************************************************************************************************************
|
||||
|
||||
This program is proprietary and is not to be used by or disclosed to others, nor is it to be copied without written
|
||||
permission from Infineon.
|
||||
|
||||
Name : NDW_PM_Override_Events
|
||||
|
||||
Description : This function acts as a commuter module for all events related to this window.
|
||||
|
||||
Notes : Commuter Modules are automatically called from the Promoted_Events function which is called by the
|
||||
application-specific promoted event handler. This makes it possible to add QuickEvents that need to
|
||||
execute Basic+ logic without having use the Form Designer to make the association, although this is
|
||||
limited to the events which are currently promoted.
|
||||
|
||||
If the form needs to call the commuter module directly then the QuickEvent parameters should be
|
||||
formatted like this:
|
||||
|
||||
'@SELF','@EVENT',['@PARAM1','@PARAMx']
|
||||
|
||||
Parameters :
|
||||
CtrlEntId [in] -- The fully qualified name of the control calling the promoted event
|
||||
Event [in] -- The event being executed. See the Notes section regarding "PRE" events
|
||||
Param1-15 [in] -- Additional event parameter holders
|
||||
EventFlow [out] -- Set to 1 or 0 so the calling event knows whether or not to chain forward. See comments in
|
||||
EVENT_SETUP insert
|
||||
|
||||
History : (Date, Initials, Notes)
|
||||
06/25/24 djs Created initial commuter module.
|
||||
|
||||
***********************************************************************************************************************/
|
||||
#pragma precomp SRP_PreCompiler
|
||||
#window NDW_PM_OVERRIDE
|
||||
|
||||
$Insert APP_INSERTS
|
||||
$Insert EVENT_SETUP
|
||||
$Insert REACTOR_LOG_EQUATES
|
||||
$insert MESSAGE_BOX_EQUATES
|
||||
|
||||
Declare subroutine Placedialog, Message_Box
|
||||
|
||||
// Update the arguments so that the OpenInsight OLE event will treate the ActiveX event as a native event handler.
|
||||
If Event EQ 'OLE' then
|
||||
Transfer Event to OIEvent
|
||||
Transfer Param1 to Event
|
||||
Transfer Param2 to Param1
|
||||
Transfer Param3 to Param2
|
||||
Transfer Param4 to Param3
|
||||
Transfer Param5 to Param4
|
||||
Transfer Param6 to Param5
|
||||
Transfer Param7 to Param6
|
||||
Transfer Param8 to Param7
|
||||
end
|
||||
|
||||
GoToEvent Event for CtrlEntId else
|
||||
// Event not implemented
|
||||
end
|
||||
|
||||
Return EventFlow or 1
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// EVENT HANDLERS
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
Event WINDOW.CREATE(CreateParam)
|
||||
|
||||
RlNo = CreateParam
|
||||
PmOrderTypes = Xlate('REACTOR_LOG', RLNo, REACTOR_LOG_CHECKLIST_TYPE$, 'X')
|
||||
for each PmOrderType in PmOrderTypes using @VM setting dummy
|
||||
Begin Case
|
||||
Case PmOrderType _EQC 'ASM_HTR_TUBE_CHANGE'
|
||||
Set_Property(@Window:'.CHB_ASM_HTR_TUBE_CHANGE', 'ENABLED', True$)
|
||||
Case PmOrderType _EQC 'SEMIANNUAL_PM'
|
||||
Set_Property(@Window:'.CHB_SEMIANNUAL_PM', 'ENABLED', True$)
|
||||
Case PmOrderType _EQC 'ANNUAL_PM'
|
||||
Set_Property(@Window:'.CHB_ANNUAL_PM', 'ENABLED', True$)
|
||||
Case Otherwise$
|
||||
Null
|
||||
End Case
|
||||
Next PmOrderType
|
||||
|
||||
Placedialog(-2, -2)
|
||||
|
||||
End Event
|
||||
|
||||
|
||||
Event PUB_SUBMIT.CLICK()
|
||||
|
||||
OverrideData = ''
|
||||
SelectedTypes = ''
|
||||
If Get_Property(@Window:'.CHB_ASM_HTR_TUBE_CHANGE', 'CHECK') then SelectedTypes<0, -1> = "ASM_HTR_TUBE_CHANGE"
|
||||
If Get_Property(@Window:'.CHB_SEMIANNUAL_PM', 'CHECK') then SelectedTypes<0, -1> = 'SEMIANNUAL_PM'
|
||||
If Get_Property(@Window:'.CHB_ANNUAL_PM', 'CHECK') then SelectedTypes<0, -1> = 'ANNUAL_PM'
|
||||
|
||||
If SelectedTypes EQ '' then
|
||||
Message_Box(@Window, "You must select at least one PM type!", "Error", MSG_ICON_EXCLAM$)
|
||||
return
|
||||
end else
|
||||
OverrideData<1, 1> = SelectedTypes
|
||||
end
|
||||
|
||||
OverrideData<2, 1> = Get_Property(@Window:'.EDB_COMMENT', 'TEXT')
|
||||
|
||||
If OverrideData<2, 1> EQ '' or Len(OverrideData<2, 1>) LT 4 then
|
||||
Message_Box(@Window, "Your comment must be at least 4 characters!", "Error", MSG_ICON_EXCLAM$)
|
||||
return
|
||||
end
|
||||
|
||||
End_Dialog(@Window, OverrideData)
|
||||
|
||||
end event
|
||||
|
||||
|
||||
Event PUB_CANCEL.CLICK()
|
||||
|
||||
End_Dialog(@Window, '')
|
||||
|
||||
end event
|
||||
|
||||
|
||||
Compile function NDW_PM_OVERRIDE_EVENTS(CtrlEntId, Event, @PARAMS)
|
||||
/***********************************************************************************************************************
|
||||
|
||||
This program is proprietary and is not to be used by or disclosed to others, nor is it to be copied without written
|
||||
permission from Infineon.
|
||||
|
||||
Name : NDW_PM_Override_Events
|
||||
|
||||
Description : This function acts as a commuter module for all events related to this window.
|
||||
|
||||
Notes : Commuter Modules are automatically called from the Promoted_Events function which is called by the
|
||||
application-specific promoted event handler. This makes it possible to add QuickEvents that need to
|
||||
execute Basic+ logic without having use the Form Designer to make the association, although this is
|
||||
limited to the events which are currently promoted.
|
||||
|
||||
If the form needs to call the commuter module directly then the QuickEvent parameters should be
|
||||
formatted like this:
|
||||
|
||||
'@SELF','@EVENT',['@PARAM1','@PARAMx']
|
||||
|
||||
Parameters :
|
||||
CtrlEntId [in] -- The fully qualified name of the control calling the promoted event
|
||||
Event [in] -- The event being executed. See the Notes section regarding "PRE" events
|
||||
Param1-15 [in] -- Additional event parameter holders
|
||||
EventFlow [out] -- Set to 1 or 0 so the calling event knows whether or not to chain forward. See comments in
|
||||
EVENT_SETUP insert
|
||||
|
||||
History : (Date, Initials, Notes)
|
||||
06/25/24 djs Created initial commuter module.
|
||||
|
||||
***********************************************************************************************************************/
|
||||
#pragma precomp SRP_PreCompiler
|
||||
#window NDW_PM_OVERRIDE
|
||||
|
||||
$Insert APP_INSERTS
|
||||
$Insert EVENT_SETUP
|
||||
$Insert REACTOR_LOG_EQUATES
|
||||
$insert MESSAGE_BOX_EQUATES
|
||||
|
||||
Declare subroutine Placedialog, Message_Box
|
||||
|
||||
// Update the arguments so that the OpenInsight OLE event will treate the ActiveX event as a native event handler.
|
||||
If Event EQ 'OLE' then
|
||||
Transfer Event to OIEvent
|
||||
Transfer Param1 to Event
|
||||
Transfer Param2 to Param1
|
||||
Transfer Param3 to Param2
|
||||
Transfer Param4 to Param3
|
||||
Transfer Param5 to Param4
|
||||
Transfer Param6 to Param5
|
||||
Transfer Param7 to Param6
|
||||
Transfer Param8 to Param7
|
||||
end
|
||||
|
||||
GoToEvent Event for CtrlEntId else
|
||||
// Event not implemented
|
||||
end
|
||||
|
||||
Return EventFlow or 1
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// EVENT HANDLERS
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
Event WINDOW.CREATE(CreateParam)
|
||||
|
||||
RlNo = CreateParam
|
||||
PmOrderTypes = Xlate('REACTOR_LOG', RLNo, REACTOR_LOG_CHECKLIST_TYPE$, 'X')
|
||||
for each PmOrderType in PmOrderTypes using @VM setting dummy
|
||||
Begin Case
|
||||
Case PmOrderType _EQC 'ASM_HTR_TUBE_CHANGE'
|
||||
Set_Property(@Window:'.CHB_ASM_HTR_TUBE_CHANGE', 'ENABLED', True$)
|
||||
Case PmOrderType _EQC 'SEMIANNUAL_PM'
|
||||
Set_Property(@Window:'.CHB_SEMIANNUAL_PM', 'ENABLED', True$)
|
||||
Case PmOrderType _EQC 'ANNUAL_PM'
|
||||
Set_Property(@Window:'.CHB_ANNUAL_PM', 'ENABLED', True$)
|
||||
Case Otherwise$
|
||||
Null
|
||||
End Case
|
||||
Next PmOrderType
|
||||
|
||||
Placedialog(-2, -2)
|
||||
|
||||
End Event
|
||||
|
||||
|
||||
Event PUB_SUBMIT.CLICK()
|
||||
|
||||
OverrideData = ''
|
||||
SelectedTypes = ''
|
||||
If Get_Property(@Window:'.CHB_ASM_HTR_TUBE_CHANGE', 'CHECK') then SelectedTypes<0, -1> = "ASM_HTR_TUBE_CHANGE"
|
||||
If Get_Property(@Window:'.CHB_SEMIANNUAL_PM', 'CHECK') then SelectedTypes<0, -1> = 'SEMIANNUAL_PM'
|
||||
If Get_Property(@Window:'.CHB_ANNUAL_PM', 'CHECK') then SelectedTypes<0, -1> = 'ANNUAL_PM'
|
||||
|
||||
If SelectedTypes EQ '' then
|
||||
Message_Box(@Window, "You must select at least one PM type!", "Error", MSG_ICON_EXCLAM$)
|
||||
return
|
||||
end else
|
||||
OverrideData<1, 1> = SelectedTypes
|
||||
end
|
||||
|
||||
OverrideData<2, 1> = Get_Property(@Window:'.EDB_COMMENT', 'TEXT')
|
||||
|
||||
If OverrideData<2, 1> EQ '' or Len(OverrideData<2, 1>) LT 4 then
|
||||
Message_Box(@Window, "Your comment must be at least 4 characters!", "Error", MSG_ICON_EXCLAM$)
|
||||
return
|
||||
end
|
||||
|
||||
End_Dialog(@Window, OverrideData)
|
||||
|
||||
end event
|
||||
|
||||
|
||||
Event PUB_CANCEL.CLICK()
|
||||
|
||||
End_Dialog(@Window, '')
|
||||
|
||||
end event
|
||||
|
||||
|
||||
|
@ -1,189 +1,189 @@
|
||||
Function NDW_Remove_Supplements_Events(CtrlEntId, Event, @PARAMS)
|
||||
/***********************************************************************************************************************
|
||||
|
||||
This program is proprietary and is not to be used by or disclosed to others, nor is it to be copied without written
|
||||
permission from Infineon.
|
||||
|
||||
Name : NDW_Remove_Supplements_Events
|
||||
|
||||
Description : This function acts as a commuter module for all events related to this window.
|
||||
|
||||
Notes : Commuter Modules are automatically called from the Promoted_Events function which is called by the
|
||||
application-specific promoted event handler. This makes it possible to add QuickEvents that need to
|
||||
execute Basic+ logic without having use the Form Designer to make the association, although this is
|
||||
limited to the events which are currently promoted.
|
||||
|
||||
If the form needs to call the commuter module directly then the QuickEvent parameters should be
|
||||
formatted like this:
|
||||
|
||||
'@SELF','@EVENT',['@PARAM1','@PARAMx']
|
||||
|
||||
Parameters :
|
||||
CtrlEntId [in] -- The fully qualified name of the control calling the promoted event
|
||||
Event [in] -- The event being executed. See the Notes section regarding "PRE" events
|
||||
Param1-15 [in] -- Additional event parameter holders
|
||||
EventFlow [out] -- Set to 1 or 0 so the calling event knows whether or not to chain forward. See comments in
|
||||
EVENT_SETUP insert
|
||||
|
||||
History : (Date, Initials, Notes)
|
||||
05/24/18 djs Created initial commuter module.
|
||||
|
||||
***********************************************************************************************************************/
|
||||
|
||||
#pragma precomp SRP_PreCompiler
|
||||
#Window NDW_ADD_SUPPLEMENT
|
||||
|
||||
$insert APP_INSERTS
|
||||
$insert EVENT_SETUP
|
||||
$insert MSG_EQUATES
|
||||
$Insert SUPPLEMENTS_EQUATES
|
||||
|
||||
Declare subroutine SRP_Show_Window, Supplement_Services
|
||||
Declare function SRP_Array, Supplement_Services
|
||||
|
||||
SubclassInfo = Form_Services('FindSubclassControl')
|
||||
Subclass = SubclassInfo<1>
|
||||
|
||||
// Update the arguments so that the OpenInsight OLE event will treate the ActiveX event as a native event handler.
|
||||
If Event EQ 'OLE' then
|
||||
Transfer Event to OIEvent
|
||||
Transfer Param1 to Event
|
||||
Transfer Param2 to Param1
|
||||
Transfer Param3 to Param2
|
||||
* Transfer Param4 to Param3
|
||||
* Transfer Param5 to Param4
|
||||
* Transfer Param6 to Param5
|
||||
* Transfer Param7 to Param6
|
||||
* Transfer Param8 to Param7
|
||||
end
|
||||
|
||||
GoToEvent Event for CtrlEntID
|
||||
|
||||
Return EventFlow else EVENT_CONTINUE$
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Events
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
Event WINDOW.CREATE(CreateParam)
|
||||
|
||||
Result = ''
|
||||
SupplInst = ''
|
||||
GoSub Setup_OLE_Controls
|
||||
If CreateParam NE '' then
|
||||
Gosub PopulateStages
|
||||
Set_Property(@Window : '.CMB_STAGE', 'LIST', StageList)
|
||||
Set_Property(@Window : '.CMB_STAGE', 'SELPOS', 1)
|
||||
Set_Property(@Window : '.PUB_OK', 'ENABLED', True$)
|
||||
end
|
||||
|
||||
Gosub CheckForSupplements
|
||||
SRP_Show_Window(@Window, '', 'C', 'C', 1, '', False$, False$, FormSize)
|
||||
|
||||
end event
|
||||
|
||||
|
||||
Event WINDOW.CLOSE(CancelFlag)
|
||||
|
||||
Result = ''
|
||||
Result<1> = False$
|
||||
End_Dialog(@Window, Result)
|
||||
|
||||
end event
|
||||
|
||||
Event CMB_STAGE.CHANGED(CreateParam)
|
||||
|
||||
Gosub CheckForSupplements
|
||||
|
||||
end event
|
||||
|
||||
|
||||
|
||||
Event PUB_OK.CLICK()
|
||||
|
||||
Removal = ''
|
||||
StageSel = Get_Property(@Window : '.CMB_STAGE', 'TEXT')
|
||||
StageSel = Field(StageSel, '-', 2)
|
||||
For Each RDSKey in @ReCur1 Using @VM
|
||||
Removal = Supplement_Services('DeleteSupplementByLotStage', @USER4, 'RDS', RDSKey, StageSel)
|
||||
Next RDSKey
|
||||
|
||||
If Error_Services('NoError') then
|
||||
Result = True$
|
||||
End else
|
||||
|
||||
End
|
||||
End_Dialog(@Window, Result)
|
||||
|
||||
end event
|
||||
|
||||
|
||||
Event PUB_CANCEL.CLICK()
|
||||
|
||||
Result = ''
|
||||
Result<1> = False$
|
||||
End_Dialog(@Window, Result)
|
||||
|
||||
end event
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Internal GoSubs
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
Setup_OLE_Controls:
|
||||
|
||||
Qualify = ''
|
||||
Qualify<1> = 1
|
||||
Qualify<4> = 0
|
||||
|
||||
return
|
||||
|
||||
PopulateStages:
|
||||
|
||||
DraftStageList = ''
|
||||
PlainTextStages = ''
|
||||
RDSList = SRP_Array("Rotate", CreateParam)
|
||||
@ReCur1 = RDSList<5>
|
||||
|
||||
For Each RDSKey in @ReCur1 Using @VM
|
||||
RDSStageList = Supplement_Services('GetStagesForLot', 'RDS', RDSKey)
|
||||
RDSStageList2 = RDSStageList<2> :@FM: RDSStageList<1>
|
||||
RDSStageList3 = SRP_Array("Rotate", RDSStageList2)
|
||||
DraftStageList := RDSStageList3 :@FM
|
||||
Next RDSKey
|
||||
Swap @VM with ' -' in DraftStageList
|
||||
StageList = SRP_Array('Clean', DraftStageList, "TrimAndMakeUnique", @FM)
|
||||
return
|
||||
|
||||
|
||||
|
||||
CheckForSupplements:
|
||||
|
||||
SuppFound = ''
|
||||
StageSel = Get_Property(@Window : '.CMB_STAGE', 'TEXT')
|
||||
Stage = Field(StageSel, '-', 2)
|
||||
For Each RDSKey in @ReCur1 Using @VM
|
||||
SuppFound = Supplement_Services('GetSupplementsForLot', 'RDS', RDSKey, Stage)
|
||||
Until SuppFound NE False$
|
||||
Next RDSKey
|
||||
If SuppFound NE False$ then
|
||||
SuppText = Xlate('SUPPLEMENTS', SuppFound, SUPPLEMENTS_SUPPL_TEXT$, 'X', '')
|
||||
If SuppText NE '' then
|
||||
Set_Property(@Window : '.EDL_SUPPL_INST', 'TEXT', SuppText)
|
||||
Set_Property(@Window : '.PUB_OK', 'ENABLED', True$)
|
||||
end else
|
||||
Set_Property(@Window : '.EDL_SUPPL_INST', 'TEXT', '')
|
||||
Set_Property(@Window : '.PUB_OK', 'ENABLED', False$)
|
||||
end
|
||||
end else
|
||||
Set_Property(@Window : '.EDL_SUPPL_INST', 'TEXT', '')
|
||||
Set_Property(@Window : '.PUB_OK', 'ENABLED', False$)
|
||||
end
|
||||
|
||||
return
|
||||
|
||||
|
||||
|
||||
|
||||
Function NDW_Remove_Supplements_Events(CtrlEntId, Event, @PARAMS)
|
||||
/***********************************************************************************************************************
|
||||
|
||||
This program is proprietary and is not to be used by or disclosed to others, nor is it to be copied without written
|
||||
permission from Infineon.
|
||||
|
||||
Name : NDW_Remove_Supplements_Events
|
||||
|
||||
Description : This function acts as a commuter module for all events related to this window.
|
||||
|
||||
Notes : Commuter Modules are automatically called from the Promoted_Events function which is called by the
|
||||
application-specific promoted event handler. This makes it possible to add QuickEvents that need to
|
||||
execute Basic+ logic without having use the Form Designer to make the association, although this is
|
||||
limited to the events which are currently promoted.
|
||||
|
||||
If the form needs to call the commuter module directly then the QuickEvent parameters should be
|
||||
formatted like this:
|
||||
|
||||
'@SELF','@EVENT',['@PARAM1','@PARAMx']
|
||||
|
||||
Parameters :
|
||||
CtrlEntId [in] -- The fully qualified name of the control calling the promoted event
|
||||
Event [in] -- The event being executed. See the Notes section regarding "PRE" events
|
||||
Param1-15 [in] -- Additional event parameter holders
|
||||
EventFlow [out] -- Set to 1 or 0 so the calling event knows whether or not to chain forward. See comments in
|
||||
EVENT_SETUP insert
|
||||
|
||||
History : (Date, Initials, Notes)
|
||||
05/24/18 djs Created initial commuter module.
|
||||
|
||||
***********************************************************************************************************************/
|
||||
|
||||
#pragma precomp SRP_PreCompiler
|
||||
#Window NDW_ADD_SUPPLEMENT
|
||||
|
||||
$insert APP_INSERTS
|
||||
$insert EVENT_SETUP
|
||||
$insert MSG_EQUATES
|
||||
$Insert SUPPLEMENTS_EQUATES
|
||||
|
||||
Declare subroutine SRP_Show_Window, Supplement_Services
|
||||
Declare function SRP_Array, Supplement_Services
|
||||
|
||||
SubclassInfo = Form_Services('FindSubclassControl')
|
||||
Subclass = SubclassInfo<1>
|
||||
|
||||
// Update the arguments so that the OpenInsight OLE event will treate the ActiveX event as a native event handler.
|
||||
If Event EQ 'OLE' then
|
||||
Transfer Event to OIEvent
|
||||
Transfer Param1 to Event
|
||||
Transfer Param2 to Param1
|
||||
Transfer Param3 to Param2
|
||||
* Transfer Param4 to Param3
|
||||
* Transfer Param5 to Param4
|
||||
* Transfer Param6 to Param5
|
||||
* Transfer Param7 to Param6
|
||||
* Transfer Param8 to Param7
|
||||
end
|
||||
|
||||
GoToEvent Event for CtrlEntID
|
||||
|
||||
Return EventFlow else EVENT_CONTINUE$
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Events
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
Event WINDOW.CREATE(CreateParam)
|
||||
|
||||
Result = ''
|
||||
SupplInst = ''
|
||||
GoSub Setup_OLE_Controls
|
||||
If CreateParam NE '' then
|
||||
Gosub PopulateStages
|
||||
Set_Property(@Window : '.CMB_STAGE', 'LIST', StageList)
|
||||
Set_Property(@Window : '.CMB_STAGE', 'SELPOS', 1)
|
||||
Set_Property(@Window : '.PUB_OK', 'ENABLED', True$)
|
||||
end
|
||||
|
||||
Gosub CheckForSupplements
|
||||
SRP_Show_Window(@Window, '', 'C', 'C', 1, '', False$, False$, FormSize)
|
||||
|
||||
end event
|
||||
|
||||
|
||||
Event WINDOW.CLOSE(CancelFlag)
|
||||
|
||||
Result = ''
|
||||
Result<1> = False$
|
||||
End_Dialog(@Window, Result)
|
||||
|
||||
end event
|
||||
|
||||
Event CMB_STAGE.CHANGED(CreateParam)
|
||||
|
||||
Gosub CheckForSupplements
|
||||
|
||||
end event
|
||||
|
||||
|
||||
|
||||
Event PUB_OK.CLICK()
|
||||
|
||||
Removal = ''
|
||||
StageSel = Get_Property(@Window : '.CMB_STAGE', 'TEXT')
|
||||
StageSel = Field(StageSel, '-', 2)
|
||||
For Each RDSKey in @ReCur1 Using @VM
|
||||
Removal = Supplement_Services('DeleteSupplementByLotStage', @USER4, 'RDS', RDSKey, StageSel)
|
||||
Next RDSKey
|
||||
|
||||
If Error_Services('NoError') then
|
||||
Result = True$
|
||||
End else
|
||||
|
||||
End
|
||||
End_Dialog(@Window, Result)
|
||||
|
||||
end event
|
||||
|
||||
|
||||
Event PUB_CANCEL.CLICK()
|
||||
|
||||
Result = ''
|
||||
Result<1> = False$
|
||||
End_Dialog(@Window, Result)
|
||||
|
||||
end event
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Internal GoSubs
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
Setup_OLE_Controls:
|
||||
|
||||
Qualify = ''
|
||||
Qualify<1> = 1
|
||||
Qualify<4> = 0
|
||||
|
||||
return
|
||||
|
||||
PopulateStages:
|
||||
|
||||
DraftStageList = ''
|
||||
PlainTextStages = ''
|
||||
RDSList = SRP_Array("Rotate", CreateParam)
|
||||
@ReCur1 = RDSList<5>
|
||||
|
||||
For Each RDSKey in @ReCur1 Using @VM
|
||||
RDSStageList = Supplement_Services('GetStagesForLot', 'RDS', RDSKey)
|
||||
RDSStageList2 = RDSStageList<2> :@FM: RDSStageList<1>
|
||||
RDSStageList3 = SRP_Array("Rotate", RDSStageList2)
|
||||
DraftStageList := RDSStageList3 :@FM
|
||||
Next RDSKey
|
||||
Swap @VM with ' -' in DraftStageList
|
||||
StageList = SRP_Array('Clean', DraftStageList, "TrimAndMakeUnique", @FM)
|
||||
return
|
||||
|
||||
|
||||
|
||||
CheckForSupplements:
|
||||
|
||||
SuppFound = ''
|
||||
StageSel = Get_Property(@Window : '.CMB_STAGE', 'TEXT')
|
||||
Stage = Field(StageSel, '-', 2)
|
||||
For Each RDSKey in @ReCur1 Using @VM
|
||||
SuppFound = Supplement_Services('GetSupplementsForLot', 'RDS', RDSKey, Stage)
|
||||
Until SuppFound NE False$
|
||||
Next RDSKey
|
||||
If SuppFound NE False$ then
|
||||
SuppText = Xlate('SUPPLEMENTS', SuppFound, SUPPLEMENTS_SUPPL_TEXT$, 'X', '')
|
||||
If SuppText NE '' then
|
||||
Set_Property(@Window : '.EDL_SUPPL_INST', 'TEXT', SuppText)
|
||||
Set_Property(@Window : '.PUB_OK', 'ENABLED', True$)
|
||||
end else
|
||||
Set_Property(@Window : '.EDL_SUPPL_INST', 'TEXT', '')
|
||||
Set_Property(@Window : '.PUB_OK', 'ENABLED', False$)
|
||||
end
|
||||
end else
|
||||
Set_Property(@Window : '.EDL_SUPPL_INST', 'TEXT', '')
|
||||
Set_Property(@Window : '.PUB_OK', 'ENABLED', False$)
|
||||
end
|
||||
|
||||
return
|
||||
|
||||
|
||||
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -429,21 +429,23 @@ SAPCreate:
|
||||
SendReason = 'Initial Tx (Auto)'
|
||||
SendDtm = ICONV(OCONV(Date(),'D4/'):' ':OCONV(Time(),'MTS'),'DT')
|
||||
SendUser = @User4
|
||||
TaskID = RTI_Task_Submit('', 'PRINT_SHIPMENT_DEV', ShipNo, ShipRec, 1, True$)
|
||||
* TaskID = RTI_Task_Submit('', 'PRINT_SHIPMENT_DEV', ShipNo, ShipRec, 1, True$)
|
||||
|
||||
Logging_Services('AppendLog', objLog, LoggingDTM : @FM : WONo : @FM: ShipNo : @FM : ' Called PRINT_SHIPMENT_DEV Task. TaskID : ' : TaskID, @RM, @FM, '')
|
||||
If TaskID NE 0 then
|
||||
Done = False$
|
||||
TaskResponse = ''
|
||||
Loop
|
||||
Status = RTI_Task_Status(TaskID, TaskResponse)
|
||||
If (Status EQ 'COMPLETED') OR (Status EQ 'ERROR') then Done = True$
|
||||
Until Done
|
||||
Repeat
|
||||
end else
|
||||
// Track if task id wasn't created at all.
|
||||
end
|
||||
Logging_Services('AppendLog', objLog, LoggingDTM : @FM : WONo : @FM: ShipNo : @FM : ' Finished PRINT_SHIPMENT_DEV Task. Status : ' : Status, @RM, @FM, '')
|
||||
Print_Shipment_Dev(ShipNo, ShipRec, True$, True$)
|
||||
|
||||
* Logging_Services('AppendLog', objLog, LoggingDTM : @FM : WONo : @FM: ShipNo : @FM : ' Called PRINT_SHIPMENT_DEV Task. TaskID : ' : TaskID, @RM, @FM, '')
|
||||
* If TaskID NE 0 then
|
||||
* Done = False$
|
||||
* TaskResponse = ''
|
||||
* Loop
|
||||
* Status = RTI_Task_Status(TaskID, TaskResponse)
|
||||
* If (Status EQ 'COMPLETED') OR (Status EQ 'ERROR') then Done = True$
|
||||
* Until Done
|
||||
* Repeat
|
||||
* end else
|
||||
* // Track if task id wasn't created at all.
|
||||
* end
|
||||
* Logging_Services('AppendLog', objLog, LoggingDTM : @FM : WONo : @FM: ShipNo : @FM : ' Finished PRINT_SHIPMENT_DEV Task. Status : ' : Status, @RM, @FM, '')
|
||||
StatusError = Get_Status(errCode)
|
||||
Logging_Services('AppendLog', objLog, LoggingDTM : @FM : WONo : @FM: ShipNo : @FM : ' GetStatus PRINT_SHIPMENT_DEV Task. ErrCode : ' : ErrCode, @RM, @FM, '')
|
||||
If (Index(errCode, 'SHELLEXECUTE', 1)) NE 0 then StatusError = 0
|
||||
|
@ -1,79 +1,79 @@
|
||||
Function Pm_API(@API)
|
||||
/***********************************************************************************************************************
|
||||
|
||||
This program is proprietary and is not to be used by or disclosed to others, nor is it to be copied without written
|
||||
permission from SRP Computer Solutions, Inc.
|
||||
|
||||
Name : Pm_API
|
||||
|
||||
Description : API logic for the Pm resource.
|
||||
|
||||
Notes : All web APIs should include the API_SETUP insert. This will provide several useful variables:
|
||||
|
||||
HTTPMethod - The HTTP Method (Verb) submitted by the client (e.g., GET, POST, etc.)
|
||||
APIURL - The URL for the API entry point (e.g., api.mysite.com/v1).
|
||||
FullEndpointURL - The URL submitted by the client, including query params.
|
||||
FullEndpointURLNoQuery - The URL submitted by the client, excluding query params.
|
||||
EndpointSegment - The URL endpoint segment.
|
||||
ParentURL - The URL path preceeding the current endpoint.
|
||||
CurrentAPI - The name of this stored procedure.
|
||||
|
||||
Parameters :
|
||||
API [in] -- Web API to process. Format is [APIPattern].[HTTPMethod]:
|
||||
- APIPattern must follow this structure Pm[.ID.[<Property>]]
|
||||
- HTTPMethod can be any valid HTTP method, e.g., GET, POST, PUT, DELETE, etc.
|
||||
Examples:
|
||||
- Pm.POST
|
||||
- Pm.ID.PUT
|
||||
- Pm.ID.firstName.GET
|
||||
Response [out] -- Response to be sent back to the Controller (HTTP_MCP) or requesting procedure. Web API
|
||||
services do not rely upon anything being returned in the response. This is what the
|
||||
various services like SetResponseBody and SetResponseStatus services are for. A response
|
||||
value is only helpful if the developers want to use it for debug purposes.
|
||||
|
||||
History : (Date, Initials, Notes)
|
||||
06/05/24 xxx Original programmer.
|
||||
|
||||
***********************************************************************************************************************/
|
||||
|
||||
#pragma precomp SRP_PreCompiler
|
||||
|
||||
$insert APP_INSERTS
|
||||
$insert API_SETUP
|
||||
$insert HTTP_INSERTS
|
||||
|
||||
GoToAPI else
|
||||
// The specific resource endpoint doesn't have a API handler yet.
|
||||
HTTP_Services('SetResponseStatus', 204, 'This is a valid endpoint but a web API handler has not yet been created.')
|
||||
end
|
||||
|
||||
Return Response OR ''
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Endpoint Handlers
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
API pm.HEAD
|
||||
API pm.GET
|
||||
|
||||
HTTP_Resource_Services('LoremIpsum')
|
||||
|
||||
end api
|
||||
|
||||
|
||||
API pm.ID.HEAD
|
||||
API pm.ID.GET
|
||||
|
||||
HTTP_Resource_Services('LoremIpsum')
|
||||
|
||||
end api
|
||||
|
||||
|
||||
API pm.ID.POST
|
||||
|
||||
HTTP_Resource_Services('LoremIpsum')
|
||||
|
||||
end api
|
||||
|
||||
Function Pm_API(@API)
|
||||
/***********************************************************************************************************************
|
||||
|
||||
This program is proprietary and is not to be used by or disclosed to others, nor is it to be copied without written
|
||||
permission from SRP Computer Solutions, Inc.
|
||||
|
||||
Name : Pm_API
|
||||
|
||||
Description : API logic for the Pm resource.
|
||||
|
||||
Notes : All web APIs should include the API_SETUP insert. This will provide several useful variables:
|
||||
|
||||
HTTPMethod - The HTTP Method (Verb) submitted by the client (e.g., GET, POST, etc.)
|
||||
APIURL - The URL for the API entry point (e.g., api.mysite.com/v1).
|
||||
FullEndpointURL - The URL submitted by the client, including query params.
|
||||
FullEndpointURLNoQuery - The URL submitted by the client, excluding query params.
|
||||
EndpointSegment - The URL endpoint segment.
|
||||
ParentURL - The URL path preceeding the current endpoint.
|
||||
CurrentAPI - The name of this stored procedure.
|
||||
|
||||
Parameters :
|
||||
API [in] -- Web API to process. Format is [APIPattern].[HTTPMethod]:
|
||||
- APIPattern must follow this structure Pm[.ID.[<Property>]]
|
||||
- HTTPMethod can be any valid HTTP method, e.g., GET, POST, PUT, DELETE, etc.
|
||||
Examples:
|
||||
- Pm.POST
|
||||
- Pm.ID.PUT
|
||||
- Pm.ID.firstName.GET
|
||||
Response [out] -- Response to be sent back to the Controller (HTTP_MCP) or requesting procedure. Web API
|
||||
services do not rely upon anything being returned in the response. This is what the
|
||||
various services like SetResponseBody and SetResponseStatus services are for. A response
|
||||
value is only helpful if the developers want to use it for debug purposes.
|
||||
|
||||
History : (Date, Initials, Notes)
|
||||
06/05/24 xxx Original programmer.
|
||||
|
||||
***********************************************************************************************************************/
|
||||
|
||||
#pragma precomp SRP_PreCompiler
|
||||
|
||||
$insert APP_INSERTS
|
||||
$insert API_SETUP
|
||||
$insert HTTP_INSERTS
|
||||
|
||||
GoToAPI else
|
||||
// The specific resource endpoint doesn't have a API handler yet.
|
||||
HTTP_Services('SetResponseStatus', 204, 'This is a valid endpoint but a web API handler has not yet been created.')
|
||||
end
|
||||
|
||||
Return Response OR ''
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Endpoint Handlers
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
API pm.HEAD
|
||||
API pm.GET
|
||||
|
||||
HTTP_Resource_Services('LoremIpsum')
|
||||
|
||||
end api
|
||||
|
||||
|
||||
API pm.ID.HEAD
|
||||
API pm.ID.GET
|
||||
|
||||
HTTP_Resource_Services('LoremIpsum')
|
||||
|
||||
end api
|
||||
|
||||
|
||||
API pm.ID.POST
|
||||
|
||||
HTTP_Resource_Services('LoremIpsum')
|
||||
|
||||
end api
|
||||
|
||||
|
@ -1,64 +1,64 @@
|
||||
Function Pm_spec_API(@API)
|
||||
/***********************************************************************************************************************
|
||||
|
||||
This program is proprietary and is not to be used by or disclosed to others, nor is it to be copied without written
|
||||
permission from SRP Computer Solutions, Inc.
|
||||
|
||||
Name : Pm_spec_API
|
||||
|
||||
Description : API logic for the Pm_spec resource.
|
||||
|
||||
Notes : All web APIs should include the API_SETUP insert. This will provide several useful variables:
|
||||
|
||||
HTTPMethod - The HTTP Method (Verb) submitted by the client (e.g., GET, POST, etc.)
|
||||
APIURL - The URL for the API entry point (e.g., api.mysite.com/v1).
|
||||
FullEndpointURL - The URL submitted by the client, including query params.
|
||||
FullEndpointURLNoQuery - The URL submitted by the client, excluding query params.
|
||||
EndpointSegment - The URL endpoint segment.
|
||||
ParentURL - The URL path preceeding the current endpoint.
|
||||
CurrentAPI - The name of this stored procedure.
|
||||
|
||||
Parameters :
|
||||
API [in] -- Web API to process. Format is [APIPattern].[HTTPMethod]:
|
||||
- APIPattern must follow this structure Pm_spec[.ID.[<Property>]]
|
||||
- HTTPMethod can be any valid HTTP method, e.g., GET, POST, PUT, DELETE, etc.
|
||||
Examples:
|
||||
- Pm_spec.POST
|
||||
- Pm_spec.ID.PUT
|
||||
- Pm_spec.ID.firstName.GET
|
||||
Response [out] -- Response to be sent back to the Controller (HTTP_MCP) or requesting procedure. Web API
|
||||
services do not rely upon anything being returned in the response. This is what the
|
||||
various services like SetResponseBody and SetResponseStatus services are for. A response
|
||||
value is only helpful if the developers want to use it for debug purposes.
|
||||
|
||||
History : (Date, Initials, Notes)
|
||||
06/05/24 xxx Original programmer.
|
||||
|
||||
***********************************************************************************************************************/
|
||||
|
||||
#pragma precomp SRP_PreCompiler
|
||||
|
||||
$insert APP_INSERTS
|
||||
$insert API_SETUP
|
||||
$insert HTTP_INSERTS
|
||||
|
||||
GoToAPI else
|
||||
// The specific resource endpoint doesn't have a API handler yet.
|
||||
HTTP_Services('SetResponseStatus', 204, 'This is a valid endpoint but a web API handler has not yet been created.')
|
||||
end
|
||||
|
||||
Return Response OR ''
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Endpoint Handlers
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
API pm_spec.HEAD
|
||||
API pm_spec.GET
|
||||
|
||||
HTTP_Resource_Services('LoremIpsum')
|
||||
|
||||
end api
|
||||
|
||||
Function Pm_spec_API(@API)
|
||||
/***********************************************************************************************************************
|
||||
|
||||
This program is proprietary and is not to be used by or disclosed to others, nor is it to be copied without written
|
||||
permission from SRP Computer Solutions, Inc.
|
||||
|
||||
Name : Pm_spec_API
|
||||
|
||||
Description : API logic for the Pm_spec resource.
|
||||
|
||||
Notes : All web APIs should include the API_SETUP insert. This will provide several useful variables:
|
||||
|
||||
HTTPMethod - The HTTP Method (Verb) submitted by the client (e.g., GET, POST, etc.)
|
||||
APIURL - The URL for the API entry point (e.g., api.mysite.com/v1).
|
||||
FullEndpointURL - The URL submitted by the client, including query params.
|
||||
FullEndpointURLNoQuery - The URL submitted by the client, excluding query params.
|
||||
EndpointSegment - The URL endpoint segment.
|
||||
ParentURL - The URL path preceeding the current endpoint.
|
||||
CurrentAPI - The name of this stored procedure.
|
||||
|
||||
Parameters :
|
||||
API [in] -- Web API to process. Format is [APIPattern].[HTTPMethod]:
|
||||
- APIPattern must follow this structure Pm_spec[.ID.[<Property>]]
|
||||
- HTTPMethod can be any valid HTTP method, e.g., GET, POST, PUT, DELETE, etc.
|
||||
Examples:
|
||||
- Pm_spec.POST
|
||||
- Pm_spec.ID.PUT
|
||||
- Pm_spec.ID.firstName.GET
|
||||
Response [out] -- Response to be sent back to the Controller (HTTP_MCP) or requesting procedure. Web API
|
||||
services do not rely upon anything being returned in the response. This is what the
|
||||
various services like SetResponseBody and SetResponseStatus services are for. A response
|
||||
value is only helpful if the developers want to use it for debug purposes.
|
||||
|
||||
History : (Date, Initials, Notes)
|
||||
06/05/24 xxx Original programmer.
|
||||
|
||||
***********************************************************************************************************************/
|
||||
|
||||
#pragma precomp SRP_PreCompiler
|
||||
|
||||
$insert APP_INSERTS
|
||||
$insert API_SETUP
|
||||
$insert HTTP_INSERTS
|
||||
|
||||
GoToAPI else
|
||||
// The specific resource endpoint doesn't have a API handler yet.
|
||||
HTTP_Services('SetResponseStatus', 204, 'This is a valid endpoint but a web API handler has not yet been created.')
|
||||
end
|
||||
|
||||
Return Response OR ''
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Endpoint Handlers
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
API pm_spec.HEAD
|
||||
API pm_spec.GET
|
||||
|
||||
HTTP_Resource_Services('LoremIpsum')
|
||||
|
||||
end api
|
||||
|
||||
|
@ -1,154 +1,154 @@
|
||||
Compile function PM_Spec_Services(@Service, @Params)
|
||||
/***********************************************************************************************************************
|
||||
|
||||
Name : PM_Spec_Services
|
||||
|
||||
Description : Handler program for all PM_SPEC services.
|
||||
|
||||
Notes : Application errors should be logged using the Error Services module. There are a few methodological
|
||||
assumptions built into way errors are managed which are important to understand in order to properly
|
||||
work with Error Services:
|
||||
|
||||
- The term 'top' refers to the originating procedure of a call stack and the term 'bottom' refers to
|
||||
the last routine (or the current routine) within a call stack. Within the OpenInsight Debugger
|
||||
this will appear backwards since the originating procedure always appears at the bottom of the
|
||||
list and the current routine appears at the top of the list. We are using this orientation because
|
||||
it is common to refer to the process of calling other procedures as 'drilling down'.
|
||||
|
||||
- The reason for defining the orientation of the call stack is because Error_Services allows for
|
||||
multiple error conditions to be appended to an original error. In most cases this will happen when
|
||||
a procedure at the bottom of the stack generates an error condition and then returns to its
|
||||
calling procedure. This higher level procedure can optionally add more information relevant to
|
||||
itself. This continues as the call stack 'bubbles' its way back to the top to where the
|
||||
originating procedure is waiting.
|
||||
|
||||
- Native OpenInsight commands that handle errors (e.g., Set_Status, Set_FSError, Set_EventStatus)
|
||||
preserve their error state until explicitly cleared. This can hinder the normal execution of code
|
||||
since subsequent procedures (usually SSPs) will fail if a pre-existing error condition exists.
|
||||
Our philosophy is that error conditions should automatically be cleared before a new procedure
|
||||
is executed to avoid this problem. However, the nature of Basic+ does not make this easy to
|
||||
automate for any given stored procedure. Therefore, if a stored procedure wants to conform to our
|
||||
philosophy then it should include a call into the 'Clear' service request at the top of the
|
||||
program. Alternatively this can be done through a common insert (see SERVICE_SETUP for example.)
|
||||
|
||||
- Service modules will use the SERVICE_SETUP insert and therefore automatically clear out any
|
||||
error conditions that were set before.
|
||||
|
||||
Parameters :
|
||||
Service [in] -- Name of the service being requested
|
||||
Param1-10 [in/out] -- Additional request parameter holders
|
||||
Response [out] -- Response to be sent back to the Controller (MCP) or requesting procedure
|
||||
|
||||
Metadata :
|
||||
|
||||
History : (Date, Initials, Notes)
|
||||
03/29/24 djs Original programmer.
|
||||
|
||||
***********************************************************************************************************************/
|
||||
#pragma precomp SRP_PreCompiler
|
||||
|
||||
$Insert APP_INSERTS
|
||||
$Insert SERVICE_SETUP
|
||||
$Insert PM_EQUATES
|
||||
$Insert PM_SPEC_EQUATES
|
||||
$Insert TOOL_EQUATES
|
||||
|
||||
// Reduce Modes
|
||||
Equ NEW_EXIST$ To 0
|
||||
Equ NEXT_CUR$ To 1
|
||||
Equ ADD_EXIST$ To 2
|
||||
|
||||
Declare subroutine Error_Services, Reduce, Push.Select, Pop.Select
|
||||
|
||||
GoToService
|
||||
|
||||
Return Response or ""
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Service Parameter Options
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
Options BOOLEAN = True$, False$
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// SERVICES
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
Service UpdatePMCompDtm(PMSpecID)
|
||||
|
||||
F1 = ''
|
||||
F2 = ''
|
||||
F3 = ''
|
||||
F4 = ''
|
||||
Push.Select(F1, F2, F3, F4)
|
||||
ErrorMsg = ''
|
||||
If (PMSpecID NE '') then
|
||||
If RowExists('PM_SPEC', PMSpecID) then
|
||||
TableName = "PM"
|
||||
Flag = ""
|
||||
Done = False$
|
||||
CursorVar = ""
|
||||
GoSub ClearCursors
|
||||
SortList = "#COMP_DTM"
|
||||
ReduceScript = "WITH {PMS_ID} EQ ":PMSpecID
|
||||
Mode = NEXT_CUR$
|
||||
Reduce(ReduceScript, SortList, Mode, TableName, CursorVar, Flag)
|
||||
If Flag then
|
||||
Select TableName By SortList Using CursorVar then
|
||||
Open TableName To FileVar then
|
||||
Loop
|
||||
ReadNext Key Using CursorVar By AT else Done = TRUE$
|
||||
Until Done
|
||||
Read Rec From FileVar, Key then
|
||||
NewStopDtm = Rec<PM_COMP_DTM$>
|
||||
Done = True$
|
||||
Open 'PM_SPEC' to hPMSpec then
|
||||
WriteV NewStopDtm on hPMSpec, PMSpecID, PM_SPEC_LAST_PM_COMP_DTM$ else
|
||||
ErrorMsg = 'Error in ':Service:' service. Error writing LAST_PM_COMP_DTM on PM_SPEC record ':PMSpecID:'.'
|
||||
end
|
||||
end else
|
||||
ErrorMsg = 'Error in ':Service:' service. Error opening PM_SPEC table.'
|
||||
end
|
||||
end else
|
||||
ErrorMsg = 'Error in ':Service:' service. Error reading PM record ':Key:'.'
|
||||
end
|
||||
Repeat
|
||||
end else
|
||||
ErrorMsg = 'Error in ':Service:' service. Error opening PM table.'
|
||||
end
|
||||
end else
|
||||
ErrorMsg = 'Error in ':Service:' service. Error calling Select on PM table.'
|
||||
end
|
||||
end else
|
||||
ErrorMsg = 'Error in ':Service:' service. Error calling Reduce on PM table.'
|
||||
end
|
||||
end else
|
||||
ErrorMsg = 'Error in ':Service:' service. PM_SPEC record ':PMSpecID:' does not exist!'
|
||||
end
|
||||
end else
|
||||
ErrorMsg = 'Error in ':Service:' service. Null PMSpecID passed into service!'
|
||||
end
|
||||
|
||||
Pop.Select(F1, F2, F3, F4)
|
||||
If ErrorMsg NE '' then
|
||||
Error_Services('Add', ErrorMsg)
|
||||
Response = False$
|
||||
end else
|
||||
Repsponse = True$
|
||||
end
|
||||
|
||||
end service
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Internal GoSubs
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
ClearCursors:
|
||||
|
||||
For counter = 0 To 8
|
||||
ClearSelect counter
|
||||
Next counter
|
||||
|
||||
return
|
||||
|
||||
|
||||
Compile function PM_Spec_Services(@Service, @Params)
|
||||
/***********************************************************************************************************************
|
||||
|
||||
Name : PM_Spec_Services
|
||||
|
||||
Description : Handler program for all PM_SPEC services.
|
||||
|
||||
Notes : Application errors should be logged using the Error Services module. There are a few methodological
|
||||
assumptions built into way errors are managed which are important to understand in order to properly
|
||||
work with Error Services:
|
||||
|
||||
- The term 'top' refers to the originating procedure of a call stack and the term 'bottom' refers to
|
||||
the last routine (or the current routine) within a call stack. Within the OpenInsight Debugger
|
||||
this will appear backwards since the originating procedure always appears at the bottom of the
|
||||
list and the current routine appears at the top of the list. We are using this orientation because
|
||||
it is common to refer to the process of calling other procedures as 'drilling down'.
|
||||
|
||||
- The reason for defining the orientation of the call stack is because Error_Services allows for
|
||||
multiple error conditions to be appended to an original error. In most cases this will happen when
|
||||
a procedure at the bottom of the stack generates an error condition and then returns to its
|
||||
calling procedure. This higher level procedure can optionally add more information relevant to
|
||||
itself. This continues as the call stack 'bubbles' its way back to the top to where the
|
||||
originating procedure is waiting.
|
||||
|
||||
- Native OpenInsight commands that handle errors (e.g., Set_Status, Set_FSError, Set_EventStatus)
|
||||
preserve their error state until explicitly cleared. This can hinder the normal execution of code
|
||||
since subsequent procedures (usually SSPs) will fail if a pre-existing error condition exists.
|
||||
Our philosophy is that error conditions should automatically be cleared before a new procedure
|
||||
is executed to avoid this problem. However, the nature of Basic+ does not make this easy to
|
||||
automate for any given stored procedure. Therefore, if a stored procedure wants to conform to our
|
||||
philosophy then it should include a call into the 'Clear' service request at the top of the
|
||||
program. Alternatively this can be done through a common insert (see SERVICE_SETUP for example.)
|
||||
|
||||
- Service modules will use the SERVICE_SETUP insert and therefore automatically clear out any
|
||||
error conditions that were set before.
|
||||
|
||||
Parameters :
|
||||
Service [in] -- Name of the service being requested
|
||||
Param1-10 [in/out] -- Additional request parameter holders
|
||||
Response [out] -- Response to be sent back to the Controller (MCP) or requesting procedure
|
||||
|
||||
Metadata :
|
||||
|
||||
History : (Date, Initials, Notes)
|
||||
03/29/24 djs Original programmer.
|
||||
|
||||
***********************************************************************************************************************/
|
||||
#pragma precomp SRP_PreCompiler
|
||||
|
||||
$Insert APP_INSERTS
|
||||
$Insert SERVICE_SETUP
|
||||
$Insert PM_EQUATES
|
||||
$Insert PM_SPEC_EQUATES
|
||||
$Insert TOOL_EQUATES
|
||||
|
||||
// Reduce Modes
|
||||
Equ NEW_EXIST$ To 0
|
||||
Equ NEXT_CUR$ To 1
|
||||
Equ ADD_EXIST$ To 2
|
||||
|
||||
Declare subroutine Error_Services, Reduce, Push.Select, Pop.Select
|
||||
|
||||
GoToService
|
||||
|
||||
Return Response or ""
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Service Parameter Options
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
Options BOOLEAN = True$, False$
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// SERVICES
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
Service UpdatePMCompDtm(PMSpecID)
|
||||
|
||||
F1 = ''
|
||||
F2 = ''
|
||||
F3 = ''
|
||||
F4 = ''
|
||||
Push.Select(F1, F2, F3, F4)
|
||||
ErrorMsg = ''
|
||||
If (PMSpecID NE '') then
|
||||
If RowExists('PM_SPEC', PMSpecID) then
|
||||
TableName = "PM"
|
||||
Flag = ""
|
||||
Done = False$
|
||||
CursorVar = ""
|
||||
GoSub ClearCursors
|
||||
SortList = "#COMP_DTM"
|
||||
ReduceScript = "WITH {PMS_ID} EQ ":PMSpecID
|
||||
Mode = NEXT_CUR$
|
||||
Reduce(ReduceScript, SortList, Mode, TableName, CursorVar, Flag)
|
||||
If Flag then
|
||||
Select TableName By SortList Using CursorVar then
|
||||
Open TableName To FileVar then
|
||||
Loop
|
||||
ReadNext Key Using CursorVar By AT else Done = TRUE$
|
||||
Until Done
|
||||
Read Rec From FileVar, Key then
|
||||
NewStopDtm = Rec<PM_COMP_DTM$>
|
||||
Done = True$
|
||||
Open 'PM_SPEC' to hPMSpec then
|
||||
WriteV NewStopDtm on hPMSpec, PMSpecID, PM_SPEC_LAST_PM_COMP_DTM$ else
|
||||
ErrorMsg = 'Error in ':Service:' service. Error writing LAST_PM_COMP_DTM on PM_SPEC record ':PMSpecID:'.'
|
||||
end
|
||||
end else
|
||||
ErrorMsg = 'Error in ':Service:' service. Error opening PM_SPEC table.'
|
||||
end
|
||||
end else
|
||||
ErrorMsg = 'Error in ':Service:' service. Error reading PM record ':Key:'.'
|
||||
end
|
||||
Repeat
|
||||
end else
|
||||
ErrorMsg = 'Error in ':Service:' service. Error opening PM table.'
|
||||
end
|
||||
end else
|
||||
ErrorMsg = 'Error in ':Service:' service. Error calling Select on PM table.'
|
||||
end
|
||||
end else
|
||||
ErrorMsg = 'Error in ':Service:' service. Error calling Reduce on PM table.'
|
||||
end
|
||||
end else
|
||||
ErrorMsg = 'Error in ':Service:' service. PM_SPEC record ':PMSpecID:' does not exist!'
|
||||
end
|
||||
end else
|
||||
ErrorMsg = 'Error in ':Service:' service. Null PMSpecID passed into service!'
|
||||
end
|
||||
|
||||
Pop.Select(F1, F2, F3, F4)
|
||||
If ErrorMsg NE '' then
|
||||
Error_Services('Add', ErrorMsg)
|
||||
Response = False$
|
||||
end else
|
||||
Repsponse = True$
|
||||
end
|
||||
|
||||
end service
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Internal GoSubs
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
ClearCursors:
|
||||
|
||||
For counter = 0 To 8
|
||||
ClearSelect counter
|
||||
Next counter
|
||||
|
||||
return
|
||||
|
||||
|
||||
|
@ -1,90 +1,90 @@
|
||||
Compile function PROVE_IN_OVERRIDE_EVENTS(CtrlEntId, Event, @PARAMS)
|
||||
#pragma precomp SRP_PreCompiler
|
||||
#window PROVE_IN_OVERRIDE
|
||||
|
||||
$Insert APP_INSERTS
|
||||
$Insert REACTOR_EQUATES
|
||||
$insert Message_Box_Equates
|
||||
|
||||
Declare subroutine Placedialog, Message_Box
|
||||
|
||||
GoToEvent Event for CtrlEntId else
|
||||
// Event not implemented
|
||||
end
|
||||
|
||||
Return EventFlow or 1
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// EVENT HANDLERS
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
Event WINDOW.CREATE(CreateParam)
|
||||
ReactNo = CreateParam
|
||||
|
||||
Placedialog(-2, -2)
|
||||
|
||||
ProveInTypes = Xlate('REACTOR', ReactNo, REACTOR_PROVE_IN_TYPE$, 'X')
|
||||
for each ProveInType in ProveInTypes using @VM setting dummy
|
||||
Begin Case
|
||||
Case ProveInType _EQC 'changeover'
|
||||
Set_Property(@Window:'.CHB_CHANGEOVER', 'ENABLED', True$)
|
||||
Case ProveInType _EQC 'initiate_idle'
|
||||
Set_Property(@Window:'.CHB_IDLE_SHUTDOWN', 'ENABLED', True$)
|
||||
Case ProveInType _EQC 'idle'
|
||||
Set_Property(@Window:'.CHB_IDLE_STARTUP', 'ENABLED', True$)
|
||||
Case ProveInType _EQC 'intrusive_maint'
|
||||
Set_Property(@Window:'.CHB_INTRUSIVE_MAINT', 'ENABLED', True$)
|
||||
Case Otherwise$
|
||||
Null
|
||||
End Case
|
||||
Next ProveInType
|
||||
End Event
|
||||
|
||||
Event PUB_SUBMIT.CLICK()
|
||||
OverrideData = ''
|
||||
|
||||
SelectedTypes = ''
|
||||
If Get_Property(@Window:'.CHB_CHANGEOVER', 'CHECK') then
|
||||
SelectedTypes = "CHANGEOVER"
|
||||
end
|
||||
If Get_Property(@Window:'.CHB_IDLE_SHUTDOWN', 'CHECK') then
|
||||
If SelectedTypes NE '' then
|
||||
SelectedTypes := @VM
|
||||
end
|
||||
SelectedTypes := 'INITIATE_IDLE'
|
||||
end
|
||||
If Get_Property(@Window:'.CHB_IDLE_STARTUP', 'CHECK') then
|
||||
If SelectedTypes NE '' then
|
||||
SelectedTypes := @VM
|
||||
end
|
||||
SelectedTypes := 'IDLE'
|
||||
end
|
||||
If Get_Property(@Window:'.CHB_INTRUSIVE_MAINT', 'CHECK') then
|
||||
If SelectedTypes NE '' then
|
||||
SelectedTypes := @VM
|
||||
end
|
||||
SelectedTypes := 'INTRUSIVE_MAINT'
|
||||
end
|
||||
|
||||
If SelectedTypes EQ '' then
|
||||
Message_Box(@Window, "You must select at least one prove in type!", "Error", MSG_ICON_EXCLAM$)
|
||||
return
|
||||
end else
|
||||
OverrideData<1, 1> = SelectedTypes
|
||||
end
|
||||
|
||||
OverrideData<2, 1> = Get_Property(@Window:'.EDB_COMMENT', 'TEXT')
|
||||
|
||||
If OverrideData<2, 1> EQ '' or Len(OverrideData<2, 1>) LT 4 then
|
||||
Message_Box(@Window, "Your comment must be at least 4 characters!", "Error", MSG_ICON_EXCLAM$)
|
||||
return
|
||||
end
|
||||
|
||||
End_Dialog(@Window, OverrideData)
|
||||
end event
|
||||
|
||||
Event PUB_CANCEL.CLICK()
|
||||
End_Dialog(@Window, '')
|
||||
end event
|
||||
|
||||
|
||||
Compile function PROVE_IN_OVERRIDE_EVENTS(CtrlEntId, Event, @PARAMS)
|
||||
#pragma precomp SRP_PreCompiler
|
||||
#window PROVE_IN_OVERRIDE
|
||||
|
||||
$Insert APP_INSERTS
|
||||
$Insert REACTOR_EQUATES
|
||||
$insert Message_Box_Equates
|
||||
|
||||
Declare subroutine Placedialog, Message_Box
|
||||
|
||||
GoToEvent Event for CtrlEntId else
|
||||
// Event not implemented
|
||||
end
|
||||
|
||||
Return EventFlow or 1
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// EVENT HANDLERS
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
Event WINDOW.CREATE(CreateParam)
|
||||
ReactNo = CreateParam
|
||||
|
||||
Placedialog(-2, -2)
|
||||
|
||||
ProveInTypes = Xlate('REACTOR', ReactNo, REACTOR_PROVE_IN_TYPE$, 'X')
|
||||
for each ProveInType in ProveInTypes using @VM setting dummy
|
||||
Begin Case
|
||||
Case ProveInType _EQC 'changeover'
|
||||
Set_Property(@Window:'.CHB_CHANGEOVER', 'ENABLED', True$)
|
||||
Case ProveInType _EQC 'initiate_idle'
|
||||
Set_Property(@Window:'.CHB_IDLE_SHUTDOWN', 'ENABLED', True$)
|
||||
Case ProveInType _EQC 'idle'
|
||||
Set_Property(@Window:'.CHB_IDLE_STARTUP', 'ENABLED', True$)
|
||||
Case ProveInType _EQC 'intrusive_maint'
|
||||
Set_Property(@Window:'.CHB_INTRUSIVE_MAINT', 'ENABLED', True$)
|
||||
Case Otherwise$
|
||||
Null
|
||||
End Case
|
||||
Next ProveInType
|
||||
End Event
|
||||
|
||||
Event PUB_SUBMIT.CLICK()
|
||||
OverrideData = ''
|
||||
|
||||
SelectedTypes = ''
|
||||
If Get_Property(@Window:'.CHB_CHANGEOVER', 'CHECK') then
|
||||
SelectedTypes = "CHANGEOVER"
|
||||
end
|
||||
If Get_Property(@Window:'.CHB_IDLE_SHUTDOWN', 'CHECK') then
|
||||
If SelectedTypes NE '' then
|
||||
SelectedTypes := @VM
|
||||
end
|
||||
SelectedTypes := 'INITIATE_IDLE'
|
||||
end
|
||||
If Get_Property(@Window:'.CHB_IDLE_STARTUP', 'CHECK') then
|
||||
If SelectedTypes NE '' then
|
||||
SelectedTypes := @VM
|
||||
end
|
||||
SelectedTypes := 'IDLE'
|
||||
end
|
||||
If Get_Property(@Window:'.CHB_INTRUSIVE_MAINT', 'CHECK') then
|
||||
If SelectedTypes NE '' then
|
||||
SelectedTypes := @VM
|
||||
end
|
||||
SelectedTypes := 'INTRUSIVE_MAINT'
|
||||
end
|
||||
|
||||
If SelectedTypes EQ '' then
|
||||
Message_Box(@Window, "You must select at least one prove in type!", "Error", MSG_ICON_EXCLAM$)
|
||||
return
|
||||
end else
|
||||
OverrideData<1, 1> = SelectedTypes
|
||||
end
|
||||
|
||||
OverrideData<2, 1> = Get_Property(@Window:'.EDB_COMMENT', 'TEXT')
|
||||
|
||||
If OverrideData<2, 1> EQ '' or Len(OverrideData<2, 1>) LT 4 then
|
||||
Message_Box(@Window, "Your comment must be at least 4 characters!", "Error", MSG_ICON_EXCLAM$)
|
||||
return
|
||||
end
|
||||
|
||||
End_Dialog(@Window, OverrideData)
|
||||
end event
|
||||
|
||||
Event PUB_CANCEL.CLICK()
|
||||
End_Dialog(@Window, '')
|
||||
end event
|
||||
|
||||
|
||||
|
@ -1,106 +1,106 @@
|
||||
Function Reactorloadings_API(@API)
|
||||
/***********************************************************************************************************************
|
||||
|
||||
This program is proprietary and is not to be used by or disclosed to others, nor is it to be copied without written
|
||||
permission from SRP Computer Solutions, Inc.
|
||||
|
||||
Name : Reactorloadings_API
|
||||
|
||||
Description : API logic for the Reactorloadings resource.
|
||||
|
||||
Notes : All web APIs should include the API_SETUP insert. This will provide several useful variables:
|
||||
|
||||
HTTPMethod - The HTTP Method (Verb) submitted by the client (e.g., GET, POST, etc.)
|
||||
APIURL - The URL for the API entry point (e.g., api.mysite.com/v1).
|
||||
FullEndpointURL - The URL submitted by the client, including query params.
|
||||
FullEndpointURLNoQuery - The URL submitted by the client, excluding query params.
|
||||
EndpointSegment - The URL endpoint segment.
|
||||
ParentURL - The URL path preceeding the current endpoint.
|
||||
CurrentAPI - The name of this stored procedure.
|
||||
|
||||
Parameters :
|
||||
API [in] -- Web API to process. Format is [APIPattern].[HTTPMethod]:
|
||||
- APIPattern must follow this structure Reactorloadings[.ID.[<Property>]]
|
||||
- HTTPMethod can be any valid HTTP method, e.g., GET, POST, PUT, DELETE, etc.
|
||||
Examples:
|
||||
- Reactorloadings.POST
|
||||
- Reactorloadings.ID.PUT
|
||||
- Reactorloadings.ID.firstName.GET
|
||||
Response [out] -- Response to be sent back to the Controller (HTTP_MCP) or requesting procedure. Web API
|
||||
services do not rely upon anything being returned in the response. This is what the
|
||||
various services like SetResponseBody and SetResponseStatus services are for. A response
|
||||
value is only helpful if the developers want to use it for debug purposes.
|
||||
|
||||
History : (Date, Initials, Notes)
|
||||
05/22/24 xxx Original programmer.
|
||||
|
||||
***********************************************************************************************************************/
|
||||
|
||||
#pragma precomp SRP_PreCompiler
|
||||
|
||||
Declare function Oi_Wizard_Services, Memberof, Oi_Wizard_Services
|
||||
Declare subroutine Reactor_Services, Oi_Wizard_Services
|
||||
|
||||
$insert APP_INSERTS
|
||||
$insert API_SETUP
|
||||
$insert HTTP_INSERTS
|
||||
|
||||
GoToAPI else
|
||||
// The specific resource endpoint doesn't have a API handler yet.
|
||||
HTTP_Services('SetResponseStatus', 204, 'This is a valid endpoint but a web API handler has not yet been created.')
|
||||
end
|
||||
|
||||
Return Response OR ''
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Endpoint Handlers
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
API reactorloadings.POST
|
||||
OIWizardID = ''
|
||||
CurrUser = ''
|
||||
Cookies = HTTP_Services('GetHTTPCookie')
|
||||
For each Cookie in Cookies using ';'
|
||||
Key = Trim(Field(Cookie, '=', 1))
|
||||
If Key EQ 'sessionID' then
|
||||
OIWizardID = Field(Cookie, '=', 2)
|
||||
end
|
||||
Next Cookie
|
||||
|
||||
If OIWizardID NE '' then
|
||||
// Call validate session to extend session expiry
|
||||
OI_Wizard_Services('ValidateSession', OIWizardID)
|
||||
CurrUser = Xlate('OI_WIZARD', OIWizardID, 'EMPLOYEE_ID', 'X')
|
||||
end
|
||||
|
||||
ValidSession = OI_Wizard_Services('ValidateSession', OIWizardID)
|
||||
|
||||
If ValidSession then
|
||||
If Memberof(CurrUser, 'OI_ADMIN') OR Memberof(CurrUser, 'LEAD') OR Memberof(CurrUser, 'SUPERVISOR') then
|
||||
Body = HTTP_Services('GetHTTPPostString', True$)
|
||||
// The POST string will have been encoded so use percent (URL) decoding.
|
||||
DecodedJSON = HTTP_Services('DecodePercentString', Body)
|
||||
If SRP_JSON(objBody, 'Parse', Body) EQ '' then
|
||||
rdsNo = SRP_JSON(objBody, 'GetValue', 'rdsNo')
|
||||
reactorNo = SRP_JSON(objBody, 'GetValue', 'reactorNo')
|
||||
SRP_JSON(objBody, 'Release')
|
||||
end
|
||||
|
||||
Reactor_Services('RemoveRDSFromReactorLoad', rdsNo, reactorNo, CurrUser)
|
||||
If Error_Services('NoError') then
|
||||
HTTP_Services('SetResponseStatus', 200, 'RDS Successfully removed.')
|
||||
end else
|
||||
ErrCode = Error_Services('GetMessage')
|
||||
HTTP_Services('SetResponseStatus', 500, ErrCode)
|
||||
end
|
||||
end else
|
||||
HTTP_Services('SetResponseStatus', 503, 'User is not authorized!')
|
||||
end
|
||||
End else
|
||||
HTTP_Services('SetResponseStatus', 401, 'User must be signed in to access this resource.')
|
||||
end
|
||||
|
||||
end api
|
||||
|
||||
Function Reactorloadings_API(@API)
|
||||
/***********************************************************************************************************************
|
||||
|
||||
This program is proprietary and is not to be used by or disclosed to others, nor is it to be copied without written
|
||||
permission from SRP Computer Solutions, Inc.
|
||||
|
||||
Name : Reactorloadings_API
|
||||
|
||||
Description : API logic for the Reactorloadings resource.
|
||||
|
||||
Notes : All web APIs should include the API_SETUP insert. This will provide several useful variables:
|
||||
|
||||
HTTPMethod - The HTTP Method (Verb) submitted by the client (e.g., GET, POST, etc.)
|
||||
APIURL - The URL for the API entry point (e.g., api.mysite.com/v1).
|
||||
FullEndpointURL - The URL submitted by the client, including query params.
|
||||
FullEndpointURLNoQuery - The URL submitted by the client, excluding query params.
|
||||
EndpointSegment - The URL endpoint segment.
|
||||
ParentURL - The URL path preceeding the current endpoint.
|
||||
CurrentAPI - The name of this stored procedure.
|
||||
|
||||
Parameters :
|
||||
API [in] -- Web API to process. Format is [APIPattern].[HTTPMethod]:
|
||||
- APIPattern must follow this structure Reactorloadings[.ID.[<Property>]]
|
||||
- HTTPMethod can be any valid HTTP method, e.g., GET, POST, PUT, DELETE, etc.
|
||||
Examples:
|
||||
- Reactorloadings.POST
|
||||
- Reactorloadings.ID.PUT
|
||||
- Reactorloadings.ID.firstName.GET
|
||||
Response [out] -- Response to be sent back to the Controller (HTTP_MCP) or requesting procedure. Web API
|
||||
services do not rely upon anything being returned in the response. This is what the
|
||||
various services like SetResponseBody and SetResponseStatus services are for. A response
|
||||
value is only helpful if the developers want to use it for debug purposes.
|
||||
|
||||
History : (Date, Initials, Notes)
|
||||
05/22/24 xxx Original programmer.
|
||||
|
||||
***********************************************************************************************************************/
|
||||
|
||||
#pragma precomp SRP_PreCompiler
|
||||
|
||||
Declare function Oi_Wizard_Services, Memberof, Oi_Wizard_Services
|
||||
Declare subroutine Reactor_Services, Oi_Wizard_Services
|
||||
|
||||
$insert APP_INSERTS
|
||||
$insert API_SETUP
|
||||
$insert HTTP_INSERTS
|
||||
|
||||
GoToAPI else
|
||||
// The specific resource endpoint doesn't have a API handler yet.
|
||||
HTTP_Services('SetResponseStatus', 204, 'This is a valid endpoint but a web API handler has not yet been created.')
|
||||
end
|
||||
|
||||
Return Response OR ''
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Endpoint Handlers
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
API reactorloadings.POST
|
||||
OIWizardID = ''
|
||||
CurrUser = ''
|
||||
Cookies = HTTP_Services('GetHTTPCookie')
|
||||
For each Cookie in Cookies using ';'
|
||||
Key = Trim(Field(Cookie, '=', 1))
|
||||
If Key EQ 'sessionID' then
|
||||
OIWizardID = Field(Cookie, '=', 2)
|
||||
end
|
||||
Next Cookie
|
||||
|
||||
If OIWizardID NE '' then
|
||||
// Call validate session to extend session expiry
|
||||
OI_Wizard_Services('ValidateSession', OIWizardID)
|
||||
CurrUser = Xlate('OI_WIZARD', OIWizardID, 'EMPLOYEE_ID', 'X')
|
||||
end
|
||||
|
||||
ValidSession = OI_Wizard_Services('ValidateSession', OIWizardID)
|
||||
|
||||
If ValidSession then
|
||||
If Memberof(CurrUser, 'OI_ADMIN') OR Memberof(CurrUser, 'LEAD') OR Memberof(CurrUser, 'SUPERVISOR') then
|
||||
Body = HTTP_Services('GetHTTPPostString', True$)
|
||||
// The POST string will have been encoded so use percent (URL) decoding.
|
||||
DecodedJSON = HTTP_Services('DecodePercentString', Body)
|
||||
If SRP_JSON(objBody, 'Parse', Body) EQ '' then
|
||||
rdsNo = SRP_JSON(objBody, 'GetValue', 'rdsNo')
|
||||
reactorNo = SRP_JSON(objBody, 'GetValue', 'reactorNo')
|
||||
SRP_JSON(objBody, 'Release')
|
||||
end
|
||||
|
||||
Reactor_Services('RemoveRDSFromReactorLoad', rdsNo, reactorNo, CurrUser)
|
||||
If Error_Services('NoError') then
|
||||
HTTP_Services('SetResponseStatus', 200, 'RDS Successfully removed.')
|
||||
end else
|
||||
ErrCode = Error_Services('GetMessage')
|
||||
HTTP_Services('SetResponseStatus', 500, ErrCode)
|
||||
end
|
||||
end else
|
||||
HTTP_Services('SetResponseStatus', 503, 'User is not authorized!')
|
||||
end
|
||||
End else
|
||||
HTTP_Services('SetResponseStatus', 401, 'User must be signed in to access this resource.')
|
||||
end
|
||||
|
||||
end api
|
||||
|
||||
|
@ -3287,7 +3287,7 @@ Service CreateReactorProveInOrder(ReactNo, ProveInType)
|
||||
|
||||
Retries = Retries - 1
|
||||
|
||||
HttpResponseJson = Httpclient_Services('SendHTTPRequest', 'POST', ProveInUrl, 'Accept':@VM:'*/*', '', '', '', '', '', '')
|
||||
HttpResponseJson = Httpclient_Services('SendHTTPRequest', 'POST', ProveInUrl, 'Accept':@VM:'*/*', '', '', '', False$, False$, '')
|
||||
If HttpResponseJson NE '' then
|
||||
ObjResponseJson = ''
|
||||
If SRP_JSON(ObjResponseJson, 'Parse', HttpResponseJson) EQ '' then
|
||||
@ -3340,6 +3340,7 @@ Service CreateReactorProveInOrder(ReactNo, ProveInType)
|
||||
end service
|
||||
|
||||
Service GetReactorProveInStatus(ReactNo)
|
||||
|
||||
Headers = 'Logging DTM' : @FM : 'Machine' : @FM : 'Log'
|
||||
ColumnWidths = 20 : @FM : 15 : @FM : 300
|
||||
LogPath = Environment_Services('GetApplicationRootPath') : '\LogFiles\ReactorProveIn'
|
||||
@ -3386,7 +3387,7 @@ Service GetReactorProveInStatus(ReactNo)
|
||||
|
||||
Retries = Retries - 1
|
||||
|
||||
HttpResponseJson = Httpclient_Services('SendHTTPRequest', 'GET', ProveInUrl, 'Accept':@VM:'*/*', '', '', '', '', '', '')
|
||||
HttpResponseJson = Httpclient_Services('SendHTTPRequest', 'GET', ProveInUrl, 'Accept':@VM:'*/*', '', '', '', False$, False$, '')
|
||||
If HttpResponseJson NE '' then
|
||||
ObjResponseJson = ''
|
||||
If SRP_JSON(ObjResponseJson, 'Parse', HttpResponseJson) EQ '' then
|
||||
@ -3488,7 +3489,7 @@ Service CancelReactorProveIn(ReactNo, OrderId)
|
||||
|
||||
Retries = Retries - 1
|
||||
|
||||
HttpResponseJson = Httpclient_Services('SendHTTPRequest', 'PUT', ProveInUrl, 'Accept':@VM:'*/*', '', '', '', '', '', '')
|
||||
HttpResponseJson = Httpclient_Services('SendHTTPRequest', 'PUT', ProveInUrl, 'Accept':@VM:'*/*', '', '', '', False$, False$, '')
|
||||
If HttpResponseJson NE '' then
|
||||
ObjResponseJson = ''
|
||||
If SRP_JSON(ObjResponseJson, 'Parse', HttpResponseJson) EQ '' then
|
||||
|
@ -1,254 +1,254 @@
|
||||
Function REACT_ITEM_Actions(Action, CalcColName, FSList, Handle, Name, FMC, Record, Status, OrigRecord, Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10)
|
||||
/***********************************************************************************************************************
|
||||
|
||||
This program is proprietary and is not to be used by or disclosed to others, nor is it to be copied without written
|
||||
permission from Infineon.
|
||||
|
||||
Name : RDS_Actions
|
||||
|
||||
Description : Handles calculated columns and MFS calls for the current table.
|
||||
|
||||
Notes : This function uses @ID, @RECORD, and @DICT to make sure {ColumnName} references work correctly.
|
||||
If called from outside of a calculated column these will need to be set and restored.
|
||||
|
||||
Parameters :
|
||||
Action [in] -- Name of the action to be taken
|
||||
CalcColName [in] -- Name of the calculated column that needs to be processed. Normally this should only be
|
||||
populated when the CalcField action is being used.
|
||||
FSList [in] -- The list of MFSs and the BFS name for the current file or volume. This is an @SVM
|
||||
delimited array, with the current MFS name as the first value in the array, and the BFS
|
||||
name as the last value. Normally set by a calling MFS.
|
||||
Handle [in] -- The file handle of the file or media map being accessed. Note, this does contain the
|
||||
entire handle structure that the Basic+ Open statement would provide. Normally set by a
|
||||
calling MFS.
|
||||
Name [in] -- The name (key) of the record or file being accessed. Normally set by a calling MFS.
|
||||
FMC [in] -- Various functions. Normally set by a calling MFS.
|
||||
Record [in] -- The entire record (for record-oriented functions) or a newly-created handle (for
|
||||
"get handle" functions). Normally set by a calling MFS.
|
||||
Status [in/out] -- Indicator of the success or failure of an action. Normally set by the calling MFS but
|
||||
for some actions can be set by the action handler to indicate failure.
|
||||
OrigRecord [in] -- Original content of the record being processed by the current action. This is
|
||||
automatically being assigned by the WRITE_RECORD and DELETE_RECORD actions within
|
||||
BASE_MFS.
|
||||
Param1-10 [in/out] -- Additional request parameter holders
|
||||
ActionFlow [out] -- Used to control the action chain (see the ACTION_SETUP insert for more information.)
|
||||
Can also be used to return a special value, such as the results of the CalcField
|
||||
method.
|
||||
|
||||
History : (Date, Initials, Notes)
|
||||
04/10/18 dmb Original programmer.
|
||||
10/04/18 djs Added a trigger within the WRITE_RECORD event, which fires when the reactor number has
|
||||
changed. When this occurs the related RDS_LAYER records for this RDS record are populated
|
||||
with the most recent associated TOOL_PARMS record. (related by PSN and Reactor)
|
||||
|
||||
***********************************************************************************************************************/
|
||||
|
||||
#pragma precomp SRP_PreCompiler
|
||||
|
||||
$Insert FILE.SYSTEM.EQUATES
|
||||
$Insert ACTION_SETUP
|
||||
$Insert RDS_EQUATES
|
||||
$Insert CLEAN_INSP_EQUATES
|
||||
$Insert COMPANY_EQUATES
|
||||
$Insert RDS_LAYER_EQUATES
|
||||
$Insert TOOL_PARMS_EQUATES
|
||||
$Insert RLIST_EQUATES
|
||||
$Insert APP_INSERTS
|
||||
$Insert QA_MET_EQUATES
|
||||
$Insert PRS_STAGE_EQUATES
|
||||
$Insert WO_MAT_EQUATES
|
||||
$Insert WO_MAT_QA_EQUATES
|
||||
|
||||
Equ COMMA$ to ','
|
||||
|
||||
Declare function Error_Services, Database_Services, obj_RDS_Test, Logging_Services, Environment_Services, SRP_Math
|
||||
Declare function Tool_Parms_Services, Signature_Services, obj_WO_Mat_QA, Datetime, Override_Services, obj_WO_Mat
|
||||
Declare subroutine Error_Services, Database_Services, Logging_Services, Set_Status, Schedule_Services_Dev
|
||||
Declare subroutine Work_Order_Services, Material_Services, Set_FSError
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
If KeyID then GoSub Initialize_System_Variables
|
||||
|
||||
Begin Case
|
||||
|
||||
Case Action _EQC 'CalculateColumn' ; GoSub CalculateColumn
|
||||
Case Action _EQC 'READ_RECORD_PRE' ; GoSub READ_RECORD_PRE
|
||||
Case Action _EQC 'READ_RECORD' ; GoSub READ_RECORD
|
||||
Case Action _EQC 'READONLY_RECORD_PRE' ; GoSub READONLY_RECORD_PRE
|
||||
Case Action _EQC 'READONLY_RECORD' ; GoSub READONLY_RECORD
|
||||
Case Action _EQC 'WRITE_RECORD_PRE' ; GoSub WRITE_RECORD_PRE
|
||||
Case Action _EQC 'WRITE_RECORD' ; GoSub WRITE_RECORD
|
||||
Case Action _EQC 'DELETE_RECORD_PRE' ; GoSub DELETE_RECORD_PRE
|
||||
Case Action _EQC 'DELETE_RECORD' ; GoSub DELETE_RECORD
|
||||
Case Otherwise$ ; Status = 'Invalid Action'
|
||||
|
||||
End Case
|
||||
|
||||
If KeyID then GoSub Restore_System_Variables
|
||||
|
||||
If Assigned(ActionFlow) else ActionFlow = ACTION_CONTINUE$
|
||||
|
||||
Return ActionFlow
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Calculated Columns
|
||||
//
|
||||
// The typical structure of a calculated column will look like this:
|
||||
//
|
||||
// Declare function Database_Services
|
||||
//
|
||||
// @ANS = Database_Services('CalculateColumn')
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
CalculateColumn:
|
||||
|
||||
// Make sure the ActionFlow return variable is cleared in case nothing is calculated.
|
||||
ActionFlow = ''
|
||||
|
||||
|
||||
|
||||
return
|
||||
|
||||
|
||||
|
||||
// ----- MFS calls -----------------------------------------------------------------------------------------------------
|
||||
|
||||
READ_RECORD_PRE:
|
||||
// In order to stop a record from being read in this action these lines of code must be used:
|
||||
//
|
||||
// OrigFileError = 100 : @FM : KeyID
|
||||
// Status = 0
|
||||
// Record = ''
|
||||
// ActionFlow = ACTION_STOP$
|
||||
|
||||
|
||||
return
|
||||
|
||||
READ_RECORD:
|
||||
|
||||
// In order to stop a record from being read in this action these lines of code must be used:
|
||||
//
|
||||
// OrigFileError = 100 : @FM : KeyID
|
||||
// Status = 0
|
||||
// Record = ''
|
||||
|
||||
return
|
||||
|
||||
READONLY_RECORD_PRE:
|
||||
// In order to stop a record from being read in this action these lines of code must be used:
|
||||
//
|
||||
// OrigFileError = 100 : @FM : KeyID
|
||||
// Status = 0
|
||||
// Record = ''
|
||||
// ActionFlow = ACTION_STOP$
|
||||
return
|
||||
|
||||
READONLY_RECORD:
|
||||
// In order to stop a record from being read in this action these lines of code must be used:
|
||||
//
|
||||
// OrigFileError = 100 : @FM : KeyID
|
||||
// Status = 0
|
||||
// Record = ''
|
||||
return
|
||||
|
||||
WRITE_RECORD_PRE:
|
||||
|
||||
ErrMsg = ''
|
||||
|
||||
//Req'd parameter checks
|
||||
ItemType = {RI_TYPE}
|
||||
|
||||
If ItemType EQ '' then
|
||||
ErrMsg := 'Item Type was not specified. '
|
||||
end
|
||||
|
||||
If ErrMsg NE '' then
|
||||
Error_Services('Add', 'Error Saving Reactor Item: ' : ErrMsg)
|
||||
OrigFileError = 104:': Error Saving Reactor Item: ' : ErrMsg
|
||||
Status = 0
|
||||
Record = ''
|
||||
ActionFlow = ACTION_STOP$
|
||||
end
|
||||
|
||||
return
|
||||
|
||||
WRITE_RECORD:
|
||||
|
||||
|
||||
|
||||
return
|
||||
|
||||
DELETE_RECORD_PRE:
|
||||
|
||||
|
||||
return
|
||||
|
||||
DELETE_RECORD:
|
||||
return
|
||||
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Internal GoSubs
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
ClearCursors:
|
||||
For counter = 0 to 8
|
||||
ClearSelect counter
|
||||
Next counter
|
||||
return
|
||||
|
||||
|
||||
Initialize_System_Variables:
|
||||
|
||||
// Save these for restoration later
|
||||
SaveDict = @DICT
|
||||
SaveID = @ID
|
||||
SaveRecord = @RECORD
|
||||
OrigFileError = @FILE.ERROR
|
||||
|
||||
// Now make sure @DICT, ID, and @RECORD are populated
|
||||
CurrentDictName = ''
|
||||
If @DICT then
|
||||
DictHandle = @DICT<1, 2>
|
||||
Locate DictHandle in @TABLES(5) Using @FM Setting fPos then
|
||||
CurrentDictName = Field(@TABLES(0), @FM, fPos, 1)
|
||||
end
|
||||
end
|
||||
|
||||
If CurrentDictName NE DictName then
|
||||
Open DictName to @DICT else Status = 'Unable to initialize @DICT'
|
||||
end
|
||||
|
||||
@ID = KeyID
|
||||
If Record else
|
||||
// Record might not have been passed in. Read the record from the database table just to make sure.
|
||||
@FILE.ERROR = ''
|
||||
Open TableName to hTable then
|
||||
FullFSList = hTable[1, 'F' : @VM]
|
||||
BFS = FullFSList[-1, 'B' : @SVM]
|
||||
LastHandle = hTable[-1, 'B' : \0D\]
|
||||
FileHandle = \0D\ : LastHandle[1, @VM]
|
||||
|
||||
Call @BFS(READO.RECORD, BFS, FileHandle, KeyID, FMC, Record, ReadOStatus)
|
||||
end
|
||||
end
|
||||
@RECORD = Record
|
||||
|
||||
return
|
||||
|
||||
|
||||
Restore_System_Variables:
|
||||
|
||||
Transfer SaveDict to @DICT
|
||||
Transfer SaveID to @ID
|
||||
Transfer SaveRecord to @RECORD
|
||||
@FILE.ERROR = OrigFileError
|
||||
|
||||
return
|
||||
|
||||
|
||||
Function REACT_ITEM_Actions(Action, CalcColName, FSList, Handle, Name, FMC, Record, Status, OrigRecord, Param1, Param2, Param3, Param4, Param5, Param6, Param7, Param8, Param9, Param10)
|
||||
/***********************************************************************************************************************
|
||||
|
||||
This program is proprietary and is not to be used by or disclosed to others, nor is it to be copied without written
|
||||
permission from Infineon.
|
||||
|
||||
Name : RDS_Actions
|
||||
|
||||
Description : Handles calculated columns and MFS calls for the current table.
|
||||
|
||||
Notes : This function uses @ID, @RECORD, and @DICT to make sure {ColumnName} references work correctly.
|
||||
If called from outside of a calculated column these will need to be set and restored.
|
||||
|
||||
Parameters :
|
||||
Action [in] -- Name of the action to be taken
|
||||
CalcColName [in] -- Name of the calculated column that needs to be processed. Normally this should only be
|
||||
populated when the CalcField action is being used.
|
||||
FSList [in] -- The list of MFSs and the BFS name for the current file or volume. This is an @SVM
|
||||
delimited array, with the current MFS name as the first value in the array, and the BFS
|
||||
name as the last value. Normally set by a calling MFS.
|
||||
Handle [in] -- The file handle of the file or media map being accessed. Note, this does contain the
|
||||
entire handle structure that the Basic+ Open statement would provide. Normally set by a
|
||||
calling MFS.
|
||||
Name [in] -- The name (key) of the record or file being accessed. Normally set by a calling MFS.
|
||||
FMC [in] -- Various functions. Normally set by a calling MFS.
|
||||
Record [in] -- The entire record (for record-oriented functions) or a newly-created handle (for
|
||||
"get handle" functions). Normally set by a calling MFS.
|
||||
Status [in/out] -- Indicator of the success or failure of an action. Normally set by the calling MFS but
|
||||
for some actions can be set by the action handler to indicate failure.
|
||||
OrigRecord [in] -- Original content of the record being processed by the current action. This is
|
||||
automatically being assigned by the WRITE_RECORD and DELETE_RECORD actions within
|
||||
BASE_MFS.
|
||||
Param1-10 [in/out] -- Additional request parameter holders
|
||||
ActionFlow [out] -- Used to control the action chain (see the ACTION_SETUP insert for more information.)
|
||||
Can also be used to return a special value, such as the results of the CalcField
|
||||
method.
|
||||
|
||||
History : (Date, Initials, Notes)
|
||||
04/10/18 dmb Original programmer.
|
||||
10/04/18 djs Added a trigger within the WRITE_RECORD event, which fires when the reactor number has
|
||||
changed. When this occurs the related RDS_LAYER records for this RDS record are populated
|
||||
with the most recent associated TOOL_PARMS record. (related by PSN and Reactor)
|
||||
|
||||
***********************************************************************************************************************/
|
||||
|
||||
#pragma precomp SRP_PreCompiler
|
||||
|
||||
$Insert FILE.SYSTEM.EQUATES
|
||||
$Insert ACTION_SETUP
|
||||
$Insert RDS_EQUATES
|
||||
$Insert CLEAN_INSP_EQUATES
|
||||
$Insert COMPANY_EQUATES
|
||||
$Insert RDS_LAYER_EQUATES
|
||||
$Insert TOOL_PARMS_EQUATES
|
||||
$Insert RLIST_EQUATES
|
||||
$Insert APP_INSERTS
|
||||
$Insert QA_MET_EQUATES
|
||||
$Insert PRS_STAGE_EQUATES
|
||||
$Insert WO_MAT_EQUATES
|
||||
$Insert WO_MAT_QA_EQUATES
|
||||
|
||||
Equ COMMA$ to ','
|
||||
|
||||
Declare function Error_Services, Database_Services, obj_RDS_Test, Logging_Services, Environment_Services, SRP_Math
|
||||
Declare function Tool_Parms_Services, Signature_Services, obj_WO_Mat_QA, Datetime, Override_Services, obj_WO_Mat
|
||||
Declare subroutine Error_Services, Database_Services, Logging_Services, Set_Status, Schedule_Services_Dev
|
||||
Declare subroutine Work_Order_Services, Material_Services, Set_FSError
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
If KeyID then GoSub Initialize_System_Variables
|
||||
|
||||
Begin Case
|
||||
|
||||
Case Action _EQC 'CalculateColumn' ; GoSub CalculateColumn
|
||||
Case Action _EQC 'READ_RECORD_PRE' ; GoSub READ_RECORD_PRE
|
||||
Case Action _EQC 'READ_RECORD' ; GoSub READ_RECORD
|
||||
Case Action _EQC 'READONLY_RECORD_PRE' ; GoSub READONLY_RECORD_PRE
|
||||
Case Action _EQC 'READONLY_RECORD' ; GoSub READONLY_RECORD
|
||||
Case Action _EQC 'WRITE_RECORD_PRE' ; GoSub WRITE_RECORD_PRE
|
||||
Case Action _EQC 'WRITE_RECORD' ; GoSub WRITE_RECORD
|
||||
Case Action _EQC 'DELETE_RECORD_PRE' ; GoSub DELETE_RECORD_PRE
|
||||
Case Action _EQC 'DELETE_RECORD' ; GoSub DELETE_RECORD
|
||||
Case Otherwise$ ; Status = 'Invalid Action'
|
||||
|
||||
End Case
|
||||
|
||||
If KeyID then GoSub Restore_System_Variables
|
||||
|
||||
If Assigned(ActionFlow) else ActionFlow = ACTION_CONTINUE$
|
||||
|
||||
Return ActionFlow
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Calculated Columns
|
||||
//
|
||||
// The typical structure of a calculated column will look like this:
|
||||
//
|
||||
// Declare function Database_Services
|
||||
//
|
||||
// @ANS = Database_Services('CalculateColumn')
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
CalculateColumn:
|
||||
|
||||
// Make sure the ActionFlow return variable is cleared in case nothing is calculated.
|
||||
ActionFlow = ''
|
||||
|
||||
|
||||
|
||||
return
|
||||
|
||||
|
||||
|
||||
// ----- MFS calls -----------------------------------------------------------------------------------------------------
|
||||
|
||||
READ_RECORD_PRE:
|
||||
// In order to stop a record from being read in this action these lines of code must be used:
|
||||
//
|
||||
// OrigFileError = 100 : @FM : KeyID
|
||||
// Status = 0
|
||||
// Record = ''
|
||||
// ActionFlow = ACTION_STOP$
|
||||
|
||||
|
||||
return
|
||||
|
||||
READ_RECORD:
|
||||
|
||||
// In order to stop a record from being read in this action these lines of code must be used:
|
||||
//
|
||||
// OrigFileError = 100 : @FM : KeyID
|
||||
// Status = 0
|
||||
// Record = ''
|
||||
|
||||
return
|
||||
|
||||
READONLY_RECORD_PRE:
|
||||
// In order to stop a record from being read in this action these lines of code must be used:
|
||||
//
|
||||
// OrigFileError = 100 : @FM : KeyID
|
||||
// Status = 0
|
||||
// Record = ''
|
||||
// ActionFlow = ACTION_STOP$
|
||||
return
|
||||
|
||||
READONLY_RECORD:
|
||||
// In order to stop a record from being read in this action these lines of code must be used:
|
||||
//
|
||||
// OrigFileError = 100 : @FM : KeyID
|
||||
// Status = 0
|
||||
// Record = ''
|
||||
return
|
||||
|
||||
WRITE_RECORD_PRE:
|
||||
|
||||
ErrMsg = ''
|
||||
|
||||
//Req'd parameter checks
|
||||
ItemType = {RI_TYPE}
|
||||
|
||||
If ItemType EQ '' then
|
||||
ErrMsg := 'Item Type was not specified. '
|
||||
end
|
||||
|
||||
If ErrMsg NE '' then
|
||||
Error_Services('Add', 'Error Saving Reactor Item: ' : ErrMsg)
|
||||
OrigFileError = 104:': Error Saving Reactor Item: ' : ErrMsg
|
||||
Status = 0
|
||||
Record = ''
|
||||
ActionFlow = ACTION_STOP$
|
||||
end
|
||||
|
||||
return
|
||||
|
||||
WRITE_RECORD:
|
||||
|
||||
|
||||
|
||||
return
|
||||
|
||||
DELETE_RECORD_PRE:
|
||||
|
||||
|
||||
return
|
||||
|
||||
DELETE_RECORD:
|
||||
return
|
||||
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Internal GoSubs
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
ClearCursors:
|
||||
For counter = 0 to 8
|
||||
ClearSelect counter
|
||||
Next counter
|
||||
return
|
||||
|
||||
|
||||
Initialize_System_Variables:
|
||||
|
||||
// Save these for restoration later
|
||||
SaveDict = @DICT
|
||||
SaveID = @ID
|
||||
SaveRecord = @RECORD
|
||||
OrigFileError = @FILE.ERROR
|
||||
|
||||
// Now make sure @DICT, ID, and @RECORD are populated
|
||||
CurrentDictName = ''
|
||||
If @DICT then
|
||||
DictHandle = @DICT<1, 2>
|
||||
Locate DictHandle in @TABLES(5) Using @FM Setting fPos then
|
||||
CurrentDictName = Field(@TABLES(0), @FM, fPos, 1)
|
||||
end
|
||||
end
|
||||
|
||||
If CurrentDictName NE DictName then
|
||||
Open DictName to @DICT else Status = 'Unable to initialize @DICT'
|
||||
end
|
||||
|
||||
@ID = KeyID
|
||||
If Record else
|
||||
// Record might not have been passed in. Read the record from the database table just to make sure.
|
||||
@FILE.ERROR = ''
|
||||
Open TableName to hTable then
|
||||
FullFSList = hTable[1, 'F' : @VM]
|
||||
BFS = FullFSList[-1, 'B' : @SVM]
|
||||
LastHandle = hTable[-1, 'B' : \0D\]
|
||||
FileHandle = \0D\ : LastHandle[1, @VM]
|
||||
|
||||
Call @BFS(READO.RECORD, BFS, FileHandle, KeyID, FMC, Record, ReadOStatus)
|
||||
end
|
||||
end
|
||||
@RECORD = Record
|
||||
|
||||
return
|
||||
|
||||
|
||||
Restore_System_Variables:
|
||||
|
||||
Transfer SaveDict to @DICT
|
||||
Transfer SaveID to @ID
|
||||
Transfer SaveRecord to @RECORD
|
||||
@FILE.ERROR = OrigFileError
|
||||
|
||||
return
|
||||
|
||||
|
||||
|
@ -1,64 +1,64 @@
|
||||
Function Remotehealthcheck_API(@API)
|
||||
/***********************************************************************************************************************
|
||||
|
||||
This program is proprietary and is not to be used by or disclosed to others, nor is it to be copied without written
|
||||
permission from SRP Computer Solutions, Inc.
|
||||
|
||||
Name : Remotehealthcheck_API
|
||||
|
||||
Description : API logic for the Remotehealthcheck resource.
|
||||
|
||||
Notes : All web APIs should include the API_SETUP insert. This will provide several useful variables:
|
||||
|
||||
HTTPMethod - The HTTP Method (Verb) submitted by the client (e.g., GET, POST, etc.)
|
||||
APIURL - The URL for the API entry point (e.g., api.mysite.com/v1).
|
||||
FullEndpointURL - The URL submitted by the client, including query params.
|
||||
FullEndpointURLNoQuery - The URL submitted by the client, excluding query params.
|
||||
EndpointSegment - The URL endpoint segment.
|
||||
ParentURL - The URL path preceeding the current endpoint.
|
||||
CurrentAPI - The name of this stored procedure.
|
||||
|
||||
Parameters :
|
||||
API [in] -- Web API to process. Format is [APIPattern].[HTTPMethod]:
|
||||
- APIPattern must follow this structure Remotehealthcheck[.ID.[<Property>]]
|
||||
- HTTPMethod can be any valid HTTP method, e.g., GET, POST, PUT, DELETE, etc.
|
||||
Examples:
|
||||
- Remotehealthcheck.POST
|
||||
- Remotehealthcheck.ID.PUT
|
||||
- Remotehealthcheck.ID.firstName.GET
|
||||
Response [out] -- Response to be sent back to the Controller (HTTP_MCP) or requesting procedure. Web API
|
||||
services do not rely upon anything being returned in the response. This is what the
|
||||
various services like SetResponseBody and SetResponseStatus services are for. A response
|
||||
value is only helpful if the developers want to use it for debug purposes.
|
||||
|
||||
History : (Date, Initials, Notes)
|
||||
07/17/24 xxx Original programmer.
|
||||
|
||||
***********************************************************************************************************************/
|
||||
|
||||
#pragma precomp SRP_PreCompiler
|
||||
|
||||
$insert APP_INSERTS
|
||||
$insert API_SETUP
|
||||
$insert HTTP_INSERTS
|
||||
|
||||
GoToAPI else
|
||||
// The specific resource endpoint doesn't have a API handler yet.
|
||||
HTTP_Services('SetResponseStatus', 200, 'This is a valid endpoint but a web API handler has not yet been created.')
|
||||
end
|
||||
|
||||
Return Response OR ''
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Endpoint Handlers
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
API remotehealthcheck.HEAD
|
||||
API remotehealthcheck.GET
|
||||
|
||||
HTTP_Resource_Services('LoremIpsum')
|
||||
|
||||
end api
|
||||
|
||||
Function Remotehealthcheck_API(@API)
|
||||
/***********************************************************************************************************************
|
||||
|
||||
This program is proprietary and is not to be used by or disclosed to others, nor is it to be copied without written
|
||||
permission from SRP Computer Solutions, Inc.
|
||||
|
||||
Name : Remotehealthcheck_API
|
||||
|
||||
Description : API logic for the Remotehealthcheck resource.
|
||||
|
||||
Notes : All web APIs should include the API_SETUP insert. This will provide several useful variables:
|
||||
|
||||
HTTPMethod - The HTTP Method (Verb) submitted by the client (e.g., GET, POST, etc.)
|
||||
APIURL - The URL for the API entry point (e.g., api.mysite.com/v1).
|
||||
FullEndpointURL - The URL submitted by the client, including query params.
|
||||
FullEndpointURLNoQuery - The URL submitted by the client, excluding query params.
|
||||
EndpointSegment - The URL endpoint segment.
|
||||
ParentURL - The URL path preceeding the current endpoint.
|
||||
CurrentAPI - The name of this stored procedure.
|
||||
|
||||
Parameters :
|
||||
API [in] -- Web API to process. Format is [APIPattern].[HTTPMethod]:
|
||||
- APIPattern must follow this structure Remotehealthcheck[.ID.[<Property>]]
|
||||
- HTTPMethod can be any valid HTTP method, e.g., GET, POST, PUT, DELETE, etc.
|
||||
Examples:
|
||||
- Remotehealthcheck.POST
|
||||
- Remotehealthcheck.ID.PUT
|
||||
- Remotehealthcheck.ID.firstName.GET
|
||||
Response [out] -- Response to be sent back to the Controller (HTTP_MCP) or requesting procedure. Web API
|
||||
services do not rely upon anything being returned in the response. This is what the
|
||||
various services like SetResponseBody and SetResponseStatus services are for. A response
|
||||
value is only helpful if the developers want to use it for debug purposes.
|
||||
|
||||
History : (Date, Initials, Notes)
|
||||
07/17/24 xxx Original programmer.
|
||||
|
||||
***********************************************************************************************************************/
|
||||
|
||||
#pragma precomp SRP_PreCompiler
|
||||
|
||||
$insert APP_INSERTS
|
||||
$insert API_SETUP
|
||||
$insert HTTP_INSERTS
|
||||
|
||||
GoToAPI else
|
||||
// The specific resource endpoint doesn't have a API handler yet.
|
||||
HTTP_Services('SetResponseStatus', 200, 'This is a valid endpoint but a web API handler has not yet been created.')
|
||||
end
|
||||
|
||||
Return Response OR ''
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Endpoint Handlers
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
API remotehealthcheck.HEAD
|
||||
API remotehealthcheck.GET
|
||||
|
||||
HTTP_Resource_Services('LoremIpsum')
|
||||
|
||||
end api
|
||||
|
||||
|
@ -77,7 +77,6 @@ Return Response or ""
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
Service CalculateMaterialTrackData(RptColumns, LocationFilter, NoMatFlag)
|
||||
|
||||
hSysLists = Database_Services('GetTableHandle', 'SYSLISTS')
|
||||
Lock hSysLists, ServiceKeyID then
|
||||
|
||||
@ -131,7 +130,7 @@ Service CalculateMaterialTrackData(RptColumns, LocationFilter, NoMatFlag)
|
||||
PrevReactNo = ''
|
||||
PrevWO = ''
|
||||
|
||||
SelectSent = 'SELECT SCHED_DET_NG WITH STOP_DTM GE ':Today:' BY REACT_NO'
|
||||
SelectSent = 'SELECT SCHED_DET_NG WITH STOP_DTM GE "':OCONV(Today, 'DT'):'" BY REACT_NO'
|
||||
|
||||
RList(SelectSent,TARGET_ACTIVELIST$,'','','')
|
||||
IF Get_Status(errCode) THEN
|
||||
@ -432,7 +431,7 @@ DETAIL:
|
||||
WPDAdjusted = Epi_Part_Services('GetAdjustedWafersPerDayScheduler', EpiPartNo, S.React_Type)
|
||||
If WPDAdjusted NE '' then
|
||||
CPDAdjusted = SRP_Math('CEILING', (WPDAdjusted/25) )
|
||||
CassInCR = DCount(KittCassList, ',') + DCount(PTICassList, ',') + DCount(LoadedCassList, ',')
|
||||
CassInCR = DCount(KitCassList, ',') + DCount(PTICassList, ',') + DCount(LoadedCassList, ',')
|
||||
CassNeeded = CassInCR - CPDAdjusted
|
||||
end
|
||||
end
|
||||
|
@ -149,7 +149,7 @@ Service GetMaterialTrackReport(RptColumns, LocationFilter, NoMatFlag)
|
||||
PrevReactNo = ''
|
||||
PrevWO = ''
|
||||
|
||||
SelectSent = 'SELECT SCHED_DET_NG WITH STOP_DTM GE ':Today:' BY REACT_NO'
|
||||
SelectSent = 'SELECT SCHED_DET_NG WITH STOP_DTM GE "':OCONV(Today, 'DT'):'" BY REACT_NO'
|
||||
|
||||
RList(SelectSent,TARGET_ACTIVELIST$,'','','')
|
||||
IF Get_Status(errCode) THEN
|
||||
@ -461,7 +461,7 @@ DETAIL:
|
||||
WPDAdjusted = Epi_Part_Services('GetAdjustedWafersPerDayScheduler', EpiPartNo, S.React_Type)
|
||||
If WPDAdjusted NE '' then
|
||||
CPDAdjusted = SRP_Math('CEILING', (WPDAdjusted/25) )
|
||||
CassInCR = DCount(KittCassList, ',') + DCount(PTICassList, ',') + DCount(LoadedCassList, ',')
|
||||
CassInCR = DCount(KitCassList, ',') + DCount(PTICassList, ',') + DCount(LoadedCassList, ',')
|
||||
CassNeeded = CassInCR - CPDAdjusted
|
||||
end
|
||||
end
|
||||
|
@ -218,7 +218,7 @@ end service
|
||||
// Calculates and stores the current inbound pending count for SAP.
|
||||
//----------------------------------------------------------------------------------------------------------------------
|
||||
Service SetInboundPending()
|
||||
|
||||
|
||||
hSysLists = Database_Services('GetTableHandle', 'SYSLISTS')
|
||||
Lock hSysLists, ServiceKeyID then
|
||||
|
||||
@ -387,7 +387,7 @@ end service
|
||||
// Gets the incoming SAP transactions and processes them.
|
||||
//----------------------------------------------------------------------------------------------------------------------
|
||||
Service GetInboundTransactions()
|
||||
|
||||
|
||||
hSysLists = Database_Services('GetTableHandle', 'SYSLISTS')
|
||||
Lock hSysLists, ServiceKeyID then
|
||||
SAPHoldStartDateTime = SAP_Services('GetSAPHoldStartDateTime')
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,23 +1,23 @@
|
||||
Compile subroutine ScrapeOEngineInit(void)
|
||||
#pragma SRP_Precompiler
|
||||
|
||||
$Insert ENVIRON_CONSTANTS
|
||||
|
||||
Declare subroutine Set_Env, GetEngineVersion
|
||||
Declare function RTI_Xlate_Controller
|
||||
|
||||
Version = ''
|
||||
GetEngineVersion(Version)
|
||||
MajorVersion = Version[1, 'F.']
|
||||
If MajorVersion GE 10 then
|
||||
// Stopgap performance fix for OI 10.2.2 RC1. Revelation will re-enable caching by default in 10.2.2 RC2.
|
||||
// Do not invoke this in OI 9 as the function does not exist!
|
||||
rv = RTI_Xlate_Controller('EnableCache')
|
||||
end
|
||||
|
||||
Set_Env(ENV_DEBUGGER_ENABLED$, 2, 1)
|
||||
Set_Env(ENV_DEBUGGER_INTERCEPT_PROC$,'SCRAPE_ENGINE_DEBUGGER_INTERCEPT',1)
|
||||
|
||||
return
|
||||
|
||||
|
||||
Compile subroutine ScrapeOEngineInit(void)
|
||||
#pragma SRP_Precompiler
|
||||
|
||||
$Insert ENVIRON_CONSTANTS
|
||||
|
||||
Declare subroutine Set_Env, GetEngineVersion
|
||||
Declare function RTI_Xlate_Controller
|
||||
|
||||
Version = ''
|
||||
GetEngineVersion(Version)
|
||||
MajorVersion = Version[1, 'F.']
|
||||
If MajorVersion GE 10 then
|
||||
// Stopgap performance fix for OI 10.2.2 RC1. Revelation will re-enable caching by default in 10.2.2 RC2.
|
||||
// Do not invoke this in OI 9 as the function does not exist!
|
||||
rv = RTI_Xlate_Controller('EnableCache')
|
||||
end
|
||||
|
||||
Set_Env(ENV_DEBUGGER_ENABLED$, 2, 1)
|
||||
Set_Env(ENV_DEBUGGER_INTERCEPT_PROC$,'SCRAPE_ENGINE_DEBUGGER_INTERCEPT',1)
|
||||
|
||||
return
|
||||
|
||||
|
||||
|
@ -1,48 +1,48 @@
|
||||
Subroutine Scrape_Engine_Debugger_Intercept(Void)
|
||||
/***********************************************************************************************************************
|
||||
|
||||
This program is proprietary and is not to be used by or disclosed to others, nor is it to be copied without written
|
||||
permission from SRP Computer Solutions, Inc.
|
||||
|
||||
Name : Scrape_Engine_Debugger_Intercept
|
||||
|
||||
Description : Handler program for the HTTP Debugger service module.
|
||||
|
||||
Notes : Service handler for HTTP Requests that abort due to a Runtime Error and the Debugger Intercept
|
||||
has been enabled.
|
||||
|
||||
Parameters :
|
||||
|
||||
Metadata :
|
||||
|
||||
History : (Date, Initials, Notes)
|
||||
07/25/23 djs Original programmer.
|
||||
|
||||
***********************************************************************************************************************/
|
||||
|
||||
#pragma precomp SRP_PreCompiler
|
||||
|
||||
$insert APP_INSERTS
|
||||
$insert RTI_DEBUG_COMMON
|
||||
|
||||
Declare function Environment_Services, Logging_Services
|
||||
Declare subroutine Logging_Services
|
||||
|
||||
LogPath = Environment_Services('GetApplicationRootPath') : '\LogFiles\Scrape'
|
||||
LogDate = Oconv(Date(), 'D4/')
|
||||
LogTime = Oconv(Time(), 'MTS')
|
||||
LogFileName = LogDate[7, 4] : '-' : LogDate[1, 2] : '-' : LogDate[4, 2] : ' OEngine Log.csv'
|
||||
Headers = 'Stored Proc Status' : @FM : 'Stored Proc Status Code' : @FM : 'Current Program' : @FM : 'Call Depth' : @FM : 'Line No' : @FM : 'Call Stack'
|
||||
objLog = Logging_Services('NewLog', LogPath, LogFileName, CRLF$, ',', Headers, '', False$, False$)
|
||||
LogData = ''
|
||||
LogData<1> = SPStatus@
|
||||
LogData<2> = SPStatCode@
|
||||
LogData<3> = Curr_Program@
|
||||
LogData<4> = CallDepth@
|
||||
LogData<5> = LineNo@
|
||||
LogData<6> = CallStack@
|
||||
Logging_Services('AppendLog', objLog, LogData, @RM, @FM, '', '', '')
|
||||
|
||||
Return
|
||||
|
||||
|
||||
Subroutine Scrape_Engine_Debugger_Intercept(Void)
|
||||
/***********************************************************************************************************************
|
||||
|
||||
This program is proprietary and is not to be used by or disclosed to others, nor is it to be copied without written
|
||||
permission from SRP Computer Solutions, Inc.
|
||||
|
||||
Name : Scrape_Engine_Debugger_Intercept
|
||||
|
||||
Description : Handler program for the HTTP Debugger service module.
|
||||
|
||||
Notes : Service handler for HTTP Requests that abort due to a Runtime Error and the Debugger Intercept
|
||||
has been enabled.
|
||||
|
||||
Parameters :
|
||||
|
||||
Metadata :
|
||||
|
||||
History : (Date, Initials, Notes)
|
||||
07/25/23 djs Original programmer.
|
||||
|
||||
***********************************************************************************************************************/
|
||||
|
||||
#pragma precomp SRP_PreCompiler
|
||||
|
||||
$insert APP_INSERTS
|
||||
$insert RTI_DEBUG_COMMON
|
||||
|
||||
Declare function Environment_Services, Logging_Services
|
||||
Declare subroutine Logging_Services
|
||||
|
||||
LogPath = Environment_Services('GetApplicationRootPath') : '\LogFiles\Scrape'
|
||||
LogDate = Oconv(Date(), 'D4/')
|
||||
LogTime = Oconv(Time(), 'MTS')
|
||||
LogFileName = LogDate[7, 4] : '-' : LogDate[1, 2] : '-' : LogDate[4, 2] : ' OEngine Log.csv'
|
||||
Headers = 'Stored Proc Status' : @FM : 'Stored Proc Status Code' : @FM : 'Current Program' : @FM : 'Call Depth' : @FM : 'Line No' : @FM : 'Call Stack'
|
||||
objLog = Logging_Services('NewLog', LogPath, LogFileName, CRLF$, ',', Headers, '', False$, False$)
|
||||
LogData = ''
|
||||
LogData<1> = SPStatus@
|
||||
LogData<2> = SPStatCode@
|
||||
LogData<3> = Curr_Program@
|
||||
LogData<4> = CallDepth@
|
||||
LogData<5> = LineNo@
|
||||
LogData<6> = CallStack@
|
||||
Logging_Services('AppendLog', objLog, LogData, @RM, @FM, '', '', '')
|
||||
|
||||
Return
|
||||
|
||||
|
||||
|
@ -1,131 +1,131 @@
|
||||
Function Scrubber_pm_API(@API)
|
||||
/***********************************************************************************************************************
|
||||
|
||||
This program is proprietary and is not to be used by or disclosed to others, nor is it to be copied without written
|
||||
permission from SRP Computer Solutions, Inc.
|
||||
|
||||
Name : Scrubber_pm_API
|
||||
|
||||
Description : API logic for the Scrubber_pm resource.
|
||||
|
||||
Notes : All web APIs should include the API_SETUP insert. This will provide several useful variables:
|
||||
|
||||
HTTPMethod - The HTTP Method (Verb) submitted by the client (e.g., GET, POST, etc.)
|
||||
APIURL - The URL for the API entry point (e.g., api.mysite.com/v1).
|
||||
FullEndpointURL - The URL submitted by the client, including query params.
|
||||
FullEndpointURLNoQuery - The URL submitted by the client, excluding query params.
|
||||
EndpointSegment - The URL endpoint segment.
|
||||
ParentURL - The URL path preceeding the current endpoint.
|
||||
CurrentAPI - The name of this stored procedure.
|
||||
|
||||
Parameters :
|
||||
API [in] -- Web API to process. Format is [APIPattern].[HTTPMethod]:
|
||||
- APIPattern must follow this structure Scrubber_pm[.ID.[<Property>]]
|
||||
- HTTPMethod can be any valid HTTP method, e.g., GET, POST, PUT, DELETE, etc.
|
||||
Examples:
|
||||
- Scrubber_pm.POST
|
||||
- Scrubber_pm.ID.PUT
|
||||
- Scrubber_pm.ID.firstName.GET
|
||||
Response [out] -- Response to be sent back to the Controller (HTTP_MCP) or requesting procedure. Web API
|
||||
services do not rely upon anything being returned in the response. This is what the
|
||||
various services like SetResponseBody and SetResponseStatus services are for. A response
|
||||
value is only helpful if the developers want to use it for debug purposes.
|
||||
|
||||
History : (Date, Initials, Notes)
|
||||
06/05/24 xxx Original programmer.
|
||||
|
||||
***********************************************************************************************************************/
|
||||
|
||||
#pragma precomp SRP_PreCompiler
|
||||
|
||||
Declare Subroutine Pm_Services, Http_Services, Logging_Services
|
||||
Declare function Error_Services, Logging_Services, Environment_Services, Datetime
|
||||
|
||||
$insert APP_INSERTS
|
||||
$insert API_SETUP
|
||||
$insert HTTP_INSERTS
|
||||
|
||||
LogPath = Environment_Services('GetApplicationRootPath') : '\LogFiles\Scrubbers\API'
|
||||
LogDate = Oconv(Date(), 'D4/')
|
||||
LogTime = Oconv(Time(), 'MTS')
|
||||
LogFileName = LogDate[7, 4] : '-' : LogDate[1, 2] : '-' : LogDate[4, 2] : ' Tool Log.csv'
|
||||
Headers = 'Logging DTM' : @FM : 'ScrubberID' : @FM : 'Notes' : @FM : 'Message'
|
||||
objLog = Logging_Services('NewLog', LogPath, LogFileName, CRLF$, ',', Headers, '', False$, False$)
|
||||
LoggingDTM = LogDate : ' ' : LogTime ; // Logging DTM
|
||||
|
||||
GoToAPI else
|
||||
// The specific resource endpoint doesn't have a API handler yet.
|
||||
HTTP_Services('SetResponseStatus', 204, 'This is a valid endpoint but a web API handler has not yet been created.')
|
||||
end
|
||||
|
||||
Return Response OR ''
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Endpoint Handlers
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
API scrubber_pm.POST
|
||||
Body = HTTP_Services('GetHTTPPostString')
|
||||
If Body NE '' then
|
||||
// The POST string will have been encoded so use percent (URL) decoding.
|
||||
PMJson = HTTP_Services('DecodePercentString', Body)
|
||||
ParseResponse = SRP_JSON(objJson, 'PARSE', PMJson)
|
||||
If (ParseResponse EQ '') then
|
||||
EquipmentID = SRP_JSON(objJson, 'GetValue', 'EquipmentId')
|
||||
User = SRP_JSON(objJson, 'GetValue', 'User')
|
||||
end else
|
||||
HTTP_Services('SetResponseStatus', 400, 'Unable to parse the JSON data from the request.')
|
||||
end
|
||||
end else
|
||||
HTTP_Services('SetResponseStatus', 400, 'JSON object is missing in the body of the request.')
|
||||
end
|
||||
|
||||
end api
|
||||
|
||||
|
||||
API scrubber_pm.HEAD
|
||||
API scrubber_pm.GET
|
||||
|
||||
HTTP_Resource_Services('LoremIpsum')
|
||||
|
||||
end api
|
||||
|
||||
|
||||
API scrubber_pm.ID.HEAD
|
||||
API scrubber_pm.ID.GET
|
||||
|
||||
ScrubberID = EndpointSegment
|
||||
IF RowExists('TOOL', ScrubberID) then
|
||||
Pm_Services('CompleteScrubberPM', ScrubberID)
|
||||
If Error_Services('HasError') then
|
||||
ErrMsg = Error_Services('GetMessage')
|
||||
HTTP_Services('SetResponseStatus', 500, ErrMsg)
|
||||
LogData = ''
|
||||
LogData<1> = OConv(Datetime(), 'DT2/^H')
|
||||
LogData<2> = ScrubberID
|
||||
LogData<3> = 'Error'
|
||||
LogData<4> = ErrMsg
|
||||
Logging_Services('AppendLog', objLog, LogData, @RM, @FM)
|
||||
end else
|
||||
LogData = ''
|
||||
LogData<1> = OConv(Datetime(), 'DT2/^H')
|
||||
LogData<2> = ScrubberID
|
||||
LogData<3> = 'Success'
|
||||
LogData<4> = 'Scrubber PM Completion was successful'
|
||||
Logging_Services('AppendLog', objLog, LogData, @RM, @FM)
|
||||
end
|
||||
end else
|
||||
ErrMsg = 'Scrubber does not exist!'
|
||||
HTTP_Services('SetResponseStatus', 500, ErrMsg)
|
||||
LogData = ''
|
||||
LogData<1> = OConv(Datetime(), 'DT2/^H')
|
||||
LogData<2> = ScrubberID
|
||||
LogData<3> = 'Error'
|
||||
LogData<4> = ErrMsg
|
||||
Logging_Services('AppendLog', objLog, LogData, @RM, @FM)
|
||||
end
|
||||
end api
|
||||
|
||||
|
||||
Function Scrubber_pm_API(@API)
|
||||
/***********************************************************************************************************************
|
||||
|
||||
This program is proprietary and is not to be used by or disclosed to others, nor is it to be copied without written
|
||||
permission from SRP Computer Solutions, Inc.
|
||||
|
||||
Name : Scrubber_pm_API
|
||||
|
||||
Description : API logic for the Scrubber_pm resource.
|
||||
|
||||
Notes : All web APIs should include the API_SETUP insert. This will provide several useful variables:
|
||||
|
||||
HTTPMethod - The HTTP Method (Verb) submitted by the client (e.g., GET, POST, etc.)
|
||||
APIURL - The URL for the API entry point (e.g., api.mysite.com/v1).
|
||||
FullEndpointURL - The URL submitted by the client, including query params.
|
||||
FullEndpointURLNoQuery - The URL submitted by the client, excluding query params.
|
||||
EndpointSegment - The URL endpoint segment.
|
||||
ParentURL - The URL path preceeding the current endpoint.
|
||||
CurrentAPI - The name of this stored procedure.
|
||||
|
||||
Parameters :
|
||||
API [in] -- Web API to process. Format is [APIPattern].[HTTPMethod]:
|
||||
- APIPattern must follow this structure Scrubber_pm[.ID.[<Property>]]
|
||||
- HTTPMethod can be any valid HTTP method, e.g., GET, POST, PUT, DELETE, etc.
|
||||
Examples:
|
||||
- Scrubber_pm.POST
|
||||
- Scrubber_pm.ID.PUT
|
||||
- Scrubber_pm.ID.firstName.GET
|
||||
Response [out] -- Response to be sent back to the Controller (HTTP_MCP) or requesting procedure. Web API
|
||||
services do not rely upon anything being returned in the response. This is what the
|
||||
various services like SetResponseBody and SetResponseStatus services are for. A response
|
||||
value is only helpful if the developers want to use it for debug purposes.
|
||||
|
||||
History : (Date, Initials, Notes)
|
||||
06/05/24 xxx Original programmer.
|
||||
|
||||
***********************************************************************************************************************/
|
||||
|
||||
#pragma precomp SRP_PreCompiler
|
||||
|
||||
Declare Subroutine Pm_Services, Http_Services, Logging_Services
|
||||
Declare function Error_Services, Logging_Services, Environment_Services, Datetime
|
||||
|
||||
$insert APP_INSERTS
|
||||
$insert API_SETUP
|
||||
$insert HTTP_INSERTS
|
||||
|
||||
LogPath = Environment_Services('GetApplicationRootPath') : '\LogFiles\Scrubbers\API'
|
||||
LogDate = Oconv(Date(), 'D4/')
|
||||
LogTime = Oconv(Time(), 'MTS')
|
||||
LogFileName = LogDate[7, 4] : '-' : LogDate[1, 2] : '-' : LogDate[4, 2] : ' Tool Log.csv'
|
||||
Headers = 'Logging DTM' : @FM : 'ScrubberID' : @FM : 'Notes' : @FM : 'Message'
|
||||
objLog = Logging_Services('NewLog', LogPath, LogFileName, CRLF$, ',', Headers, '', False$, False$)
|
||||
LoggingDTM = LogDate : ' ' : LogTime ; // Logging DTM
|
||||
|
||||
GoToAPI else
|
||||
// The specific resource endpoint doesn't have a API handler yet.
|
||||
HTTP_Services('SetResponseStatus', 204, 'This is a valid endpoint but a web API handler has not yet been created.')
|
||||
end
|
||||
|
||||
Return Response OR ''
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Endpoint Handlers
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
API scrubber_pm.POST
|
||||
Body = HTTP_Services('GetHTTPPostString')
|
||||
If Body NE '' then
|
||||
// The POST string will have been encoded so use percent (URL) decoding.
|
||||
PMJson = HTTP_Services('DecodePercentString', Body)
|
||||
ParseResponse = SRP_JSON(objJson, 'PARSE', PMJson)
|
||||
If (ParseResponse EQ '') then
|
||||
EquipmentID = SRP_JSON(objJson, 'GetValue', 'EquipmentId')
|
||||
User = SRP_JSON(objJson, 'GetValue', 'User')
|
||||
end else
|
||||
HTTP_Services('SetResponseStatus', 400, 'Unable to parse the JSON data from the request.')
|
||||
end
|
||||
end else
|
||||
HTTP_Services('SetResponseStatus', 400, 'JSON object is missing in the body of the request.')
|
||||
end
|
||||
|
||||
end api
|
||||
|
||||
|
||||
API scrubber_pm.HEAD
|
||||
API scrubber_pm.GET
|
||||
|
||||
HTTP_Resource_Services('LoremIpsum')
|
||||
|
||||
end api
|
||||
|
||||
|
||||
API scrubber_pm.ID.HEAD
|
||||
API scrubber_pm.ID.GET
|
||||
|
||||
ScrubberID = EndpointSegment
|
||||
IF RowExists('TOOL', ScrubberID) then
|
||||
Pm_Services('CompleteScrubberPM', ScrubberID)
|
||||
If Error_Services('HasError') then
|
||||
ErrMsg = Error_Services('GetMessage')
|
||||
HTTP_Services('SetResponseStatus', 500, ErrMsg)
|
||||
LogData = ''
|
||||
LogData<1> = OConv(Datetime(), 'DT2/^H')
|
||||
LogData<2> = ScrubberID
|
||||
LogData<3> = 'Error'
|
||||
LogData<4> = ErrMsg
|
||||
Logging_Services('AppendLog', objLog, LogData, @RM, @FM)
|
||||
end else
|
||||
LogData = ''
|
||||
LogData<1> = OConv(Datetime(), 'DT2/^H')
|
||||
LogData<2> = ScrubberID
|
||||
LogData<3> = 'Success'
|
||||
LogData<4> = 'Scrubber PM Completion was successful'
|
||||
Logging_Services('AppendLog', objLog, LogData, @RM, @FM)
|
||||
end
|
||||
end else
|
||||
ErrMsg = 'Scrubber does not exist!'
|
||||
HTTP_Services('SetResponseStatus', 500, ErrMsg)
|
||||
LogData = ''
|
||||
LogData<1> = OConv(Datetime(), 'DT2/^H')
|
||||
LogData<2> = ScrubberID
|
||||
LogData<3> = 'Error'
|
||||
LogData<4> = ErrMsg
|
||||
Logging_Services('AppendLog', objLog, LogData, @RM, @FM)
|
||||
end
|
||||
end api
|
||||
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,106 +1,106 @@
|
||||
Compile function System_Healthcheck_Services(@Service, @Params)
|
||||
#pragma precomp SRP_PreCompiler
|
||||
$insert LOGICAL
|
||||
$Insert ENGINE_HEALTH_EQUATES
|
||||
|
||||
Declare Subroutine Error_Services, SRP_Json
|
||||
Declare function System_Healthcheck_Services, Error_Services, SRP_Datetime, SRP_Json
|
||||
|
||||
GoToService
|
||||
|
||||
Return Response or ""
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// SERVICES
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
Service GetEngineLastRunDTM(EngineID)
|
||||
If EngineID NE '' then
|
||||
If RowExists('APP_INFO', EngineID) then
|
||||
Open "APP_INFO" To AITable then
|
||||
LastRunDTM = ''
|
||||
ReadV LastRunDTM From AITable, EngineID, 1 Then
|
||||
If LastRunDTM NE '' then
|
||||
Response = LastRunDTM
|
||||
end else
|
||||
Error_Services('Add', 'Error in System_Healthcheck_Services -> GetEngineLastRunDTM: Last Run Time not found')
|
||||
end
|
||||
end else
|
||||
Error_Services('Add', 'Error in System_Healthcheck_Services -> GetEngineLastRunDTM: Error reading specified engine record')
|
||||
end
|
||||
end else
|
||||
Error_Services('Add', 'Error in System_Healthcheck_Services -> GetEngineLastRunDTM: Unable to open APP_INFO table')
|
||||
end
|
||||
end else
|
||||
Error_Services('Add', 'Error in System_Healthcheck_Services -> GetEngineLastRunDTM: No engine record found')
|
||||
end
|
||||
end else
|
||||
Error_Services('Add', 'Error in System_Healthcheck_Services -> GetEngineLastRunDTM: No Engine ID entered')
|
||||
end
|
||||
End Service
|
||||
|
||||
Service GetEngineHealthInfo(EngineID)
|
||||
EngineHealthInfo = ''
|
||||
If EngineID NE '' then
|
||||
If RowExists('APP_INFO', EngineID) then
|
||||
LastRunDTM = System_HealthCheck_Services('GetEngineLastRunDTM', EngineID)
|
||||
If Error_Services('NoError') then
|
||||
CurrDTM = SRP_Datetime('Now')
|
||||
EngineHealthThreshold = XLATE('APP_INFO', 'ENGINE_HEALTH_THRESHOLD_MINUTES', 1, 'X')
|
||||
MinutesSinceLastRun = SRP_Datetime('MinuteSpan', LastRunDTM, CurrDTM)
|
||||
Healthy = MinutesSinceLastRun LT EngineHealthThreshold
|
||||
EngineHealthInfo<ENGINE_HEALTH_ENGINE_ID$> = EngineID
|
||||
EngineHealthInfo<ENGINE_HEALTH_LAST_RUN_DTM$> = LastRunDTM
|
||||
EngineHealthInfo<ENGINE_HEALTH_MINUTES_SINCE_LAST_RUN$> = MinutesSinceLastRun
|
||||
EngineHealthInfo<ENGINE_HEALTH_HEALTH_STATUS$> = Healthy
|
||||
Response = EngineHealthInfo
|
||||
end else
|
||||
Error_Services('Add', Error_Services('GetMessage'))
|
||||
end
|
||||
end else
|
||||
Error_Services('Add', 'Error in System_Healthcheck_Services -> GetEngineHealth: No engine record found')
|
||||
end
|
||||
end else
|
||||
Error_Services('Add', 'Error in System_Healthcheck_Services -> GetEngineHealth: No Engine ID entered')
|
||||
end
|
||||
end service
|
||||
|
||||
Service ConvertEngineHealthInfoToJSON(EngineHealthInfo, ItemURL)
|
||||
objJSON = ''
|
||||
If SRP_JSON(objJSON, 'New', 'Object') then
|
||||
objEngine = ''
|
||||
If SRP_JSON(objEngine, 'New', 'Object') then
|
||||
SRP_JSON(objEngine, 'SetValue', 'EngineID', EngineHealthInfo<ENGINE_HEALTH_ENGINE_ID$>)
|
||||
SRP_JSON(objEngine, 'SetValue', 'LastRunDTM', EngineHealthInfo<ENGINE_HEALTH_LAST_RUN_DTM$>)
|
||||
SRP_JSON(objEngine, 'SetValue', 'MinutesSinceLastRun', EngineHealthInfo<ENGINE_HEALTH_MINUTES_SINCE_LAST_RUN$>)
|
||||
SRP_JSON(objEngine, 'SetValue', 'Healthy', EngineHealthInfo<ENGINE_HEALTH_HEALTH_STATUS$>)
|
||||
SRP_JSON(objJSON, 'Set', 'Engine', objEngine)
|
||||
SRP_JSON(objEngine, 'Release')
|
||||
end
|
||||
|
||||
If itemURL NE '' then
|
||||
objLinks = ''
|
||||
If SRP_JSON(objLinks, 'New', 'Object') then
|
||||
objLink = ''
|
||||
If SRP_JSON(objLink, 'New', 'Object') then
|
||||
SRP_JSON(objLink, 'SetValue', 'href', ItemURL, 'String')
|
||||
SRP_JSON(objLink, 'SetValue', 'title', 'Self', 'String')
|
||||
SRP_JSON(objLinks, 'Set', 'self', objLink)
|
||||
SRP_JSON(objLink, 'Release')
|
||||
end
|
||||
SRP_JSON(objJSON, 'Set', '_links', objLinks)
|
||||
SRP_JSON(objLinks, 'Release')
|
||||
end
|
||||
SRP_JSON(objJSON, 'SetValue', '_class', 'resource')
|
||||
end
|
||||
JSON = SRP_JSON(objJSON, 'Stringify', 'Styled')
|
||||
SRP_JSON(objJSON, 'Release')
|
||||
end else
|
||||
Error_Services('Add', 'Error creating JSON Object')
|
||||
end
|
||||
Response = JSON
|
||||
end service
|
||||
|
||||
|
||||
|
||||
|
||||
Compile function System_Healthcheck_Services(@Service, @Params)
|
||||
#pragma precomp SRP_PreCompiler
|
||||
$insert LOGICAL
|
||||
$Insert ENGINE_HEALTH_EQUATES
|
||||
|
||||
Declare Subroutine Error_Services, SRP_Json
|
||||
Declare function System_Healthcheck_Services, Error_Services, SRP_Datetime, SRP_Json
|
||||
|
||||
GoToService
|
||||
|
||||
Return Response or ""
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// SERVICES
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
Service GetEngineLastRunDTM(EngineID)
|
||||
If EngineID NE '' then
|
||||
If RowExists('APP_INFO', EngineID) then
|
||||
Open "APP_INFO" To AITable then
|
||||
LastRunDTM = ''
|
||||
ReadV LastRunDTM From AITable, EngineID, 1 Then
|
||||
If LastRunDTM NE '' then
|
||||
Response = LastRunDTM
|
||||
end else
|
||||
Error_Services('Add', 'Error in System_Healthcheck_Services -> GetEngineLastRunDTM: Last Run Time not found')
|
||||
end
|
||||
end else
|
||||
Error_Services('Add', 'Error in System_Healthcheck_Services -> GetEngineLastRunDTM: Error reading specified engine record')
|
||||
end
|
||||
end else
|
||||
Error_Services('Add', 'Error in System_Healthcheck_Services -> GetEngineLastRunDTM: Unable to open APP_INFO table')
|
||||
end
|
||||
end else
|
||||
Error_Services('Add', 'Error in System_Healthcheck_Services -> GetEngineLastRunDTM: No engine record found')
|
||||
end
|
||||
end else
|
||||
Error_Services('Add', 'Error in System_Healthcheck_Services -> GetEngineLastRunDTM: No Engine ID entered')
|
||||
end
|
||||
End Service
|
||||
|
||||
Service GetEngineHealthInfo(EngineID)
|
||||
EngineHealthInfo = ''
|
||||
If EngineID NE '' then
|
||||
If RowExists('APP_INFO', EngineID) then
|
||||
LastRunDTM = System_HealthCheck_Services('GetEngineLastRunDTM', EngineID)
|
||||
If Error_Services('NoError') then
|
||||
CurrDTM = SRP_Datetime('Now')
|
||||
EngineHealthThreshold = XLATE('APP_INFO', 'ENGINE_HEALTH_THRESHOLD_MINUTES', 1, 'X')
|
||||
MinutesSinceLastRun = SRP_Datetime('MinuteSpan', LastRunDTM, CurrDTM)
|
||||
Healthy = MinutesSinceLastRun LT EngineHealthThreshold
|
||||
EngineHealthInfo<ENGINE_HEALTH_ENGINE_ID$> = EngineID
|
||||
EngineHealthInfo<ENGINE_HEALTH_LAST_RUN_DTM$> = LastRunDTM
|
||||
EngineHealthInfo<ENGINE_HEALTH_MINUTES_SINCE_LAST_RUN$> = MinutesSinceLastRun
|
||||
EngineHealthInfo<ENGINE_HEALTH_HEALTH_STATUS$> = Healthy
|
||||
Response = EngineHealthInfo
|
||||
end else
|
||||
Error_Services('Add', Error_Services('GetMessage'))
|
||||
end
|
||||
end else
|
||||
Error_Services('Add', 'Error in System_Healthcheck_Services -> GetEngineHealth: No engine record found')
|
||||
end
|
||||
end else
|
||||
Error_Services('Add', 'Error in System_Healthcheck_Services -> GetEngineHealth: No Engine ID entered')
|
||||
end
|
||||
end service
|
||||
|
||||
Service ConvertEngineHealthInfoToJSON(EngineHealthInfo, ItemURL)
|
||||
objJSON = ''
|
||||
If SRP_JSON(objJSON, 'New', 'Object') then
|
||||
objEngine = ''
|
||||
If SRP_JSON(objEngine, 'New', 'Object') then
|
||||
SRP_JSON(objEngine, 'SetValue', 'EngineID', EngineHealthInfo<ENGINE_HEALTH_ENGINE_ID$>)
|
||||
SRP_JSON(objEngine, 'SetValue', 'LastRunDTM', EngineHealthInfo<ENGINE_HEALTH_LAST_RUN_DTM$>)
|
||||
SRP_JSON(objEngine, 'SetValue', 'MinutesSinceLastRun', EngineHealthInfo<ENGINE_HEALTH_MINUTES_SINCE_LAST_RUN$>)
|
||||
SRP_JSON(objEngine, 'SetValue', 'Healthy', EngineHealthInfo<ENGINE_HEALTH_HEALTH_STATUS$>)
|
||||
SRP_JSON(objJSON, 'Set', 'Engine', objEngine)
|
||||
SRP_JSON(objEngine, 'Release')
|
||||
end
|
||||
|
||||
If itemURL NE '' then
|
||||
objLinks = ''
|
||||
If SRP_JSON(objLinks, 'New', 'Object') then
|
||||
objLink = ''
|
||||
If SRP_JSON(objLink, 'New', 'Object') then
|
||||
SRP_JSON(objLink, 'SetValue', 'href', ItemURL, 'String')
|
||||
SRP_JSON(objLink, 'SetValue', 'title', 'Self', 'String')
|
||||
SRP_JSON(objLinks, 'Set', 'self', objLink)
|
||||
SRP_JSON(objLink, 'Release')
|
||||
end
|
||||
SRP_JSON(objJSON, 'Set', '_links', objLinks)
|
||||
SRP_JSON(objLinks, 'Release')
|
||||
end
|
||||
SRP_JSON(objJSON, 'SetValue', '_class', 'resource')
|
||||
end
|
||||
JSON = SRP_JSON(objJSON, 'Stringify', 'Styled')
|
||||
SRP_JSON(objJSON, 'Release')
|
||||
end else
|
||||
Error_Services('Add', 'Error creating JSON Object')
|
||||
end
|
||||
Response = JSON
|
||||
end service
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -86,13 +86,13 @@ Testing:
|
||||
* DebuggerOn = Get_Env(AttributeList)
|
||||
* DebuggerOn = AttributeList
|
||||
|
||||
TickCount = GetTickCount()
|
||||
Response = 'Hello World2! Ticks: ':TickCount:' Debugger is off'
|
||||
OSWrite Response on 'D:\tmp\HelloWorld2.txt'
|
||||
* TickCount = GetTickCount()
|
||||
* Response = 'Hello World2! Ticks: ':TickCount:' Debugger is off'
|
||||
* OSWrite Response on 'D:\tmp\HelloWorld2.txt'
|
||||
*
|
||||
* Response = Param1
|
||||
|
||||
Response = Param1
|
||||
|
||||
return Response
|
||||
return
|
||||
|
||||
* Testing:
|
||||
*
|
||||
|
@ -94,29 +94,32 @@ $Insert PS_EQUATES
|
||||
|
||||
Main:
|
||||
debug
|
||||
|
||||
TaskID = RTI_Task_Submit('', 'TEST_DANIEL2', '', '', '')
|
||||
|
||||
* Slots = Xlate('WM_OUT', '173011*1*2', 'SLOT_WAFER_ID', 'X')
|
||||
* RDSNos = Xlate('WM_OUT', '173011*1*3', 'RDS', 'X')
|
||||
|
||||
WONo = 172637
|
||||
WOStep = 1
|
||||
CassNo = 30
|
||||
WMOKey = WONo:'*':WOStep:'*':CassNo
|
||||
WOMatKey = WONo:'*':CassNo
|
||||
NCRNos = Xlate('WM_OUT', WMOKey, 'SLOT_NCR', 'X')
|
||||
NumScrapSlots = 0
|
||||
If NCRNos NE '' then
|
||||
For each NCRNo in NCRNos using @VM
|
||||
NumScrapSlots += (NCRNo NE '')
|
||||
Next NCRNo
|
||||
end
|
||||
|
||||
SchedCassQty = XLATE('WO_MAT', WOMatKey, 'WAFER_QTY', 'X')
|
||||
|
||||
If NumScrapSlots GE SchedCassQty then
|
||||
FullBoxReject = True$
|
||||
end else
|
||||
FullBoxReject = False$
|
||||
end
|
||||
* WONo = 172637
|
||||
* WOStep = 1
|
||||
* CassNo = 30
|
||||
* WMOKey = WONo:'*':WOStep:'*':CassNo
|
||||
* WOMatKey = WONo:'*':CassNo
|
||||
* NCRNos = Xlate('WM_OUT', WMOKey, 'SLOT_NCR', 'X')
|
||||
* NumScrapSlots = 0
|
||||
* If NCRNos NE '' then
|
||||
* For each NCRNo in NCRNos using @VM
|
||||
* NumScrapSlots += (NCRNo NE '')
|
||||
* Next NCRNo
|
||||
* end
|
||||
*
|
||||
* SchedCassQty = XLATE('WO_MAT', WOMatKey, 'WAFER_QTY', 'X')
|
||||
*
|
||||
* If NumScrapSlots GE SchedCassQty then
|
||||
* FullBoxReject = True$
|
||||
* end else
|
||||
* FullBoxReject = False$
|
||||
* end
|
||||
|
||||
* Version = ''
|
||||
* GetEngineVersion(Version)
|
||||
@ -124,7 +127,7 @@ Main:
|
||||
* rv = RTI_Xlate_Controller('EnableCache')
|
||||
* end
|
||||
|
||||
return
|
||||
return TaskID
|
||||
|
||||
* Path = Drive()
|
||||
* UNCPath = SRP_Path("PathToUnc", Path)
|
||||
|
@ -1,57 +1,57 @@
|
||||
Compile function Test_Wafer_Counter(@Test)
|
||||
#pragma precomp SRP_PreCompiler
|
||||
|
||||
$Insert APP_INSERTS
|
||||
|
||||
Declare function Wafer_Counter_Services, Error_Services
|
||||
|
||||
// TODO: Code to run before each test goes here
|
||||
|
||||
GotoTest
|
||||
|
||||
// TODO: Code to run after each test goes here
|
||||
|
||||
Return TestResult or 1
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// TESTS
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
Test Test1
|
||||
|
||||
FileData = 'T25':CRLF$:'P1FFFFFF'
|
||||
Value = Wafer_Counter_Services('ConvertWaferData', FileData)
|
||||
If Error_Services('HasError') then Value = Error_Services('GetMessage')
|
||||
Assert Value equals 1:@VM:1:@VM:1:@VM:1:@VM:1:@VM:1:@VM:1:@VM:1:@VM:1:@VM:1:@VM:1:@VM:1:@VM:1:@VM:1:@VM:1:@VM:1:@VM:1:@VM:1:@VM:1:@VM:1:@VM:1:@VM:1:@VM:1:@VM:1:@VM:1
|
||||
|
||||
End Test
|
||||
|
||||
Test Test2
|
||||
|
||||
FileData = 'T00':CRLF$:'P0000000'
|
||||
Value = Wafer_Counter_Services('ConvertWaferData', FileData)
|
||||
If Error_Services('HasError') then Value = Error_Services('GetMessage')
|
||||
Assert Value equals 0:@VM:0:@VM:0:@VM:0:@VM:0:@VM:0:@VM:0:@VM:0:@VM:0:@VM:0:@VM:0:@VM:0:@VM:0:@VM:0:@VM:0:@VM:0:@VM:0:@VM:0:@VM:0:@VM:0:@VM:0:@VM:0:@VM:0:@VM:0:@VM:0
|
||||
|
||||
End Test
|
||||
|
||||
Test Test3
|
||||
|
||||
FileData = 'T12':CRLF$:'P0AAAAAA'
|
||||
Value = Wafer_Counter_Services('ConvertWaferData', FileData)
|
||||
If Error_Services('HasError') then Value = Error_Services('GetMessage')
|
||||
Assert Value equals 0:@VM:1:@VM:0:@VM:1:@VM:0:@VM:1:@VM:0:@VM:1:@VM:0:@VM:1:@VM:0:@VM:1:@VM:0:@VM:1:@VM:0:@VM:1:@VM:0:@VM:1:@VM:0:@VM:1:@VM:0:@VM:1:@VM:0:@VM:1:@VM:0
|
||||
|
||||
end test
|
||||
|
||||
Test Test4
|
||||
|
||||
FileData = 'T13':CRLF$:'P1555555'
|
||||
Value = Wafer_Counter_Services('ConvertWaferData', FileData)
|
||||
If Error_Services('HasError') then Value = Error_Services('GetMessage')
|
||||
Assert Value equals 1:@VM:0:@VM:1:@VM:0:@VM:1:@VM:0:@VM:1:@VM:0:@VM:1:@VM:0:@VM:1:@VM:0:@VM:1:@VM:0:@VM:1:@VM:0:@VM:1:@VM:0:@VM:1:@VM:0:@VM:1:@VM:0:@VM:1:@VM:0:@VM:1
|
||||
|
||||
end test
|
||||
|
||||
|
||||
|
||||
Compile function Test_Wafer_Counter(@Test)
|
||||
#pragma precomp SRP_PreCompiler
|
||||
|
||||
$Insert APP_INSERTS
|
||||
|
||||
Declare function Wafer_Counter_Services, Error_Services
|
||||
|
||||
// TODO: Code to run before each test goes here
|
||||
|
||||
GotoTest
|
||||
|
||||
// TODO: Code to run after each test goes here
|
||||
|
||||
Return TestResult or 1
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// TESTS
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
Test Test1
|
||||
|
||||
FileData = 'T25':CRLF$:'P1FFFFFF'
|
||||
Value = Wafer_Counter_Services('ConvertWaferData', FileData)
|
||||
If Error_Services('HasError') then Value = Error_Services('GetMessage')
|
||||
Assert Value equals 1:@VM:1:@VM:1:@VM:1:@VM:1:@VM:1:@VM:1:@VM:1:@VM:1:@VM:1:@VM:1:@VM:1:@VM:1:@VM:1:@VM:1:@VM:1:@VM:1:@VM:1:@VM:1:@VM:1:@VM:1:@VM:1:@VM:1:@VM:1:@VM:1
|
||||
|
||||
End Test
|
||||
|
||||
Test Test2
|
||||
|
||||
FileData = 'T00':CRLF$:'P0000000'
|
||||
Value = Wafer_Counter_Services('ConvertWaferData', FileData)
|
||||
If Error_Services('HasError') then Value = Error_Services('GetMessage')
|
||||
Assert Value equals 0:@VM:0:@VM:0:@VM:0:@VM:0:@VM:0:@VM:0:@VM:0:@VM:0:@VM:0:@VM:0:@VM:0:@VM:0:@VM:0:@VM:0:@VM:0:@VM:0:@VM:0:@VM:0:@VM:0:@VM:0:@VM:0:@VM:0:@VM:0:@VM:0
|
||||
|
||||
End Test
|
||||
|
||||
Test Test3
|
||||
|
||||
FileData = 'T12':CRLF$:'P0AAAAAA'
|
||||
Value = Wafer_Counter_Services('ConvertWaferData', FileData)
|
||||
If Error_Services('HasError') then Value = Error_Services('GetMessage')
|
||||
Assert Value equals 0:@VM:1:@VM:0:@VM:1:@VM:0:@VM:1:@VM:0:@VM:1:@VM:0:@VM:1:@VM:0:@VM:1:@VM:0:@VM:1:@VM:0:@VM:1:@VM:0:@VM:1:@VM:0:@VM:1:@VM:0:@VM:1:@VM:0:@VM:1:@VM:0
|
||||
|
||||
end test
|
||||
|
||||
Test Test4
|
||||
|
||||
FileData = 'T13':CRLF$:'P1555555'
|
||||
Value = Wafer_Counter_Services('ConvertWaferData', FileData)
|
||||
If Error_Services('HasError') then Value = Error_Services('GetMessage')
|
||||
Assert Value equals 1:@VM:0:@VM:1:@VM:0:@VM:1:@VM:0:@VM:1:@VM:0:@VM:1:@VM:0:@VM:1:@VM:0:@VM:1:@VM:0:@VM:1:@VM:0:@VM:1:@VM:0:@VM:1:@VM:0:@VM:1:@VM:0:@VM:1:@VM:0:@VM:1
|
||||
|
||||
end test
|
||||
|
||||
|
||||
|
||||
|
@ -1,17 +1,17 @@
|
||||
compile insert CHANGE_LOG_EQUATES
|
||||
/*----------------------------------------
|
||||
Author : Table Create Insert Routine
|
||||
Written : 18/07/2024
|
||||
Description : Insert for Table CHANGE_LOG
|
||||
----------------------------------------*/
|
||||
|
||||
|
||||
Equ CHANGE_LOG_CHANGE_ID$ To 0
|
||||
Equ CHANGE_LOG_CHANGE_DTM$ To 1
|
||||
Equ CHANGE_LOG_APPLICATION$ To 2
|
||||
Equ CHANGE_LOG_ENTITY_TYPE$ To 3
|
||||
Equ CHANGE_LOG_ENTITY_CLASS$ To 4
|
||||
Equ CHANGE_LOG_ENTITY_NAME$ To 5
|
||||
Equ CHANGE_LOG_UPDATED_BY$ To 6
|
||||
Equ CHANGE_LOG_ENVIRONMENT$ To 7
|
||||
|
||||
compile insert CHANGE_LOG_EQUATES
|
||||
/*----------------------------------------
|
||||
Author : Table Create Insert Routine
|
||||
Written : 18/07/2024
|
||||
Description : Insert for Table CHANGE_LOG
|
||||
----------------------------------------*/
|
||||
|
||||
|
||||
Equ CHANGE_LOG_CHANGE_ID$ To 0
|
||||
Equ CHANGE_LOG_CHANGE_DTM$ To 1
|
||||
Equ CHANGE_LOG_APPLICATION$ To 2
|
||||
Equ CHANGE_LOG_ENTITY_TYPE$ To 3
|
||||
Equ CHANGE_LOG_ENTITY_CLASS$ To 4
|
||||
Equ CHANGE_LOG_ENTITY_NAME$ To 5
|
||||
Equ CHANGE_LOG_UPDATED_BY$ To 6
|
||||
Equ CHANGE_LOG_ENVIRONMENT$ To 7
|
||||
|
||||
|
@ -1,12 +1,12 @@
|
||||
compile insert ENGINE_HEALTH_EQUATES
|
||||
/*----------------------------------------
|
||||
Author : Table Create Insert Routine
|
||||
Written : 05/02/2010
|
||||
Description : Insert for Table EMAIL_BOX
|
||||
----------------------------------------*/
|
||||
|
||||
EQU ENGINE_HEALTH_ENGINE_ID$ to 1
|
||||
EQU ENGINE_HEALTH_LAST_RUN_DTM$ to 2
|
||||
EQU ENGINE_HEALTH_MINUTES_SINCE_LAST_RUN$ to 3
|
||||
EQU ENGINE_HEALTH_HEALTH_STATUS$ to 4
|
||||
|
||||
compile insert ENGINE_HEALTH_EQUATES
|
||||
/*----------------------------------------
|
||||
Author : Table Create Insert Routine
|
||||
Written : 05/02/2010
|
||||
Description : Insert for Table EMAIL_BOX
|
||||
----------------------------------------*/
|
||||
|
||||
EQU ENGINE_HEALTH_ENGINE_ID$ to 1
|
||||
EQU ENGINE_HEALTH_LAST_RUN_DTM$ to 2
|
||||
EQU ENGINE_HEALTH_MINUTES_SINCE_LAST_RUN$ to 3
|
||||
EQU ENGINE_HEALTH_HEALTH_STATUS$ to 4
|
||||
|
||||
|
@ -20,7 +20,7 @@ Declare function NDW_Messaging_Processor_Events, RetStack, SRP_Encode, SRP_De
|
||||
Declare subroutine Error_Services, Messaging_Services, Memory_Services, SRP_JSON, SRP_COM
|
||||
Declare subroutine NDW_Messaging_Processor_Events, SRP_Stopwatch, Send_Event, Send_Message, RTP27
|
||||
|
||||
Equ Server.Name$ to 'MESTSA01EC'
|
||||
Equ Server.Name$ to 'MESSA01EC'
|
||||
Equ Server.Port$ to 25000
|
||||
Equ Server.KeepAlive$ to 60000
|
||||
Equ MessageProcessor$ to 'NDW_MESSAGING_PROCESSOR'
|
||||
|
@ -1,38 +1,38 @@
|
||||
compile insert REACTOR_DAILY_UPTIME_EQUATES
|
||||
/*----------------------------------------
|
||||
Author : Table Create Insert Routine
|
||||
Written : 21/08/2024
|
||||
Description : Insert for Table REACTOR_DAILY_UPTIME
|
||||
----------------------------------------*/
|
||||
|
||||
|
||||
Equ REACTOR_DAILY_UPTIME_DATE$ To 0
|
||||
Equ REACTOR_DAILY_UPTIME_REACT_TYPE$ To 0
|
||||
Equ REACTOR_DAILY_UPTIME_TOTAL_PROD_PERCENTAGE$ To 1
|
||||
Equ REACTOR_DAILY_UPTIME_TOTAL_PROD_MINUTES$ To 2
|
||||
Equ REACTOR_DAILY_UPTIME_TOTAL_ENG_PERCENTAGE$ To 3
|
||||
Equ REACTOR_DAILY_UPTIME_TOTAL_ENG_MINUTES$ To 4
|
||||
Equ REACTOR_DAILY_UPTIME_TOTAL_DOWN_UNSCHED_PERCENTAGE$ To 5
|
||||
Equ REACTOR_DAILY_UPTIME_TOTAL_DOWN_UNSCHED_MINUTES$ To 6
|
||||
Equ REACTOR_DAILY_UPTIME_TOTAL_DOWN_SCHED_PERCENTAGE$ To 7
|
||||
Equ REACTOR_DAILY_UPTIME_TOTAL_DOWN_SCHED_MINUTES$ To 8
|
||||
Equ REACTOR_DAILY_UPTIME_INCL_REACTORS$ To 9
|
||||
Equ REACTOR_DAILY_UPTIME_INCL_REACTOR_PROD_PERCENTAGE$ To 10
|
||||
Equ REACTOR_DAILY_UPTIME_INCL_REACTOR_PROD_MINUTES$ To 11
|
||||
Equ REACTOR_DAILY_UPTIME_INCL_REACTOR_ENG_PERCENTAGE$ To 12
|
||||
Equ REACTOR_DAILY_UPTIME_INCL_REACTOR_ENG_MINUTES$ To 13
|
||||
Equ REACTOR_DAILY_UPTIME_INCL_REACTOR_DOWN_UNSCHED_PERCENTAGE$ To 14
|
||||
Equ REACTOR_DAILY_UPTIME_INCL_REACTOR_DOWN_UNSCHED_MINUTES$ To 15
|
||||
Equ REACTOR_DAILY_UPTIME_INCL_REACTOR_DOWN_SCHED_PERCENTAGE$ To 16
|
||||
Equ REACTOR_DAILY_UPTIME_INCL_REACTOR_DOWN_SCHED_MINUTES$ To 17
|
||||
Equ REACTOR_DAILY_UPTIME_INCL_REACTOR_IDLE_PERCENTAGE$ To 18
|
||||
Equ REACTOR_DAILY_UPTIME_INCL_REACTOR_IDLE_MINUTES$ To 19
|
||||
Equ REACTOR_DAILY_UPTIME_EXCLUDED_REACTORS$ To 20
|
||||
Equ REACTOR_DAILY_UPTIME_TOTAL_UPTIME_PERCENTAGE$ To 21
|
||||
Equ REACTOR_DAILY_UPTIME_TOTAL_IDLE_PERCENTAGE$ To 22
|
||||
Equ REACTOR_DAILY_UPTIME_TOTAL_IDLE_MINUTES$ To 23
|
||||
Equ REACTOR_DAILY_UPTIME_TOTAL_UPTIME_MINUTES$ To 24
|
||||
Equ REACTOR_DAILY_UPTIME_TOTAL_AVAIL_MINUTES$ To 25
|
||||
Equ REACTOR_DAILY_UPTIME_INCL_REACTOR_SINGLE_LL$ To 26
|
||||
Equ REACTOR_DAILY_UPTIME_TOTAL_SINGLE_LL$ To 27
|
||||
|
||||
compile insert REACTOR_DAILY_UPTIME_EQUATES
|
||||
/*----------------------------------------
|
||||
Author : Table Create Insert Routine
|
||||
Written : 21/08/2024
|
||||
Description : Insert for Table REACTOR_DAILY_UPTIME
|
||||
----------------------------------------*/
|
||||
|
||||
|
||||
Equ REACTOR_DAILY_UPTIME_DATE$ To 0
|
||||
Equ REACTOR_DAILY_UPTIME_REACT_TYPE$ To 0
|
||||
Equ REACTOR_DAILY_UPTIME_TOTAL_PROD_PERCENTAGE$ To 1
|
||||
Equ REACTOR_DAILY_UPTIME_TOTAL_PROD_MINUTES$ To 2
|
||||
Equ REACTOR_DAILY_UPTIME_TOTAL_ENG_PERCENTAGE$ To 3
|
||||
Equ REACTOR_DAILY_UPTIME_TOTAL_ENG_MINUTES$ To 4
|
||||
Equ REACTOR_DAILY_UPTIME_TOTAL_DOWN_UNSCHED_PERCENTAGE$ To 5
|
||||
Equ REACTOR_DAILY_UPTIME_TOTAL_DOWN_UNSCHED_MINUTES$ To 6
|
||||
Equ REACTOR_DAILY_UPTIME_TOTAL_DOWN_SCHED_PERCENTAGE$ To 7
|
||||
Equ REACTOR_DAILY_UPTIME_TOTAL_DOWN_SCHED_MINUTES$ To 8
|
||||
Equ REACTOR_DAILY_UPTIME_INCL_REACTORS$ To 9
|
||||
Equ REACTOR_DAILY_UPTIME_INCL_REACTOR_PROD_PERCENTAGE$ To 10
|
||||
Equ REACTOR_DAILY_UPTIME_INCL_REACTOR_PROD_MINUTES$ To 11
|
||||
Equ REACTOR_DAILY_UPTIME_INCL_REACTOR_ENG_PERCENTAGE$ To 12
|
||||
Equ REACTOR_DAILY_UPTIME_INCL_REACTOR_ENG_MINUTES$ To 13
|
||||
Equ REACTOR_DAILY_UPTIME_INCL_REACTOR_DOWN_UNSCHED_PERCENTAGE$ To 14
|
||||
Equ REACTOR_DAILY_UPTIME_INCL_REACTOR_DOWN_UNSCHED_MINUTES$ To 15
|
||||
Equ REACTOR_DAILY_UPTIME_INCL_REACTOR_DOWN_SCHED_PERCENTAGE$ To 16
|
||||
Equ REACTOR_DAILY_UPTIME_INCL_REACTOR_DOWN_SCHED_MINUTES$ To 17
|
||||
Equ REACTOR_DAILY_UPTIME_INCL_REACTOR_IDLE_PERCENTAGE$ To 18
|
||||
Equ REACTOR_DAILY_UPTIME_INCL_REACTOR_IDLE_MINUTES$ To 19
|
||||
Equ REACTOR_DAILY_UPTIME_EXCLUDED_REACTORS$ To 20
|
||||
Equ REACTOR_DAILY_UPTIME_TOTAL_UPTIME_PERCENTAGE$ To 21
|
||||
Equ REACTOR_DAILY_UPTIME_TOTAL_IDLE_PERCENTAGE$ To 22
|
||||
Equ REACTOR_DAILY_UPTIME_TOTAL_IDLE_MINUTES$ To 23
|
||||
Equ REACTOR_DAILY_UPTIME_TOTAL_UPTIME_MINUTES$ To 24
|
||||
Equ REACTOR_DAILY_UPTIME_TOTAL_AVAIL_MINUTES$ To 25
|
||||
Equ REACTOR_DAILY_UPTIME_INCL_REACTOR_SINGLE_LL$ To 26
|
||||
Equ REACTOR_DAILY_UPTIME_TOTAL_SINGLE_LL$ To 27
|
||||
|
||||
|
@ -1,207 +1,207 @@
|
||||
compile insert SRP_EDITOR_TEMP_MSG_EQUATES_SYSPROG
|
||||
|
||||
******************************************************************************
|
||||
*
|
||||
* Product : OpenInsight for Workgroups
|
||||
* Version : 3.5
|
||||
*
|
||||
* History : (date, initials, notes)
|
||||
* 12/15/95 apk Original programmer.
|
||||
* 02/26/96 cp Changed OK return value to "" from 0 (backwards compat.)
|
||||
* 03/28/96 cp Added MHELP$, MREQRESP$, and MBEEP$ fields
|
||||
* Commented message structure and instructions
|
||||
* 06/24/97 cp Added G (gauge) type, removed unused equates
|
||||
******************************************************************************
|
||||
|
||||
declare subroutine Msg ;* Msg(Parent, MsgDef [, MsgKey, Instruction, Params])
|
||||
declare function Msg ;* Ans = Msg(Parent, MsgDef [, MsgKey, Instruction, Params])
|
||||
|
||||
* message structure field definitions
|
||||
equ MTEXT$ to 1 ;* the text to display in the message, multiple lines delimited by @tm, cr/lf, or "|"
|
||||
equ MTYPE$ to 2 ;* the message type, defaults to "BO" (see below)
|
||||
equ MMODAL$ to 3 ;* modality of message, defaults to "A" (see below)
|
||||
equ MICON$ to 4 ;* icon to display (see below)
|
||||
equ MDEFBTN$ to 5 ;* default button (1 for first, 2 for second, etc.)
|
||||
equ MCOL$ to 6 ;* message h-pos in pixels, or -2 (center screen, the default), -1 (center parent)
|
||||
equ MROW$ to 7 ;* message v-pos in pixels
|
||||
equ MJUST$ to 8 ;* justification: T (text, the default), L (left), R (right), C (center)
|
||||
equ MBKCOLOR$ to 9 ;* background color (RGB value, @vm-delimited), see Utility("CHOOSECOLOR")
|
||||
equ MFGCOLOR$ to 10 ;* foreground color (RGB value, @vm-delimited), see Utility("CHOOSECOLOR")
|
||||
equ MTEXTWIDTH$ to 11 ;* the message width (or the response field width for response messages)
|
||||
equ MCAPTION$ to 12 ;* the message title
|
||||
equ MVALID$ to 13 ;* for response messages, this is the validation pattern (ie. (MD0) for integer)
|
||||
equ MDEFINPUT$ to 14 ;* for reponse messages, this is the default response
|
||||
equ MMASKINPUT$ to 15 ;* boolean, true for password (masked) input, false (default) for readable input
|
||||
equ MBITMAP$ to 16 ;* name of a bitmap registered in repository (as it appears in the outliner)
|
||||
equ MCLIPBMP$ to 17 ;* boolean, true to clip bitmaps, false to resize (see IMAGECLIP property)
|
||||
equ MFONT$ to 18 ;* font structure for the text of the message
|
||||
equ MLITERAL$ to 19 ;* boolean, defaults to false, true specifies that default value is a function (see below)
|
||||
equ MHELP$ to 20 ;* help button, Type:@vm:Specifier:@vm:Text (see below), defaults to null (no help)
|
||||
equ MREQRESP$ to 21 ;* boolean, for type "R" messages, false allows nulls (default) while true doesn't
|
||||
equ MBEEP$ to 22 ;* integer, specifies beep (see MessageBeep in the Windows API)
|
||||
equ MEXTENT$ to 23 ;* integer, specifies extent of the gauge (number of items to process for type="G")
|
||||
equ MNUMFIELDS$ to 23
|
||||
|
||||
|
||||
* MTYPE$ details:
|
||||
*
|
||||
* there are six base types, B (buttons), R (response), U (up), and D (down),
|
||||
* T (timed), and G (gauge)
|
||||
*
|
||||
* the button type has several pre-defined button sets which are localized
|
||||
* using entries from the SYSTEM_RESOURCES record in the SYSENV table; for
|
||||
* non-standard labels, the buttons can be specified in a comma-delimited
|
||||
* list, like "B&One,&Two,&Three" (where the & specifies the accelerator)
|
||||
*
|
||||
* B Type Description
|
||||
* ------ --------------------
|
||||
* BO OK
|
||||
* BOC OK/Cancel
|
||||
* BNY Yes/No
|
||||
* BNYC Yes/No/Cancel
|
||||
* BRC Retry/Cancel
|
||||
* BAR Abort/Retry
|
||||
* BARI Abort/Retry/Ignore
|
||||
* B{list} User-defined buttons
|
||||
*
|
||||
* the response type displays an edit field and OK and Cancel buttons;
|
||||
* the optional sub-types are C (upper-case only) and E (escape or
|
||||
* cancel button returns escape character instead of default response);
|
||||
* for example, the following types are valid: "R", "RC", "RE", "RCE"
|
||||
*
|
||||
* for B and R types, the type can be preceded with an N to specify that
|
||||
* the default value for the message is to be returned without the message
|
||||
* being displayed; this is one way to change messages from interactive
|
||||
* to non-interactive for batch processes; for example, instead of "BARI",
|
||||
* pass "NBARI" (meaning don't display the abort/retry/ignore message)
|
||||
*
|
||||
* to display a message while processing, use the "U" type:
|
||||
*
|
||||
* Def = ""
|
||||
* Def<MTEXT$> = "Processing..."
|
||||
* Def<MTYPE$> = "U"
|
||||
* MsgUp = Msg(@window, Def) ;* display the processing message
|
||||
* ...
|
||||
* Msg(@window, MsgUp) ;* take down the processing message
|
||||
*
|
||||
* to display a message for a specific length of time, use the "T" type:
|
||||
*
|
||||
* Def = ""
|
||||
* Def<MTEXT$> = "Waiting..."
|
||||
* Def<MTYPE$> = "T2" ;* 2-second message
|
||||
* Msg(@window, Def)
|
||||
*
|
||||
* the optional sub-type for T type is A (asynchronous), which displays
|
||||
* the message and returns (allowing processing to continue) and takes
|
||||
* the message down after the specified period of time; since this relies
|
||||
* on a timer event, your event code must either complete within the
|
||||
* specified period of time or you must regularly use Yield() to allow
|
||||
* the processing of posted events (like the timer):
|
||||
*
|
||||
* Def = ""
|
||||
* Def<MTYPE$> = "TA5" ;* 5-second splash-screen
|
||||
* Msg(@window, Def, "SPLASHSCREEN")
|
||||
* loop
|
||||
* Done = AppLogonProcessing()
|
||||
* Yield()
|
||||
* until Done
|
||||
* repeat
|
||||
*
|
||||
* to display a gauge (percent bar), use the "G" type; sub-types are C (show
|
||||
* cancel button) and Y (yield on each cycle):
|
||||
*
|
||||
* Def = ""
|
||||
* Def<MCAPTION$> = "Processing Orders..."
|
||||
* Def<MTYPE$ > = "GC"
|
||||
* Def<MEXTENT$ > = OrderCnt
|
||||
* MsgUp = Msg(@window, Def)
|
||||
* for Order = 1 to OrderCnt
|
||||
* gosub ProcessOrder
|
||||
* * update the gauge and check if cancel was pressed
|
||||
* while Msg(@window, MsgUp, Order, MSGINSTUPDATE$)
|
||||
* next Order
|
||||
* Msg(@window, MsgUp) ;* take down the gauge
|
||||
|
||||
* MMODAL$ detail:
|
||||
*
|
||||
* Code Modality Description
|
||||
* ----------- ----------- -----------------------------
|
||||
* W Window only the parent is disabled
|
||||
* A (default) Application all OI windows are disabled
|
||||
* S System all applications are disabled
|
||||
|
||||
* MICON$ detail:
|
||||
*
|
||||
* Code Icon
|
||||
* ---- ---------------
|
||||
* null None
|
||||
* * Asterisk (Info)
|
||||
* ? Question
|
||||
* ! Exclaim (Warning)
|
||||
* H Halt (Stop sign)
|
||||
* B User-specified bitmap (specified in MBITMAP$ field)
|
||||
|
||||
* MLITERAL$ details (applies only to response type messages):
|
||||
*
|
||||
* if MLITERAL$ is true, the Msg() function assumes that the default value is
|
||||
* the name of a function which returns the default value for the message;
|
||||
* for example, if you wrote a function called CURRENTUSER which returned
|
||||
* the user name of the current user, you could specify CURRENTUSER as the
|
||||
* default value (MDEFINPUT$) and set MLITERAL$ to true, so that the current
|
||||
* user name would be the default value for the message; parameters are
|
||||
* passed to the specified function depending on the number of parameters
|
||||
* that are supported by the function:
|
||||
*
|
||||
* # Params Values Passed
|
||||
* --------- --------------
|
||||
* 0 None
|
||||
* 1 MsgKey
|
||||
* 2 or more MsgKey, MsgDef
|
||||
|
||||
* MHELP$ details:
|
||||
*
|
||||
* Type Description Specifier
|
||||
* ---- ------------- -----------------
|
||||
* Q QuickHelp (AppNote) Name of AppNote
|
||||
* M Message Name of Message
|
||||
* H WinHelp HelpFile,HelpID
|
||||
* S Stored Procedure ProcName[,Param1]
|
||||
*
|
||||
* Note: Specify the AppNote, Message, HelpFile, or ProcName as it appears
|
||||
* in the repository outliner. For example, the OINSIGHT.HLP file is
|
||||
* registered as OINSIGHT, so specify the HelpFile as "OINSIGHT" (look
|
||||
* in the outline under "General", "Windows Components", "Help Files")
|
||||
*
|
||||
* Text defaults to "&Help" or a localized equivalent
|
||||
|
||||
* Replaceable message parameters:
|
||||
*
|
||||
* Msg(@window, "Hello, %1%, how are you %2%?", "", "", @username: @fm: "today")
|
||||
|
||||
* Msg() function instruction values
|
||||
equ MSGINSTSTART$ to 1 ;* (default instruction)
|
||||
equ MSGINSTREAD$ to 2 ;* bErr = Msg("", MsgDef, MsgID, MSGINSTREAD$)
|
||||
equ MSGINSTWRITE$ to 3 ;* bErr = Msg("", MsgDef, MsgID, MSGINSTWRITE$)
|
||||
equ MSGINSTLOCK$ to 4 ;* bErr = Msg("", "", MsgID, MSGINSTLOCK$)
|
||||
equ MSGINSTUNLOCK$ to 5 ;* bErr = Msg("", "", MsgID, MSGINSTUNLOCK$)
|
||||
equ MSGINSTBUTTON$ to 6 ;* reserved
|
||||
equ MSGINSTCREATE$ to 7 ;* reserved
|
||||
equ MSGINSTRESPCHG$ to 8 ;* reserved
|
||||
equ MSGINSTCLOSE$ to 9 ;* reserved
|
||||
equ MSGINSTTIMER$ to 10 ;* reserved
|
||||
equ MSGINSTHELP$ to 11 ;* reserved
|
||||
equ MSGINSTUPDATE$ to 12 ;* (see above)
|
||||
|
||||
* Msg() function return values from MSGINSTSTART$
|
||||
equ RET_OK$ to ""
|
||||
equ RET_CANCEL$ to \1B\ ;* escape character
|
||||
equ RET_YES$ to 1
|
||||
equ RET_NO$ to 0
|
||||
equ RET_ABORT$ to 1
|
||||
equ RET_RETRY$ to 2
|
||||
equ RET_IGNORE$ to 3
|
||||
|
||||
* misc strings
|
||||
equ MSGTYPE$ to "MSG"
|
||||
equ MSGCLASS$ to ""
|
||||
|
||||
compile insert SRP_EDITOR_TEMP_MSG_EQUATES_SYSPROG
|
||||
|
||||
******************************************************************************
|
||||
*
|
||||
* Product : OpenInsight for Workgroups
|
||||
* Version : 3.5
|
||||
*
|
||||
* History : (date, initials, notes)
|
||||
* 12/15/95 apk Original programmer.
|
||||
* 02/26/96 cp Changed OK return value to "" from 0 (backwards compat.)
|
||||
* 03/28/96 cp Added MHELP$, MREQRESP$, and MBEEP$ fields
|
||||
* Commented message structure and instructions
|
||||
* 06/24/97 cp Added G (gauge) type, removed unused equates
|
||||
******************************************************************************
|
||||
|
||||
declare subroutine Msg ;* Msg(Parent, MsgDef [, MsgKey, Instruction, Params])
|
||||
declare function Msg ;* Ans = Msg(Parent, MsgDef [, MsgKey, Instruction, Params])
|
||||
|
||||
* message structure field definitions
|
||||
equ MTEXT$ to 1 ;* the text to display in the message, multiple lines delimited by @tm, cr/lf, or "|"
|
||||
equ MTYPE$ to 2 ;* the message type, defaults to "BO" (see below)
|
||||
equ MMODAL$ to 3 ;* modality of message, defaults to "A" (see below)
|
||||
equ MICON$ to 4 ;* icon to display (see below)
|
||||
equ MDEFBTN$ to 5 ;* default button (1 for first, 2 for second, etc.)
|
||||
equ MCOL$ to 6 ;* message h-pos in pixels, or -2 (center screen, the default), -1 (center parent)
|
||||
equ MROW$ to 7 ;* message v-pos in pixels
|
||||
equ MJUST$ to 8 ;* justification: T (text, the default), L (left), R (right), C (center)
|
||||
equ MBKCOLOR$ to 9 ;* background color (RGB value, @vm-delimited), see Utility("CHOOSECOLOR")
|
||||
equ MFGCOLOR$ to 10 ;* foreground color (RGB value, @vm-delimited), see Utility("CHOOSECOLOR")
|
||||
equ MTEXTWIDTH$ to 11 ;* the message width (or the response field width for response messages)
|
||||
equ MCAPTION$ to 12 ;* the message title
|
||||
equ MVALID$ to 13 ;* for response messages, this is the validation pattern (ie. (MD0) for integer)
|
||||
equ MDEFINPUT$ to 14 ;* for reponse messages, this is the default response
|
||||
equ MMASKINPUT$ to 15 ;* boolean, true for password (masked) input, false (default) for readable input
|
||||
equ MBITMAP$ to 16 ;* name of a bitmap registered in repository (as it appears in the outliner)
|
||||
equ MCLIPBMP$ to 17 ;* boolean, true to clip bitmaps, false to resize (see IMAGECLIP property)
|
||||
equ MFONT$ to 18 ;* font structure for the text of the message
|
||||
equ MLITERAL$ to 19 ;* boolean, defaults to false, true specifies that default value is a function (see below)
|
||||
equ MHELP$ to 20 ;* help button, Type:@vm:Specifier:@vm:Text (see below), defaults to null (no help)
|
||||
equ MREQRESP$ to 21 ;* boolean, for type "R" messages, false allows nulls (default) while true doesn't
|
||||
equ MBEEP$ to 22 ;* integer, specifies beep (see MessageBeep in the Windows API)
|
||||
equ MEXTENT$ to 23 ;* integer, specifies extent of the gauge (number of items to process for type="G")
|
||||
equ MNUMFIELDS$ to 23
|
||||
|
||||
|
||||
* MTYPE$ details:
|
||||
*
|
||||
* there are six base types, B (buttons), R (response), U (up), and D (down),
|
||||
* T (timed), and G (gauge)
|
||||
*
|
||||
* the button type has several pre-defined button sets which are localized
|
||||
* using entries from the SYSTEM_RESOURCES record in the SYSENV table; for
|
||||
* non-standard labels, the buttons can be specified in a comma-delimited
|
||||
* list, like "B&One,&Two,&Three" (where the & specifies the accelerator)
|
||||
*
|
||||
* B Type Description
|
||||
* ------ --------------------
|
||||
* BO OK
|
||||
* BOC OK/Cancel
|
||||
* BNY Yes/No
|
||||
* BNYC Yes/No/Cancel
|
||||
* BRC Retry/Cancel
|
||||
* BAR Abort/Retry
|
||||
* BARI Abort/Retry/Ignore
|
||||
* B{list} User-defined buttons
|
||||
*
|
||||
* the response type displays an edit field and OK and Cancel buttons;
|
||||
* the optional sub-types are C (upper-case only) and E (escape or
|
||||
* cancel button returns escape character instead of default response);
|
||||
* for example, the following types are valid: "R", "RC", "RE", "RCE"
|
||||
*
|
||||
* for B and R types, the type can be preceded with an N to specify that
|
||||
* the default value for the message is to be returned without the message
|
||||
* being displayed; this is one way to change messages from interactive
|
||||
* to non-interactive for batch processes; for example, instead of "BARI",
|
||||
* pass "NBARI" (meaning don't display the abort/retry/ignore message)
|
||||
*
|
||||
* to display a message while processing, use the "U" type:
|
||||
*
|
||||
* Def = ""
|
||||
* Def<MTEXT$> = "Processing..."
|
||||
* Def<MTYPE$> = "U"
|
||||
* MsgUp = Msg(@window, Def) ;* display the processing message
|
||||
* ...
|
||||
* Msg(@window, MsgUp) ;* take down the processing message
|
||||
*
|
||||
* to display a message for a specific length of time, use the "T" type:
|
||||
*
|
||||
* Def = ""
|
||||
* Def<MTEXT$> = "Waiting..."
|
||||
* Def<MTYPE$> = "T2" ;* 2-second message
|
||||
* Msg(@window, Def)
|
||||
*
|
||||
* the optional sub-type for T type is A (asynchronous), which displays
|
||||
* the message and returns (allowing processing to continue) and takes
|
||||
* the message down after the specified period of time; since this relies
|
||||
* on a timer event, your event code must either complete within the
|
||||
* specified period of time or you must regularly use Yield() to allow
|
||||
* the processing of posted events (like the timer):
|
||||
*
|
||||
* Def = ""
|
||||
* Def<MTYPE$> = "TA5" ;* 5-second splash-screen
|
||||
* Msg(@window, Def, "SPLASHSCREEN")
|
||||
* loop
|
||||
* Done = AppLogonProcessing()
|
||||
* Yield()
|
||||
* until Done
|
||||
* repeat
|
||||
*
|
||||
* to display a gauge (percent bar), use the "G" type; sub-types are C (show
|
||||
* cancel button) and Y (yield on each cycle):
|
||||
*
|
||||
* Def = ""
|
||||
* Def<MCAPTION$> = "Processing Orders..."
|
||||
* Def<MTYPE$ > = "GC"
|
||||
* Def<MEXTENT$ > = OrderCnt
|
||||
* MsgUp = Msg(@window, Def)
|
||||
* for Order = 1 to OrderCnt
|
||||
* gosub ProcessOrder
|
||||
* * update the gauge and check if cancel was pressed
|
||||
* while Msg(@window, MsgUp, Order, MSGINSTUPDATE$)
|
||||
* next Order
|
||||
* Msg(@window, MsgUp) ;* take down the gauge
|
||||
|
||||
* MMODAL$ detail:
|
||||
*
|
||||
* Code Modality Description
|
||||
* ----------- ----------- -----------------------------
|
||||
* W Window only the parent is disabled
|
||||
* A (default) Application all OI windows are disabled
|
||||
* S System all applications are disabled
|
||||
|
||||
* MICON$ detail:
|
||||
*
|
||||
* Code Icon
|
||||
* ---- ---------------
|
||||
* null None
|
||||
* * Asterisk (Info)
|
||||
* ? Question
|
||||
* ! Exclaim (Warning)
|
||||
* H Halt (Stop sign)
|
||||
* B User-specified bitmap (specified in MBITMAP$ field)
|
||||
|
||||
* MLITERAL$ details (applies only to response type messages):
|
||||
*
|
||||
* if MLITERAL$ is true, the Msg() function assumes that the default value is
|
||||
* the name of a function which returns the default value for the message;
|
||||
* for example, if you wrote a function called CURRENTUSER which returned
|
||||
* the user name of the current user, you could specify CURRENTUSER as the
|
||||
* default value (MDEFINPUT$) and set MLITERAL$ to true, so that the current
|
||||
* user name would be the default value for the message; parameters are
|
||||
* passed to the specified function depending on the number of parameters
|
||||
* that are supported by the function:
|
||||
*
|
||||
* # Params Values Passed
|
||||
* --------- --------------
|
||||
* 0 None
|
||||
* 1 MsgKey
|
||||
* 2 or more MsgKey, MsgDef
|
||||
|
||||
* MHELP$ details:
|
||||
*
|
||||
* Type Description Specifier
|
||||
* ---- ------------- -----------------
|
||||
* Q QuickHelp (AppNote) Name of AppNote
|
||||
* M Message Name of Message
|
||||
* H WinHelp HelpFile,HelpID
|
||||
* S Stored Procedure ProcName[,Param1]
|
||||
*
|
||||
* Note: Specify the AppNote, Message, HelpFile, or ProcName as it appears
|
||||
* in the repository outliner. For example, the OINSIGHT.HLP file is
|
||||
* registered as OINSIGHT, so specify the HelpFile as "OINSIGHT" (look
|
||||
* in the outline under "General", "Windows Components", "Help Files")
|
||||
*
|
||||
* Text defaults to "&Help" or a localized equivalent
|
||||
|
||||
* Replaceable message parameters:
|
||||
*
|
||||
* Msg(@window, "Hello, %1%, how are you %2%?", "", "", @username: @fm: "today")
|
||||
|
||||
* Msg() function instruction values
|
||||
equ MSGINSTSTART$ to 1 ;* (default instruction)
|
||||
equ MSGINSTREAD$ to 2 ;* bErr = Msg("", MsgDef, MsgID, MSGINSTREAD$)
|
||||
equ MSGINSTWRITE$ to 3 ;* bErr = Msg("", MsgDef, MsgID, MSGINSTWRITE$)
|
||||
equ MSGINSTLOCK$ to 4 ;* bErr = Msg("", "", MsgID, MSGINSTLOCK$)
|
||||
equ MSGINSTUNLOCK$ to 5 ;* bErr = Msg("", "", MsgID, MSGINSTUNLOCK$)
|
||||
equ MSGINSTBUTTON$ to 6 ;* reserved
|
||||
equ MSGINSTCREATE$ to 7 ;* reserved
|
||||
equ MSGINSTRESPCHG$ to 8 ;* reserved
|
||||
equ MSGINSTCLOSE$ to 9 ;* reserved
|
||||
equ MSGINSTTIMER$ to 10 ;* reserved
|
||||
equ MSGINSTHELP$ to 11 ;* reserved
|
||||
equ MSGINSTUPDATE$ to 12 ;* (see above)
|
||||
|
||||
* Msg() function return values from MSGINSTSTART$
|
||||
equ RET_OK$ to ""
|
||||
equ RET_CANCEL$ to \1B\ ;* escape character
|
||||
equ RET_YES$ to 1
|
||||
equ RET_NO$ to 0
|
||||
equ RET_ABORT$ to 1
|
||||
equ RET_RETRY$ to 2
|
||||
equ RET_IGNORE$ to 3
|
||||
|
||||
* misc strings
|
||||
equ MSGTYPE$ to "MSG"
|
||||
equ MSGCLASS$ to ""
|
||||
|
||||
|
@ -1,20 +1,20 @@
|
||||
compile insert SUPPLEMENTS_EQUATES
|
||||
/*----------------------------------------
|
||||
Author : Table Create Insert Routine
|
||||
Written : 20/03/2024
|
||||
Description : Insert for Table SUPPLEMENTS
|
||||
----------------------------------------*/
|
||||
|
||||
|
||||
Equ SUPPLEMENTS_SUPPL_ID$ To 0
|
||||
Equ SUPPLEMENTS_LOT_TYPE$ To 1
|
||||
Equ SUPPLEMENTS_LOT_ID$ To 2
|
||||
Equ SUPPLEMENTS_STAGE$ To 3
|
||||
Equ SUPPLEMENTS_SUPPL_TEXT$ To 4
|
||||
Equ SUPPLEMENTS_SUPPL_ACK$ To 5
|
||||
Equ SUPPLEMENTS_ACK_USER$ To 6
|
||||
Equ SUPPLEMENTS_ACK_DTM$ To 7
|
||||
Equ SUPPLEMENTS_ENTRY_USER$ To 8
|
||||
Equ SUPPLEMENTS_ENTRY_DATETIME$ To 9
|
||||
|
||||
|
||||
compile insert SUPPLEMENTS_EQUATES
|
||||
/*----------------------------------------
|
||||
Author : Table Create Insert Routine
|
||||
Written : 20/03/2024
|
||||
Description : Insert for Table SUPPLEMENTS
|
||||
----------------------------------------*/
|
||||
|
||||
|
||||
Equ SUPPLEMENTS_SUPPL_ID$ To 0
|
||||
Equ SUPPLEMENTS_LOT_TYPE$ To 1
|
||||
Equ SUPPLEMENTS_LOT_ID$ To 2
|
||||
Equ SUPPLEMENTS_STAGE$ To 3
|
||||
Equ SUPPLEMENTS_SUPPL_TEXT$ To 4
|
||||
Equ SUPPLEMENTS_SUPPL_ACK$ To 5
|
||||
Equ SUPPLEMENTS_ACK_USER$ To 6
|
||||
Equ SUPPLEMENTS_ACK_DTM$ To 7
|
||||
Equ SUPPLEMENTS_ENTRY_USER$ To 8
|
||||
Equ SUPPLEMENTS_ENTRY_DATETIME$ To 9
|
||||
|
||||
|
||||
|
@ -1,14 +1,14 @@
|
||||
compile insert UNLOCK_REQUESTS_EQUATES
|
||||
/*----------------------------------------
|
||||
Author : Table Create Insert Routine
|
||||
Written : 19/03/2024
|
||||
Description : Insert for Table UNLOCK_REQUESTS
|
||||
----------------------------------------*/
|
||||
|
||||
|
||||
Equ UNLOCK_REQUESTS_REQUEST_DATETIME$ To 0
|
||||
Equ UNLOCK_REQUESTS_TABLE_NAME$ To 0
|
||||
Equ UNLOCK_REQUESTS_RECORD_KEY$ To 1
|
||||
Equ UNLOCK_REQUESTS_USER_NAME$ To 2
|
||||
Equ UNLOCK_REQUESTS_SUCCESS$ To 3
|
||||
|
||||
compile insert UNLOCK_REQUESTS_EQUATES
|
||||
/*----------------------------------------
|
||||
Author : Table Create Insert Routine
|
||||
Written : 19/03/2024
|
||||
Description : Insert for Table UNLOCK_REQUESTS
|
||||
----------------------------------------*/
|
||||
|
||||
|
||||
Equ UNLOCK_REQUESTS_REQUEST_DATETIME$ To 0
|
||||
Equ UNLOCK_REQUESTS_TABLE_NAME$ To 0
|
||||
Equ UNLOCK_REQUESTS_RECORD_KEY$ To 1
|
||||
Equ UNLOCK_REQUESTS_USER_NAME$ To 2
|
||||
Equ UNLOCK_REQUESTS_SUCCESS$ To 3
|
||||
|
||||
|
@ -1,17 +1,17 @@
|
||||
compile insert WAFER_COUNTER_EQUATES
|
||||
/*----------------------------------------
|
||||
Author : Table Create Insert Routine
|
||||
Written : 22/03/2024
|
||||
Description : Insert for Table WAFER_COUNTER
|
||||
----------------------------------------*/
|
||||
|
||||
|
||||
Equ WAFER_COUNTER.SCAN_ID$ To 0
|
||||
Equ WAFER_COUNTER.LOT_ID$ To 1
|
||||
Equ WAFER_COUNTER.SCAN_QTY$ To 2
|
||||
Equ WAFER_COUNTER.SCAN_DTM$ To 3
|
||||
Equ WAFER_COUNTER.SCAN_TOOL$ To 4
|
||||
Equ WAFER_COUNTER.SCAN_USER$ To 5
|
||||
Equ WAFER_COUNTER.SCAN_LOCATION$ To 6
|
||||
Equ WAFER_COUNTER.SCAN_WAFER_MAP$ To 7
|
||||
|
||||
compile insert WAFER_COUNTER_EQUATES
|
||||
/*----------------------------------------
|
||||
Author : Table Create Insert Routine
|
||||
Written : 22/03/2024
|
||||
Description : Insert for Table WAFER_COUNTER
|
||||
----------------------------------------*/
|
||||
|
||||
|
||||
Equ WAFER_COUNTER.SCAN_ID$ To 0
|
||||
Equ WAFER_COUNTER.LOT_ID$ To 1
|
||||
Equ WAFER_COUNTER.SCAN_QTY$ To 2
|
||||
Equ WAFER_COUNTER.SCAN_DTM$ To 3
|
||||
Equ WAFER_COUNTER.SCAN_TOOL$ To 4
|
||||
Equ WAFER_COUNTER.SCAN_USER$ To 5
|
||||
Equ WAFER_COUNTER.SCAN_LOCATION$ To 6
|
||||
Equ WAFER_COUNTER.SCAN_WAFER_MAP$ To 7
|
||||
|
||||
|
@ -445,7 +445,7 @@ return
|
||||
|
||||
|
||||
Populate:
|
||||
|
||||
|
||||
Set_Property('SYSTEM', 'CURSOR', 'H')
|
||||
Set_Property(@Window:".OLE_RPT_WORK", "OLE.EmptyTablePrompt", "Loading...")
|
||||
Set_Property(@Window:'.OLE_RPT_WORK', 'OLE.List', "")
|
||||
|
Loading…
x
Reference in New Issue
Block a user