2020-12-14 18:57:33 +00:00
|
|
|
using Elsa.Activities.Entity;
|
|
|
|
|
using Elsa.Activities.Console;
|
|
|
|
|
using Elsa.Builders;
|
|
|
|
|
using Elsa.Activities.Entity.Models;
|
|
|
|
|
|
|
|
|
|
namespace Elsa.Samples.EntityChanged
|
|
|
|
|
{
|
|
|
|
|
public class EntityChangedWorkflow : IWorkflow
|
|
|
|
|
{
|
|
|
|
|
public void Build(IWorkflowBuilder workflow)
|
|
|
|
|
{
|
|
|
|
|
workflow
|
|
|
|
|
.EntityChanged<Entity>(EntityChangedAction.Added)
|
2020-12-14 19:03:40 +00:00
|
|
|
.WriteLine(context => $"Entity '{((EntityChangedModel)context.Input)!.EntityName}' was '{((EntityChangedModel)context.Input).Action}'");
|
2020-12-14 18:57:33 +00:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|