iris-pex-embedded-python 2.3.19__py3-none-any.whl → 2.3.21b1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of iris-pex-embedded-python might be problematic. Click here for more details.

Files changed (54) hide show
  1. grongier/cls/Grongier/PEX/Common.cls +115 -74
  2. grongier/pex/wsgi/handlers.py +51 -0
  3. intersystems_iris/_IRISOREF.py +6 -1
  4. intersystems_iris/dbapi/_DBAPI.py +16 -1
  5. intersystems_iris/dbapi/_Parameter.py +2 -0
  6. {iris_pex_embedded_python-2.3.19.dist-info → iris_pex_embedded_python-2.3.21b1.dist-info}/METADATA +32 -10
  7. {iris_pex_embedded_python-2.3.19.dist-info → iris_pex_embedded_python-2.3.21b1.dist-info}/RECORD +11 -53
  8. {iris_pex_embedded_python-2.3.19.dist-info → iris_pex_embedded_python-2.3.21b1.dist-info}/WHEEL +1 -1
  9. grongier/iris/Grongier/PEX/BusinessOperation.cls +0 -33
  10. grongier/iris/Grongier/PEX/BusinessProcess.cls +0 -100
  11. grongier/iris/Grongier/PEX/BusinessService.cls +0 -33
  12. grongier/iris/Grongier/PEX/Common.cls +0 -133
  13. grongier/iris/Grongier/PEX/Director.cls +0 -15
  14. grongier/iris/Grongier/PEX/Duplex/Operation.cls +0 -27
  15. grongier/iris/Grongier/PEX/Duplex/Process.cls +0 -211
  16. grongier/iris/Grongier/PEX/Duplex/Service.cls +0 -9
  17. grongier/iris/Grongier/PEX/InboundAdapter.cls +0 -22
  18. grongier/iris/Grongier/PEX/Message.cls +0 -126
  19. grongier/iris/Grongier/PEX/OutboundAdapter.cls +0 -34
  20. grongier/iris/Grongier/PEX/PickleMessage.cls +0 -58
  21. grongier/iris/Grongier/PEX/PrivateSession/Duplex.cls +0 -247
  22. grongier/iris/Grongier/PEX/PrivateSession/Message/Ack.cls +0 -32
  23. grongier/iris/Grongier/PEX/PrivateSession/Message/Poll.cls +0 -32
  24. grongier/iris/Grongier/PEX/PrivateSession/Message/Start.cls +0 -32
  25. grongier/iris/Grongier/PEX/PrivateSession/Message/Stop.cls +0 -48
  26. grongier/iris/Grongier/PEX/Python.cls +0 -27
  27. grongier/iris/Grongier/PEX/Test.cls +0 -62
  28. grongier/iris/Grongier/PEX/Utils.cls +0 -312
  29. grongier/iris/__init__.py +0 -0
  30. grongier/pex/data/PEX/BusinessOperation.cls +0 -35
  31. grongier/pex/data/PEX/BusinessProcess.cls +0 -113
  32. grongier/pex/data/PEX/BusinessService.cls +0 -35
  33. grongier/pex/data/PEX/Common.cls +0 -146
  34. grongier/pex/data/PEX/Director.cls +0 -57
  35. grongier/pex/data/PEX/Duplex/Operation.cls +0 -29
  36. grongier/pex/data/PEX/Duplex/Process.cls +0 -229
  37. grongier/pex/data/PEX/Duplex/Service.cls +0 -9
  38. grongier/pex/data/PEX/InboundAdapter.cls +0 -22
  39. grongier/pex/data/PEX/Message.cls +0 -128
  40. grongier/pex/data/PEX/OutboundAdapter.cls +0 -36
  41. grongier/pex/data/PEX/PickleMessage.cls +0 -58
  42. grongier/pex/data/PEX/PrivateSession/Duplex.cls +0 -260
  43. grongier/pex/data/PEX/PrivateSession/Message/Ack.cls +0 -32
  44. grongier/pex/data/PEX/PrivateSession/Message/Poll.cls +0 -32
  45. grongier/pex/data/PEX/PrivateSession/Message/Start.cls +0 -32
  46. grongier/pex/data/PEX/PrivateSession/Message/Stop.cls +0 -48
  47. grongier/pex/data/PEX/Test.cls +0 -62
  48. grongier/pex/data/PEX/Utils.cls +0 -413
  49. iris/iris_site.py +0 -13
  50. iris/irisbuiltins.py +0 -97
  51. iris/irisloader.py +0 -199
  52. {iris_pex_embedded_python-2.3.19.dist-info → iris_pex_embedded_python-2.3.21b1.dist-info}/LICENSE +0 -0
  53. {iris_pex_embedded_python-2.3.19.dist-info → iris_pex_embedded_python-2.3.21b1.dist-info}/entry_points.txt +0 -0
  54. {iris_pex_embedded_python-2.3.19.dist-info → iris_pex_embedded_python-2.3.21b1.dist-info}/top_level.txt +0 -0
@@ -1,34 +0,0 @@
1
- /* Copyright (c) 2021 by InterSystems Corporation.
2
- Cambridge, Massachusetts, U.S.A. All rights reserved.
3
- Confidential property of InterSystems Corporation. */
4
-
5
- Class Grongier.PEX.OutboundAdapter Extends (Ens.OutboundAdapter, Grongier.PEX.Common) [ Inheritance = right, ProcedureBlock, System = 4 ]
6
- {
7
-
8
- Property KeepaliveInterval As %Numeric [ InitialExpression = 0 ];
9
-
10
- Parameter SETTINGS = "KeepaliveInterval:Python CallInterval,%classname:Python OutboundAdapter,%module:Python OutboundAdapter,%settings:Python OutboundAdapter,%classpaths:Python OutboundAdapter";
11
-
12
- Method %DispatchMethod(method As %String, args...) As %ObjectHandle
13
- {
14
- if $quit {
15
- quit $method($this.%class,method,args...)
16
- } else {
17
- do $method($this.%class,method,args...)
18
- quit
19
- }
20
- }
21
-
22
- Method OnKeepalive(pStatus As %Status = {$$$OK}) As %Status
23
- {
24
- set tSC = $$$OK
25
- try {
26
- $$$ThrowOnError(##super(pStatus))
27
- do ..%class."on_keepalive"()
28
- } catch ex {
29
- set tSC = ex.AsStatus()
30
- }
31
- quit tSC
32
- }
33
-
34
- }
@@ -1,58 +0,0 @@
1
- /* Copyright (c) 2021 by InterSystems Corporation.
2
- Cambridge, Massachusetts, U.S.A. All rights reserved.
3
- Confidential property of InterSystems Corporation. */
4
-
5
- Class Grongier.PEX.PickleMessage Extends (Ens.MessageBody, %CSP.Page)
6
- {
7
-
8
- Property classname As %String(MAXLEN = "");
9
-
10
- Property jstr As %Stream.GlobalCharacter [ Internal, Private ];
11
-
12
- Method %OnNew(classname) As %Status [ Private, ServerOnly = 1 ]
13
- {
14
- set ..classname = $g(classname)
15
- Quit $$$OK
16
- }
17
-
18
- /// This method is called by the Management Portal to determine the content type that will be returned by the <method>%ShowContents</method> method.
19
- /// The return value is a string containing an HTTP content type.
20
- Method %GetContentType() As %String
21
- {
22
- Quit "text/html"
23
- }
24
-
25
- /// This method is called by the Management Portal to display a message-specific content viewer.<br>
26
- /// This method displays its content by writing out to the current device.
27
- /// The content should match the type returned by the <method>%GetContentType</method> method.<br>
28
- Method %ShowContents(pZenOutput As %Boolean = 0)
29
- {
30
- // https://github.com/bazh/jquery.json-view
31
- &html<<div id="element">#(..classname)#</div>>
32
- &html<<div>Pickle Pyhton Message can't be displayed</div>>
33
- }
34
-
35
- Storage Default
36
- {
37
- <Data name="MessageDefaultData">
38
- <Subscript>"Message"</Subscript>
39
- <Value name="1">
40
- <Value>classname</Value>
41
- </Value>
42
- <Value name="2">
43
- <Value>json</Value>
44
- </Value>
45
- <Value name="3">
46
- <Value>jstr</Value>
47
- </Value>
48
- </Data>
49
- <Data name="jsonObject">
50
- <Attribute>jsonObject</Attribute>
51
- <Structure>node</Structure>
52
- <Subscript>"Grongier.PEX.Message.jsonObject"</Subscript>
53
- </Data>
54
- <DefaultData>MessageDefaultData</DefaultData>
55
- <Type>%Storage.Persistent</Type>
56
- }
57
-
58
- }
@@ -1,247 +0,0 @@
1
- /* Copyright (c) 2022 by InterSystems Corporation.
2
- Cambridge, Massachusetts, U.S.A. All rights reserved.
3
- Confidential property of InterSystems Corporation. */
4
-
5
- Class Grongier.PEX.PrivateSessionDuplex Extends (Grongier.PEX.Common, Ens.BusinessDuplex) [ Abstract, System = 4 ]
6
- {
7
-
8
- /// Domain for error messages
9
- Parameter DOMAIN = "PrivateSession";
10
-
11
- Parameter SETTINGS = "DuplexTargetConfigName,%classname:Python BusinessProcess,%module:Python BusinessProcess,%settings:Python BusinessProcess,%classpaths:Python BusinessProcess";
12
-
13
- /// Configuration item(s) to which to send messages
14
- Property DuplexTargetConfigName As %String(MAXLEN = 1000);
15
-
16
- /// This holds the deferred response token
17
- Property DeferredResponseToken As %String;
18
-
19
- /// This holds data that is not yet ready for processing
20
- Property ReceivedDataQueue As list Of %Library.Persistent;
21
-
22
- /// This method is called by the TCP Adapter when a message is received.
23
- Method OnProcessInput(pInput As %Persistent, Output pOutput As %Persistent, ByRef pHint As %String) As %Status
24
- {
25
- set tSC = $$$OK
26
- try {
27
- try {
28
- set ..%class."_wait_for_next_call_interval" = ..%WaitForNextCallInterval
29
- }catch {}
30
- set pOutput = ..%class."_dispatch_on_process_input"(pInput)
31
- try {
32
- set ..%WaitForNextCallInterval = ..%class."_wait_for_next_call_interval"
33
- }catch {}
34
- } catch ex {
35
- set tSC = ex.AsStatus()
36
- }
37
- quit tSC
38
- }
39
-
40
- Method dispatchSendDocumentToProcess(pDocument) As %String
41
- {
42
- set tSC = ..SendDocumentToProcess(pDocument)
43
- if $$$ISERR(tSC) throw ##class(%Exception.StatusException).CreateFromStatus(tSC)
44
- quit
45
- }
46
-
47
- Method SendDocumentToProcess(pDocument As %Library.Persistent) As %Status
48
- {
49
- #dim tSC As %Status = $$$OK
50
- try {
51
- If '..%InPrivateSession Set tSC=..StartPrivateSession() Quit:$$$ISERR(tSC)
52
- If ..DeferredResponseToken'="" {
53
- Set tSC=..SendDeferredResponse(..DeferredResponseToken,pDocument) If $$$ISERR(tSC) Quit
54
- Set ..DeferredResponseToken=""
55
- } else {
56
- Do ..ReceivedDataQueue.Insert(pDocument)
57
- }
58
- } catch {
59
- Set tSC=$$$EnsSystemError
60
- }
61
- Quit tSC
62
- }
63
-
64
- Method StartPrivateSession() As %Status
65
- {
66
- #dim tSC As %Status = $$$OK
67
- try {
68
- If ..%InPrivateSession Quit
69
- Set tSC = ..RegisterPrivateSession() Quit:$$$ISERR(tSC)
70
- Set tSC=..SendRequestAsync(..DuplexTargetConfigName,##class(Grongier.PEX.PrivateSession.Message.Start).%New()) Quit:$$$ISERR(tSC)
71
- Set tSC = ..OnPrivateSessionStarted(1) Quit:$$$ISERR(tSC)
72
- } catch {
73
- Set tSC=$$$EnsSystemError
74
- }
75
- Quit tSC
76
- }
77
-
78
- Method StopPrivateSession(pAttachedMessage As %Persistent = "") As %Status
79
- {
80
- #dim tSC As %Status = $$$OK
81
- #dim tMessageHeaderId As %String
82
- #dim tRequestHeader As Ens.MessageHeader
83
- try {
84
- If ..%InPrivateSession {
85
- #; Target might receive stop message before this job unregisters and therefore need to remove queue pointer
86
- If ..DeferredResponseToken'="" {
87
- try {
88
- Set tMessageHeaderId=$p(..DeferredResponseToken,"|",1)
89
- Set tRequestHeader=##Class(Ens.MessageHeader).%OpenId(tMessageHeaderId,,.tSC) Quit:$$$ISERR(tSC)
90
- If $$$ConfigSessionQueueName(..%ConfigName,..%PrivateSessionId)'=tRequestHeader.ReturnQueueName {
91
- Kill $$$ConfigSessionQueueName(..%ConfigName,..%PrivateSessionId)
92
- }
93
- Set tRequestHeader=""
94
- } catch {}
95
- }
96
- Set tSC=..SendDocumentToProcess(##class(Grongier.PEX.PrivateSession.Message.Stop).%New(pAttachedMessage)) Quit:$$$ISERR(tSC)
97
- Set tSC=..UnRegisterPrivateSession()
98
- set ..DeferredResponseToken=""
99
-
100
- #; Ensure all messages are delivered including STOP message (JN1098)
101
- #; Do ..ReceivedDataQueue.Clear()
102
- Set tSC=..OnPrivateSessionStopped(1) Quit:$$$ISERR(tSC)
103
- }
104
- } catch {
105
- Set tSC=$$$EnsSystemError
106
- }
107
- Quit tSC
108
- }
109
-
110
- Method RegisterPrivateSession() As %Status
111
- {
112
- If ..%InPrivateSession Quit $$$OK
113
- If ..%SessionId="" Set tSC=..ForceSessionId() Quit:$$$ISERR(tSC) tSC
114
- Set ..%PrivateSessionId=..%SessionId
115
- Set tSC = ##class(Ens.Queue).Create(..QueueName()) Quit:$$$ISERR(tSC) tSC
116
-
117
- try {
118
- Set tSC=..Adapter.OpenEventDevice()
119
- }
120
- catch {
121
-
122
- }
123
-
124
- Set $$$ConfigSessionQueueName(..%ConfigName,..%SessionId)=..QueueName()
125
- $$$sysTRACE("Registered Private Session '"_..%PrivateSessionId_"'")
126
- Quit $$$OK
127
- }
128
-
129
- Method UnRegisterPrivateSession() As %Status
130
- {
131
- If '..%InPrivateSession Quit $$$OK
132
- Kill $$$ConfigSessionQueueName(..%ConfigName,..%PrivateSessionId)
133
- try {
134
- Set tSC=..Adapter.CloseEventDevice()
135
- }
136
- catch {
137
-
138
- }
139
-
140
- Set tSC=##class(Ens.Queue).Delete(..QueueName(),"*") Quit:$$$ISERR(tSC) tSC
141
- $$$sysTRACE("Unregistered Private Session '"_..%PrivateSessionId_"'")
142
- Set ..%PrivateSessionId=""
143
- Set ..%SessionId=""
144
- Kill $$$JobSessionId
145
- Quit $$$OK
146
- }
147
-
148
- XData MessageMap
149
- {
150
- <MapItems>
151
- <MapItem MessageType="Grongier.PEX.PrivateSession.Message.Start"><Method>OnMsgPrivateSessionStart</Method></MapItem>
152
- <MapItem MessageType="Grongier.PEX.PrivateSession.Message.Stop"><Method>OnMsgPrivateSessionStop</Method></MapItem>
153
- <MapItem MessageType="Grongier.PEX.PrivateSession.Message.Poll"><Method>OnMsgPrivateSessionPoll</Method></MapItem>
154
- </MapItems>
155
- }
156
-
157
- Method OnMsgPrivateSessionStart(pRequest As Grongier.PEX.PrivateSession.Message.Start, Output pResponse As %Library.Persistent) As %Status
158
- {
159
- #dim tSC As %Status = $$$OK
160
- try {
161
- Set tSC=..RegisterPrivateSession() Quit:$$$ISERR(tSC)
162
- Set tSC=..OnPrivateSessionStarted(0) Quit:$$$ISERR(tSC)
163
- Kill %objlasterror Set pResponse=##class(Grongier.PEX.PrivateSession.Message.Ack).%New()
164
- If '$IsObject(pResponse) Set tSC=$$$ERROR($$$FailedToNewClass,"Grongier.PEX.PrivateSession.Message.Ack") Quit
165
- } catch {
166
- Set tSC=$$$EnsSystemError
167
- }
168
- Quit tSC
169
- }
170
-
171
- Method OnMsgPrivateSessionStop(pRequest As Grongier.PEX.PrivateSession.Message.Stop, Output pResponse As %Library.Persistent) As %Status
172
- {
173
- #dim tSC As %Status = $$$OK
174
- try {
175
- Set tSC=..UnRegisterPrivateSession() Quit:$$$ISERR(tSC)
176
- set ..DeferredResponseToken=""
177
- do ..ReceivedDataQueue.Clear()
178
- Set tSC=..OnPrivateSessionStopped(0,pRequest.AttachedMessage) Quit:$$$ISERR(tSC)
179
- } catch {
180
- Set tSC=$$$EnsSystemError
181
- }
182
- Quit tSC
183
- }
184
-
185
- Method OnMsgPrivateSessionPoll(pPollIn As Grongier.PEX.PrivateSession.Message.Poll, Output pResponse As %Library.Persistent) As %Status
186
- {
187
- #dim tSC As %Status = $$$OK
188
- #dim tToken As %String
189
- try {
190
- If ..ReceivedDataQueue.Count() {
191
- Set pResponse=..ReceivedDataQueue.GetAt(1)
192
- do ..ReceivedDataQueue.RemoveAt(1)
193
- } Else {
194
- Set tSC=..DeferResponse(.tToken) If $$$ISERR(tSC) Quit
195
- Set ..DeferredResponseToken=tToken
196
- }
197
- } catch {
198
- Set tSC=$$$EnsSystemError
199
- }
200
- Quit tSC
201
- }
202
-
203
- /// Return an array of connections for drawing lines on the config diagram
204
- ClassMethod OnGetConnections(Output pArray As %String, pItem As Ens.Config.Item)
205
- {
206
- Do ##super(.pArray,pItem)
207
- If pItem.GetModifiedSetting("DuplexTargetConfigName",.tValue) {
208
- Set tOne=$ZStrip(tValue,"<>W")
209
- Set:""'=tOne pArray(tOne)=""
210
- }
211
- }
212
-
213
- Method OnPrivateSessionStarted(pSelfGenerated As %Boolean) As %Status
214
- {
215
- set tSC = $$$OK
216
- try {
217
- set response = ..%class."_dispatch_on_private_session_started"($this,pSelfGenerated)
218
- } catch ex {
219
- set tSC = ex.AsStatus()
220
- }
221
- quit tSC
222
- }
223
-
224
- Method OnPrivateSessionStopped(pSelfGenerated As %Boolean, pAttachedMessage As %Persistent = "") As %Status
225
- {
226
- set tSC = $$$OK
227
- try {
228
- set response = ..%class."_dispatch_on_private_session_stopped"($this,pSelfGenerated,pAttachedMessage)
229
- } catch ex {
230
- set tSC = ex.AsStatus()
231
- }
232
- quit tSC
233
- }
234
-
235
- Method OnTearDown() As %Status
236
- {
237
- #dim tSC As %Status = $$$OK
238
- try {
239
- If ..%InPrivateSession Set tSC=..StopPrivateSession() Quit:$$$ISERR(tSC)
240
- do ..%class."_dispatch_on_tear_down"()
241
- } catch {
242
- Set tSC=$$$EnsSystemError
243
- }
244
- Quit tSC
245
- }
246
-
247
- }
@@ -1,32 +0,0 @@
1
- /* Copyright (c) 2022 by InterSystems Corporation.
2
- Cambridge, Massachusetts, U.S.A. All rights reserved.
3
- Confidential property of InterSystems Corporation. */
4
-
5
- /// This class is a DICOM framework class
6
- Class Grongier.PEX.PrivateSession.Message.Ack Extends (%Persistent, Ens.Util.MessageBodyMethods) [ ClassType = persistent, Inheritance = right, ProcedureBlock, System = 4 ]
7
- {
8
-
9
- Parameter DOMAIN = "PrivateSession";
10
-
11
- /// From 'Ens.Util.MessageBodyMethods'
12
- Method %ShowContents(pZenOutput As %Boolean = 0)
13
- {
14
- Write $$$Text("(session-ack)")
15
- }
16
-
17
- Storage Default
18
- {
19
- <Data name="AckDefaultData">
20
- <Value name="1">
21
- <Value>%%CLASSNAME</Value>
22
- </Value>
23
- </Data>
24
- <DataLocation>^Grongier.PEX.PrivateSe9756.AckD</DataLocation>
25
- <DefaultData>AckDefaultData</DefaultData>
26
- <IdLocation>^Grongier.PEX.PrivateSe9756.AckD</IdLocation>
27
- <IndexLocation>^Grongier.PEX.PrivateSe9756.AckI</IndexLocation>
28
- <StreamLocation>^Grongier.PEX.PrivateSe9756.AckS</StreamLocation>
29
- <Type>%Storage.Persistent</Type>
30
- }
31
-
32
- }
@@ -1,32 +0,0 @@
1
- /* Copyright (c) 2022 by InterSystems Corporation.
2
- Cambridge, Massachusetts, U.S.A. All rights reserved.
3
- Confidential property of InterSystems Corporation. */
4
-
5
- /// This class is a DICOM framework class
6
- Class Grongier.PEX.PrivateSession.Message.Poll Extends (%Persistent, Ens.Util.MessageBodyMethods) [ ClassType = persistent, Inheritance = right, ProcedureBlock, System = 4 ]
7
- {
8
-
9
- Parameter DOMAIN = "PrivateSession";
10
-
11
- /// From 'Ens.Util.MessageBodyMethods'
12
- Method %ShowContents(pZenOutput As %Boolean = 0)
13
- {
14
- Write $$$Text("(poll-data)")
15
- }
16
-
17
- Storage Default
18
- {
19
- <Data name="PollDefaultData">
20
- <Value name="1">
21
- <Value>%%CLASSNAME</Value>
22
- </Value>
23
- </Data>
24
- <DataLocation>^Grongier.PEX.PrivateS9756.PollD</DataLocation>
25
- <DefaultData>PollDefaultData</DefaultData>
26
- <IdLocation>^Grongier.PEX.PrivateS9756.PollD</IdLocation>
27
- <IndexLocation>^Grongier.PEX.PrivateS9756.PollI</IndexLocation>
28
- <StreamLocation>^Grongier.PEX.PrivateS9756.PollS</StreamLocation>
29
- <Type>%Storage.Persistent</Type>
30
- }
31
-
32
- }
@@ -1,32 +0,0 @@
1
- /* Copyright (c) 2022 by InterSystems Corporation.
2
- Cambridge, Massachusetts, U.S.A. All rights reserved.
3
- Confidential property of InterSystems Corporation. */
4
-
5
- /// This class is a DICOM framework class
6
- Class Grongier.PEX.PrivateSession.Message.Start Extends (%Persistent, Ens.Util.MessageBodyMethods) [ ClassType = persistent, Inheritance = right, ProcedureBlock, System = 4 ]
7
- {
8
-
9
- Parameter DOMAIN = "PrivateSession";
10
-
11
- /// From 'Ens.Util.MessageBodyMethods'
12
- Method %ShowContents(pZenOutput As %Boolean = 0)
13
- {
14
- Write $$$Text("(session-start)")
15
- }
16
-
17
- Storage Default
18
- {
19
- <Data name="StartDefaultData">
20
- <Value name="1">
21
- <Value>%%CLASSNAME</Value>
22
- </Value>
23
- </Data>
24
- <DataLocation>^Grongier.PEX.Private9756.StartD</DataLocation>
25
- <DefaultData>StartDefaultData</DefaultData>
26
- <IdLocation>^Grongier.PEX.Private9756.StartD</IdLocation>
27
- <IndexLocation>^Grongier.PEX.Private9756.StartI</IndexLocation>
28
- <StreamLocation>^Grongier.PEX.Private9756.StartS</StreamLocation>
29
- <Type>%Storage.Persistent</Type>
30
- }
31
-
32
- }
@@ -1,48 +0,0 @@
1
- /* Copyright (c) 2022 by InterSystems Corporation.
2
- Cambridge, Massachusetts, U.S.A. All rights reserved.
3
- Confidential property of InterSystems Corporation. */
4
-
5
- /// This class is a DICOM framework class
6
- Class Grongier.PEX.PrivateSession.Message.Stop Extends (%Persistent, Ens.Util.MessageBodyMethods) [ ClassType = persistent, Inheritance = right, ProcedureBlock, System = 4 ]
7
- {
8
-
9
- Parameter DOMAIN = "PrivateSession";
10
-
11
- /// The message body
12
- Property AttachedMessage As %Persistent(CLASSNAME = 1);
13
-
14
- /// From 'Ens.Util.MessageBodyMethods'
15
- Method %ShowContents(pZenOutput As %Boolean = 0)
16
- {
17
- If $IsObject(..AttachedMessage) {
18
- Write $$$FormatText($$$Text("(session-stop) with AttachedMessage [%1] "),$classname(..AttachedMessage))
19
- } Else {
20
- Write $$$Text("(session-stop)")
21
- }
22
- }
23
-
24
- Method %OnNew(initvalue As %RegisteredObject) As %Status [ Private, ProcedureBlock = 1, ServerOnly = 1 ]
25
- {
26
- Set ..AttachedMessage=initvalue
27
- Quit $$$OK
28
- }
29
-
30
- Storage Default
31
- {
32
- <Data name="StopDefaultData">
33
- <Value name="1">
34
- <Value>%%CLASSNAME</Value>
35
- </Value>
36
- <Value name="2">
37
- <Value>AttachedMessage</Value>
38
- </Value>
39
- </Data>
40
- <DataLocation>^Grongier.PEX.PrivateS9756.StopD</DataLocation>
41
- <DefaultData>StopDefaultData</DefaultData>
42
- <IdLocation>^Grongier.PEX.PrivateS9756.StopD</IdLocation>
43
- <IndexLocation>^Grongier.PEX.PrivateS9756.StopI</IndexLocation>
44
- <StreamLocation>^Grongier.PEX.PrivateS9756.StopS</StreamLocation>
45
- <Type>%Storage.Persistent</Type>
46
- }
47
-
48
- }
@@ -1,27 +0,0 @@
1
- /// Description
2
- Class Grongier.PEX.Python
3
- {
4
-
5
- /// Set classPath
6
- ClassMethod SetClassPath(classPath As %String) As %Status [ Language = python ]
7
- {
8
- import sys
9
- return sys.path.append(classPath)
10
- }
11
-
12
- /// GetInstanceFromModuleClassName
13
- ClassMethod GetInstanceFromModuleClassName(modulename, classname) As %SYS.Python [ Language = python ]
14
- {
15
- import builtins
16
- import importlib
17
- module = importlib.import_module(modulename)
18
- return getattr(module, classname)()
19
- }
20
-
21
- /// Lenght of python list
22
- ClassMethod Len(pList) [ Language = python ]
23
- {
24
- return len(pList)
25
- }
26
-
27
- }
@@ -1,62 +0,0 @@
1
- /// Description
2
- Class Grongier.PEX.Test Extends %Persistent
3
- {
4
-
5
- /// Register
6
- ClassMethod Register() As %Status
7
- {
8
- Set sc = $$$OK
9
- zw ##class(Grongier.PEX.Utils).RegisterComponent("MyBusinessOperationWithAdapter","MyBusinessOperationWithAdapter","/irisdev/app/src/python/demo/",1,"PEX.MyBusinessOperationWithAdapter")
10
- #dim array as %ArrayOfObjects
11
- Return sc
12
- }
13
-
14
- ClassMethod TestBO() As %Status
15
- {
16
- try {
17
- Set sc = $$$OK
18
- set mybo = ##class(Grongier.PEX.BusinessOperation).%New("mybo")
19
- set mybo.%classpaths = "/irisdev/app/src/python/demo"
20
- set mybo.%module = "MyBusinessOperationWithAdapter"
21
- set mybo.%classname = "MyBusinessOperationWithAdapter"
22
- $$$ThrowOnError(mybo.OnInit())
23
- set request = ##class(Ens.StringRequest).%New("hello")
24
- set request = ##class(EnsLib.PEX.Message).%New()
25
- set request.%classname = "MyRequest.MyRequest"
26
- set dyna = {"requestString":"hello!"}
27
- set request.%jsonObject = dyna
28
- Try {
29
- $$$ThrowOnError(mybo.OnMessage(request,.response))
30
- zw response
31
- } catch importEx {
32
- WRITE $System.Status.GetOneStatusText(importEx.AsStatus(),1),!
33
- }
34
- } catch ex {
35
- WRITE $System.Status.GetOneStatusText(ex.AsStatus(),1),!
36
- }
37
-
38
- Return sc
39
- }
40
-
41
- /// List
42
- ClassMethod PythonList() [ Language = python ]
43
- {
44
- return [ 1, 3 ]
45
- }
46
-
47
- Storage Default
48
- {
49
- <Data name="TestDefaultData">
50
- <Value name="1">
51
- <Value>%%CLASSNAME</Value>
52
- </Value>
53
- </Data>
54
- <DataLocation>^Grongier.PEX.TestD</DataLocation>
55
- <DefaultData>TestDefaultData</DefaultData>
56
- <IdLocation>^Grongier.PEX.TestD</IdLocation>
57
- <IndexLocation>^Grongier.PEX.TestI</IndexLocation>
58
- <StreamLocation>^Grongier.PEX.TestS</StreamLocation>
59
- <Type>%Storage.Persistent</Type>
60
- }
61
-
62
- }