@@ -76,7 +76,7 @@ func (w *Workflow) Terminate(
7676// OnActivityCompleted implements ActivityStore for workflow-embedded activities.
7777// Writes ActivityTaskStarted + ActivityTaskCompleted history events; Apply() handles cleanup.
7878func (w * Workflow ) OnActivityCompleted (ctx chasm.MutableContext , act * activity.Activity ) error {
79- scheduledEventID := act .ActivityState . GetScheduledEventId ()
79+ scheduledEventID := act .GetScheduledEventId ()
8080 attempt := act .LastAttempt .Get (ctx )
8181 startedEvent , err := addAndApplyHistoryEvent [ActivityTaskStartedEventDefinition ](w , ctx , func (e * historypb.HistoryEvent ) {
8282 e .Attributes = & historypb.HistoryEvent_ActivityTaskStartedEventAttributes {
@@ -107,7 +107,7 @@ func (w *Workflow) OnActivityCompleted(ctx chasm.MutableContext, act *activity.A
107107// OnActivityFailed implements ActivityStore for workflow-embedded activities.
108108// Writes ActivityTaskStarted + ActivityTaskFailed history events; Apply() handles cleanup.
109109func (w * Workflow ) OnActivityFailed (ctx chasm.MutableContext , act * activity.Activity ) error {
110- scheduledEventID := act .ActivityState . GetScheduledEventId ()
110+ scheduledEventID := act .GetScheduledEventId ()
111111 attempt := act .LastAttempt .Get (ctx )
112112 startedEvent , err := addAndApplyHistoryEvent [ActivityTaskStartedEventDefinition ](w , ctx , func (e * historypb.HistoryEvent ) {
113113 e .Attributes = & historypb.HistoryEvent_ActivityTaskStartedEventAttributes {
@@ -139,7 +139,7 @@ func (w *Workflow) OnActivityFailed(ctx chasm.MutableContext, act *activity.Acti
139139// OnActivityTimedOut implements ActivityStore for workflow-embedded activities.
140140// Writes ActivityTaskTimedOut (and optionally ActivityTaskStarted) history events; Apply() handles cleanup.
141141func (w * Workflow ) OnActivityTimedOut (ctx chasm.MutableContext , act * activity.Activity , timeoutFailure * failurepb.Failure , needsStartedEvent bool ) error {
142- scheduledEventID := act .ActivityState . GetScheduledEventId ()
142+ scheduledEventID := act .GetScheduledEventId ()
143143 if timeoutFailure == nil {
144144 return nil
145145 }
@@ -178,14 +178,14 @@ func (w *Workflow) OnActivityTimedOut(ctx chasm.MutableContext, act *activity.Ac
178178// OnActivityCanceled implements ActivityStore for workflow-embedded activities.
179179// No ActivityTaskCanceled history event is written on the forward path in this prototype.
180180func (w * Workflow ) OnActivityCanceled (ctx chasm.MutableContext , act * activity.Activity ) error {
181- activityID := act .ActivityState . GetActivityId ()
181+ activityID := act .GetActivityId ()
182182 delete (w .Activities , activityID )
183183 return w .ScheduleWorkflowTask ()
184184}
185185
186186// OnActivityTerminated implements ActivityStore for workflow-embedded activities.
187187func (w * Workflow ) OnActivityTerminated (ctx chasm.MutableContext , act * activity.Activity ) error {
188- activityID := act .ActivityState . GetActivityId ()
188+ activityID := act .GetActivityId ()
189189 delete (w .Activities , activityID )
190190 return w .ScheduleWorkflowTask ()
191191}
@@ -311,7 +311,7 @@ func (w *Workflow) BuildPendingActivityInfos(ctx chasm.Context) ([]*workflowpb.P
311311func (w * Workflow ) FindActivityByScheduledEventID (ctx chasm.Context , scheduledEventID int64 ) * activity.Activity {
312312 for _ , field := range w .Activities {
313313 act := field .Get (ctx )
314- if act .ActivityState . GetScheduledEventId () == scheduledEventID {
314+ if act .GetScheduledEventId () == scheduledEventID {
315315 return act
316316 }
317317 }
0 commit comments