elsa-workflows / elsa-workflows/elsa-core

Handling of c# enum in javascript

Open
#3,646 4 comments 0 reactions 0 assignees View on GitHub
enhancement triaged workflow tooling
Dominant language
C#
Stars
7.9k
Forks
1.5k
Avg merge
15h 22m
Merged PRs (30d)
114

Description

Is it possible to add support of enum in javascript engine ?

like :

`workflowContext.Status = ValidationStatus.Ok;`

I get :

`Jint.Runtime.JavaScriptException: ValidationStatus is not defined`

In the JavascriptConfigurationHandler, we could register enums to be available ?

Contributor guide

Open the contributing guide

Research direction

Start with the JavascriptConfigurationHandler and trace how the Jint JavaScript engine exposes values to scripts. Reproduce the ValidationStatus.Ok example, then determine the expected enum registration behavior and verify that the enum is available without breaking existing JavaScript configuration handling.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, javascript
Domain
backend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.