Skip to content

A .NET library and a runtime engine to execute dynamic rules and a series of tasks as a workflow using intuitive and simple Simpleflow script.

License

Notifications You must be signed in to change notification settings

navtech-io/Simpleflow

Repository files navigation

Simpleflow

Simpleflow is a lightweight dynamic rule engine to execute dynamic rules and workflows using intuitive script concepts. Simpleflow allows access to the process objects or methods in script securely. Methods can be registered as activities with Simpleflow engine, which is extensible to enrich or monitor the execution flow. Simpleflow is secure and efficient to run dynamic rules and workflow.

NuGet version (Simpleflow) Github Workflow (Simpleflow)

Get Started

Install package via Nuget. Using the NuGet package manager console within Visual Studio run the following command:

Install-Package Simpleflow	

Try the following Simpleflow script:

using Simpleflow;

// Simpleflow Script
var script = 
@" 
    # Declare and initialize variables
    let today = $GetCurrentDate()

    # Write rules
    rule when arg.UniversalId == 2 
              and (arg.New or arg.Verified)  then
        message 'Hello, World! 🌄'
    end rule
    
    # Output
    output today
";

// Execute Script
FlowOutput result = SimpleflowEngine.Run(script, new {UniversalId = 2, New=true, Verified=false} );

// Access result
Console.WriteLine(result.Messages[0]); 
Console.WriteLine(result.Output["today"]);

Output

Hello, World! 🌄
<current system date and time>

Please see the full documentation on how to use this library.

License

The code is available as open source under the terms of the Apache 2.0 License. Please see the LICENSE file in this repository.

About

A .NET library and a runtime engine to execute dynamic rules and a series of tasks as a workflow using intuitive and simple Simpleflow script.

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages