Skip to content

[BUG] Workflow as activity doesn't work anymore after server restart #6696

@jeanbaptistedalle

Description

@jeanbaptistedalle

Description

A workflow "Usable as activity" could be used in another workflow but after app stop, it failed with a NotFoundActivity

Steps to Reproduce

  1. Detailed Steps:
  • Run those two projects from elsa-samples repository : Elsa.Samples.AspNet.Tenants + ElsaStudioBlazorServerWithTenantInRouteApp with at least 3.5.* packages (cf. Upgrade to 3.5 packages elsa-samples#24)
  • Create a workflow 1 and check “Usable as activity”
  • Publish workflow 1
  • Create another workflow 2 that is triggered by a cron (or any other trigger) and that calls the first workflow
  • Workflow 2 will start successfully
  • Restart the Workflow server
  • Workflow 2 will fail because workflow 1 is no longer registered in Elsa’s list of activities, the activity will result in a NotFoundActivity with error "Elsa.Workflows.Exceptions.ActivityNotFoundException: Activity type 'Workflow 1' version '0' could not be found."
  • Republish workflow 1, which will be added back to the list of activities. Workflow 2 will succeed again.
  1. Reproduction Rate: every time

Expected Behavior

Workflow usable as activity should still be usable after restart.

Actual Behavior

The workflow is not registered in the activity registry as it's done when the workflow changed, not on the app startup.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    Status

    Done

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions