INVALID_ARGUMENT: nDCStateRebuilder unable to rebuild mutable state to event ID: 11, version: 0, this event must be at the boundary
I am trying to reset the workflow ,if I pass EventId as EVENT_TYPE_WORKFLOW_TASK_STARTED .It is working but the workflow is executed from the start . My use case is to reset the workflow after n activities execution .Now, when I change the EventId to any other enum ( EVENT_TYPE_ACTIVITY_TASK_COMPLETED ,EVENT_TYPE_ACTIVITY_TASK_STARTED) ,it is throwing error stating nDCStateRebuilder unable to rebuild mutable state to event ID: 11, version: 0, this event must be at the boundary. I have updated the temporal-sdk ,it is still not working
Specify the eventId of any event after WorkflowTaskStarted to which you want to reset. Valid values are WorkflowTaskCompleted, WorkflowTaskFailed, and WorkflowTaskTimeout.
I dont want to execute the workflow from the start .I want to start the reset the workflow from few activities.EVENT_TYPE_WORKFLOW_TASK_STARTED is starting the workflow from the start , which restarting the workflow from the start and activities are executed twice.
You can specify a reset event id. If you look at your workflow history in web ui for example, the event types that you want to reset to is WorkflowTaskStarted. So if you had wf event history:
To reset after activity A invocation and before activity B invocation you can set the value of reset event id to 9.
If you share your workflow history (json) and tell us after what activity you want to reset to we can to find out the reset event id for your use case.