Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add sample of cancellation populated from parent to child workflow #54

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

longquanzheng
Copy link
Collaborator

chid workflow history:

cadence --do samples-domain wf show -w aeca58a9-9a2e-3d39-b368-3f96a44c1eff -pdt
   1  2021-07-26T22:25:04-07:00  WorkflowExecutionStarted          {WorkflowType:{Name:GreetingChild::composeGreeting},
                                                                   ParentWorkflowDomain:samples-domain,
                                                                   ParentWorkflowExecution:{WorkflowId:c54223df-8d1e-4d76-94cd-777a3a414e24,
                                                                   RunId:c018f96b-c20b-42bf-a2c7-e3fa857d1428},
                                                                   ParentInitiatedEventId:5, TaskList:{Name:HelloCancelChild},
                                                                   Input:[["Hello","World"]], ExecutionStartToCloseTimeoutSeconds:30,
                                                                   TaskStartToCloseTimeoutSeconds:10,
                                                                   ContinuedFailureDetails:[], LastCompletionResult:[],
                                                                   OriginalExecutionRunId:8ae116fa-4a52-4160-a5b7-a8c2cd9963b3,
                                                                   FirstExecutionRunId:8ae116fa-4a52-4160-a5b7-a8c2cd9963b3, Attempt:0,
                                                                   FirstDecisionTaskBackoffSeconds:0}
   2  2021-07-26T22:25:04-07:00  DecisionTaskScheduled             {TaskList:{Name:HelloCancelChild},
                                                                   StartToCloseTimeoutSeconds:10,
                                                                   Attempt:0}
   3  2021-07-26T22:25:04-07:00  DecisionTaskStarted               {ScheduledEventId:2,
                                                                   Identity:42438@IT-USA-25920,
                                                                   RequestId:ad099d1a-4b66-4a67-81f1-a4276f5f7bed}
   4  2021-07-26T22:25:04-07:00  DecisionTaskCompleted             {ExecutionContext:[],
                                                                   ScheduledEventId:2,
                                                                   StartedEventId:3,
                                                                   Identity:42438@IT-USA-25920}
   5  2021-07-26T22:25:04-07:00  TimerStarted                      {TimerId:0,
                                                                   StartToFireTimeoutSeconds:864000,
                                                                   DecisionTaskCompletedEventId:4}
   6  2021-07-26T22:25:05-07:00  WorkflowExecutionCancelRequested  {ExternalInitiatedEventId:14,
                                                                   ExternalWorkflowExecution:{WorkflowId:c54223df-8d1e-4d76-94cd-777a3a414e24,
                                                                   RunId:c018f96b-c20b-42bf-a2c7-e3fa857d1428}, Identity:history-service}
   7  2021-07-26T22:25:05-07:00  DecisionTaskScheduled             {TaskList:{Name:sticky:IT-USA-25920:f4d7be03-9597-41be-8288-60ce3339c263},
                                                                   StartToCloseTimeoutSeconds:10, Attempt:0}
   8  2021-07-26T22:25:05-07:00  DecisionTaskStarted               {ScheduledEventId:7,
                                                                   Identity:f4d7be03-9597-41be-8288-60ce3339c263,
                                                                   RequestId:8232d2fe-a056-4d01-bd51-5361deee76a7}
   9  2021-07-26T22:25:05-07:00  DecisionTaskCompleted             {ExecutionContext:[],
                                                                   ScheduledEventId:7,
                                                                   StartedEventId:8,
                                                                   Identity:42438@IT-USA-25920}
  10  2021-07-26T22:25:05-07:00  ActivityTaskScheduled             {ActivityId:1,
                                                                   ActivityType:{Name:GreetingActivities::sayGoodbye},
                                                                   TaskList:{Name:HelloCancelChild},
                                                                   Input:["World"], ScheduleToCloseTimeoutSeconds:20,
                                                                   ScheduleToStartTimeoutSeconds:20,
                                                                   StartToCloseTimeoutSeconds:20,
                                                                   HeartbeatTimeoutSeconds:20,
                                                                   DecisionTaskCompletedEventId:9}
  11  2021-07-26T22:25:05-07:00  ActivityTaskStarted               {ScheduledEventId:10,
                                                                   Identity:42438@IT-USA-25920,
                                                                   RequestId:786ed1d6-5b7a-4808-800e-2483c2666be0,
                                                                   Attempt:0, LastFailureDetails:[]}
  12  2021-07-26T22:25:15-07:00  ActivityTaskCompleted             {Result:["World"],
                                                                   ScheduledEventId:10,
                                                                   StartedEventId:11,
                                                                   Identity:42438@IT-USA-25920}
  13  2021-07-26T22:25:15-07:00  DecisionTaskScheduled             {TaskList:{Name:sticky:IT-USA-25920:f4d7be03-9597-41be-8288-60ce3339c263},
                                                                   StartToCloseTimeoutSeconds:10, Attempt:0}
  14  2021-07-26T22:25:15-07:00  DecisionTaskStarted               {ScheduledEventId:13,
                                                                   Identity:f4d7be03-9597-41be-8288-60ce3339c263,
                                                                   RequestId:b263bf45-e700-4065-8c8e-0e106257edee}
  15  2021-07-26T22:25:15-07:00  DecisionTaskCompleted             {ExecutionContext:[],
                                                                   ScheduledEventId:13,
                                                                   StartedEventId:14,
                                                                   Identity:42438@IT-USA-25920}
  16  2021-07-26T22:25:15-07:00  WorkflowExecutionCanceled         {DecisionTaskCompletedEventId:15,
                                                                   Details:[]}

Parent:

cadence --do samples-domain wf show -w c54223df-8d1e-4d76-94cd-777a3a414e24 -pdt
   1  2021-07-26T22:25:04-07:00  WorkflowExecutionStarted                         {WorkflowType:{Name:GreetingWorkflow::getGreeting},
                                                                                  TaskList:{Name:HelloCancelChild}, Input:["World"],
                                                                                  ExecutionStartToCloseTimeoutSeconds:30,
                                                                                  TaskStartToCloseTimeoutSeconds:10,
                                                                                  ContinuedFailureDetails:[], LastCompletionResult:[],
                                                                                  OriginalExecutionRunId:c018f96b-c20b-42bf-a2c7-e3fa857d1428,
                                                                                  FirstExecutionRunId:c018f96b-c20b-42bf-a2c7-e3fa857d1428,
                                                                                  Attempt:0, FirstDecisionTaskBackoffSeconds:0}
   2  2021-07-26T22:25:04-07:00  DecisionTaskScheduled                            {TaskList:{Name:HelloCancelChild},
                                                                                  StartToCloseTimeoutSeconds:10,
                                                                                  Attempt:0}
   3  2021-07-26T22:25:04-07:00  DecisionTaskStarted                              {ScheduledEventId:2,
                                                                                  Identity:42438@IT-USA-25920,
                                                                                  RequestId:9bf6c18b-5807-42df-910e-a86dcf6c50c3}
   4  2021-07-26T22:25:04-07:00  DecisionTaskCompleted                            {ExecutionContext:[],
                                                                                  ScheduledEventId:2,
                                                                                  StartedEventId:3,
                                                                                  Identity:42438@IT-USA-25920}
   5  2021-07-26T22:25:04-07:00  StartChildWorkflowExecutionInitiated             {Domain:samples-domain,
                                                                                  WorkflowId:aeca58a9-9a2e-3d39-b368-3f96a44c1eff,
                                                                                  WorkflowType:{Name:GreetingChild::composeGreeting},
                                                                                  TaskList:{Name:HelloCancelChild},
                                                                                  Input:[["Hello","World"]],
                                                                                  ExecutionStartToCloseTimeoutSeconds:30,
                                                                                  TaskStartToCloseTimeoutSeconds:10,
                                                                                  ParentClosePolicy:TERMINATE, Control:[],
                                                                                  DecisionTaskCompletedEventId:4,
                                                                                  WorkflowIdReusePolicy:AllowDuplicateFailedOnly}
   6  2021-07-26T22:25:04-07:00  ChildWorkflowExecutionStarted                    {Domain:samples-domain, InitiatedEventId:5,
                                                                                  WorkflowExecution:{WorkflowId:aeca58a9-9a2e-3d39-b368-3f96a44c1eff,
                                                                                  RunId:8ae116fa-4a52-4160-a5b7-a8c2cd9963b3},
                                                                                  WorkflowType:{Name:GreetingChild::composeGreeting}}
   7  2021-07-26T22:25:04-07:00  DecisionTaskScheduled                            {TaskList:{Name:sticky:IT-USA-25920:f4d7be03-9597-41be-8288-60ce3339c263},
                                                                                  StartToCloseTimeoutSeconds:10, Attempt:0}
   8  2021-07-26T22:25:04-07:00  DecisionTaskStarted                              {ScheduledEventId:7,
                                                                                  Identity:f4d7be03-9597-41be-8288-60ce3339c263,
                                                                                  RequestId:7dda37db-99c0-4298-aa13-307e610dbdee}
   9  2021-07-26T22:25:04-07:00  DecisionTaskCompleted                            {ExecutionContext:[],
                                                                                  ScheduledEventId:7,
                                                                                  StartedEventId:8,
                                                                                  Identity:42438@IT-USA-25920}
  10  2021-07-26T22:25:05-07:00  WorkflowExecutionCancelRequested                 {}
  11  2021-07-26T22:25:05-07:00  DecisionTaskScheduled                            {TaskList:{Name:sticky:IT-USA-25920:f4d7be03-9597-41be-8288-60ce3339c263},
                                                                                  StartToCloseTimeoutSeconds:10, Attempt:0}
  12  2021-07-26T22:25:05-07:00  DecisionTaskStarted                              {ScheduledEventId:11,
                                                                                  Identity:f4d7be03-9597-41be-8288-60ce3339c263,
                                                                                  RequestId:2dc072ab-755d-4a35-b0bd-ad46ca6c4589}
  13  2021-07-26T22:25:05-07:00  DecisionTaskCompleted                            {ExecutionContext:[],
                                                                                  ScheduledEventId:11,
                                                                                  StartedEventId:12,
                                                                                  Identity:42438@IT-USA-25920}
  14  2021-07-26T22:25:05-07:00  RequestCancelExternalWorkflowExecutionInitiated  {DecisionTaskCompletedEventId:13,
                                                                                  WorkflowExecution:{WorkflowId:aeca58a9-9a2e-3d39-b368-3f96a44c1eff},
                                                                                  Control:[], ChildWorkflowOnly:true}
  15  2021-07-26T22:25:05-07:00  ExternalWorkflowExecutionCancelRequested         {InitiatedEventId:14, Domain:samples-domain,
                                                                                  WorkflowExecution:{WorkflowId:aeca58a9-9a2e-3d39-b368-3f96a44c1eff}}
  16  2021-07-26T22:25:05-07:00  DecisionTaskScheduled                            {TaskList:{Name:sticky:IT-USA-25920:f4d7be03-9597-41be-8288-60ce3339c263},
                                                                                  StartToCloseTimeoutSeconds:10, Attempt:0}
  17  2021-07-26T22:25:05-07:00  DecisionTaskStarted                              {ScheduledEventId:16,
                                                                                  Identity:f4d7be03-9597-41be-8288-60ce3339c263,
                                                                                  RequestId:8ff88077-86af-450b-ba06-d3d88bc5a0a7}
  18  2021-07-26T22:25:05-07:00  DecisionTaskCompleted                            {ExecutionContext:[],
                                                                                  ScheduledEventId:16,
                                                                                  StartedEventId:17,
                                                                                  Identity:42438@IT-USA-25920}
  19  2021-07-26T22:25:15-07:00  ChildWorkflowExecutionCanceled                   {Details:[], Domain:samples-domain,
                                                                                  WorkflowExecution:{WorkflowId:aeca58a9-9a2e-3d39-b368-3f96a44c1eff,
                                                                                  RunId:8ae116fa-4a52-4160-a5b7-a8c2cd9963b3},
                                                                                  WorkflowType:{Name:GreetingChild::composeGreeting},
                                                                                  InitiatedEventId:5, StartedEventId:6}
  20  2021-07-26T22:25:15-07:00  DecisionTaskScheduled                            {TaskList:{Name:sticky:IT-USA-25920:f4d7be03-9597-41be-8288-60ce3339c263},
                                                                                  StartToCloseTimeoutSeconds:10, Attempt:0}
  21  2021-07-26T22:25:15-07:00  DecisionTaskStarted                              {ScheduledEventId:20,
                                                                                  Identity:f4d7be03-9597-41be-8288-60ce3339c263,
                                                                                  RequestId:dbcec853-1e03-465d-8fdd-ac9d1a56a49b}
  22  2021-07-26T22:25:15-07:00  DecisionTaskCompleted                            {ExecutionContext:[],
                                                                                  ScheduledEventId:20,
                                                                                  StartedEventId:21,
                                                                                  Identity:42438@IT-USA-25920}
  23  2021-07-26T22:25:15-07:00  WorkflowExecutionCanceled                        {DecisionTaskCompletedEventId:22,
                                                                                  Details:[]}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant