Skip to content

Commit 2117930

Browse files
Ticket #111 : Change EFCore Configuration - BPMN
1 parent 270e159 commit 2117930

187 files changed

Lines changed: 2726 additions & 3476 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

CaseManagement.sln

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CaseManagement.BPMN.Tests",
4949
EndProject
5050
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CaseManagement.Common.SqlServer", "src\CaseManagement.Common.SqlServer\CaseManagement.Common.SqlServer.csproj", "{4EB1F71A-2BC1-4E17-9B66-06F941F1AD8E}"
5151
EndProject
52-
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CaseManagement.BPMN.Common", "src\CaseManagement.BPMN.Common\CaseManagement.BPMN.Common.csproj", "{4B9657CB-5DA0-4B99-A49A-BB626947216F}"
53-
EndProject
5452
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "03. HumanTasks", "03. HumanTasks", "{F1D09F77-52D3-46B7-B1FB-6FEAAE3BEB54}"
5553
EndProject
5654
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CaseManagement.HumanTask", "src\CaseManagement.HumanTask\CaseManagement.HumanTask.csproj", "{7F498C8B-81B7-421E-917B-F2B1143BD900}"
@@ -145,10 +143,6 @@ Global
145143
{4EB1F71A-2BC1-4E17-9B66-06F941F1AD8E}.Debug|Any CPU.Build.0 = Debug|Any CPU
146144
{4EB1F71A-2BC1-4E17-9B66-06F941F1AD8E}.Release|Any CPU.ActiveCfg = Release|Any CPU
147145
{4EB1F71A-2BC1-4E17-9B66-06F941F1AD8E}.Release|Any CPU.Build.0 = Release|Any CPU
148-
{4B9657CB-5DA0-4B99-A49A-BB626947216F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
149-
{4B9657CB-5DA0-4B99-A49A-BB626947216F}.Debug|Any CPU.Build.0 = Debug|Any CPU
150-
{4B9657CB-5DA0-4B99-A49A-BB626947216F}.Release|Any CPU.ActiveCfg = Release|Any CPU
151-
{4B9657CB-5DA0-4B99-A49A-BB626947216F}.Release|Any CPU.Build.0 = Release|Any CPU
152146
{7F498C8B-81B7-421E-917B-F2B1143BD900}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
153147
{7F498C8B-81B7-421E-917B-F2B1143BD900}.Debug|Any CPU.Build.0 = Debug|Any CPU
154148
{7F498C8B-81B7-421E-917B-F2B1143BD900}.Release|Any CPU.ActiveCfg = Release|Any CPU
@@ -224,7 +218,6 @@ Global
224218
{46F4E3E4-E5D8-47DB-BCB5-339CFAAF8408} = {BFF5EF7E-750D-4A02-8EA6-E296D3A97266}
225219
{EF871DF5-4F12-41E5-92BA-C1BEACF0EBA6} = {A632EFC3-730B-46D7-B669-91962DFA8947}
226220
{4EB1F71A-2BC1-4E17-9B66-06F941F1AD8E} = {BFF5EF7E-750D-4A02-8EA6-E296D3A97266}
227-
{4B9657CB-5DA0-4B99-A49A-BB626947216F} = {905BDF27-841C-47C1-AB38-E666A582489A}
228221
{7F498C8B-81B7-421E-917B-F2B1143BD900} = {F1D09F77-52D3-46B7-B1FB-6FEAAE3BEB54}
229222
{9711CF4C-B393-401E-A8D2-E261097D3679} = {A632EFC3-730B-46D7-B669-91962DFA8947}
230223
{E80EB5E5-2399-41FF-A479-852CC85B32F9} = {F1D09F77-52D3-46B7-B1FB-6FEAAE3BEB54}

logos/submit.svg

Lines changed: 92 additions & 0 deletions
Loading

src/CaseManagement.BPMN.AspNetCore/BPMNJobServerHostedService.cs

Lines changed: 0 additions & 30 deletions
This file was deleted.

src/CaseManagement.BPMN.Host/Delegates/GetWeatherInformationDelegate.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using CaseManagement.BPMN.Common;
1+
using CaseManagement.BPMN.Domains;
22
using Newtonsoft.Json.Linq;
33
using System;
44
using System.Collections.Generic;

src/CaseManagement.BPMN.Host/Startup.cs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// Copyright (c) SimpleIdServer. All rights reserved.
22
// Licensed under the Apache License, Version 2.0. See LICENSE in the project root for license information.
3-
using CaseManagement.BPMN.AspNetCore;
3+
using CaseManagement.BPMN.AspNetCore.Apis;
44
using Microsoft.AspNetCore.Authentication.JwtBearer;
55
using Microsoft.AspNetCore.Builder;
66
using Microsoft.AspNetCore.Hosting;
@@ -32,7 +32,9 @@ public Startup(IHostingEnvironment env, IConfiguration configuration)
3232
public void ConfigureServices(IServiceCollection services)
3333
{
3434
var files = Directory.EnumerateFiles(Path.Combine(Directory.GetCurrentDirectory(), "Bpmns"), "*.bpmn").ToList();
35-
services.AddMvc(opts => opts.EnableEndpointRouting = false).AddNewtonsoftJson();
35+
services
36+
.AddMvc(opts => opts.EnableEndpointRouting = false)
37+
.AddNewtonsoftJson();
3638
services.AddAuthentication(options =>
3739
{
3840
options.DefaultChallengeScheme = JwtBearerDefaults.AuthenticationScheme;
@@ -45,12 +47,12 @@ public void ConfigureServices(IServiceCollection services)
4547
IssuerSigningKey = ExtractKey("openid_puk.txt"),
4648
ValidAudiences = new List<string>
4749
{
48-
"http://localhost:60000",
50+
"https://localhost:60000",
4951
"https://simpleidserver.northeurope.cloudapp.azure.com/openid"
5052
},
5153
ValidIssuers = new List<string>
5254
{
53-
"http://localhost:60000",
55+
"https://localhost:60000",
5456
"https://simpleidserver.northeurope.cloudapp.azure.com/openid"
5557
}
5658
};
@@ -59,7 +61,6 @@ public void ConfigureServices(IServiceCollection services)
5961
services.AddCors(options => options.AddPolicy("AllowAll", p => p.AllowAnyOrigin()
6062
.AllowAnyMethod()
6163
.AllowAnyHeader()));
62-
services.AddHostedService<BPMNJobServerHostedService>();
6364
services.AddProcessJobServer(callbackServerOpts: opts =>
6465
{
6566
opts.WSHumanTaskAPI = "http://localhost:60006";

src/CaseManagement.BPMN.Persistence.EF/BPMNDbContext.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using CaseManagement.BPMN.Persistence.EF.Models;
1+
using CaseManagement.BPMN.Domains;
22
using Microsoft.EntityFrameworkCore;
33

44
namespace CaseManagement.BPMN.Persistence.EF
@@ -7,8 +7,8 @@ public class BPMNDbContext : DbContext
77
{
88
public BPMNDbContext(DbContextOptions<BPMNDbContext> dbContextOptions) : base(dbContextOptions) { }
99

10-
public DbSet<ProcessInstanceModel> ProcessInstances { get; set; }
11-
public DbSet<ProcessFileModel> ProcessFiles { get; set; }
10+
public DbSet<ProcessInstanceAggregate> ProcessInstances { get; set; }
11+
public DbSet<ProcessFileAggregate> ProcessFiles { get; set; }
1212

1313
protected override void OnModelCreating(ModelBuilder modelBuilder)
1414
{

src/CaseManagement.BPMN.Persistence.EF/CaseManagement.BPMN.Persistence.EF.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
</ItemGroup>
1717
<ItemGroup>
1818
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="5.0.3" />
19+
<PackageReference Include="Microsoft.EntityFrameworkCore.Proxies" Version="5.0.3" />"
1920
<PackageReference Include="Microsoft.SourceLink.GitHub" PrivateAssets="All" />
2021
</ItemGroup>
2122
</Project>
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
using CaseManagement.BPMN.Domains;
2+
using Microsoft.EntityFrameworkCore;
3+
using Microsoft.EntityFrameworkCore.Metadata.Builders;
4+
5+
namespace CaseManagement.BPMN.Persistence.EF.Configuration
6+
{
7+
public class ActivityStateHistoryConfiguration : IEntityTypeConfiguration<ActivityStateHistory>
8+
{
9+
public void Configure(EntityTypeBuilder<ActivityStateHistory> builder)
10+
{
11+
builder.Property<int>("Id").ValueGeneratedOnAdd();
12+
builder.HasKey("Id");
13+
}
14+
}
15+
}

src/CaseManagement.BPMN.Persistence.EF/Configuration/ActivityStateHistoryModelConfiguration.cs

Lines changed: 0 additions & 15 deletions
This file was deleted.
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
using CaseManagement.BPMN.Domains;
2+
using Microsoft.EntityFrameworkCore;
3+
using Microsoft.EntityFrameworkCore.Metadata.Builders;
4+
5+
namespace CaseManagement.BPMN.Persistence.EF.Configuration
6+
{
7+
public class BPMNInterfaceConfiguration : IEntityTypeConfiguration<BPMNInterface>
8+
{
9+
public void Configure(EntityTypeBuilder<BPMNInterface> builder)
10+
{
11+
builder.Property<int>("Id").ValueGeneratedOnAdd();
12+
builder.HasKey("Id");
13+
builder.HasMany(_ => _.Operations).WithOne().OnDelete(DeleteBehavior.Cascade);
14+
}
15+
}
16+
}

0 commit comments

Comments
 (0)