Skip to content

Add Support for Power Fx as an Expression Type #6609

@sfmskywalker

Description

@sfmskywalker

Background
Elsa Workflows currently supports a number of dynamic expression types including JavaScript, C#, Python, and Liquid. While these are powerful and versatile, they may present a barrier to non-developers or users more familiar with business tools like Excel or Power Platform. To bridge this gap and make Elsa more accessible to a broader audience—including citizen developers and business analysts—it would be highly beneficial to support Microsoft Power Fx as an additional expression type.

Feature
Introduce a new PowerFx expression type that leverages the open-source Power Fx engine from Microsoft. This would allow users to write expressions in a syntax that is familiar to Excel users and declarative business rule authors.

This new expression type should:

  • Allow access to workflow variables, input/output data, and potentially services (where applicable).
  • Support expression evaluation at runtime with strong typing and error feedback.
  • Be pluggable and configurable like existing expression types.
  • Integrate seamlessly with the Elsa designer, ideally with syntax highlighting and a simplified editor experience.

Alternative considerations

  • Relying solely on existing expression types. However, these often require programming skills.
  • Creating a custom low-code DSL, which would be a significantly larger effort than leveraging Power Fx.

Additional context
Power Fx is a strongly typed, functional, declarative language developed by Microsoft for low-code development. It is used across the Power Platform and has a growing ecosystem. Benefits of integrating Power Fx into Elsa Workflows include:

  • Lowering the barrier to entry for non-developers to build and maintain workflows.
  • Alignment with Microsoft ecosystem tools like Power Apps, Dataverse, and Power Automate.
  • Excel-like syntax that is widely understood and accepted in business environments.
  • Strong typing and reactive computation model, ideal for defining dynamic behavior in workflows.

Example:

{
  "type": "PowerFx",
  "value": "If(Amount > 100 && Category = \"Premium\", true, false)"
}

This addition would greatly expand Elsa’s appeal and usability in enterprise and citizen-developer scenarios.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

Status

No status

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions