Skip to content

Commit

Permalink
Refactor variable names in _BusinessProcess class for consistency
Browse files Browse the repository at this point in the history
  • Loading branch information
grongierisc committed Apr 9, 2024
1 parent 2061a94 commit 84282a4
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
4 changes: 2 additions & 2 deletions src/grongier/cls/Grongier/PEX/BusinessProcess.cls
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ Method OnResponse(
{
set tSC = $$$OK
try {
set response = ..%class."_dispatch_on_response"($this,request,response,callRequest,callResponse,pCompletionKey)
set response = ..%class."_dispatch_on_response"($this,request,callRequest,callResponse,pCompletionKey)
} catch ex {
set tSC = ex.AsStatus()
}
Expand All @@ -62,7 +62,7 @@ Method OnComplete(
set tSC = $$$OK
try {
set tSC = ..Connect() quit:$$$ISERR(tSC)
set response = ..%class."_dispatch_on_complete"($this,request,response)
set response = ..%class."_dispatch_on_complete"($this,request)
} catch ex {
set tSC = ex.AsStatus()
}
Expand Down
24 changes: 12 additions & 12 deletions src/grongier/pex/_business_process.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def on_request(self, request):
"""
return self.OnRequest(request)

def on_response(self, request, response, call_request, call_response, completion_key):
def on_response(self, request, call_request, call_response, completion_key):
""" Handles responses sent to the business process in response to messages that it sent to the target.
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.
Typically this is a response to an asynchronous request made by the business process where the responseRequired parameter has a true value.
Expand All @@ -53,9 +53,9 @@ def on_response(self, request, response, call_request, call_response, completion
An instance of IRISObject or subclass of Message that contains the response message that this business process can return
to the production component that sent the initial message.
"""
return self.OnResponse(request, response, call_request, call_response, completion_key)
return self.OnResponse(request, call_request, call_response, completion_key)

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

@_BusinessHost.input_serialzer_param(0,'response')
def reply(self, response):
Expand Down Expand Up @@ -151,19 +151,19 @@ def _dispatch_on_request(self, host_object, request):

@_BusinessHost.input_deserialzer
@_BusinessHost.output_serialzer
def _dispatch_on_response(self, host_object, request, response, call_request, call_response, completion_key):
def _dispatch_on_response(self, host_object, request, call_request, call_response, completion_key):
""" For internal use only. """
self._restore_persistent_properties(host_object)
return_object = self.on_response(request, response, call_request, call_response, completion_key)
return_object = self.on_response(request, call_request, call_response, completion_key)
self._save_persistent_properties(host_object)
return return_object

@_BusinessHost.input_deserialzer
@_BusinessHost.output_serialzer
def _dispatch_on_complete(self, host_object, request, response):
def _dispatch_on_complete(self, host_object, request):
""" For internal use only. """
self._restore_persistent_properties(host_object)
return_object = self.on_complete(request, response)
return_object = self.on_complete(request)
self._save_persistent_properties(host_object)
return return_object

Expand All @@ -181,7 +181,7 @@ def OnRequest(self, request):
"""
return

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

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

0 comments on commit 84282a4

Please sign in to comment.