| | | 1 | | using Bpmn.Interchange; |
| | | 2 | | using CShells.FastEndpoints.Features; |
| | | 3 | | using CShells.Features; |
| | | 4 | | using Elsa.Bpmn.Interchange.Binding; |
| | | 5 | | using Elsa.Bpmn.Interchange.Handlers.Notifications; |
| | | 6 | | using Elsa.Bpmn.Interchange.Services; |
| | | 7 | | using Elsa.Bpmn.ShellFeatures; |
| | | 8 | | using Elsa.Common.ShellFeatures; |
| | | 9 | | using JetBrains.Annotations; |
| | | 10 | | using Microsoft.Extensions.DependencyInjection; |
| | | 11 | | |
| | | 12 | | namespace Elsa.Bpmn.Interchange.ShellFeatures; |
| | | 13 | | |
| | | 14 | | /// <summary> |
| | | 15 | | /// Provides BPMN XML interchange support to the system. |
| | | 16 | | /// </summary> |
| | | 17 | | /// <remarks> |
| | | 18 | | /// The task-to-activity binding this module reads lives inside the BPMN document as an <c>elsa:</c> vendor extension, |
| | | 19 | | /// so an exported <c>.bpmn</c> carries binding configuration — including input expressions — verbatim. Exporting a |
| | | 20 | | /// process discloses its implementation detail; see <see cref="BpmnActivityBindingFormat"/> for the format and for why |
| | | 21 | | /// nothing is redacted. |
| | | 22 | | /// </remarks> |
| | | 23 | | [ShellFeature( |
| | | 24 | | DisplayName = "BPMN Interchange", |
| | | 25 | | Description = "Provides BPMN XML interchange (import/export) capabilities for workflows.", |
| | | 26 | | DependsOn = [typeof(BpmnFeature)])] |
| | | 27 | | [UsedImplicitly] |
| | | 28 | | public class BpmnInterchangeFeature : IFastEndpointsShellFeature |
| | | 29 | | { |
| | | 30 | | public void ConfigureServices(IServiceCollection services) |
| | | 31 | | { |
| | 0 | 32 | | services.AddSingleton<BpmnActivityBindingFormat>(); |
| | 0 | 33 | | services.AddSingleton<BpmnWorkBinder>(); |
| | 0 | 34 | | services.AddSingleton<BpmnXmlReader>(); |
| | 0 | 35 | | services.AddSingleton<BpmnXmlWriter>(); |
| | 0 | 36 | | services.AddScoped<BpmnInterchangeDocumentService>(); |
| | 0 | 37 | | services.AddNotificationHandler<ValidateBpmnProcessBindings>(); |
| | 0 | 38 | | } |
| | | 39 | | } |