我有一个回购https://github.com/BuilderHarrison/temporal-hello-world-dsl,当我运行它时,它50%的时间失败,50%的时候成功.我对时态和无服务器sdk都很陌生.所以我不知道如何继续调试这个问题.我遇到的问题是:
{
"type": "workflowExecutionFailedEventAttributes",
"failure": {
"message": "unable to decode the workflow function input payload with error: payload item 0: unable to decode: json: cannot unmarshal object into Go struct field Workflow.Start of type string, function name: HelloWorld",
"source": "GoSDK",
"stackTrace": "",
"cause": {
"message": "payload item 0: unable to decode: json: cannot unmarshal object into Go struct field Workflow.Start of type string",
"source": "GoSDK",
"stackTrace": "",
"cause": {
"message": "unable to decode: json: cannot unmarshal object into Go struct field Workflow.Start of type string",
"source": "GoSDK",
"stackTrace": "",
"cause": {
"message": "unable to decode",
"source": "GoSDK",
"stackTrace": "",
"cause": null,
"applicationFailureInfo": {
"type": "",
"nonRetryable": false,
"details": null
}
},
"applicationFailureInfo": {
"type": "wrapError",
"nonRetryable": false,
"details": null
}
},
"applicationFailureInfo": {
"type": "wrapError",
"nonRetryable": false,
"details": null
}
},
"applicationFailureInfo": {
"type": "wrapError",
"nonRetryable": false,
"details": null
}
},
"retryState": "RetryPolicyNotSet",
"workflowTaskCompletedEventId": "7",
"newExecutionRunId": ""
}
作为参考,我提供的json文件是:
{
"id": "helloworld",
"version": "1.0",
"specVersion": "0.8",
"name": "Hello World Workflow",
"description": "Hello World",
"start": "Hello State",
"states": [
{
"name": "Hello State",
"type": "operation",
"actionMode": "sequential",
"actions": [
{
"functionRef": {
"refName": "PrintHelloWorld1",
"arguments": {
"arg1": "Hello World1!"
}
}
},
{"functionRef": {
"refName": "PrintHelloWorld2",
"arguments": {
"arg1": "Hello World2!"
}
}
}
],
"end": true
}
]
}
如有任何帮助,我们将不胜感激!
干杯