Skip to content

prod42net/P42WorkflowEngine

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

P42 Workflow Engine

The P42 Workflow Engine is a flexible and extendable platform designed to handle automation of various workflows. It supports different types of workflow steps, such as conditional, loop, switch, parallel, and sequential steps, among others.

Core Concepts

The core unit is a WorkflowStep, which performs an action. Input and output are represented by IWorkflowStepInput and IWorkflowStepOutput respectively. Steps can be combined in various ways to form complex workflows.

Special step types - Conditional, Loop, Parallel, Sequential, and ExceptionHandler steps - provide flexibility in controlling the flow of execution.

Features

  1. Extensibility: You can easily extend new types of steps by creating new interfaces that extend IWorkflowStep.
  2. Flexibility: Includes built-in support for conditionals (if-then-else), loops, handling exceptions, and executing steps in parallel or sequential order.
  3. Robustness: Exception handling allows workflows to fail gracefully when things go wrong.

Getting Started

To create a new workflow, first create the individual steps. Each step is an implementation of the IWorkflowStep interface. Instead of implementing IWorkflowStep directly, you may want to use or extend one of the more specialized interfaces such as ILoopWorkflowStep or IConditionalWorkflowStep.

Once the steps have been defined, they can be combined in a Workflow object by adding them to the Steps list.

Here's an example of creating a simple workflow with a loop:

var workflow = new Workflow() 
{ 
    Steps = 
    { 
        new SimpleLoopWorkflowStep 
        { 
            LoopStep = new MyStep(), 
            LoopCondition = inputs => inputs.Count < 5, 
            Inputs = new List  
            { 
                // Initialize your input 
            } 
        } 
    } 
};

To execute the workflow, simply call the Perform method:

Feedback

If you run into any issues or have suggestions for improvements, please submit an issue on our GitHub page. Contributions are welcome!

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages