Skip to content

Commit

Permalink
feat(processWorker): create process worker package
Browse files Browse the repository at this point in the history
Refs:  #240
  • Loading branch information
Phil91 committed Sep 27, 2024
1 parent 9d27d25 commit a33c0d3
Show file tree
Hide file tree
Showing 359 changed files with 12,802 additions and 2,069 deletions.
92 changes: 61 additions & 31 deletions src/Portal.Backend.sln
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ApplicationActivation.Libra
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ApplicationChecklist.Config", "processes\ApplicationChecklist.Config\ApplicationChecklist.Config.csproj", "{C3E5E7C8-69D3-4ECB-A4FA-53A9A780EFF0}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Processes.Worker.Library", "processes\Processes.Worker.Library\Processes.Worker.Library.csproj", "{527A4A82-D63A-4DD5-B37D-0AC8A79F1B0E}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ApplicationChecklist.Executor", "processes\ApplicationChecklist.Executor\ApplicationChecklist.Executor.csproj", "{0221E83B-B26B-442F-ACAD-B1043DF9993A}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Processes.Worker.Library.Tests", "..\tests\processes\Processes.Worker.Library.Tests\Processes.Worker.Library.Tests.csproj", "{B787DF92-23F7-410A-B592-95701E4B423D}"
Expand All @@ -140,9 +138,7 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OfferSubscription.Executor.
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OfferSubscription.Library.Tests", "..\tests\processes\OfferSubscription.Library.Tests\OfferSubscription.Library.Tests.csproj", "{C356AA93-5BEE-44CD-A905-EFD325ED7578}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OfferProvider.Library", "..\tests\externalsystems\OfferProvider.Library\OfferProvider.Library.csproj", "{CC063A63-8282-4293-9A0E-2598ADCA747B}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Processes.Library", "processes\Processes.Library\Processes.Library.csproj", "{58D5C0B4-3C5C-4BE4-82EA-4CB9940943B1}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OfferProvider.Library.Tests", "..\tests\externalsystems\OfferProvider.Library.Tests\OfferProvider.Library.Tests.csproj", "{CC063A63-8282-4293-9A0E-2598ADCA747B}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Processes.Library.Tests", "..\tests\processes\Processes.Library.Tests\Processes.Library.Tests.csproj", "{5E80DEEA-B254-425C-8220-27EEF47C10BD}"
EndProject
Expand Down Expand Up @@ -286,6 +282,14 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SelfDescriptionCreation.Exe
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SelfDescriptionCreation.Executor.Tests", "..\tests\processes\SelfDescriptionCreation.Executor.Tests\SelfDescriptionCreation.Executor.Tests.csproj", "{AA14B842-6A65-40BB-818A-D450F66F4101}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Framework.Processes.Worker.Library", "framework\Framework.Processes.Worker.Library\Framework.Processes.Worker.Library.csproj", "{DE38F44A-8B1F-4C41-81A0-350CF767F7B2}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Framework.Processes.Library", "framework\Framework.Processes.Library\Framework.Processes.Library.csproj", "{A6A4C3C9-4962-4EEA-96CC-687650680504}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Framework.Processes.ProcessIdentity", "framework\Framework.Processes.ProcessIdentity\Framework.Processes.ProcessIdentity.csproj", "{346AA429-2AE0-4171-9F41-D3F31D823D19}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Framework.Identity", "framework\Framework.Identity\Framework.Identity.csproj", "{A0B339C0-5BCD-40C1-8FF6-421F41321F74}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -872,18 +876,6 @@ Global
{C3E5E7C8-69D3-4ECB-A4FA-53A9A780EFF0}.Release|x64.Build.0 = Release|Any CPU
{C3E5E7C8-69D3-4ECB-A4FA-53A9A780EFF0}.Release|x86.ActiveCfg = Release|Any CPU
{C3E5E7C8-69D3-4ECB-A4FA-53A9A780EFF0}.Release|x86.Build.0 = Release|Any CPU
{527A4A82-D63A-4DD5-B37D-0AC8A79F1B0E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{527A4A82-D63A-4DD5-B37D-0AC8A79F1B0E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{527A4A82-D63A-4DD5-B37D-0AC8A79F1B0E}.Debug|x64.ActiveCfg = Debug|Any CPU
{527A4A82-D63A-4DD5-B37D-0AC8A79F1B0E}.Debug|x64.Build.0 = Debug|Any CPU
{527A4A82-D63A-4DD5-B37D-0AC8A79F1B0E}.Debug|x86.ActiveCfg = Debug|Any CPU
{527A4A82-D63A-4DD5-B37D-0AC8A79F1B0E}.Debug|x86.Build.0 = Debug|Any CPU
{527A4A82-D63A-4DD5-B37D-0AC8A79F1B0E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{527A4A82-D63A-4DD5-B37D-0AC8A79F1B0E}.Release|Any CPU.Build.0 = Release|Any CPU
{527A4A82-D63A-4DD5-B37D-0AC8A79F1B0E}.Release|x64.ActiveCfg = Release|Any CPU
{527A4A82-D63A-4DD5-B37D-0AC8A79F1B0E}.Release|x64.Build.0 = Release|Any CPU
{527A4A82-D63A-4DD5-B37D-0AC8A79F1B0E}.Release|x86.ActiveCfg = Release|Any CPU
{527A4A82-D63A-4DD5-B37D-0AC8A79F1B0E}.Release|x86.Build.0 = Release|Any CPU
{0221E83B-B26B-442F-ACAD-B1043DF9993A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0221E83B-B26B-442F-ACAD-B1043DF9993A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0221E83B-B26B-442F-ACAD-B1043DF9993A}.Debug|x64.ActiveCfg = Debug|Any CPU
Expand Down Expand Up @@ -992,18 +984,6 @@ Global
{CC063A63-8282-4293-9A0E-2598ADCA747B}.Release|x64.Build.0 = Release|Any CPU
{CC063A63-8282-4293-9A0E-2598ADCA747B}.Release|x86.ActiveCfg = Release|Any CPU
{CC063A63-8282-4293-9A0E-2598ADCA747B}.Release|x86.Build.0 = Release|Any CPU
{58D5C0B4-3C5C-4BE4-82EA-4CB9940943B1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{58D5C0B4-3C5C-4BE4-82EA-4CB9940943B1}.Debug|Any CPU.Build.0 = Debug|Any CPU
{58D5C0B4-3C5C-4BE4-82EA-4CB9940943B1}.Debug|x64.ActiveCfg = Debug|Any CPU
{58D5C0B4-3C5C-4BE4-82EA-4CB9940943B1}.Debug|x64.Build.0 = Debug|Any CPU
{58D5C0B4-3C5C-4BE4-82EA-4CB9940943B1}.Debug|x86.ActiveCfg = Debug|Any CPU
{58D5C0B4-3C5C-4BE4-82EA-4CB9940943B1}.Debug|x86.Build.0 = Debug|Any CPU
{58D5C0B4-3C5C-4BE4-82EA-4CB9940943B1}.Release|Any CPU.ActiveCfg = Release|Any CPU
{58D5C0B4-3C5C-4BE4-82EA-4CB9940943B1}.Release|Any CPU.Build.0 = Release|Any CPU
{58D5C0B4-3C5C-4BE4-82EA-4CB9940943B1}.Release|x64.ActiveCfg = Release|Any CPU
{58D5C0B4-3C5C-4BE4-82EA-4CB9940943B1}.Release|x64.Build.0 = Release|Any CPU
{58D5C0B4-3C5C-4BE4-82EA-4CB9940943B1}.Release|x86.ActiveCfg = Release|Any CPU
{58D5C0B4-3C5C-4BE4-82EA-4CB9940943B1}.Release|x86.Build.0 = Release|Any CPU
{5E80DEEA-B254-425C-8220-27EEF47C10BD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5E80DEEA-B254-425C-8220-27EEF47C10BD}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5E80DEEA-B254-425C-8220-27EEF47C10BD}.Debug|x64.ActiveCfg = Debug|Any CPU
Expand Down Expand Up @@ -1822,6 +1802,54 @@ Global
{AA14B842-6A65-40BB-818A-D450F66F4101}.Release|x64.Build.0 = Release|Any CPU
{AA14B842-6A65-40BB-818A-D450F66F4101}.Release|x86.ActiveCfg = Release|Any CPU
{AA14B842-6A65-40BB-818A-D450F66F4101}.Release|x86.Build.0 = Release|Any CPU
{DE38F44A-8B1F-4C41-81A0-350CF767F7B2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{DE38F44A-8B1F-4C41-81A0-350CF767F7B2}.Debug|Any CPU.Build.0 = Debug|Any CPU
{DE38F44A-8B1F-4C41-81A0-350CF767F7B2}.Debug|x64.ActiveCfg = Debug|Any CPU
{DE38F44A-8B1F-4C41-81A0-350CF767F7B2}.Debug|x64.Build.0 = Debug|Any CPU
{DE38F44A-8B1F-4C41-81A0-350CF767F7B2}.Debug|x86.ActiveCfg = Debug|Any CPU
{DE38F44A-8B1F-4C41-81A0-350CF767F7B2}.Debug|x86.Build.0 = Debug|Any CPU
{DE38F44A-8B1F-4C41-81A0-350CF767F7B2}.Release|Any CPU.ActiveCfg = Release|Any CPU
{DE38F44A-8B1F-4C41-81A0-350CF767F7B2}.Release|Any CPU.Build.0 = Release|Any CPU
{DE38F44A-8B1F-4C41-81A0-350CF767F7B2}.Release|x64.ActiveCfg = Release|Any CPU
{DE38F44A-8B1F-4C41-81A0-350CF767F7B2}.Release|x64.Build.0 = Release|Any CPU
{DE38F44A-8B1F-4C41-81A0-350CF767F7B2}.Release|x86.ActiveCfg = Release|Any CPU
{DE38F44A-8B1F-4C41-81A0-350CF767F7B2}.Release|x86.Build.0 = Release|Any CPU
{A6A4C3C9-4962-4EEA-96CC-687650680504}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A6A4C3C9-4962-4EEA-96CC-687650680504}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A6A4C3C9-4962-4EEA-96CC-687650680504}.Debug|x64.ActiveCfg = Debug|Any CPU
{A6A4C3C9-4962-4EEA-96CC-687650680504}.Debug|x64.Build.0 = Debug|Any CPU
{A6A4C3C9-4962-4EEA-96CC-687650680504}.Debug|x86.ActiveCfg = Debug|Any CPU
{A6A4C3C9-4962-4EEA-96CC-687650680504}.Debug|x86.Build.0 = Debug|Any CPU
{A6A4C3C9-4962-4EEA-96CC-687650680504}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A6A4C3C9-4962-4EEA-96CC-687650680504}.Release|Any CPU.Build.0 = Release|Any CPU
{A6A4C3C9-4962-4EEA-96CC-687650680504}.Release|x64.ActiveCfg = Release|Any CPU
{A6A4C3C9-4962-4EEA-96CC-687650680504}.Release|x64.Build.0 = Release|Any CPU
{A6A4C3C9-4962-4EEA-96CC-687650680504}.Release|x86.ActiveCfg = Release|Any CPU
{A6A4C3C9-4962-4EEA-96CC-687650680504}.Release|x86.Build.0 = Release|Any CPU
{346AA429-2AE0-4171-9F41-D3F31D823D19}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{346AA429-2AE0-4171-9F41-D3F31D823D19}.Debug|Any CPU.Build.0 = Debug|Any CPU
{346AA429-2AE0-4171-9F41-D3F31D823D19}.Debug|x64.ActiveCfg = Debug|Any CPU
{346AA429-2AE0-4171-9F41-D3F31D823D19}.Debug|x64.Build.0 = Debug|Any CPU
{346AA429-2AE0-4171-9F41-D3F31D823D19}.Debug|x86.ActiveCfg = Debug|Any CPU
{346AA429-2AE0-4171-9F41-D3F31D823D19}.Debug|x86.Build.0 = Debug|Any CPU
{346AA429-2AE0-4171-9F41-D3F31D823D19}.Release|Any CPU.ActiveCfg = Release|Any CPU
{346AA429-2AE0-4171-9F41-D3F31D823D19}.Release|Any CPU.Build.0 = Release|Any CPU
{346AA429-2AE0-4171-9F41-D3F31D823D19}.Release|x64.ActiveCfg = Release|Any CPU
{346AA429-2AE0-4171-9F41-D3F31D823D19}.Release|x64.Build.0 = Release|Any CPU
{346AA429-2AE0-4171-9F41-D3F31D823D19}.Release|x86.ActiveCfg = Release|Any CPU
{346AA429-2AE0-4171-9F41-D3F31D823D19}.Release|x86.Build.0 = Release|Any CPU
{A0B339C0-5BCD-40C1-8FF6-421F41321F74}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A0B339C0-5BCD-40C1-8FF6-421F41321F74}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A0B339C0-5BCD-40C1-8FF6-421F41321F74}.Debug|x64.ActiveCfg = Debug|Any CPU
{A0B339C0-5BCD-40C1-8FF6-421F41321F74}.Debug|x64.Build.0 = Debug|Any CPU
{A0B339C0-5BCD-40C1-8FF6-421F41321F74}.Debug|x86.ActiveCfg = Debug|Any CPU
{A0B339C0-5BCD-40C1-8FF6-421F41321F74}.Debug|x86.Build.0 = Debug|Any CPU
{A0B339C0-5BCD-40C1-8FF6-421F41321F74}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A0B339C0-5BCD-40C1-8FF6-421F41321F74}.Release|Any CPU.Build.0 = Release|Any CPU
{A0B339C0-5BCD-40C1-8FF6-421F41321F74}.Release|x64.ActiveCfg = Release|Any CPU
{A0B339C0-5BCD-40C1-8FF6-421F41321F74}.Release|x64.Build.0 = Release|Any CPU
{A0B339C0-5BCD-40C1-8FF6-421F41321F74}.Release|x86.ActiveCfg = Release|Any CPU
{A0B339C0-5BCD-40C1-8FF6-421F41321F74}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down Expand Up @@ -1884,7 +1912,6 @@ Global
{0BFA8C5B-3F15-4381-9621-AD7A3EC0315F} = {AB9C5AA2-DD5D-4A38-97C0-674A995C0AE0}
{96D96CA7-35C0-40C6-A8C8-91E0C4456660} = {323C198D-A8C6-4EB0-8B79-72624275E35F}
{C3E5E7C8-69D3-4ECB-A4FA-53A9A780EFF0} = {282CEF03-292F-4A49-83C6-997567D0FF5F}
{527A4A82-D63A-4DD5-B37D-0AC8A79F1B0E} = {282CEF03-292F-4A49-83C6-997567D0FF5F}
{0221E83B-B26B-442F-ACAD-B1043DF9993A} = {282CEF03-292F-4A49-83C6-997567D0FF5F}
{4C7E9EAC-222B-4C13-B8B1-5987406817A0} = {282CEF03-292F-4A49-83C6-997567D0FF5F}
{7985B208-CE41-49DA-B749-B94B582612E6} = {323C198D-A8C6-4EB0-8B79-72624275E35F}
Expand All @@ -1893,7 +1920,6 @@ Global
{B682C5B9-AFAB-474D-95AD-B86099FC5EC7} = {323C198D-A8C6-4EB0-8B79-72624275E35F}
{C356AA93-5BEE-44CD-A905-EFD325ED7578} = {323C198D-A8C6-4EB0-8B79-72624275E35F}
{CC063A63-8282-4293-9A0E-2598ADCA747B} = {323C198D-A8C6-4EB0-8B79-72624275E35F}
{58D5C0B4-3C5C-4BE4-82EA-4CB9940943B1} = {282CEF03-292F-4A49-83C6-997567D0FF5F}
{EC493B36-9E14-4CAF-973F-FB96FDAF546F} = {A878BDF1-6DB6-4BA5-A724-92885A710856}
{1694E75F-ABCE-4573-B805-18ED50F148FD} = {323C198D-A8C6-4EB0-8B79-72624275E35F}
{E1D41A07-F468-4D13-8185-35F127230B17} = {46383371-8252-4598-9350-A97692851408}
Expand Down Expand Up @@ -1958,5 +1984,9 @@ Global
{E5494227-BDFE-41F2-A12F-54292D76C29F} = {282CEF03-292F-4A49-83C6-997567D0FF5F}
{D8EBE555-F103-4D05-9697-5381E4DE1DFE} = {282CEF03-292F-4A49-83C6-997567D0FF5F}
{AA14B842-6A65-40BB-818A-D450F66F4101} = {323C198D-A8C6-4EB0-8B79-72624275E35F}
{DE38F44A-8B1F-4C41-81A0-350CF767F7B2} = {B42CFF96-B8DB-48A6-A9CA-72BFB5F0117B}
{A6A4C3C9-4962-4EEA-96CC-687650680504} = {B42CFF96-B8DB-48A6-A9CA-72BFB5F0117B}
{346AA429-2AE0-4171-9F41-D3F31D823D19} = {B42CFF96-B8DB-48A6-A9CA-72BFB5F0117B}
{A0B339C0-5BCD-40C1-8FF6-421F41321F74} = {B42CFF96-B8DB-48A6-A9CA-72BFB5F0117B}
EndGlobalSection
EndGlobal
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,10 @@
<ProjectReference Include="..\..\externalsystems\OnboardingServiceProvider.Library\OnboardingServiceProvider.Library.csproj" />
<ProjectReference Include="..\..\framework\Framework.Async\Framework.Async.csproj" />
<ProjectReference Include="..\..\framework\Framework.DateTimeProvider\Framework.DateTimeProvider.csproj" />
<ProjectReference Include="..\..\framework\Framework.Identity\Framework.Identity.csproj" />
<ProjectReference Include="..\..\framework\Framework.IO\Framework.IO.csproj" />
<ProjectReference Include="..\..\framework\Framework.Models\Framework.Models.csproj" />
<ProjectReference Include="..\..\framework\Framework.Processes.Library\Framework.Processes.Library.csproj" />
<ProjectReference Include="..\..\framework\Framework.Token\Framework.Token.csproj" />
<ProjectReference Include="..\..\keycloak\Keycloak.Authentication\Keycloak.Authentication.csproj" />
<ProjectReference Include="..\..\processes\ApplicationChecklist.Config\ApplicationChecklist.Config.csproj" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,21 +22,19 @@
using Org.Eclipse.TractusX.Portal.Backend.Framework.Async;
using Org.Eclipse.TractusX.Portal.Backend.Framework.DateTimeProvider;
using Org.Eclipse.TractusX.Portal.Backend.Framework.ErrorHandling;
using Org.Eclipse.TractusX.Portal.Backend.Framework.Identity;
using Org.Eclipse.TractusX.Portal.Backend.Framework.Linq;
using Org.Eclipse.TractusX.Portal.Backend.Framework.Models;
using Org.Eclipse.TractusX.Portal.Backend.Framework.Processes.Library;
using Org.Eclipse.TractusX.Portal.Backend.Framework.Processes.Library.Context;
using Org.Eclipse.TractusX.Portal.Backend.Framework.Processes.Library.Enums;
using Org.Eclipse.TractusX.Portal.Backend.Framework.Web;
using Org.Eclipse.TractusX.Portal.Backend.IssuerComponent.Library.BusinessLogic;
using Org.Eclipse.TractusX.Portal.Backend.PortalBackend.DBAccess;
using Org.Eclipse.TractusX.Portal.Backend.PortalBackend.DBAccess.Extensions;
using Org.Eclipse.TractusX.Portal.Backend.PortalBackend.DBAccess.Models;
using Org.Eclipse.TractusX.Portal.Backend.PortalBackend.DBAccess.Repositories;
using Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Enums;
using Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Identities;
using Org.Eclipse.TractusX.Portal.Backend.Processes.Library;
using Org.Eclipse.TractusX.Portal.Backend.Processes.Mailing.Library;
using System.Collections.Immutable;
using System.Globalization;
using System.Text.Json;
using System.Text.RegularExpressions;

namespace Org.Eclipse.TractusX.Portal.Backend.Administration.Service.BusinessLogic;
Expand Down Expand Up @@ -448,7 +446,7 @@ public async Task<int> DeleteCompanyCertificateAsync(Guid documentId)
public async Task TriggerSelfDescriptionCreation()
{
var companiesWithMissingSd = portalRepositories.GetInstance<ICompanyRepository>().GetCompanyIdsWithMissingSelfDescription();
var processStepRepository = portalRepositories.GetInstance<IProcessStepRepository>();
var processStepRepository = portalRepositories.GetInstance<IProcessStepRepository<ProcessTypeId, ProcessStepTypeId>>();
var companyRepository = portalRepositories.GetInstance<ICompanyRepository>();
await foreach (var companyId in companiesWithMissingSd)
{
Expand All @@ -464,7 +462,7 @@ public async Task RetriggerSelfDescriptionCreation(Guid processId)
{
const ProcessStepTypeId NextStep = ProcessStepTypeId.SELF_DESCRIPTION_COMPANY_CREATION;
const ProcessStepTypeId StepToTrigger = ProcessStepTypeId.RETRIGGER_SELF_DESCRIPTION_COMPANY_CREATION;
var (validProcessId, processData) = await portalRepositories.GetInstance<IProcessStepRepository>().IsValidProcess(processId, ProcessTypeId.SELF_DESCRIPTION_CREATION, Enumerable.Repeat(StepToTrigger, 1)).ConfigureAwait(ConfigureAwaitOptions.None);
var (validProcessId, processData) = await portalRepositories.GetInstance<IProcessStepRepository<ProcessTypeId, ProcessStepTypeId>>().IsValidProcess(processId, ProcessTypeId.SELF_DESCRIPTION_CREATION, Enumerable.Repeat(StepToTrigger, 1)).ConfigureAwait(ConfigureAwaitOptions.None);
if (!validProcessId)
{
throw new NotFoundException($"process {processId} does not exist");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,17 @@
using Org.Eclipse.TractusX.Portal.Backend.Administration.Service.Models;
using Org.Eclipse.TractusX.Portal.Backend.Framework.Async;
using Org.Eclipse.TractusX.Portal.Backend.Framework.ErrorHandling;
using Org.Eclipse.TractusX.Portal.Backend.Framework.Identity;
using Org.Eclipse.TractusX.Portal.Backend.Framework.IO;
using Org.Eclipse.TractusX.Portal.Backend.Framework.Linq;
using Org.Eclipse.TractusX.Portal.Backend.Framework.Models;
using Org.Eclipse.TractusX.Portal.Backend.Framework.Processes.Library;
using Org.Eclipse.TractusX.Portal.Backend.Framework.Processes.Library.Context;
using Org.Eclipse.TractusX.Portal.Backend.Framework.Processes.Library.Enums;
using Org.Eclipse.TractusX.Portal.Backend.PortalBackend.DBAccess;
using Org.Eclipse.TractusX.Portal.Backend.PortalBackend.DBAccess.Models;
using Org.Eclipse.TractusX.Portal.Backend.PortalBackend.DBAccess.Repositories;
using Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Enums;
using Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Identities;
using Org.Eclipse.TractusX.Portal.Backend.Processes.Library;
using Org.Eclipse.TractusX.Portal.Backend.SdFactory.Library.BusinessLogic;
using Org.Eclipse.TractusX.Portal.Backend.SdFactory.Library.Models;
using System.Text.RegularExpressions;
Expand Down Expand Up @@ -451,7 +453,7 @@ public IAsyncEnumerable<OfferSubscriptionConnectorData> GetConnectorOfferSubscri
public async Task TriggerSelfDescriptionCreation()
{
var connectorRepository = portalRepositories.GetInstance<IConnectorsRepository>();
var processStepRepository = portalRepositories.GetInstance<IProcessStepRepository>();
var processStepRepository = portalRepositories.GetInstance<IProcessStepRepository<ProcessTypeId, ProcessStepTypeId>>();
var connectorIds = connectorRepository.GetConnectorIdsWithMissingSelfDescription();
await foreach (var connectorId in connectorIds)
{
Expand All @@ -467,7 +469,7 @@ public async Task RetriggerSelfDescriptionCreation(Guid processId)
{
const ProcessStepTypeId NextStep = ProcessStepTypeId.SELF_DESCRIPTION_CONNECTOR_CREATION;
const ProcessStepTypeId StepToTrigger = ProcessStepTypeId.RETRIGGER_SELF_DESCRIPTION_CONNECTOR_CREATION;
var (validProcessId, processData) = await portalRepositories.GetInstance<IProcessStepRepository>().IsValidProcess(processId, ProcessTypeId.SELF_DESCRIPTION_CREATION, Enumerable.Repeat(StepToTrigger, 1)).ConfigureAwait(ConfigureAwaitOptions.None);
var (validProcessId, processData) = await portalRepositories.GetInstance<IProcessStepRepository<ProcessTypeId, ProcessStepTypeId>>().IsValidProcess(processId, ProcessTypeId.SELF_DESCRIPTION_CREATION, Enumerable.Repeat(StepToTrigger, 1)).ConfigureAwait(ConfigureAwaitOptions.None);
if (!validProcessId)
{
throw new NotFoundException($"process {processId} does not exist");
Expand Down
Loading

0 comments on commit a33c0d3

Please sign in to comment.