elsa-workflows / elsa-workflows/elsa-core

How to Enable Strongly Typed Workflow Input with IntelliSense in Elsa 3.5 Designer?

Open
#7,282 1 comment 0 reactions 0 assignees View on GitHub
triaged
Dominant language
C#
Stars
7.9k
Forks
1.5k
Avg merge
15h 22m
Merged PRs (30d)
114

Description

Hello Team

**Question**

We are using Elsa 3.5 and starting workflows programmatically using StartWorkflowAsync.

We pass workflow input like this:

```
var workflowInput = new Dictionary
{
["InjectionInput"] = dto,
["InjectionId"] = dto.InjectionId,
["ProviderGroupId"] = dto.ProviderGroupId,
["IsNewRecord"] = dto.IsNewRecord,
["IsWorkCompRecord"] = dto.IsWorkCompRecord,
["OrderingAthenaDepartmentId"] = dto.OrderingAthenaDepartmentId,
["OrderCode"] = dto.OrderCode ?? "",
["IsFOIPurchase"] = dto.IsFOIPurchase,
["TenantId"] = dto.TenantId
};

var options = new StartWorkflowRuntimeParams
{
Input = workflowInput,
VersionOptions = VersionOptions.LatestAndPublished
};

await _workflowRuntime.StartWorkflowAsync(workflowDefinitionId, options);
```

**🎯 What We Want**

Inside the Elsa Designer expression editor, we want to access input properties like:

```
input.IsNewRecord
input.ProviderGroupId
```

And when typing:

`input.`

here is the Ui Screen for refrence

Image

We would like IntelliSense/autocomplete to show all available properties.

**❓ My Questions**

What is the correct way to define strongly-typed workflow input in Elsa 3.5?

Is there a way to register a DTO as the workflow input contract?

Can we attach a JSON schema or model so the designer expression editor knows the structure?

Is IntelliSense for workflow input supported in Elsa 3.5 Designer?

**📦 Environment**

Elsa 3.5

.NET 9

Workflow started via StartWorkflowAsync

We would appreciate guidance on the recommended approach.

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.