elsa-workflows / elsa-workflows/elsa-core

Mismatch between ActivityLivecycle casing and Designer casing prevents correct instance color coding

Open
#2,845 0 comments 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

Props for the `ActivityLifecyclcle` are defined using uppercase in
https://github.com/elsa-workflows/elsa-core/blob/77dbbad3caf5756b1cbb734c2ab6a3ad27693d9d/src/core/Elsa.Core/Models/ActivityLifecycle.cs#L5

This is checked against a lowercase property in the designer
https://github.com/elsa-workflows/elsa-core/blob/2733a642f258187fb0717182d3ebd2e0d608eea8/src/designer/elsa-workflows-studio/src/components/screens/workflow-instance-viewer/elsa-workflow-instance-viewer-screen/elsa-workflow-instance-viewer-screen.tsx#L269

The interesting part is that the latest docker sample server claims to return an `Elsa.Models.ActivityLycle` type, however, the response is lowercase.

![image](https://user-images.githubusercontent.com/581644/158602015-53a4c4ba-8d34-4f57-971a-b24d06f81204.png)

While our server that's on Elsa2.5 and is using mongo persistence the response doesn't have a `$type` prop, however, the casing looks correct.

![image](https://user-images.githubusercontent.com/581644/158602398-5cba2875-c07a-4198-9a97-45b31a4f3a43.png)

As a short-term workaround would be to check against both cases in the designer, however, it's probably cleaner to enforce the correct usage of `Elsa.Model.ActivityLifecycle` on the server.

Contributor guide

Open the contributing guide

Research direction

Compare the ActivityLifecycle definition in src/core/Elsa.Core/Models/ActivityLifecycle.cs with the check in src/designer/elsa-workflows-studio/src/components/screens/workflow-instance-viewer/elsa-workflow-instance-viewer-screen/elsa-workflow-instance-viewer-screen.tsx around line 269. Inspect the Docker sample response and the reported Elsa 2.5 Mongo response to confirm the casing difference. Done means the server and designer agree on ActivityLifecycle casing and instance color coding works consistently.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, typescript
Domain
backend, frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.