elsa-workflows / elsa-workflows/elsa-core

v2.9.3 StartAt Activity not working when it is the first in the workflow

Open
#3,616 1 comment 0 reactions 0 assignees View on GitHub
bug triaged
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.