Skip to content

Commit 770104f

Browse files
authored
Add PauseInfo to the pending activity info (#569)
<!-- Describe what has changed in this PR --> **What changed?** Add "PauseInfo" message to the PendincgActivityInfo. Message contain information about who, why and when paused the activity. Note: if activity is paused by rule id, users will need to call "DescribeWorkflowRule" to get the details for that rule. <!-- Tell your future self why have you made these changes --> **Why?** Product request, for audit purpose. Note: we don't add this information to the history. <!-- Are there any breaking changes on binary or code level? --> **Breaking changes** No
1 parent 292155a commit 770104f

File tree

4 files changed

+90
-0
lines changed

4 files changed

+90
-0
lines changed

openapi/openapiv2.json

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6756,6 +6756,37 @@
67566756
}
67576757
}
67586758
},
6759+
"PauseInfoManual": {
6760+
"type": "object",
6761+
"properties": {
6762+
"identity": {
6763+
"type": "string",
6764+
"description": "The identity of the actor that paused the activity."
6765+
},
6766+
"reason": {
6767+
"type": "string",
6768+
"description": "Reason for pausing the activity."
6769+
}
6770+
}
6771+
},
6772+
"PendingActivityInfoPauseInfo": {
6773+
"type": "object",
6774+
"properties": {
6775+
"pauseTime": {
6776+
"type": "string",
6777+
"format": "date-time",
6778+
"description": "The time when the activity was paused."
6779+
},
6780+
"manual": {
6781+
"$ref": "#/definitions/PauseInfoManual",
6782+
"title": "activity was paused by the manual intervention"
6783+
},
6784+
"ruleId": {
6785+
"type": "string",
6786+
"description": "Id of the rule that paused the activity."
6787+
}
6788+
}
6789+
},
67596790
"StartOperationResponseAsync": {
67606791
"type": "object",
67616792
"properties": {
@@ -7845,6 +7876,10 @@
78457876
"spec": {
78467877
"$ref": "#/definitions/v1WorkflowRuleSpec",
78477878
"description": "Note: Rule ID and expiration date are not used in the trigger request."
7879+
},
7880+
"identity": {
7881+
"type": "string",
7882+
"title": "The identity of the client who initiated this request"
78487883
}
78497884
}
78507885
},
@@ -11603,6 +11638,9 @@
1160311638
"priority": {
1160411639
"$ref": "#/definitions/v1Priority",
1160511640
"title": "Priority metadata"
11641+
},
11642+
"pauseInfo": {
11643+
"$ref": "#/definitions/PendingActivityInfoPauseInfo"
1160611644
}
1160711645
}
1160811646
},

openapi/openapiv3.yaml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8692,6 +8692,15 @@ components:
86928692
PauseActivityResponse:
86938693
type: object
86948694
properties: {}
8695+
PauseInfo_Manual:
8696+
type: object
8697+
properties:
8698+
identity:
8699+
type: string
8700+
description: The identity of the actor that paused the activity.
8701+
reason:
8702+
type: string
8703+
description: Reason for pausing the activity.
86958704
Payload:
86968705
description: |-
86978706
Represents some binary (byte array) data (ex: activity input parameters or workflow result) with
@@ -8794,6 +8803,22 @@ components:
87948803
allOf:
87958804
- $ref: '#/components/schemas/Priority'
87968805
description: Priority metadata
8806+
pauseInfo:
8807+
$ref: '#/components/schemas/PendingActivityInfo_PauseInfo'
8808+
PendingActivityInfo_PauseInfo:
8809+
type: object
8810+
properties:
8811+
pauseTime:
8812+
type: string
8813+
description: The time when the activity was paused.
8814+
format: date-time
8815+
manual:
8816+
allOf:
8817+
- $ref: '#/components/schemas/PauseInfo_Manual'
8818+
description: activity was paused by the manual intervention
8819+
ruleId:
8820+
type: string
8821+
description: Id of the rule that paused the activity.
87978822
PendingChildExecutionInfo:
87988823
type: object
87998824
properties:
@@ -11302,6 +11327,9 @@ components:
1130211327
allOf:
1130311328
- $ref: '#/components/schemas/WorkflowRuleSpec'
1130411329
description: 'Note: Rule ID and expiration date are not used in the trigger request.'
11330+
identity:
11331+
type: string
11332+
description: The identity of the client who initiated this request
1130511333
TriggerWorkflowRuleResponse:
1130611334
type: object
1130711335
properties:

temporal/api/workflow/v1/message.proto

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -304,6 +304,27 @@ message PendingActivityInfo {
304304

305305
// Priority metadata
306306
temporal.api.common.v1.Priority priority = 22;
307+
308+
message PauseInfo {
309+
// The time when the activity was paused.
310+
google.protobuf.Timestamp pause_time = 1;
311+
312+
message Manual {
313+
// The identity of the actor that paused the activity.
314+
string identity = 1;
315+
// Reason for pausing the activity.
316+
string reason = 2;
317+
}
318+
oneof paused_by {
319+
// activity was paused by the manual intervention
320+
Manual manual = 2;
321+
322+
// Id of the rule that paused the activity.
323+
string rule_id = 3;
324+
}
325+
}
326+
327+
PauseInfo pause_info = 23;
307328
}
308329

309330
message PendingChildExecutionInfo {

temporal/api/workflowservice/v1/request_response.proto

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2271,6 +2271,9 @@ message TriggerWorkflowRuleRequest {
22712271
// Note: Rule ID and expiration date are not used in the trigger request.
22722272
temporal.api.rules.v1.WorkflowRuleSpec spec = 5;
22732273
}
2274+
2275+
// The identity of the client who initiated this request
2276+
string identity = 3;
22742277
}
22752278

22762279
message TriggerWorkflowRuleResponse {

0 commit comments

Comments
 (0)