elsa-workflows / elsa-workflows/elsa-core
v2.9.3 StartAt Activity not working when it is the first in the workflow
- Dominant language
- C#
- Stars
- 7.9k
- Forks
- 1.5k
- Avg merge
- 15h 22m
- Merged PRs (30d)
- 114
Description
Hello,
I just noticed that the `Elsa.Activities.Temporal.StartAt` activity (and the other temporal activities) do not suspend the workflow when they are the first activity executed in the workflow.
With a little code review I found that these nodes rely on this kind of logic to understand if they should be completed or suspended:
```c#
if (context.WorkflowExecutionContext.IsFirstPass)
{
context.JournalData.Add("Executed At", now);
context.JournalData.Add("First Pass", true);
return Done();
}
```
As a workaround, I added a `SetVariable` activity to compute the parameter for `StartAt`, so the `StartAt` is not the first activity to be executed.
Is there any better way to work with these temporal activities? Is this by design for some reason or is it a bug?
Thank you!
Contributor guide
Assessment
This issue has not been assessed yet.