75 lines
2.3 KiB
Plaintext
75 lines
2.3 KiB
Plaintext
FUNCTION CHANGE_LOG_SERVICES(@Service, @Params)
|
|
|
|
|
|
|
|
|
|
#pragma precomp SRP_PreCompiler
|
|
$Insert LOGICAL
|
|
$insert SERVICE_SETUP
|
|
$Insert REVDOTNETEQUATES
|
|
|
|
|
|
Declare function Repository, Get_Repos_Entities, SRP_DateTime, SRP_Array, Get_Status, Set_Status, Errmsg, Datetime
|
|
Declare subroutine Set_Status, Errmsg, Error_Services
|
|
Declare Function Database_Services
|
|
Declare Function Environment_Services
|
|
|
|
|
|
|
|
|
|
|
|
GoToService else
|
|
Error_Services('Add', Service : ' is not a valid service request within the ' : ServiceModule : ' services module.')
|
|
end
|
|
Return Response OR ''
|
|
|
|
//Write to sharepoint
|
|
Service WriteToSharePoint()
|
|
hSysLists = Database_Services('GetTableHandle', 'SYSLISTS')
|
|
Lock hSysLists, ServiceKeyID then
|
|
//Define the dotNet version
|
|
DotNetHandle = StartDotNet("","4.0")
|
|
|
|
//Specify the DLL
|
|
rv = Set_Property.NET(DotNetHandle, "AssemblyName", "D:\Apps\OICurrent\IFXAPI\SharePoint\SharePointTools.dll")
|
|
|
|
//Create_Class.NET(//Define the classes
|
|
SPApi = Create_Class.NET(DotNetHandle, "SharePointTools.ExportToSharePoint", 0)
|
|
|
|
//Set report start time to the past 30 minutes.
|
|
StartDateTime = Datetime()
|
|
StartDateTime = SRP_DateTime("AddMinutes", StartDateTime, -15)
|
|
//StartDateTime = SRP_DateTime('AddDays', StartDateTime, -7)
|
|
|
|
//Pull in a list of all existing entities
|
|
AllEntityIDs = Get_Repos_Entities('LSL2', '', '', 0, 1, 0, '')
|
|
EntityList = ''
|
|
|
|
Server = Environment_Services('GetServer')
|
|
IF Server EQ 'MESSA005' then
|
|
Environment = 'PROD'
|
|
end else
|
|
Environment = 'DEV'
|
|
end
|
|
|
|
For Each EntityID in AllEntityIDs using @FM
|
|
|
|
Set_Status(0)
|
|
statList = ''
|
|
Entity = Repository('GET', EntityID)
|
|
time = Entity<25>
|
|
If time GE StartDateTime then
|
|
time = OCONV(time,'DT4/^H')
|
|
(application, entityType, entityClass, entityName) using '*' = EntityID
|
|
updatedBy = Entity<26>
|
|
IF entityType NE 'STPROCDBG' AND entityType NE 'STPROCEXE' then
|
|
SharePointLog = Send_Message.NET(SPApi, "SendToList",time:@FM:application:@FM:entityType:@FM:entityClass:@FM:entityName:@FM:updatedBy:@FM:Environment, "System.String":@FM:"System.String":@FM:"System.String":@FM:"System.String":@FM:"System.String":@FM:"System.String":@FM:"System.String")
|
|
end
|
|
end
|
|
test1='test'
|
|
Next EntityID
|
|
end
|
|
Unlock hSysLists, ServiceKeyID else Null
|
|
end service
|
|
|