Pass data between scheduled workflows

I have a scheduled workflow. Is there a way to get the value of a variable from the prior execution of the workflow? For example, I want to track a weighted count, and I would like to use the value from the prior execution as input each time. Thank you.

Oh, I may be able to answer my own question. I found Workflow.getLastCompletionResult described here Distributed CRON | Temporal documentation.

1 Like

Nice find! You can also do a check if this is a continued execution, for example:

if(Workflow.getInfo().getContinuedExecutionRunId().isPresent()) {
            // Workflow.getLastCompletionResult(... )
}