Mine is a long running workflow(continue-as-new). I am just trying use WorkflowReplayer
- Downloaded the history from temporal UI. I modified the json based on temporal-patient-onboarding/testrun.json at main · tsurdilo/temporal-patient-onboarding · GitHub
- when I run my replay test
@RegisterExtension
val extension = TestWorkflowExtension.newBuilder()
.setWorkflowTypes(MyWorkflowImpl::class.java)
.setNamespace("Cloud")
.setWorkflowClientOptions(
WorkflowClientOptions.newBuilder()
.setDataConverter(
DefaultDataConverter(
JacksonJsonPayloadConverter(
Jackson2ObjectMapperBuilder.json()
.modulesToInstall(KotlinModule())
.build()
),
),
)
.build(),
)
.useInternalService()
.setDoNotStart(false)
.build()
WorkflowReplayer.replayWorkflowExecutionFromResource("MyWorkflowHistory_V2_addedKafkaEvent.json", testEnv, MyWorkflowImpl::class.java)
I get this exception. Thoughts?
First event is corrupted
java.lang.IllegalArgumentException: First event is corrupted
at io.temporal.internal.common.WorkflowExecutionHistory.checkHistory(WorkflowExecutionHistory.java:80)
at io.temporal.internal.common.WorkflowExecutionHistory.fromJson(WorkflowExecutionHistory.java:65)
at io.temporal.testing.WorkflowHistoryLoader.readHistory(WorkflowHistoryLoader.java:60)
at io.temporal.testing.WorkflowHistoryLoader.readHistoryFromResource(WorkflowHistoryLoader.java:54)
at io.temporal.testing.WorkflowReplayer.replayWorkflowExecutionFromResource(WorkflowReplayer.java:77)