wenjin272 commented on code in PR #32:
URL: https://github.com/apache/flink-agents/pull/32#discussion_r2160958100


##########
python/flink_agents/examples/workflow_example.py:
##########
@@ -0,0 +1,31 @@
+from typing import Any
+
+from flink_agents.api.decorators import action
+from flink_agents.api.event import Event, InputEvent, OutputEvent
+from flink_agents.api.workflow import Workflow
+from flink_agents.api.workflow_runner_context import WorkflowRunnerContext
+
+
+class MyEvent(Event): #noqa D101
+    value: Any
+
+class MyWorkflow(Workflow): #noqa D101
+    @action(InputEvent)
+    @staticmethod
+    def first_action(event: Event, ctx: WorkflowRunnerContext): #noqa D102
+        event.input += " first_action"

Review Comment:
   Yes, the input event may be shared in multiple actions, and should be 
immutable.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to