From 65bc6fe582e24d167bef21235514ff41e9166abf Mon Sep 17 00:00:00 2001
From: cKey <35512826+colinin@users.noreply.github.com>
Date: Thu, 28 Jul 2022 10:29:58 +0800
Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0bob-storing=E9=9B=86=E6=88=90?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
aspnet-core/LINGYUN.MicroService.Workflow.sln | 18 +++-
...anizationUnitClaimsPrincipalContributor.cs | 2 +-
.../Internal/NotificationSender.cs | 17 +++-
.../FodyWeavers.xml | 3 +
.../FodyWeavers.xsd | 30 ++++++
...YUN.Abp.Elsa.Activities.BlobStoring.csproj | 21 +++++
.../AbpElsaActivitiesBlobStoringModule.cs | 11 +++
.../BlobStoring/AbpElsaBlobContainer.cs | 8 ++
.../BlobStoring/Activities/BlobExists.cs | 36 +++++++
.../BlobStoring/Activities/DeleteBlob.cs | 33 +++++++
.../BlobStoring/Activities/ReadBlob.cs | 36 +++++++
.../BlobStoring/Activities/WriteBlob.cs | 40 ++++++++
.../Elsa/Activities/BlobStoring/Startup.cs | 16 ++++
.../BlobStoringServiceCollectionExtensions.cs | 18 ++++
...izationUnitPermissionManagementProvider.cs | 2 +-
.../Distributed/NotificationEventHandler.cs | 10 +-
...ice.WorkflowManagement.HttpApi.Host.csproj | 6 +-
.../Pages/_Host.cshtml | 34 +++++--
.../Pages/_ViewImports.cshtml | 2 +
...owManagementHttpApiHostModule.Configure.cs | 93 ++++++++++++++-----
.../WorkflowManagementHttpApiHostModule.cs | 15 ++-
.../appsettings.Development.json | 45 ++++++++-
.../appsettings.json | 3 +
23 files changed, 439 insertions(+), 60 deletions(-)
create mode 100644 aspnet-core/modules/elsa/LINGYUN.Abp.Elsa.Activities.BlobStoring/FodyWeavers.xml
create mode 100644 aspnet-core/modules/elsa/LINGYUN.Abp.Elsa.Activities.BlobStoring/FodyWeavers.xsd
create mode 100644 aspnet-core/modules/elsa/LINGYUN.Abp.Elsa.Activities.BlobStoring/LINGYUN.Abp.Elsa.Activities.BlobStoring.csproj
create mode 100644 aspnet-core/modules/elsa/LINGYUN.Abp.Elsa.Activities.BlobStoring/LINGYUN/Abp/Elsa/Activities/BlobStoring/AbpElsaActivitiesBlobStoringModule.cs
create mode 100644 aspnet-core/modules/elsa/LINGYUN.Abp.Elsa.Activities.BlobStoring/LINGYUN/Abp/Elsa/Activities/BlobStoring/AbpElsaBlobContainer.cs
create mode 100644 aspnet-core/modules/elsa/LINGYUN.Abp.Elsa.Activities.BlobStoring/LINGYUN/Abp/Elsa/Activities/BlobStoring/Activities/BlobExists.cs
create mode 100644 aspnet-core/modules/elsa/LINGYUN.Abp.Elsa.Activities.BlobStoring/LINGYUN/Abp/Elsa/Activities/BlobStoring/Activities/DeleteBlob.cs
create mode 100644 aspnet-core/modules/elsa/LINGYUN.Abp.Elsa.Activities.BlobStoring/LINGYUN/Abp/Elsa/Activities/BlobStoring/Activities/ReadBlob.cs
create mode 100644 aspnet-core/modules/elsa/LINGYUN.Abp.Elsa.Activities.BlobStoring/LINGYUN/Abp/Elsa/Activities/BlobStoring/Activities/WriteBlob.cs
create mode 100644 aspnet-core/modules/elsa/LINGYUN.Abp.Elsa.Activities.BlobStoring/LINGYUN/Abp/Elsa/Activities/BlobStoring/Startup.cs
create mode 100644 aspnet-core/modules/elsa/LINGYUN.Abp.Elsa.Activities.BlobStoring/Microsoft/Extensions/DependencyInjection/BlobStoringServiceCollectionExtensions.cs
create mode 100644 aspnet-core/services/LY.MicroService.WorkflowManagement.HttpApi.Host/Pages/_ViewImports.cshtml
diff --git a/aspnet-core/LINGYUN.MicroService.Workflow.sln b/aspnet-core/LINGYUN.MicroService.Workflow.sln
index e7c5d9c34..9f253ed20 100644
--- a/aspnet-core/LINGYUN.MicroService.Workflow.sln
+++ b/aspnet-core/LINGYUN.MicroService.Workflow.sln
@@ -51,11 +51,13 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "workflow-core", "workflow-c
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "elsa", "elsa", "{F1CCBEC7-ACAB-4DC5-909E-D8CC2E1B7EEC}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LINGYUN.Abp.Elsa", "modules\elsa\LINGYUN.Abp.Elsa\LINGYUN.Abp.Elsa.csproj", "{17EA5194-BBE8-4CE1-B6F9-DF6829622F38}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.Elsa", "modules\elsa\LINGYUN.Abp.Elsa\LINGYUN.Abp.Elsa.csproj", "{17EA5194-BBE8-4CE1-B6F9-DF6829622F38}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LINGYUN.Abp.Elsa.Server", "modules\elsa\LINGYUN.Abp.Elsa.Server\LINGYUN.Abp.Elsa.Server.csproj", "{88AA0D46-597E-4969-8382-A3F8054B9409}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.Elsa.Server", "modules\elsa\LINGYUN.Abp.Elsa.Server\LINGYUN.Abp.Elsa.Server.csproj", "{88AA0D46-597E-4969-8382-A3F8054B9409}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LINGYUN.Abp.Elsa.EntityFramework.Core", "modules\elsa\LINGYUN.Abp.Elsa.EntityFramework.Core\LINGYUN.Abp.Elsa.EntityFramework.Core.csproj", "{CAC0D3A2-8BFA-4A84-A7FA-550A3BB16288}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.Elsa.EntityFramework.Core", "modules\elsa\LINGYUN.Abp.Elsa.EntityFramework.Core\LINGYUN.Abp.Elsa.EntityFramework.Core.csproj", "{CAC0D3A2-8BFA-4A84-A7FA-550A3BB16288}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LINGYUN.Abp.Elsa.Activities.BlobStoring", "modules\elsa\LINGYUN.Abp.Elsa.Activities.BlobStoring\LINGYUN.Abp.Elsa.Activities.BlobStoring.csproj", "{81CB5141-4FC5-413A-A516-CD65F40465C0}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -143,6 +145,14 @@ Global
{CAC0D3A2-8BFA-4A84-A7FA-550A3BB16288}.Debug|Any CPU.Build.0 = Debug|Any CPU
{CAC0D3A2-8BFA-4A84-A7FA-550A3BB16288}.Release|Any CPU.ActiveCfg = Release|Any CPU
{CAC0D3A2-8BFA-4A84-A7FA-550A3BB16288}.Release|Any CPU.Build.0 = Release|Any CPU
+ {81CB5141-4FC5-413A-A516-CD65F40465C0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {81CB5141-4FC5-413A-A516-CD65F40465C0}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {81CB5141-4FC5-413A-A516-CD65F40465C0}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {81CB5141-4FC5-413A-A516-CD65F40465C0}.Release|Any CPU.Build.0 = Release|Any CPU
+ {00CB6328-83F0-4C50-9561-2C61AFC03CA1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {00CB6328-83F0-4C50-9561-2C61AFC03CA1}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {00CB6328-83F0-4C50-9561-2C61AFC03CA1}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {00CB6328-83F0-4C50-9561-2C61AFC03CA1}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -171,6 +181,8 @@ Global
{17EA5194-BBE8-4CE1-B6F9-DF6829622F38} = {F1CCBEC7-ACAB-4DC5-909E-D8CC2E1B7EEC}
{88AA0D46-597E-4969-8382-A3F8054B9409} = {F1CCBEC7-ACAB-4DC5-909E-D8CC2E1B7EEC}
{CAC0D3A2-8BFA-4A84-A7FA-550A3BB16288} = {F1CCBEC7-ACAB-4DC5-909E-D8CC2E1B7EEC}
+ {81CB5141-4FC5-413A-A516-CD65F40465C0} = {F1CCBEC7-ACAB-4DC5-909E-D8CC2E1B7EEC}
+ {00CB6328-83F0-4C50-9561-2C61AFC03CA1} = {2F51B296-58EB-4D54-9921-5A07E6E4B7BF}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {6BB7A5DE-DA12-44DC-BC9B-0F6CA524346F}
diff --git a/aspnet-core/modules/authorization/LINGYUN.Abp.Identity.OrganizaztionUnits/LINGYUN/Abp/Identity/OrganizaztionUnits/OrganizationUnitClaimsPrincipalContributor.cs b/aspnet-core/modules/authorization/LINGYUN.Abp.Identity.OrganizaztionUnits/LINGYUN/Abp/Identity/OrganizaztionUnits/OrganizationUnitClaimsPrincipalContributor.cs
index 9854e9c38..2418ecd6e 100644
--- a/aspnet-core/modules/authorization/LINGYUN.Abp.Identity.OrganizaztionUnits/LINGYUN/Abp/Identity/OrganizaztionUnits/OrganizationUnitClaimsPrincipalContributor.cs
+++ b/aspnet-core/modules/authorization/LINGYUN.Abp.Identity.OrganizaztionUnits/LINGYUN/Abp/Identity/OrganizaztionUnits/OrganizationUnitClaimsPrincipalContributor.cs
@@ -34,7 +34,7 @@ public class OrganizationUnitClaimsPrincipalContributor : IAbpClaimsPrincipalCon
return;
}
- var userOus = await _identityUserRepository.GetOrganizationUnitsAsync(userId.Value);
+ var userOus = await _identityUserRepository.GetOrganizationUnitsAsync(id: userId.Value);
foreach (var userOu in userOus)
{
diff --git a/aspnet-core/modules/common/LINGYUN.Abp.Notifications/LINGYUN/Abp/Notifications/Internal/NotificationSender.cs b/aspnet-core/modules/common/LINGYUN.Abp.Notifications/LINGYUN/Abp/Notifications/Internal/NotificationSender.cs
index 2dcdd021c..b4b750853 100644
--- a/aspnet-core/modules/common/LINGYUN.Abp.Notifications/LINGYUN/Abp/Notifications/Internal/NotificationSender.cs
+++ b/aspnet-core/modules/common/LINGYUN.Abp.Notifications/LINGYUN/Abp/Notifications/Internal/NotificationSender.cs
@@ -8,6 +8,7 @@ using System.Linq;
using System.Threading.Tasks;
using Volo.Abp.DependencyInjection;
using Volo.Abp.EventBus.Distributed;
+using Volo.Abp.Timing;
using Volo.Abp.Uow;
namespace LINGYUN.Abp.Notifications
@@ -18,6 +19,10 @@ namespace LINGYUN.Abp.Notifications
///
public class NotificationSender : INotificationSender, ITransientDependency
{
+ ///
+ /// Reference to .
+ ///
+ protected IClock Clock { get; }
///
/// Reference to .
///
@@ -37,11 +42,13 @@ namespace LINGYUN.Abp.Notifications
protected AbpNotificationOptions Options { get; }
public NotificationSender(
- IDistributedEventBus distributedEventBus,
- IDistributedIdGenerator distributedIdGenerator,
- IUnitOfWorkManager unitOfWorkManager,
- IOptions options)
+ IClock clock,
+ IDistributedEventBus distributedEventBus,
+ IDistributedIdGenerator distributedIdGenerator,
+ IUnitOfWorkManager unitOfWorkManager,
+ IOptions options)
{
+ Clock = clock;
Options = options.Value;
DistributedEventBus = distributedEventBus;
DistributedIdGenerator = distributedIdGenerator;
@@ -82,7 +89,7 @@ namespace LINGYUN.Abp.Notifications
TenantId = tenantId,
Users = users?.ToList(),
Name = name,
- CreationTime = DateTime.Now,
+ CreationTime = Clock.Now,
Severity = severity
};
diff --git a/aspnet-core/modules/elsa/LINGYUN.Abp.Elsa.Activities.BlobStoring/FodyWeavers.xml b/aspnet-core/modules/elsa/LINGYUN.Abp.Elsa.Activities.BlobStoring/FodyWeavers.xml
new file mode 100644
index 000000000..ac6b5b292
--- /dev/null
+++ b/aspnet-core/modules/elsa/LINGYUN.Abp.Elsa.Activities.BlobStoring/FodyWeavers.xml
@@ -0,0 +1,3 @@
+
+
+
\ No newline at end of file
diff --git a/aspnet-core/modules/elsa/LINGYUN.Abp.Elsa.Activities.BlobStoring/FodyWeavers.xsd b/aspnet-core/modules/elsa/LINGYUN.Abp.Elsa.Activities.BlobStoring/FodyWeavers.xsd
new file mode 100644
index 000000000..11da52550
--- /dev/null
+++ b/aspnet-core/modules/elsa/LINGYUN.Abp.Elsa.Activities.BlobStoring/FodyWeavers.xsd
@@ -0,0 +1,30 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed.
+
+
+
+
+ A comma-separated list of error codes that can be safely ignored in assembly verification.
+
+
+
+
+ 'false' to turn off automatic generation of the XML Schema file.
+
+
+
+
+
\ No newline at end of file
diff --git a/aspnet-core/modules/elsa/LINGYUN.Abp.Elsa.Activities.BlobStoring/LINGYUN.Abp.Elsa.Activities.BlobStoring.csproj b/aspnet-core/modules/elsa/LINGYUN.Abp.Elsa.Activities.BlobStoring/LINGYUN.Abp.Elsa.Activities.BlobStoring.csproj
new file mode 100644
index 000000000..50596bc1a
--- /dev/null
+++ b/aspnet-core/modules/elsa/LINGYUN.Abp.Elsa.Activities.BlobStoring/LINGYUN.Abp.Elsa.Activities.BlobStoring.csproj
@@ -0,0 +1,21 @@
+
+
+
+
+
+
+ netstandard2.1
+
+ Enable
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/aspnet-core/modules/elsa/LINGYUN.Abp.Elsa.Activities.BlobStoring/LINGYUN/Abp/Elsa/Activities/BlobStoring/AbpElsaActivitiesBlobStoringModule.cs b/aspnet-core/modules/elsa/LINGYUN.Abp.Elsa.Activities.BlobStoring/LINGYUN/Abp/Elsa/Activities/BlobStoring/AbpElsaActivitiesBlobStoringModule.cs
new file mode 100644
index 000000000..459f0ede0
--- /dev/null
+++ b/aspnet-core/modules/elsa/LINGYUN.Abp.Elsa.Activities.BlobStoring/LINGYUN/Abp/Elsa/Activities/BlobStoring/AbpElsaActivitiesBlobStoringModule.cs
@@ -0,0 +1,11 @@
+using Volo.Abp.BlobStoring;
+using Volo.Abp.Modularity;
+
+namespace LINGYUN.Abp.Elsa.Activities.BlobStoring;
+
+[DependsOn(
+ typeof(AbpElsaModule),
+ typeof(AbpBlobStoringModule))]
+public class AbpElsaActivitiesBlobStoringModule : AbpModule
+{
+}
diff --git a/aspnet-core/modules/elsa/LINGYUN.Abp.Elsa.Activities.BlobStoring/LINGYUN/Abp/Elsa/Activities/BlobStoring/AbpElsaBlobContainer.cs b/aspnet-core/modules/elsa/LINGYUN.Abp.Elsa.Activities.BlobStoring/LINGYUN/Abp/Elsa/Activities/BlobStoring/AbpElsaBlobContainer.cs
new file mode 100644
index 000000000..acbac9218
--- /dev/null
+++ b/aspnet-core/modules/elsa/LINGYUN.Abp.Elsa.Activities.BlobStoring/LINGYUN/Abp/Elsa/Activities/BlobStoring/AbpElsaBlobContainer.cs
@@ -0,0 +1,8 @@
+using Volo.Abp.BlobStoring;
+
+namespace LINGYUN.Abp.Elsa.Activities.BlobStoring;
+
+[BlobContainerName("elsa-container")]
+public class AbpElsaBlobContainer
+{
+}
diff --git a/aspnet-core/modules/elsa/LINGYUN.Abp.Elsa.Activities.BlobStoring/LINGYUN/Abp/Elsa/Activities/BlobStoring/Activities/BlobExists.cs b/aspnet-core/modules/elsa/LINGYUN.Abp.Elsa.Activities.BlobStoring/LINGYUN/Abp/Elsa/Activities/BlobStoring/Activities/BlobExists.cs
new file mode 100644
index 000000000..321555dc6
--- /dev/null
+++ b/aspnet-core/modules/elsa/LINGYUN.Abp.Elsa.Activities.BlobStoring/LINGYUN/Abp/Elsa/Activities/BlobStoring/Activities/BlobExists.cs
@@ -0,0 +1,36 @@
+using Elsa;
+using Elsa.ActivityResults;
+using Elsa.Attributes;
+using Elsa.Services;
+using Elsa.Services.Models;
+using System;
+using System.Threading.Tasks;
+using Volo.Abp.BlobStoring;
+
+namespace LINGYUN.Abp.Elsa.Activities.BlobStoring;
+
+[Action(Category = "Blob",
+ Description = "Check if a blob exists.",
+ Outcomes = new[] { OutcomeNames.True, OutcomeNames.False })]
+public class BlobExists : Activity
+{
+ private readonly IBlobContainer _container;
+
+ [ActivityInput(Hint = "Path of the oss.")]
+ public string? Path { get; set; }
+
+ public BlobExists(IBlobContainer container)
+ {
+ _container = container;
+ }
+
+ protected async override ValueTask OnExecuteAsync(ActivityExecutionContext context)
+ {
+ var exists = await _container.ExistsAsync(Path, context.CancellationToken);
+ if (exists)
+ {
+ return Outcome(OutcomeNames.True);
+ }
+ return Outcome(OutcomeNames.False);
+ }
+}
diff --git a/aspnet-core/modules/elsa/LINGYUN.Abp.Elsa.Activities.BlobStoring/LINGYUN/Abp/Elsa/Activities/BlobStoring/Activities/DeleteBlob.cs b/aspnet-core/modules/elsa/LINGYUN.Abp.Elsa.Activities.BlobStoring/LINGYUN/Abp/Elsa/Activities/BlobStoring/Activities/DeleteBlob.cs
new file mode 100644
index 000000000..3f28738a5
--- /dev/null
+++ b/aspnet-core/modules/elsa/LINGYUN.Abp.Elsa.Activities.BlobStoring/LINGYUN/Abp/Elsa/Activities/BlobStoring/Activities/DeleteBlob.cs
@@ -0,0 +1,33 @@
+using Elsa;
+using Elsa.ActivityResults;
+using Elsa.Attributes;
+using Elsa.Services;
+using Elsa.Services.Models;
+using System;
+using System.Threading.Tasks;
+using Volo.Abp.BlobStoring;
+
+namespace LINGYUN.Abp.Elsa.Activities.BlobStoring;
+
+[Action(Category = "Blob",
+ Description = "Deletes blob at specified location",
+ Outcomes = new[] { OutcomeNames.Done })]
+public class DeleteBlob : Activity
+{
+ private readonly IBlobContainer _container;
+
+ [ActivityInput(Hint = "Path of the blob to be deleted.")]
+ public string? Path { get; set; }
+
+ public DeleteBlob(IBlobContainer container)
+ {
+ _container = container;
+ }
+
+ protected async override ValueTask OnExecuteAsync(ActivityExecutionContext context)
+ {
+ await _container.DeleteAsync(Path, context.CancellationToken);
+
+ return Done();
+ }
+}
diff --git a/aspnet-core/modules/elsa/LINGYUN.Abp.Elsa.Activities.BlobStoring/LINGYUN/Abp/Elsa/Activities/BlobStoring/Activities/ReadBlob.cs b/aspnet-core/modules/elsa/LINGYUN.Abp.Elsa.Activities.BlobStoring/LINGYUN/Abp/Elsa/Activities/BlobStoring/Activities/ReadBlob.cs
new file mode 100644
index 000000000..7672ddd0b
--- /dev/null
+++ b/aspnet-core/modules/elsa/LINGYUN.Abp.Elsa.Activities.BlobStoring/LINGYUN/Abp/Elsa/Activities/BlobStoring/Activities/ReadBlob.cs
@@ -0,0 +1,36 @@
+using Elsa;
+using Elsa.ActivityResults;
+using Elsa.Attributes;
+using Elsa.Services;
+using Elsa.Services.Models;
+using System;
+using System.Threading.Tasks;
+using Volo.Abp.BlobStoring;
+
+namespace LINGYUN.Abp.Elsa.Activities.BlobStoring;
+
+[Action(Category = "Blob",
+ Description = "Reads a blob.",
+ Outcomes = new[] { OutcomeNames.Done })]
+public class ReadBlob : Activity
+{
+ private readonly IBlobContainer _container;
+
+ [ActivityInput(Hint = "Path of the blob.")]
+ public string? Path { get; set; }
+
+ [ActivityOutput]
+ public byte[]? Output { get; set; }
+
+ public ReadBlob(IBlobContainer container)
+ {
+ _container = container;
+ }
+
+ protected async override ValueTask OnExecuteAsync(ActivityExecutionContext context)
+ {
+ Output = await _container.GetAllBytesAsync(Path, context.CancellationToken);
+
+ return Done();
+ }
+}
diff --git a/aspnet-core/modules/elsa/LINGYUN.Abp.Elsa.Activities.BlobStoring/LINGYUN/Abp/Elsa/Activities/BlobStoring/Activities/WriteBlob.cs b/aspnet-core/modules/elsa/LINGYUN.Abp.Elsa.Activities.BlobStoring/LINGYUN/Abp/Elsa/Activities/BlobStoring/Activities/WriteBlob.cs
new file mode 100644
index 000000000..65367c7da
--- /dev/null
+++ b/aspnet-core/modules/elsa/LINGYUN.Abp.Elsa.Activities.BlobStoring/LINGYUN/Abp/Elsa/Activities/BlobStoring/Activities/WriteBlob.cs
@@ -0,0 +1,40 @@
+using Elsa;
+using Elsa.ActivityResults;
+using Elsa.Attributes;
+using Elsa.Expressions;
+using Elsa.Services;
+using Elsa.Services.Models;
+using System;
+using System.Threading.Tasks;
+using Volo.Abp.BlobStoring;
+
+namespace LINGYUN.Abp.Elsa.Activities.BlobStoring;
+
+[Action(Category = "Blob",
+ Description = "Save a blob.",
+ Outcomes = new[] { OutcomeNames.Done })]
+public class WriteBlob : Activity
+{
+ private readonly IBlobContainer _container;
+
+ [ActivityInput(Hint = "Path of the blob.")]
+ public string? Path { get; set; }
+
+ [ActivityInput(Hint = "Blob exists whether overwrite")]
+ public bool Overwrite { get; set; }
+
+ [ActivityInput(Hint = "The bytes to write.", SupportedSyntaxes = new[] { SyntaxNames.JavaScript }, DefaultSyntax = SyntaxNames.JavaScript)]
+ public byte[]? Bytes { get; set; }
+
+ public WriteBlob(IBlobContainer container)
+ {
+ _container = container;
+ }
+
+ protected async override ValueTask OnExecuteAsync(ActivityExecutionContext context)
+ {
+ await _container.SaveAsync(Path, Bytes, Overwrite, context.CancellationToken);
+
+ return Done();
+ }
+}
diff --git a/aspnet-core/modules/elsa/LINGYUN.Abp.Elsa.Activities.BlobStoring/LINGYUN/Abp/Elsa/Activities/BlobStoring/Startup.cs b/aspnet-core/modules/elsa/LINGYUN.Abp.Elsa.Activities.BlobStoring/LINGYUN/Abp/Elsa/Activities/BlobStoring/Startup.cs
new file mode 100644
index 000000000..a07f3ff6f
--- /dev/null
+++ b/aspnet-core/modules/elsa/LINGYUN.Abp.Elsa.Activities.BlobStoring/LINGYUN/Abp/Elsa/Activities/BlobStoring/Startup.cs
@@ -0,0 +1,16 @@
+using Elsa.Attributes;
+using Elsa.Options;
+using Elsa.Services.Startup;
+using Microsoft.Extensions.Configuration;
+using Microsoft.Extensions.DependencyInjection;
+
+namespace LINGYUN.Abp.Elsa.Activities.BlobStoring;
+
+[Feature("BlobStoring")]
+public class Startup : StartupBase
+{
+ public override void ConfigureElsa(ElsaOptionsBuilder elsa, IConfiguration configuration)
+ {
+ elsa.AddBlobStoringActivities();
+ }
+}
diff --git a/aspnet-core/modules/elsa/LINGYUN.Abp.Elsa.Activities.BlobStoring/Microsoft/Extensions/DependencyInjection/BlobStoringServiceCollectionExtensions.cs b/aspnet-core/modules/elsa/LINGYUN.Abp.Elsa.Activities.BlobStoring/Microsoft/Extensions/DependencyInjection/BlobStoringServiceCollectionExtensions.cs
new file mode 100644
index 000000000..7de227477
--- /dev/null
+++ b/aspnet-core/modules/elsa/LINGYUN.Abp.Elsa.Activities.BlobStoring/Microsoft/Extensions/DependencyInjection/BlobStoringServiceCollectionExtensions.cs
@@ -0,0 +1,18 @@
+using Elsa.Options;
+using LINGYUN.Abp.Elsa.Activities.BlobStoring;
+
+namespace Microsoft.Extensions.DependencyInjection;
+
+public static class BlobStoringServiceCollectionExtensions
+{
+ public static ElsaOptionsBuilder AddBlobStoringActivities(this ElsaOptionsBuilder options)
+ {
+ options
+ .AddActivity()
+ .AddActivity()
+ .AddActivity()
+ .AddActivity();
+
+ return options;
+ }
+}
diff --git a/aspnet-core/modules/permissions-management/LINGYUN.Abp.PermissionManagement.Domain.OrganizationUnits/LINGYUN/Abp/PermissionManagement/OrganizationUnits/OrganizationUnitPermissionManagementProvider.cs b/aspnet-core/modules/permissions-management/LINGYUN.Abp.PermissionManagement.Domain.OrganizationUnits/LINGYUN/Abp/PermissionManagement/OrganizationUnits/OrganizationUnitPermissionManagementProvider.cs
index a52317dc0..a28327563 100644
--- a/aspnet-core/modules/permissions-management/LINGYUN.Abp.PermissionManagement.Domain.OrganizationUnits/LINGYUN/Abp/PermissionManagement/OrganizationUnits/OrganizationUnitPermissionManagementProvider.cs
+++ b/aspnet-core/modules/permissions-management/LINGYUN.Abp.PermissionManagement.Domain.OrganizationUnits/LINGYUN/Abp/PermissionManagement/OrganizationUnits/OrganizationUnitPermissionManagementProvider.cs
@@ -68,7 +68,7 @@ public class OrganizationUnitPermissionManagementProvider : PermissionManagement
if (providerName == UserPermissionValueProvider.ProviderName)
{
var userId = Guid.Parse(providerKey);
- var organizationUnits = await IdentityUserRepository.GetOrganizationUnitsAsync(userId);
+ var organizationUnits = await IdentityUserRepository.GetOrganizationUnitsAsync(id: userId);
foreach (var organizationUnit in organizationUnits)
{
diff --git a/aspnet-core/services/LY.MicroService.RealtimeMessage.HttpApi.Host/EventBus/Distributed/NotificationEventHandler.cs b/aspnet-core/services/LY.MicroService.RealtimeMessage.HttpApi.Host/EventBus/Distributed/NotificationEventHandler.cs
index 08bef0bfb..e96f0996b 100644
--- a/aspnet-core/services/LY.MicroService.RealtimeMessage.HttpApi.Host/EventBus/Distributed/NotificationEventHandler.cs
+++ b/aspnet-core/services/LY.MicroService.RealtimeMessage.HttpApi.Host/EventBus/Distributed/NotificationEventHandler.cs
@@ -134,11 +134,11 @@ namespace LY.MicroService.RealtimeMessage.EventBus.Distributed
cultureName: eventData.Data.Culture,
globalContext: new Dictionary
{
- { "notification", notification.Name },
- { "formUser", eventData.Data.FormUser },
- { "notificationId", eventData.Id },
- { "title", title.ToString() },
- { "creationTime", eventData.CreationTime.ToString("yyyy-MM-dd HH:mm:ss") },
+ { "$notification", notification.Name },
+ { "$formUser", eventData.Data.FormUser },
+ { "$notificationId", eventData.Id },
+ { "$title", title.ToString() },
+ { "$creationTime", eventData.CreationTime.ToString("yyyy-MM-dd HH:mm:ss") },
});
var notificationData = new NotificationData();
diff --git a/aspnet-core/services/LY.MicroService.WorkflowManagement.HttpApi.Host/LY.MicroService.WorkflowManagement.HttpApi.Host.csproj b/aspnet-core/services/LY.MicroService.WorkflowManagement.HttpApi.Host/LY.MicroService.WorkflowManagement.HttpApi.Host.csproj
index c3a21c215..65dfdb07d 100644
--- a/aspnet-core/services/LY.MicroService.WorkflowManagement.HttpApi.Host/LY.MicroService.WorkflowManagement.HttpApi.Host.csproj
+++ b/aspnet-core/services/LY.MicroService.WorkflowManagement.HttpApi.Host/LY.MicroService.WorkflowManagement.HttpApi.Host.csproj
@@ -11,9 +11,10 @@
-
+
all
@@ -45,6 +46,7 @@
+
diff --git a/aspnet-core/services/LY.MicroService.WorkflowManagement.HttpApi.Host/Pages/_Host.cshtml b/aspnet-core/services/LY.MicroService.WorkflowManagement.HttpApi.Host/Pages/_Host.cshtml
index 5352f8b1e..0a576edef 100644
--- a/aspnet-core/services/LY.MicroService.WorkflowManagement.HttpApi.Host/Pages/_Host.cshtml
+++ b/aspnet-core/services/LY.MicroService.WorkflowManagement.HttpApi.Host/Pages/_Host.cshtml
@@ -1,6 +1,8 @@
@page "/"
+@inject IConfiguration Configuration;
@{
- var serverUrl = $"{Request.Scheme}://{Request.Host}";
+ var serverUrl = Configuration["Elsa:Server:BaseAddress"];
+ var basePath = Configuration["Hosting:BasePath"];
}
@@ -8,16 +10,32 @@
Elsa Workflows
-
-
-
-
-
-
+
+
+
+
+
+
+
-
+
+
+
+