Hello.
I successfully called upsertMemo
in an Activity, but WorkflowExecutionInfo.memo
is still empty when I look for it in a list of all worfklow executions obtained via TemporalClient.workflowService.listWorkflowExecutions
.
This is my worker code:
const fieldValue = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx";
upsertMemo({'fieldName': fieldValue});
console.log(`Memo set to ${JSON.stringify(workflowInfo().memo)}`);
Output:
Memo set to {"fieldName":"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"}
This is my consumer code:
const client: Client = await this.temporalService.getClient();
const workflowExecutions = await client.workflowService.listWorkflowExecutions({
query: "WorkflowType = 'workflowName'",
namespace: 'default',
});
const ids = [];
for await (const execution of workflowExecutions.executions) {
console.log(`Found workflow ${execution.execution?.workflowId}`);
const memo = execution.memo;
console.log(`Memo = ${JSON.stringify(memo)} (${memo})`);
}
Output:
Found workflow 2c81a11a-512a-4e56-88b8-00ea5762f81d
Memo = {} ([object Object])
What’s going on here in your opinion?
Thank you for your help.