diff --git a/examples/configuration/README.md b/examples/configuration/README.md index 4dc38f5e7..ec260b531 100644 --- a/examples/configuration/README.md +++ b/examples/configuration/README.md @@ -47,10 +47,10 @@ To run this example, use the following command: name: Run get configuration example match_order: none expected_stdout_lines: - - "== APP == Got key=orderId1 value=100 version=1 metadata={}" - - "== APP == Got key=orderId2 value=200 version=1 metadata={}" - - "== APP == Subscribe key=orderId2 value=210 version=2 metadata={}" - - "== APP == Unsubscribed successfully? True" + - "Got key=orderId1 value=100 version=1 metadata={}" + - "Got key=orderId2 value=200 version=1 metadata={}" + - "Subscribe key=orderId2 value=210 version=2 metadata={}" + - "Unsubscribed successfully? True" background: true timeout_seconds: 30 sleep: 3 @@ -75,7 +75,7 @@ docker exec dapr_redis redis-cli SET orderId2 "210||2" You should be able to see the following output: ``` -== APP == Got key=orderId1 value=100 version=1 -== APP == Got key=orderId2 value=200 version=1 -== APP == Subscribe key=orderId2 value=210 version=2 +Got key=orderId1 value=100 version=1 +Got key=orderId2 value=200 version=1 +Subscribe key=orderId2 value=210 version=2 ``` diff --git a/examples/conversation/README.md b/examples/conversation/README.md index 1d7789b32..4f630d46d 100644 --- a/examples/conversation/README.md +++ b/examples/conversation/README.md @@ -28,8 +28,8 @@ The Conversation API supports real LLM providers including: @@ -47,8 +47,8 @@ The Conversation API supports real LLM providers including: diff --git a/examples/crypto/README.md b/examples/crypto/README.md index 1dca3fb14..e9736b160 100644 --- a/examples/crypto/README.md +++ b/examples/crypto/README.md @@ -39,14 +39,14 @@ openssl rand -out keys/symmetric-key-256 32 @@ -53,23 +53,23 @@ timeout_seconds: 60 Expected output: ``` ... - == APP == Activate DemoActor actor! - == APP == has_value: False - == APP == INFO: 127.0.0.1:50739 - "PUT /actors/DemoActor/1/method/GetMyData HTTP/1.1" 200 OK - == APP == has_value: False - == APP == INFO: 127.0.0.1:50739 - "PUT /actors/DemoActor/1/method/GetMyData HTTP/1.1" 200 OK - == APP == set_my_data: {'data': 'new_data'} - == APP == INFO: 127.0.0.1:50739 - "PUT /actors/DemoActor/1/method/SetMyData HTTP/1.1" 200 OK - == APP == has_value: True - == APP == INFO: 127.0.0.1:50739 - "PUT /actors/DemoActor/1/method/GetMyData HTTP/1.1" 200 OK - == APP == set reminder to True - == APP == set reminder is done - == APP == INFO: 127.0.0.1:50739 - "PUT /actors/DemoActor/1/method/SetReminder HTTP/1.1" 200 OK - == APP == set_timer to True - == APP == set_timer is done - == APP == INFO: 127.0.0.1:50739 - "PUT /actors/DemoActor/1/method/SetTimer HTTP/1.1" 200 OK - == APP == receive_reminder is called - demo_reminder reminder - b'reminder_state' - == APP == clear_my_data + Activate DemoActor actor! + has_value: False + INFO: 127.0.0.1:50739 - "PUT /actors/DemoActor/1/method/GetMyData HTTP/1.1" 200 OK + has_value: False + INFO: 127.0.0.1:50739 - "PUT /actors/DemoActor/1/method/GetMyData HTTP/1.1" 200 OK + set_my_data: {'data': 'new_data'} + INFO: 127.0.0.1:50739 - "PUT /actors/DemoActor/1/method/SetMyData HTTP/1.1" 200 OK + has_value: True + INFO: 127.0.0.1:50739 - "PUT /actors/DemoActor/1/method/GetMyData HTTP/1.1" 200 OK + set reminder to True + set reminder is done + INFO: 127.0.0.1:50739 - "PUT /actors/DemoActor/1/method/SetReminder HTTP/1.1" 200 OK + set_timer to True + set_timer is done + INFO: 127.0.0.1:50739 - "PUT /actors/DemoActor/1/method/SetTimer HTTP/1.1" 200 OK + receive_reminder is called - demo_reminder reminder - b'reminder_state' + clear_my_data ... ``` @@ -78,19 +78,19 @@ timeout_seconds: 60 2. Run Demo client in new terminal window @@ -105,20 +105,20 @@ expected_stdout_lines: Expected output: ``` ... - == APP == call actor method via proxy.invoke_method() - == APP == b'null' - == APP == call actor method using rpc style - == APP == None - == APP == Actor reentrancy enabled: True - == APP == call SetMyData actor method to save the state - == APP == call GetMyData actor method to get the state - == APP == {'data': 'new_data', 'ts': datetime.datetime(2020, 11, 13, 0, 38, 36, 163000, tzinfo=tzutc())} - == APP == Register reminder - == APP == Register timer - == APP == waiting for 30 seconds - == APP == stop reminder - == APP == stop timer - == APP == clear actor state + call actor method via proxy.invoke_method() + b'null' + call actor method using rpc style + None + Actor reentrancy enabled: True + call SetMyData actor method to save the state + call GetMyData actor method to get the state + {'data': 'new_data', 'ts': datetime.datetime(2020, 11, 13, 0, 38, 36, 163000, tzinfo=tzutc())} + Register reminder + Register timer + waiting for 30 seconds + stop reminder + stop timer + clear actor state ``` diff --git a/examples/demo_workflow/README.md b/examples/demo_workflow/README.md index cf75112a2..58e4d3bb5 100644 --- a/examples/demo_workflow/README.md +++ b/examples/demo_workflow/README.md @@ -25,28 +25,28 @@ pip3 install -r demo_workflow/requirements.txt @@ -47,13 +47,13 @@ dapr run --app-id=locksapp --app-protocol grpc --resources-path components/ pyth The output should be as follows: ``` -== APP == Will try to acquire a lock from lock store named [lockstore] -== APP == The lock is for a resource named [example-lock-resource] -== APP == The client identifier is [example-client-id] -== APP == The lock will will expire in 60 seconds. -== APP == Lock acquired successfully!!! -== APP == We already released the lock so unlocking will not work. -== APP == We tried to unlock it anyway and got back [UnlockResponseStatus.lock_does_not_exist] +Will try to acquire a lock from lock store named [lockstore] +The lock is for a resource named [example-lock-resource] +The client identifier is [example-client-id] +The lock will will expire in 60 seconds. +Lock acquired successfully!!! +We already released the lock so unlocking will not work. +We tried to unlock it anyway and got back [UnlockResponseStatus.lock_does_not_exist] ``` ## Error Handling diff --git a/examples/error_handling/README.md b/examples/error_handling/README.md index 9f09b8946..480d73635 100644 --- a/examples/error_handling/README.md +++ b/examples/error_handling/README.md @@ -25,15 +25,15 @@ To run this example, the following code can be used: @@ -45,13 +45,13 @@ dapr run --resources-path components -- python3 error_handling.py The output should be as follows: ``` -== APP == Status code: INVALID_ARGUMENT -== APP == Message: input key/keyPrefix 'key||' can't contain '||' -== APP == Error code: DAPR_STATE_ILLEGAL_KEY -== APP == Error info(reason): DAPR_STATE_ILLEGAL_KEY -== APP == Resource info (resource type): state -== APP == Resource info (resource name): statestore -== APP == Bad request (field): key|| -== APP == Bad request (description): input key/keyPrefix 'key||' can't contain '||' -== APP == JSON: {"status_code": "INVALID_ARGUMENT", "message": "input key/keyPrefix 'key||' can't contain '||'", "error_code": "DAPR_STATE_ILLEGAL_KEY", "details": {"error_info": {"@type": "type.googleapis.com/google.rpc.ErrorInfo", "reason": "DAPR_STATE_ILLEGAL_KEY", "domain": "dapr.io"}, "retry_info": null, "debug_info": null, "quota_failure": null, "precondition_failure": null, "bad_request": {"@type": "type.googleapis.com/google.rpc.BadRequest", "field_violations": [{"field": "key||", "description": "input key/keyPrefix 'key||' can't contain '||'"}]}, "request_info": null, "resource_info": {"@type": "type.googleapis.com/google.rpc.ResourceInfo", "resource_type": "state", "resource_name": "statestore"}, "help": null, "localized_message": null}} +Status code: INVALID_ARGUMENT +Message: input key/keyPrefix 'key||' can't contain '||' +Error code: DAPR_STATE_ILLEGAL_KEY +Error info(reason): DAPR_STATE_ILLEGAL_KEY +Resource info (resource type): state +Resource info (resource name): statestore +Bad request (field): key|| +Bad request (description): input key/keyPrefix 'key||' can't contain '||' +JSON: {"status_code": "INVALID_ARGUMENT", "message": "input key/keyPrefix 'key||' can't contain '||'", "error_code": "DAPR_STATE_ILLEGAL_KEY", "details": {"error_info": {"@type": "type.googleapis.com/google.rpc.ErrorInfo", "reason": "DAPR_STATE_ILLEGAL_KEY", "domain": "dapr.io"}, "retry_info": null, "debug_info": null, "quota_failure": null, "precondition_failure": null, "bad_request": {"@type": "type.googleapis.com/google.rpc.BadRequest", "field_violations": [{"field": "key||", "description": "input key/keyPrefix 'key||' can't contain '||'"}]}, "request_info": null, "resource_info": {"@type": "type.googleapis.com/google.rpc.ResourceInfo", "resource_type": "state", "resource_name": "statestore"}, "help": null, "localized_message": null}} ``` diff --git a/examples/grpc_proxying/README.md b/examples/grpc_proxying/README.md index 73b4fafe5..cd9aaa892 100644 --- a/examples/grpc_proxying/README.md +++ b/examples/grpc_proxying/README.md @@ -23,8 +23,9 @@ Run the following command in a terminal/command-prompt: @@ -42,7 +43,7 @@ In another terminal/command prompt run: diff --git a/examples/invoke-binding/README.md b/examples/invoke-binding/README.md index c90ff1dfc..36413d10c 100644 --- a/examples/invoke-binding/README.md +++ b/examples/invoke-binding/README.md @@ -37,9 +37,9 @@ docker compose -f ./docker-compose-single-kafka.yml up -d @@ -59,9 +59,9 @@ In another terminal/command-prompt run: diff --git a/examples/invoke-custom-data/README.md b/examples/invoke-custom-data/README.md index 6c1f87f19..1a1ab3881 100644 --- a/examples/invoke-custom-data/README.md +++ b/examples/invoke-custom-data/README.md @@ -33,7 +33,7 @@ To run this example, the following steps should be followed: @@ -49,9 +49,9 @@ sleep: 5 @@ -50,14 +50,14 @@ Start the caller: diff --git a/examples/invoke-simple/README.md b/examples/invoke-simple/README.md index b2af5c60f..c8f452a6f 100644 --- a/examples/invoke-simple/README.md +++ b/examples/invoke-simple/README.md @@ -24,8 +24,8 @@ Run the following command in a terminal/command-prompt: @@ -42,10 +42,10 @@ In another terminal/command prompt run: diff --git a/examples/jobs/README.md b/examples/jobs/README.md index 3e2417472..3964abf68 100644 --- a/examples/jobs/README.md +++ b/examples/jobs/README.md @@ -34,23 +34,23 @@ To run this example, the following code can be utilized: @@ -74,19 +74,19 @@ Run the following command in a terminal/command-prompt: diff --git a/examples/langgraph-checkpointer/README.md b/examples/langgraph-checkpointer/README.md index 0fce355d7..15c199a3c 100644 --- a/examples/langgraph-checkpointer/README.md +++ b/examples/langgraph-checkpointer/README.md @@ -34,14 +34,14 @@ Run the following command in a terminal/command prompt: @@ -56,18 +56,18 @@ dapr run --app-id=my-metadata-app --app-protocol grpc --resources-path component The output should be as follows: ``` -== APP == First, we will assign a new custom label to Dapr sidecar -== APP == Now, we will fetch the sidecar's metadata -== APP == And this is what we got: -== APP == application_id: my-metadata-app -== APP == active_actors_count: {} -== APP == registered_components: -== APP == name=lockstore type=lock.redis version= capabilities=[] -== APP == name=pubsub type=pubsub.redis version=v1 capabilities=[] -== APP == name=statestore type=state.redis version=v1 capabilities=['ACTOR', 'ETAG', 'KEYS_LIKE', 'TRANSACTIONAL', 'TTL'] -== APP == We will update our custom label value and check it was persisted -== APP == We added a custom label named [is-this-our-metadata-example] -== APP == Its old value was [yes] but now it is [You bet it is!] +First, we will assign a new custom label to Dapr sidecar +Now, we will fetch the sidecar's metadata +And this is what we got: + application_id: my-metadata-app + active_actors_count: {} + registered_components: + name=lockstore type=lock.redis version= capabilities=[] + name=pubsub type=pubsub.redis version=v1 capabilities=[] + name=statestore type=state.redis version=v1 capabilities=['ACTOR', 'ETAG', 'KEYS_LIKE', 'TRANSACTIONAL', 'TTL'] +We will update our custom label value and check it was persisted +We added a custom label named [is-this-our-metadata-example] +Its old value was [yes] but now it is [You bet it is!] ``` ## Error Handling diff --git a/examples/pubsub-simple/README.md b/examples/pubsub-simple/README.md index 6ee7ad89d..1cf38c9c1 100644 --- a/examples/pubsub-simple/README.md +++ b/examples/pubsub-simple/README.md @@ -27,23 +27,23 @@ Run the following command in a terminal/command prompt: ```bash # 2. Start Publisher -dapr run --app-id python-publisher --app-protocol grpc --dapr-grpc-port=3500 --enable-app-health-check python3 publisher.py +dapr run --app-id python-publisher --app-protocol grpc --dapr-grpc-port=3500 --enable-app-health-check -- python3 publisher.py ``` diff --git a/examples/pubsub-streaming-async/README.md b/examples/pubsub-streaming-async/README.md index e626fe75a..35c399b13 100644 --- a/examples/pubsub-streaming-async/README.md +++ b/examples/pubsub-streaming-async/README.md @@ -27,12 +27,12 @@ Run the following command in a terminal/command prompt: @@ -47,12 +47,12 @@ dapr run --app-id=secretsapp --app-protocol grpc --resources-path components/ py You should be able to see the following output: ``` -== APP == Got! -== APP == {'secretKey': 'secretValue'} -== APP == Got! -== APP == [('random', {'random': 'randomValue'}), ('secretKey', {'secretKey': 'secretValue'})] -== APP == Got! -== APP == {'random': 'randomValue'} +Got! +{'secretKey': 'secretValue'} +Got! +[('random', {'random': 'randomValue'}), ('secretKey', {'secretKey': 'secretValue'})] +Got! +{'random': 'randomValue'} ``` In `config.yaml` you can see that the `localsecretstore` secret store has been defined with some restricted permissions. @@ -78,11 +78,11 @@ To see this run the same `example.py` app with the following command: @@ -96,11 +96,11 @@ The above command overrides the default configuration file with the `--config` f The output should be as follows: ``` -== APP == Got! -== APP == {'secretKey': 'secretValue'} -== APP == Got! -== APP == [('secretKey', {'secretKey': 'secretValue'})] -== APP == Got expected error for accessing random key +Got! +{'secretKey': 'secretValue'} +Got! +[('secretKey', {'secretKey': 'secretValue'})] +Got expected error for accessing random key ``` It can be seen that when it tried to get the random key again, it fails as by default the access is denied for any key diff --git a/examples/state_store/README.md b/examples/state_store/README.md index 3569d3603..66627c9bb 100644 --- a/examples/state_store/README.md +++ b/examples/state_store/README.md @@ -34,17 +34,17 @@ To run this example, the following code can be utilized: @@ -56,27 +56,27 @@ dapr run --resources-path components/ -- python3 state_store.py The output should be as follows: ``` -== APP == State store has successfully saved value_1 with key_1 as key +State store has successfully saved value_1 with key_1 as key -== APP == Cannot save due to bad etag. ErrorCode=StatusCode.ABORTED +Cannot save due to bad etag. ErrorCode=StatusCode.ABORTED -== APP == State store has successfully saved value_2 with key_2 as key +State store has successfully saved value_2 with key_2 as key -== APP == State store has successfully saved value_3 with key_3 as key +State store has successfully saved value_3 with key_3 as key -== APP == Cannot save bulk due to bad etags. ErrorCode=StatusCode.ABORTED +Cannot save bulk due to bad etags. ErrorCode=StatusCode.ABORTED -== APP == Got value=b'value_1' eTag=1 +Got value=b'value_1' eTag=1 -== APP == Got items with etags: [(b'value_1_updated', '2'), (b'value_2', '2')] +Got items with etags: [(b'value_1_updated', '2'), (b'value_2', '2')] -== APP == Transaction with outbox pattern executed successfully! +Transaction with outbox pattern executed successfully! -== APP == Got value after outbox pattern: b'val1' +Got value after outbox pattern: b'val1' -== APP == Got values after transaction delete: [b'', b''] +Got values after transaction delete: [b'', b''] -== APP == Got value after delete: b'' +Got value after delete: b'' ``` ## Error Handling diff --git a/examples/state_store_query/README.md b/examples/state_store_query/README.md index 1c257d081..cab871789 100644 --- a/examples/state_store_query/README.md +++ b/examples/state_store_query/README.md @@ -56,14 +56,14 @@ Now run the app @@ -74,14 +74,14 @@ dapr run --app-id queryexample --resources-path components/ -- python3 state_sto You should be able to see the following output: ``` -== APP == 1 {"city": "Seattle", "person": {"id": 1036.0, "org": "Dev Ops"}, "state": "WA"} -== APP == 4 {"city": "Spokane", "person": {"id": 1042.0, "org": "Dev Ops"}, "state": "WA"} -== APP == 10 {"city": "New York", "person": {"id": 1054.0, "org": "Dev Ops"}, "state": "NY"} -== APP == Token: 3 -== APP == 9 {"city": "San Diego", "person": {"id": 1002.0, "org": "Finance"}, "state": "CA"} -== APP == 7 {"city": "San Francisco", "person": {"id": 1015.0, "org": "Dev Ops"}, "state": "CA"} -== APP == 3 {"city": "Sacramento", "person": {"id": 1071.0, "org": "Finance"}, "state": "CA"} -== APP == Token: 6 +1 {"city": "Seattle", "person": {"id": 1036.0, "org": "Dev Ops"}, "state": "WA"} +4 {"city": "Spokane", "person": {"id": 1042.0, "org": "Dev Ops"}, "state": "WA"} +10 {"city": "New York", "person": {"id": 1054.0, "org": "Dev Ops"}, "state": "NY"} +Token: 3 +9 {"city": "San Diego", "person": {"id": 1002.0, "org": "Finance"}, "state": "CA"} +7 {"city": "San Francisco", "person": {"id": 1015.0, "org": "Dev Ops"}, "state": "CA"} +3 {"city": "Sacramento", "person": {"id": 1071.0, "org": "Finance"}, "state": "CA"} +Token: 6 ``` Cleanup diff --git a/examples/w3c-tracing/README.md b/examples/w3c-tracing/README.md index 58faa8590..0dc892ed8 100644 --- a/examples/w3c-tracing/README.md +++ b/examples/w3c-tracing/README.md @@ -227,16 +227,16 @@ name: Run caller app with tracing match_order: none expected_stdout_lines: - "✅ You're up and running! Both Dapr and your app logs will appear here." - - '== APP == application/json' - - '== APP == SAY' - - '== APP == text/plain' - - '== APP == SLEEP' - - '== APP == Trace ID matches after forwarding' - - '== APP == application/json' - - '== APP == SAY' - - '== APP == text/plain' - - '== APP == SLEEP' - - '== APP == Trace ID matches after forwarding' + - 'application/json' + - 'SAY' + - 'text/plain' + - 'SLEEP' + - 'Trace ID matches after forwarding' + - 'application/json' + - 'SAY' + - 'text/plain' + - 'SLEEP' + - 'Trace ID matches after forwarding' - "✅ Exited App successfully" background: true sleep: 10 diff --git a/examples/workflow/README.md b/examples/workflow/README.md index b1f1cfae9..cf3cce610 100644 --- a/examples/workflow/README.md +++ b/examples/workflow/README.md @@ -34,25 +34,25 @@ It shows several Dapr Workflow features including: @@ -64,25 +64,25 @@ dapr run --app-id wf-simple-example -- python3 simple.py The output of this example should look like this: ``` - - "== APP == Hi Counter!" - - "== APP == New counter value is: 1!" - - "== APP == New counter value is: 11!" - - "== APP == Retry count value is: 0!" - - "== APP == Retry count value is: 1! This print statement verifies retry" - - "== APP == Appending 1 to child_orchestrator_string!" - - "== APP == Appending a to child_orchestrator_string!" - - "== APP == Appending a to child_orchestrator_string!" - - "== APP == Appending 2 to child_orchestrator_string!" - - "== APP == Appending b to child_orchestrator_string!" - - "== APP == Appending b to child_orchestrator_string!" - - "== APP == Appending 3 to child_orchestrator_string!" - - "== APP == Appending c to child_orchestrator_string!" - - "== APP == Appending c to child_orchestrator_string!" - - "== APP == Get response from hello_world_wf after pause call: SUSPENDED" - - "== APP == Get response from hello_world_wf after resume call: RUNNING" - - "== APP == New counter value is: 111!" - - "== APP == New counter value is: 1111!" - - "== APP == Workflow completed! Result: Completed" + - "Hi Counter!" + - "New counter value is: 1!" + - "New counter value is: 11!" + - "Retry count value is: 0!" + - "Retry count value is: 1! This print statement verifies retry" + - "Appending 1 to child_orchestrator_string!" + - "Appending a to child_orchestrator_string!" + - "Appending a to child_orchestrator_string!" + - "Appending 2 to child_orchestrator_string!" + - "Appending b to child_orchestrator_string!" + - "Appending b to child_orchestrator_string!" + - "Appending 3 to child_orchestrator_string!" + - "Appending c to child_orchestrator_string!" + - "Appending c to child_orchestrator_string!" + - "Get response from hello_world_wf after pause call: SUSPENDED" + - "Get response from hello_world_wf after resume call: RUNNING" + - "New counter value is: 111!" + - "New counter value is: 1111!" + - "Workflow completed! Result: Completed" ``` ### Simple Workflow with async workflow client @@ -100,25 +100,25 @@ It shows several Dapr Workflow features including: @@ -130,25 +130,25 @@ dapr run --app-id wf-simple-aio-example -- python3 simple_aio_client.py The output of this example should look like this: ``` - - "== APP == Hi Counter!" - - "== APP == New counter value is: 1!" - - "== APP == New counter value is: 11!" - - "== APP == Retry count value is: 0!" - - "== APP == Retry count value is: 1! This print statement verifies retry" - - "== APP == Appending 1 to child_orchestrator_string!" - - "== APP == Appending a to child_orchestrator_string!" - - "== APP == Appending a to child_orchestrator_string!" - - "== APP == Appending 2 to child_orchestrator_string!" - - "== APP == Appending b to child_orchestrator_string!" - - "== APP == Appending b to child_orchestrator_string!" - - "== APP == Appending 3 to child_orchestrator_string!" - - "== APP == Appending c to child_orchestrator_string!" - - "== APP == Appending c to child_orchestrator_string!" - - "== APP == Get response from hello_world_wf after pause call: SUSPENDED" - - "== APP == Get response from hello_world_wf after resume call: RUNNING" - - "== APP == New counter value is: 111!" - - "== APP == New counter value is: 1111!" - - "== APP == Workflow completed! Result: Completed" + - "Hi Counter!" + - "New counter value is: 1!" + - "New counter value is: 11!" + - "Retry count value is: 0!" + - "Retry count value is: 1! This print statement verifies retry" + - "Appending 1 to child_orchestrator_string!" + - "Appending a to child_orchestrator_string!" + - "Appending a to child_orchestrator_string!" + - "Appending 2 to child_orchestrator_string!" + - "Appending b to child_orchestrator_string!" + - "Appending b to child_orchestrator_string!" + - "Appending 3 to child_orchestrator_string!" + - "Appending c to child_orchestrator_string!" + - "Appending c to child_orchestrator_string!" + - "Get response from hello_world_wf after pause call: SUSPENDED" + - "Get response from hello_world_wf after resume call: RUNNING" + - "New counter value is: 111!" + - "New counter value is: 1111!" + - "Workflow completed! Result: Completed" ``` ### Task Chaining @@ -157,10 +157,10 @@ This example demonstrates how to chain "activity" tasks together in a workflow. @@ -172,11 +172,11 @@ dapr run --app-id wfexample -- python3 task_chaining.py The output of this example should look like this: ``` -== APP == Workflow started. Instance ID: b716208586c24829806b44b62816b598 -== APP == Step 1: Received input: 42. -== APP == Step 2: Received input: 43. -== APP == Step 3: Received input: 86. -== APP == Workflow completed! Status: WorkflowStatus.COMPLETED +Workflow started. Instance ID: b716208586c24829806b44b62816b598 +Step 1: Received input: 42. +Step 2: Received input: 43. +Step 3: Received input: 86. +Workflow completed! Status: WorkflowStatus.COMPLETED ``` ### Fan-out/Fan-in @@ -187,27 +187,27 @@ This example demonstrates how to fan-out a workflow into multiple parallel tasks name: Run the fan-out/fan-in example match_order: none expected_stdout_lines: - - "== APP == Processing work item: 1." - - "== APP == Processing work item: 2." - - "== APP == Processing work item: 3." - - "== APP == Processing work item: 4." - - "== APP == Processing work item: 5." - - "== APP == Processing work item: 6." - - "== APP == Processing work item: 7." - - "== APP == Processing work item: 8." - - "== APP == Processing work item: 9." - - "== APP == Processing work item: 10." - - "== APP == Work item 1 processed. Result: 2." - - "== APP == Work item 2 processed. Result: 4." - - "== APP == Work item 3 processed. Result: 6." - - "== APP == Work item 4 processed. Result: 8." - - "== APP == Work item 5 processed. Result: 10." - - "== APP == Work item 6 processed. Result: 12." - - "== APP == Work item 7 processed. Result: 14." - - "== APP == Work item 8 processed. Result: 16." - - "== APP == Work item 9 processed. Result: 18." - - "== APP == Work item 10 processed. Result: 20." - - "== APP == Final result: 110." + - "Processing work item: 1." + - "Processing work item: 2." + - "Processing work item: 3." + - "Processing work item: 4." + - "Processing work item: 5." + - "Processing work item: 6." + - "Processing work item: 7." + - "Processing work item: 8." + - "Processing work item: 9." + - "Processing work item: 10." + - "Work item 1 processed. Result: 2." + - "Work item 2 processed. Result: 4." + - "Work item 3 processed. Result: 6." + - "Work item 4 processed. Result: 8." + - "Work item 5 processed. Result: 10." + - "Work item 6 processed. Result: 12." + - "Work item 7 processed. Result: 14." + - "Work item 8 processed. Result: 16." + - "Work item 9 processed. Result: 18." + - "Work item 10 processed. Result: 20." + - "Final result: 110." timeout_seconds: 30 --> @@ -219,28 +219,28 @@ dapr run --app-id wfexample -- python3 fan_out_fan_in.py The output of this sample should look like this: ``` -== APP == Workflow started. Instance ID: 2e656befbb304e758776e30642b75944 -== APP == Processing work item: 1. -== APP == Processing work item: 2. -== APP == Processing work item: 3. -== APP == Processing work item: 4. -== APP == Processing work item: 5. -== APP == Processing work item: 6. -== APP == Processing work item: 7. -== APP == Processing work item: 8. -== APP == Processing work item: 9. -== APP == Processing work item: 10. -== APP == Work item 1 processed. Result: 2. -== APP == Work item 2 processed. Result: 4. -== APP == Work item 3 processed. Result: 6. -== APP == Work item 4 processed. Result: 8. -== APP == Work item 5 processed. Result: 10. -== APP == Work item 6 processed. Result: 12. -== APP == Work item 7 processed. Result: 14. -== APP == Work item 8 processed. Result: 16. -== APP == Work item 9 processed. Result: 18. -== APP == Work item 10 processed. Result: 20. -== APP == Final result: 110. +Workflow started. Instance ID: 2e656befbb304e758776e30642b75944 +Processing work item: 1. +Processing work item: 2. +Processing work item: 3. +Processing work item: 4. +Processing work item: 5. +Processing work item: 6. +Processing work item: 7. +Processing work item: 8. +Processing work item: 9. +Processing work item: 10. +Work item 1 processed. Result: 2. +Work item 2 processed. Result: 4. +Work item 3 processed. Result: 6. +Work item 4 processed. Result: 8. +Work item 5 processed. Result: 10. +Work item 6 processed. Result: 12. +Work item 7 processed. Result: 14. +Work item 8 processed. Result: 16. +Work item 9 processed. Result: 18. +Work item 10 processed. Result: 20. +Final result: 110. ``` Note that the ordering of the work-items is non-deterministic since they are all running in parallel. @@ -345,17 +345,17 @@ This example demonstrates how to call child workflows and activities in differen @@ -388,17 +388,17 @@ In this example we run `app3` in failing mode, which makes the activity call ret @@ -433,13 +433,13 @@ In this example we run `app2` in failing mode, which makes the workflow call ret @@ -477,29 +477,29 @@ It had to be done in two parts because the runtime needs to be restarted in orde name: Run the versioning example match_order: none expected_stdout_lines: - - "== APP == test1: triggering workflow" - - "== APP == test1: Received workflow call for version1" - - "== APP == test1: Finished workflow for version1" - - "== APP == test2: triggering workflow" - - "== APP == test2: Received workflow call for version1" - - "== APP == test2: Finished workflow for version1" - - "== APP == test3: triggering workflow" - - "== APP == test3: Received workflow call for version2" - - "== APP == test3: Finished workflow for version2" - - "== APP == test4: start" - - "== APP == test4: patch1 is patched" - - "== APP == test5: start" - - "== APP == test5: patch1 is not patched" - - "== APP == test5: patch2 is patched" - - "== APP == test6: start" - - "== APP == test6: patch1 is patched" - - "== APP == test6: patch2 is patched" - - "== APP == test7: Received workflow call for version1" - - "== APP == test7: Workflow is stalled" - - "== APP == test8: Workflow is stalled" - - "== APP == test100: part2" - - "== APP == test100: Finished stalled version1 workflow" - - "== APP == test100: Finished stalled patching workflow" + - "test1: triggering workflow" + - "test1: Received workflow call for version1" + - "test1: Finished workflow for version1" + - "test2: triggering workflow" + - "test2: Received workflow call for version1" + - "test2: Finished workflow for version1" + - "test3: triggering workflow" + - "test3: Received workflow call for version2" + - "test3: Finished workflow for version2" + - "test4: start" + - "test4: patch1 is patched" + - "test5: start" + - "test5: patch1 is not patched" + - "test5: patch2 is patched" + - "test6: start" + - "test6: patch1 is patched" + - "test6: patch2 is patched" + - "test7: Received workflow call for version1" + - "test7: Workflow is stalled" + - "test8: Workflow is stalled" + - "test100: part2" + - "test100: Finished stalled version1 workflow" + - "test100: Finished stalled patching workflow" timeout_seconds: 60 -->