File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -55,6 +55,8 @@ Some examples require extra dependencies. See each sample's directory for specif
5555 * [ hello_search_attributes] ( hello/hello_search_attributes.py ) - Start workflow with search attributes then change
5656 while running.
5757 * [ hello_signal] ( hello/hello_signal.py ) - Send signals to a workflow.
58+ * [ hello standalone activity] ( hello/hello_standalone_activity.py ) - Execute an activity from outside of a workflow.
59+ * [ hello update] ( hello/hello_update.py ) - Send a request to and a response from a client to a workflow execution.
5860<!-- Keep this list in alphabetical order -->
5961* [ activity_worker] ( activity_worker ) - Use Python activities from a workflow in another language.
6062* [ batch_sliding_window] ( batch_sliding_window ) - Batch processing with a sliding window of child workflows.
Original file line number Diff line number Diff line change @@ -44,7 +44,8 @@ Replace `hello/hello_activity.py` in the command with any other example filename
4444* [ hello_search_attributes] ( hello_search_attributes.py ) - Start workflow with search attributes then change while
4545 running.
4646* [ hello_signal] ( hello_signal.py ) - Send signals to a workflow.
47- * [ hello_update] ( hello_update.py ) - Send a request to and a response from a client to a workflow execution.
47+ * [ hello standalone activity] ( hello_standalone_activity.py ) - Execute an activity from outside of a workflow.
48+ * [ hello_update] ( hello_update.py ) - ** Send a request to and a response from a client to a workflow execution.**
4849
4950Note: To enable the workflow update, set the ` frontend.enableUpdateWorkflowExecution ` dynamic config value to true.
5051
Original file line number Diff line number Diff line change @@ -38,6 +38,18 @@ async def my_client_code(client: Client):
3838 )
3939 print (f"Activity result: { result } " )
4040
41+ activities = client .list_activities (
42+ query = "TaskQueue = 'hello-standalone-activity-task-queue'"
43+ )
44+ print ("ListActivity results:" )
45+ async for info in activities :
46+ print (f"\t ActivityID: { info .activity_id } , Type: { info .activity_type } , Status: { info .status } " )
47+
48+ count_result = await client .count_activities (
49+ query = "TaskQueue = 'hello-standalone-activity-task-queue'"
50+ )
51+ print (f"Total activities: { count_result .count } " )
52+
4153
4254async def main ():
4355 # Uncomment the lines below to see logging output
You can’t perform that action at this time.
0 commit comments