|
1 | 1 | from typing import Any, List, Optional, Union |
2 | | -from iop._business_host import _BusinessHost |
3 | | -from iop._decorators import input_deserializer, input_serializer_param, output_serializer, input_serializer, output_deserializer |
4 | | -from iop._dispatch import create_dispatch, dispach_message |
| 2 | + |
| 3 | +from ._business_host import _BusinessHost |
| 4 | +from ._decorators import input_deserializer, input_serializer_param, output_serializer, input_serializer, output_deserializer |
| 5 | +from ._dispatch import create_dispatch, dispach_message |
5 | 6 |
|
6 | 7 | class _BusinessProcess(_BusinessHost): |
7 | 8 | """Business process component that contains routing and transformation logic. |
@@ -72,23 +73,23 @@ def reply(self, response: Any) -> None: |
72 | 73 | return self.iris_handle.dispatchReply(response) |
73 | 74 |
|
74 | 75 | @input_serializer_param(1,'request') |
75 | | - def send_request_async(self, target: str, request: Any, response_required: bool=True, completion_key: Optional[str]=None, description: Optional[str]=None) -> None: |
| 76 | + def send_request_async(self, target: str, request: Any, description: Optional[str]=None, completion_key: Optional[str]=None, response_required: bool=True) -> None: |
76 | 77 | """Send the specified message to the target business process or business operation asynchronously. |
77 | 78 | |
78 | 79 | Args: |
79 | 80 | target: The name of the business process or operation to receive the request |
80 | 81 | request: The message to send to the target |
81 | | - response_required: Whether a response is required |
82 | | - completion_key: A string that will be returned with the response if the maximum time is exceeded |
83 | 82 | description: An optional description property in the message header |
| 83 | + completion_key: A string that will be returned with the response if the maximum time is exceeded |
| 84 | + response_required: Whether a response is required |
84 | 85 | |
85 | 86 | Raises: |
86 | 87 | TypeError: If request is not of type Message or IRISObject |
87 | 88 | """ |
88 | 89 | if response_required: |
89 | | - response_required = 1 |
| 90 | + response_required = True |
90 | 91 | else: |
91 | | - response_required = 0 |
| 92 | + response_required = False |
92 | 93 | return self.iris_handle.dispatchSendRequestAsync(target, request, response_required, completion_key, description) |
93 | 94 |
|
94 | 95 | def set_timer(self, timeout: Union[int, str], completion_key: Optional[str]=None) -> None: |
|
0 commit comments