Open jwillmer opened 3 years ago
This could be done quiet simple with the env variables:
Add a new section called env variables to the start btn of a workflow with a env list like in VisualStudio
If I create a workflow in the UI I can create new env variables / If the workflow was coded I see a list of defined variables and only can change the value
The env variables are actually used as env variables and will be set before the workflow starts
All activities have access to the variables and they are read only
In the code it could be queried like this:
var count = int.Parse(Environment.GetEnvironmentVariable("ItemCount") ?? "10", 10)
and set like this:
Environment.SetEnvironmentVariable("ItemCount", 10, "Description of the env variable")
@Axeleron007 implemented the foundation upon which this feature can be implemented further.
The Elsa.WorkflowSettings
project implements the necessary models and services that allows us to associate user-defined settings with workflow blueprints.
Currently, this feature is used to allow the user to disable workflow blueprints by setting the "disabled"
setting (which can be regarded as a system-level setting).
What we need to do to implement this task is as follows:
WorkflowSetting
records. They basically act as a blueprint for configurable settings.settings.MySetting
. {{ Settings.MySetting
}}.WorkflowSetting
records (using the already implemented workflow-settings
API endpoint in the Elsa.WorkflowSettings.Api
project.
Real world problem:
As a developer I write the following example(!) workflow for a customer (not via UI):
I implemented it and all are happy.
...
Proposed solution
As a developer I would like to define properties in my workflow that the user can set via the UI. I would then implement the example workflow like this:
This way my customer can make simple changes by his own without my intervention. There should be an option menu in the workflow UI there the customer sees all available properties and there he can change the values of it.