Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fork Activity causes errors #5204

Closed
defunky opened this issue Apr 8, 2024 · 4 comments · Fixed by #5212
Closed

Fork Activity causes errors #5204

defunky opened this issue Apr 8, 2024 · 4 comments · Fixed by #5212
Labels
bug Something isn't working elsa 3 This issue is specific to Elsa 3

Comments

@defunky
Copy link

defunky commented Apr 8, 2024

  1. Create a workflow with just fork activity or a fork activity with a bunch of console writelines.
  2. Run it
  3. ELSA UI throws exception with 404 error when it redirects to instance page
  4. Instance overview page says the instance is suspended, clicking on it causes designer to throw again

Delay activity causes similar issues

@sfmskywalker sfmskywalker added the elsa 3 This issue is specific to Elsa 3 label Apr 10, 2024
@sfmskywalker sfmskywalker moved this to Triage in ELSA 3 Apr 10, 2024
@elsa-workflows elsa-workflows deleted a comment from glime-ai bot Apr 10, 2024
@sfmskywalker
Copy link
Member

Although I could not reproduce getting an error, I did notice that the Fork (flow) activity doesn't complete, which is a bug.

image

@defunky What Elsa version did you try?

@sfmskywalker sfmskywalker moved this from Triage to Todo in ELSA 3 Apr 10, 2024
@sfmskywalker sfmskywalker moved this from Todo to In Progress in ELSA 3 Apr 10, 2024
@sfmskywalker sfmskywalker added the bug Something isn't working label Apr 10, 2024
sfmskywalker added a commit that referenced this issue Apr 10, 2024
In the FlowFork.cs file of the Elsa.Workflows.Core module, the method ScheduleOutcomesAsync has been replaced with CompleteActivityWithOutcomesAsync. This fixes the issue of the activity not completing.

Fixes #5204
sfmskywalker added a commit that referenced this issue Apr 11, 2024
…5212)

In the FlowFork.cs file of the Elsa.Workflows.Core module, the method ScheduleOutcomesAsync has been replaced with CompleteActivityWithOutcomesAsync. This fixes the issue of the activity not completing.

Fixes #5204
@github-project-automation github-project-automation bot moved this from In Progress to Done in ELSA 3 Apr 11, 2024
@defunky
Copy link
Author

defunky commented Apr 11, 2024

@sfmskywalker

3.1.2. I also get the same behaviour on the delay node if I just drag it in and run

The exception thrown:

Microsoft.AspNetCore.Components.Web.ErrorBoundary[100]
      Unhandled exception rendering component: Response status code does not indicate success: 404 (Not Found).
      System.Net.Http.HttpRequestException: Response status code does not indicate success: 404 (Not Found).
         at System.Net.Http.HttpResponseMessage.EnsureSuccessStatusCode()
         at Microsoft.AspNetCore.Http.Connections.Client.HttpConnection.NegotiateAsync(Uri url, HttpClient httpClient, ILogger logger, CancellationToken cancellationToken)
         at Microsoft.AspNetCore.Http.Connections.Client.HttpConnection.GetNegotiationResponseAsync(Uri uri, CancellationToken cancellationToken)
         at Microsoft.AspNetCore.Http.Connections.Client.HttpConnection.SelectAndStartTransport(TransferFormat transferFormat, CancellationToken cancellationToken)
         at Microsoft.AspNetCore.Http.Connections.Client.HttpConnection.StartAsyncCore(TransferFormat transferFormat, CancellationToken cancellationToken)
         at Microsoft.AspNetCore.Http.Connections.Client.HttpConnection.StartAsync(TransferFormat transferFormat, CancellationToken cancellationToken)
         at Microsoft.AspNetCore.Http.Connections.Client.HttpConnectionFactory.ConnectAsync(EndPoint endPoint, CancellationToken cancellationToken)
         at Microsoft.AspNetCore.Http.Connections.Client.HttpConnectionFactory.ConnectAsync(EndPoint endPoint, CancellationToken cancellationToken)
         at Microsoft.AspNetCore.SignalR.Client.HubConnection.StartAsyncCore(CancellationToken cancellationToken)
         at Microsoft.AspNetCore.SignalR.Client.HubConnection.StartAsyncInner(CancellationToken cancellationToken)
         at Microsoft.AspNetCore.SignalR.Client.HubConnection.StartAsync(CancellationToken cancellationToken)
         at Elsa.Studio.Workflows.Services.WorkflowInstanceObserverFactory.CreateAsync(String workflowInstanceId, CancellationToken cancellationToken)
         at Elsa.Studio.Workflows.Components.WorkflowInstanceViewer.Components.WorkflowInstanceDetails.ObserveWorkflowInstanceAsync()
         at Elsa.Studio.Workflows.Components.WorkflowInstanceViewer.Components.WorkflowInstanceDetails.OnParametersSetAsync()
         at Microsoft.AspNetCore.Components.ComponentBase.CallStateHasChangedOnAsyncCompletion(Task task)
         at Elsa.Studio.Components.StudioComponentBase.InvokeWithBlazorServiceContext(Func`1 func)
         at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask(Task taskToHandle, ComponentState owningComponentState)```

@sfmskywalker
Copy link
Member

I can't seem to reproduce that behavior. Could you share with me detailed steps to arrive at this result? Or, of possible, attach a (simplified) solution with the projects?

@defunky
Copy link
Author

defunky commented Apr 26, 2024

never mind I'm a dumbass, it was due to signalr not being registered correctly with realtime workflows being enabled. It would be nice to server to throw an exception or log a warning to let you know signalr isn't registered

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working elsa 3 This issue is specific to Elsa 3
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants