Skip to content

Commit 5899d13

Browse files
committed
chore: Remove state references
Signed-off-by: Javier Aliaga <[email protected]>
1 parent 9e1f945 commit 5899d13

File tree

1 file changed

+11
-18
lines changed

1 file changed

+11
-18
lines changed

20250523-RS-workflow-activity-context.md

Lines changed: 11 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,15 @@
66

77
## Overview
88

9-
This is a proposal to enrich workflow activity context by introducing new fields. This will make it easier for users to control the workflow's state within activities. They are particularly useful for:
9+
This is a proposal to enrich workflow activity context by introducing new fields. This will make it easier for users to control the retries within activities. They are particularly useful for:
1010

1111
1. **Idempotency**: Ensuring activities are not executed multiple times for the same task
12-
2. **State Management**: Tracking the state of activity execution
1312

1413
## Background
1514

16-
Workflow users have raised concerns about controlling and preventing an activity from being invoked more than once or tracking the state of the execution. Input parameters can be used to control the workflow's state, but certain scenarios do not have enough data to do it. Some examples are:
15+
Workflow users have raised concerns about controlling and preventing an activity from being invoked more than once.
16+
Input parameters can be used to control the workflow's state, but certain scenarios do not have enough data to do it.
17+
Some examples are:
1718

1819
- A notification activity where the message content alone isn't enough to determine uniqueness
1920
- An external service call where idempotency can't be guaranteed by the input parameters
@@ -53,24 +54,16 @@ An attempt to solve this problem has been tried in the JAVA-SDK. However, the so
5354

5455
The proposed fields introduced in this document are:
5556

56-
- WorkflowInstanceId: This field will provide a unique identifier for the workflow instance. It is already available in the orchestration context but will now be propagated to the activity context.
57-
58-
- ActivityInstanceId: This field will provide a unique identifier for the same activity among retries. This new field will be part of the [Activity Request](https://github.com/dapr/durabletask-protobuf/blob/main/protos/orchestrator_service.proto) and needs to be populated in the runtime.
57+
- TaskExecutionId: This field will provide a unique identifier for the same activity among retries. This new field will be part of the [Activity Request](https://github.com/dapr/durabletask-protobuf/blob/main/protos/orchestrator_service.proto) and needs to be populated in the runtime.
58+
The new field will be present in the following entities:
5959
```
60-
message ActivityRequest {
61-
string name = 1;
62-
google.protobuf.StringValue version = 2;
63-
google.protobuf.StringValue input = 3;
64-
OrchestrationInstance orchestrationInstance = 4;
65-
int32 taskId = 5;
66-
TraceContext parentTraceContext = 6;
67-
string activityInstanceId = 7;
68-
}
60+
ActivityRequest
61+
TaskScheduledEvent
62+
TaskCompletedEvent
63+
TaskFailedEvent
64+
ScheduleTaskAction
6965
```
7066

71-
- RetryAttempt: This field will contain the current retry count for the activity execution.
72-
73-
7467
### Feature lifecycle outline
7568

7669
* Expectations

0 commit comments

Comments
 (0)