Skip to content

Commit cba9f99

Browse files
committed
Revert response for bp to be process on complet
1 parent 84282a4 commit cba9f99

File tree

2 files changed

+14
-15
lines changed

2 files changed

+14
-15
lines changed

src/grongier/cls/Grongier/PEX/BusinessProcess.cls

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ Method OnResponse(
4848
{
4949
set tSC = $$$OK
5050
try {
51-
set response = ..%class."_dispatch_on_response"($this,request,callRequest,callResponse,pCompletionKey)
51+
set response = ..%class."_dispatch_on_response"($this,request,response,callRequest,callResponse,pCompletionKey)
5252
} catch ex {
5353
set tSC = ex.AsStatus()
5454
}
@@ -61,8 +61,7 @@ Method OnComplete(
6161
{
6262
set tSC = $$$OK
6363
try {
64-
set tSC = ..Connect() quit:$$$ISERR(tSC)
65-
set response = ..%class."_dispatch_on_complete"($this,request)
64+
set response = ..%class."_dispatch_on_complete"($this,request,response)
6665
} catch ex {
6766
set tSC = ex.AsStatus()
6867
}

src/grongier/pex/_business_process.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ def on_request(self, request):
3838
"""
3939
return self.OnRequest(request)
4040

41-
def on_response(self, request, call_request, call_response, completion_key):
41+
def on_response(self, request, response, call_request, call_response, completion_key):
4242
""" Handles responses sent to the business process in response to messages that it sent to the target.
4343
A production calls this method whenever a response for a specific business process arrives on the appropriate queue and is assigned a job in which to execute.
4444
Typically this is a response to an asynchronous request made by the business process where the responseRequired parameter has a true value.
@@ -53,9 +53,9 @@ def on_response(self, request, call_request, call_response, completion_key):
5353
An instance of IRISObject or subclass of Message that contains the response message that this business process can return
5454
to the production component that sent the initial message.
5555
"""
56-
return self.OnResponse(request, call_request, call_response, completion_key)
56+
return self.OnResponse(request, response, call_request, call_response, completion_key)
5757

58-
def on_complete(self, request):
58+
def on_complete(self, request, response):
5959
""" Called after the business process has received and handled all responses to requests it has sent to targets.
6060
Parameters:
6161
request: An instance of IRISObject or subclass of Message that contains the initial request message sent to the business process.
@@ -65,7 +65,7 @@ def on_complete(self, request):
6565
An instance of IRISObject or subclass of Message that contains the response message that this business process can return
6666
to the production component that sent the initial message.
6767
"""
68-
return self.OnComplete(request)
68+
return self.OnComplete(request, response)
6969

7070
@_BusinessHost.input_serialzer_param(0,'response')
7171
def reply(self, response):
@@ -151,19 +151,19 @@ def _dispatch_on_request(self, host_object, request):
151151

152152
@_BusinessHost.input_deserialzer
153153
@_BusinessHost.output_serialzer
154-
def _dispatch_on_response(self, host_object, request, call_request, call_response, completion_key):
154+
def _dispatch_on_response(self, host_object, request, response, call_request, call_response, completion_key):
155155
""" For internal use only. """
156156
self._restore_persistent_properties(host_object)
157-
return_object = self.on_response(request, call_request, call_response, completion_key)
157+
return_object = self.on_response(request, response, call_request, call_response, completion_key)
158158
self._save_persistent_properties(host_object)
159159
return return_object
160160

161161
@_BusinessHost.input_deserialzer
162162
@_BusinessHost.output_serialzer
163-
def _dispatch_on_complete(self, host_object, request):
163+
def _dispatch_on_complete(self, host_object, request, response):
164164
""" For internal use only. """
165165
self._restore_persistent_properties(host_object)
166-
return_object = self.on_complete(request)
166+
return_object = self.on_complete(request, response)
167167
self._save_persistent_properties(host_object)
168168
return return_object
169169

@@ -181,7 +181,7 @@ def OnRequest(self, request):
181181
"""
182182
return
183183

184-
def OnResponse(self, request, call_request, call_response, completion_key):
184+
def OnResponse(self, request, response, call_request, call_response, completion_key):
185185
"""
186186
DEPRECATED : use on_response
187187
Handles responses sent to the business process in response to messages that it sent to the target.
@@ -198,9 +198,9 @@ def OnResponse(self, request, call_request, call_response, completion_key):
198198
An instance of IRISObject or subclass of Message that contains the response message that this business process can return
199199
to the production component that sent the initial message.
200200
"""
201-
return
201+
return response
202202

203-
def OnComplete(self, request):
203+
def OnComplete(self, request, response):
204204
"""
205205
DEPRECATED : use on_complete
206206
Called after the business process has received and handled all responses to requests it has sent to targets.
@@ -212,4 +212,4 @@ def OnComplete(self, request):
212212
An instance of IRISObject or subclass of Message that contains the response message that this business process can return
213213
to the production component that sent the initial message.
214214
"""
215-
return
215+
return response

0 commit comments

Comments
 (0)