-
Notifications
You must be signed in to change notification settings - Fork 1
/
%ZSTART.int
80 lines (80 loc) · 2.35 KB
/
%ZSTART.int
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
ROUTINE %ZSTART [Type=INT]
; ARSBlue ToolBox-4-Iris
; Copyright © 2019 ARS Blue GmbH
; http://www.ars-blue.at
;
; Common start entry points
quit
SYSTEM ; ISC IRIS startup
new nsp,namespaces,idx,namespace
set nsp=$ZU(5)
try
{
set namespaces=$LISTFROMSTRING($ZU(90,28,0,0,$ZU(90,20,1))) quit:((namespaces="") || (namespaces=$LB()))
for idx=1:1:$LL(namespaces)
{
set namespace=$LG(namespaces,idx) continue:(namespace="")
zn namespace
do:($D(^oddCOM("arsblue.event.SystemEventProvider","m","FireSystemEvent"))) $ClassMethod("arsblue.event.SystemEventProvider","FireSystemEvent","SYSTEM",1)
}
}
catch (exc)
{
// should never happen, but to be sure the startup succeeds!
}
zn nsp
quit
LOGIN ; User login
try
{
do:($D(^oddCOM("arsblue.event.SystemEventProvider","m","FireSystemEvent"))) $ClassMethod("arsblue.event.SystemEventProvider","FireSystemEvent","LOGIN",1,({
"$JOB":($JOB),
"$IO":($IO),
"$ROLES":($ROLES),
"$USERNAME":($USERNAME),
"ClientIPAddress":($System.Process.ClientIPAddress()),
"ClientNodeName":($System.Process.ClientNodeName()),
"UserName":($System.Process.UserName())
}))
}
catch (exc)
{
// should never happen, but to be sure the login succeeds!
}
quit
JOB ; Background process start
try
{
do:($D(^oddCOM("arsblue.event.SystemEventProvider","m","FireSystemEvent"))) $ClassMethod("arsblue.event.SystemEventProvider","FireSystemEvent","JOB",1,({
"$JOB":($JOB),
"$IO":($IO),
"$ROLES":($ROLES),
"$USERNAME":($USERNAME),
"ClientIPAddress":($System.Process.ClientIPAddress()),
"ClientNodeName":($System.Process.ClientNodeName()),
"UserName":($System.Process.UserName())
}))
}
catch (exc)
{
// should never happen, but to be sure the job start succeeds!
}
quit
CALLIN ; External program start
try
{
do:($D(^oddCOM("arsblue.event.SystemEventProvider","m","FireSystemEvent"))) $ClassMethod("arsblue.event.SystemEventProvider","FireSystemEvent","CALLIN",1,({
"$JOB":($JOB),
"$IO":($IO),
"$ROLES":($ROLES),
"$USERNAME":($USERNAME),
"ClientIPAddress":($System.Process.ClientIPAddress()),
"ClientNodeName":($System.Process.ClientNodeName()),
"UserName":($System.Process.UserName())
}))
}
catch (exc)
{
// should never happen, but to be sure the external program start succeeds!
}
quit