Added more core functionality

This commit is contained in:
Infineon\Ouellette
2025-01-16 16:50:30 -07:00
committed by Ouellette Jonathan (CSC FI SPS MESLEO)
parent b73aa6b578
commit 9f3dfbfe12
4 changed files with 275 additions and 7 deletions

View File

@ -152,7 +152,6 @@ end api
API returntofab.ID.PATCH
debug
// Update reactor reactor and return updated reactor object
RTFId = EndpointSegment
If RTFId then
@ -184,6 +183,16 @@ debug
Return_To_Fab_Services('SetReasonForReturn', RTFId, LSLUser, Value)
Case Field EQ 'EvalResultId'
Return_To_Fab_Services('SetEvalInfo', RTFId, LSLUser, Value)
Case Field EQ 'MhInitDtm'
Return_To_Fab_Services('SetBinToBin', RTFId, LSLUser)
Case Field EQ 'CompletedDtm'
Return_To_Fab_Services('SetFinalBinToBin', RTFId, LSLUser)
if Error_Services('NoError') then
Return_To_Fab_Services('SetRTFCompleted', RTFId, LSLUser)
end else
ErrorMessage = Error_Services('GetMessage')
Error_Services('Add', ErrorMessage)
end
Case Otherwise$
Error_Services('Add', 'Error Updating ' : Field : 'field in RTF Record.')
End Case
@ -234,6 +243,87 @@ API returntofab.evaluationresultoptions.GET
end
end api
API returntofab.reportopenforms.HEAD
API returntofab.reportopenforms.GET
OIWizardID = ''
Cookies = HTTP_Services('GetHTTPCookie')
For each Cookie in Cookies using ';'
Key = Field(Cookie, '=', 1)
If Key EQ 'sessionID' then
OIWizardID = Field(Cookie, '=', 2)
end
Next Cookie
ValidSession = OI_Wizard_Services('ValidateSession', OIWizardID)
If ValidSession then
UserId = Xlate('OI_WIZARD', OIWizardID, 'EMPLOYEE_ID', 'X')
RTFId = EndpointSegment
If Error_Services('NoError') AND RTFId NE '' then
RTFJson = Return_To_Fab_Services('CreateReturnToFabReportJson', True$)
If Error_Services('NoError') then
HTTP_Services('SetResponseHeaderField', 'Content-Location', FullEndpointURL)
HTTP_Services('SetResponseBody', RTFJson, False$, 'application/hal+json')
If Assigned(Message) then
HTTP_Services('SetResponseStatus', 201, Message)
end else
HTTP_Services('SetResponseStatus', 201)
end
end else
end
end else
HTTP_Services('SetResponseStatus', 400, Error_Services('GetMessage'))
end
end else
HTTP_Services('SetResponseStatus', 401, 'Invalid session. Reauthentication required.')
end
end api
API returntofab.reportallforms.HEAD
API returntofab.reportallforms.GET
OIWizardID = ''
Cookies = HTTP_Services('GetHTTPCookie')
For each Cookie in Cookies using ';'
Key = Field(Cookie, '=', 1)
If Key EQ 'sessionID' then
OIWizardID = Field(Cookie, '=', 2)
end
Next Cookie
ValidSession = OI_Wizard_Services('ValidateSession', OIWizardID)
If ValidSession then
UserId = Xlate('OI_WIZARD', OIWizardID, 'EMPLOYEE_ID', 'X')
RTFId = EndpointSegment
If Error_Services('NoError') AND RTFId NE '' then
RTFJson = Return_To_Fab_Services('CreateReturnToFabReportJson', False$)
If Error_Services('NoError') then
HTTP_Services('SetResponseHeaderField', 'Content-Location', FullEndpointURL)
HTTP_Services('SetResponseBody', RTFJson, False$, 'application/hal+json')
If Assigned(Message) then
HTTP_Services('SetResponseStatus', 201, Message)
end else
HTTP_Services('SetResponseStatus', 201)
end
end else
end
end else
HTTP_Services('SetResponseStatus', 400, Error_Services('GetMessage'))
end
end else
HTTP_Services('SetResponseStatus', 401, 'Invalid session. Reauthentication required.')
end
end api
//----------------------------------------------------------------------------------------------------------------------
// CreateResultOptionCollection
//