Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(processWorker): create process worker package #998

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
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.Identity", "framework\Framework.Identity\Framework.Identity.csproj", "{6ED01D72-BE48-45A6-A615-BFA83DF99EF4}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Framework.Processes.Library", "framework\Framework.Processes.Library\Framework.Processes.Library.csproj", "{124683B4-17F3-4E0A-818C-32DB91324ABB}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Framework.Processes.ProcessIdentity", "framework\Framework.Processes.ProcessIdentity\Framework.Processes.ProcessIdentity.csproj", "{96F978B7-71C1-4866-BFB5-8631F4743FA5}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Framework.Processes.Worker.Library", "framework\Framework.Processes.Worker.Library\Framework.Processes.Worker.Library.csproj", "{BD0268EB-65A9-4A0A-B724-214A6D2591B5}"
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 @@ -1832,6 +1812,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
{6ED01D72-BE48-45A6-A615-BFA83DF99EF4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6ED01D72-BE48-45A6-A615-BFA83DF99EF4}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6ED01D72-BE48-45A6-A615-BFA83DF99EF4}.Debug|x64.ActiveCfg = Debug|Any CPU
{6ED01D72-BE48-45A6-A615-BFA83DF99EF4}.Debug|x64.Build.0 = Debug|Any CPU
{6ED01D72-BE48-45A6-A615-BFA83DF99EF4}.Debug|x86.ActiveCfg = Debug|Any CPU
{6ED01D72-BE48-45A6-A615-BFA83DF99EF4}.Debug|x86.Build.0 = Debug|Any CPU
{6ED01D72-BE48-45A6-A615-BFA83DF99EF4}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6ED01D72-BE48-45A6-A615-BFA83DF99EF4}.Release|Any CPU.Build.0 = Release|Any CPU
{6ED01D72-BE48-45A6-A615-BFA83DF99EF4}.Release|x64.ActiveCfg = Release|Any CPU
{6ED01D72-BE48-45A6-A615-BFA83DF99EF4}.Release|x64.Build.0 = Release|Any CPU
{6ED01D72-BE48-45A6-A615-BFA83DF99EF4}.Release|x86.ActiveCfg = Release|Any CPU
{6ED01D72-BE48-45A6-A615-BFA83DF99EF4}.Release|x86.Build.0 = Release|Any CPU
{124683B4-17F3-4E0A-818C-32DB91324ABB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{124683B4-17F3-4E0A-818C-32DB91324ABB}.Debug|Any CPU.Build.0 = Debug|Any CPU
{124683B4-17F3-4E0A-818C-32DB91324ABB}.Debug|x64.ActiveCfg = Debug|Any CPU
{124683B4-17F3-4E0A-818C-32DB91324ABB}.Debug|x64.Build.0 = Debug|Any CPU
{124683B4-17F3-4E0A-818C-32DB91324ABB}.Debug|x86.ActiveCfg = Debug|Any CPU
{124683B4-17F3-4E0A-818C-32DB91324ABB}.Debug|x86.Build.0 = Debug|Any CPU
{124683B4-17F3-4E0A-818C-32DB91324ABB}.Release|Any CPU.ActiveCfg = Release|Any CPU
{124683B4-17F3-4E0A-818C-32DB91324ABB}.Release|Any CPU.Build.0 = Release|Any CPU
{124683B4-17F3-4E0A-818C-32DB91324ABB}.Release|x64.ActiveCfg = Release|Any CPU
{124683B4-17F3-4E0A-818C-32DB91324ABB}.Release|x64.Build.0 = Release|Any CPU
{124683B4-17F3-4E0A-818C-32DB91324ABB}.Release|x86.ActiveCfg = Release|Any CPU
{124683B4-17F3-4E0A-818C-32DB91324ABB}.Release|x86.Build.0 = Release|Any CPU
{96F978B7-71C1-4866-BFB5-8631F4743FA5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{96F978B7-71C1-4866-BFB5-8631F4743FA5}.Debug|Any CPU.Build.0 = Debug|Any CPU
{96F978B7-71C1-4866-BFB5-8631F4743FA5}.Debug|x64.ActiveCfg = Debug|Any CPU
{96F978B7-71C1-4866-BFB5-8631F4743FA5}.Debug|x64.Build.0 = Debug|Any CPU
{96F978B7-71C1-4866-BFB5-8631F4743FA5}.Debug|x86.ActiveCfg = Debug|Any CPU
{96F978B7-71C1-4866-BFB5-8631F4743FA5}.Debug|x86.Build.0 = Debug|Any CPU
{96F978B7-71C1-4866-BFB5-8631F4743FA5}.Release|Any CPU.ActiveCfg = Release|Any CPU
{96F978B7-71C1-4866-BFB5-8631F4743FA5}.Release|Any CPU.Build.0 = Release|Any CPU
{96F978B7-71C1-4866-BFB5-8631F4743FA5}.Release|x64.ActiveCfg = Release|Any CPU
{96F978B7-71C1-4866-BFB5-8631F4743FA5}.Release|x64.Build.0 = Release|Any CPU
{96F978B7-71C1-4866-BFB5-8631F4743FA5}.Release|x86.ActiveCfg = Release|Any CPU
{96F978B7-71C1-4866-BFB5-8631F4743FA5}.Release|x86.Build.0 = Release|Any CPU
{BD0268EB-65A9-4A0A-B724-214A6D2591B5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{BD0268EB-65A9-4A0A-B724-214A6D2591B5}.Debug|Any CPU.Build.0 = Debug|Any CPU
{BD0268EB-65A9-4A0A-B724-214A6D2591B5}.Debug|x64.ActiveCfg = Debug|Any CPU
{BD0268EB-65A9-4A0A-B724-214A6D2591B5}.Debug|x64.Build.0 = Debug|Any CPU
{BD0268EB-65A9-4A0A-B724-214A6D2591B5}.Debug|x86.ActiveCfg = Debug|Any CPU
{BD0268EB-65A9-4A0A-B724-214A6D2591B5}.Debug|x86.Build.0 = Debug|Any CPU
{BD0268EB-65A9-4A0A-B724-214A6D2591B5}.Release|Any CPU.ActiveCfg = Release|Any CPU
{BD0268EB-65A9-4A0A-B724-214A6D2591B5}.Release|Any CPU.Build.0 = Release|Any CPU
{BD0268EB-65A9-4A0A-B724-214A6D2591B5}.Release|x64.ActiveCfg = Release|Any CPU
{BD0268EB-65A9-4A0A-B724-214A6D2591B5}.Release|x64.Build.0 = Release|Any CPU
{BD0268EB-65A9-4A0A-B724-214A6D2591B5}.Release|x86.ActiveCfg = Release|Any CPU
{BD0268EB-65A9-4A0A-B724-214A6D2591B5}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down Expand Up @@ -1894,7 +1922,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 @@ -1903,7 +1930,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 @@ -1968,5 +1994,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}
{6ED01D72-BE48-45A6-A615-BFA83DF99EF4} = {B42CFF96-B8DB-48A6-A9CA-72BFB5F0117B}
{124683B4-17F3-4E0A-818C-32DB91324ABB} = {B42CFF96-B8DB-48A6-A9CA-72BFB5F0117B}
{96F978B7-71C1-4866-BFB5-8631F4743FA5} = {B42CFF96-B8DB-48A6-A9CA-72BFB5F0117B}
{BD0268EB-65A9-4A0A-B724-214A6D2591B5} = {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,17 +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 System.Text.RegularExpressions;

namespace Org.Eclipse.TractusX.Portal.Backend.Administration.Service.BusinessLogic;
Expand Down Expand Up @@ -444,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 @@ -460,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 @@ -471,7 +473,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 @@ -487,7 +489,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
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@

using Microsoft.Extensions.Options;
using Org.Eclipse.TractusX.Portal.Backend.Framework.ErrorHandling;
using Org.Eclipse.TractusX.Portal.Backend.Framework.Identity;
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.Entities;
using Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Enums;
using Org.Eclipse.TractusX.Portal.Backend.PortalBackend.PortalEntities.Identities;

namespace Org.Eclipse.TractusX.Portal.Backend.Administration.Service.BusinessLogic;

Expand Down
Loading
Loading