* Implemented workflow sink module * Sequentual process of saving sinks in single consumer * Refactor * Log errors during sink export * Removed redundant classes * Use in process messaging in bundle * Fixed the issue with duplicated ResultVariable key on serializing * Moved workflowsink modules out of persistence projects * Moved migrations out of old projects Co-authored-by: Gürkan Güran <grkngrn@gmail.com> Co-authored-by: Sipke Schoorstra <sipkeschoorstra@outlook.com>
46 lines
1.2 KiB
C#
46 lines
1.2 KiB
C#
using System;
|
|
using Elsa.Workflows.Core.Activities;
|
|
using Elsa.Workflows.Core.Services;
|
|
|
|
namespace Elsa.IntegrationTests.Activities;
|
|
|
|
public class ComplexIfWorkflow : WorkflowBase
|
|
{
|
|
private readonly Func<bool> _condition;
|
|
|
|
public ComplexIfWorkflow(Func<bool> condition)
|
|
{
|
|
_condition = condition;
|
|
}
|
|
|
|
protected override void Build(IWorkflowBuilder workflow)
|
|
{
|
|
workflow.Root = new Sequence
|
|
{
|
|
Activities =
|
|
{
|
|
new WriteLine("Start"),
|
|
new If(_condition)
|
|
{
|
|
Then = new Sequence
|
|
{
|
|
Activities =
|
|
{
|
|
new WriteLine("Executing"),
|
|
new WriteLine("True!")
|
|
}
|
|
},
|
|
Else = new Sequence
|
|
{
|
|
Activities =
|
|
{
|
|
new WriteLine("Executing"),
|
|
new WriteLine("False!")
|
|
}
|
|
}
|
|
},
|
|
new WriteLine("End")
|
|
}
|
|
};
|
|
}
|
|
} |