elsa-workflows / elsa-workflows/elsa-core
How to Enable Strongly Typed Workflow Input with IntelliSense in Elsa 3.5 Designer?
- 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
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
Assessment
This issue has not been assessed yet.