Skip to content

Commit 7651946

Browse files
committed
Refactor MyGeneratorProcess to use MyGenerator for requests and update mkdocs navigation to include Component Interaction
1 parent ad60ed0 commit 7651946

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

demo/python/generator/bp.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,16 @@
11
from typing import Any
22
from iop import BusinessProcess
33

4-
from msg import MyGenerator, MyGeneratorResponse
4+
from msg import MyGenerator
55

66
class MyGeneratorProcess(BusinessProcess):
77

88
def on_request(self, request: Any) -> Any:
9-
rsp = self.send_request_sync(
10-
target="User.MyGeneratorOperation",
11-
request=MyGeneratorResponse(my_other_string="Hello, World!"),
12-
timeout=10,
13-
description="My generator request")
149
gen = self.send_generator_request(
1510
target="User.MyGeneratorOperation",
1611
request=MyGenerator(my_string="Hello, World!"),
1712
timeout=10,
1813
description="My generator request")
14+
1915
for response in gen:
2016
self.log_info(f"Received response: {response}")

mkdocs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ nav:
1212
- API documentation:
1313
- Command Line Interface: command-line.md
1414
- Python API: python-api.md
15+
- Component Interaction: component-interaction.md
1516
- DTL Support: dtl.md
1617
- Logging: logging.md
1718
- Debugging: debug.md

0 commit comments

Comments
 (0)