Skip to content

Commit

Permalink
Add FormFlow for handling multi page journeys (#850)
Browse files Browse the repository at this point in the history
* Add FormFlow submodule

* Add FormFlow journey state store that uses Postgres

* Add a convention to bind JourneyInstance properties by default

* Add supporting test infrastructure for FormFlow journeys
  • Loading branch information
gunndabad authored Oct 5, 2023
1 parent bd4474d commit 113665a
Show file tree
Hide file tree
Showing 22 changed files with 936 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ jobs:

steps:
- uses: actions/checkout@v4
with:
submodules: recursive

- uses: extractions/setup-just@v1

Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ jobs:

steps:
- uses: actions/checkout@v4
with:
submodules: recursive

- uses: extractions/setup-just@v1

Expand Down
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "TeachingRecordSystem/lib/formflow"]
path = TeachingRecordSystem/lib/formflow
url = https://github.com/gunndabad/formflow.git
15 changes: 15 additions & 0 deletions TeachingRecordSystem/TeachingRecordSystem.sln
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TeachingRecordSystem.Suppor
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TeachingRecordSystem.SupportUi.Tests", "tests\TeachingRecordSystem.SupportUi.Tests\TeachingRecordSystem.SupportUi.Tests.csproj", "{407EB5A5-8B4F-4F7D-80BA-E39AB6AD013C}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FormFlow", "lib\formflow\src\FormFlow\FormFlow.csproj", "{DA3F55CA-6B95-4A85-A3D6-2997C3149A63}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -163,6 +165,18 @@ Global
{407EB5A5-8B4F-4F7D-80BA-E39AB6AD013C}.Release|x64.Build.0 = Release|Any CPU
{407EB5A5-8B4F-4F7D-80BA-E39AB6AD013C}.Release|x86.ActiveCfg = Release|Any CPU
{407EB5A5-8B4F-4F7D-80BA-E39AB6AD013C}.Release|x86.Build.0 = Release|Any CPU
{DA3F55CA-6B95-4A85-A3D6-2997C3149A63}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{DA3F55CA-6B95-4A85-A3D6-2997C3149A63}.Debug|Any CPU.Build.0 = Debug|Any CPU
{DA3F55CA-6B95-4A85-A3D6-2997C3149A63}.Debug|x64.ActiveCfg = Debug|Any CPU
{DA3F55CA-6B95-4A85-A3D6-2997C3149A63}.Debug|x64.Build.0 = Debug|Any CPU
{DA3F55CA-6B95-4A85-A3D6-2997C3149A63}.Debug|x86.ActiveCfg = Debug|Any CPU
{DA3F55CA-6B95-4A85-A3D6-2997C3149A63}.Debug|x86.Build.0 = Debug|Any CPU
{DA3F55CA-6B95-4A85-A3D6-2997C3149A63}.Release|Any CPU.ActiveCfg = Release|Any CPU
{DA3F55CA-6B95-4A85-A3D6-2997C3149A63}.Release|Any CPU.Build.0 = Release|Any CPU
{DA3F55CA-6B95-4A85-A3D6-2997C3149A63}.Release|x64.ActiveCfg = Release|Any CPU
{DA3F55CA-6B95-4A85-A3D6-2997C3149A63}.Release|x64.Build.0 = Release|Any CPU
{DA3F55CA-6B95-4A85-A3D6-2997C3149A63}.Release|x86.ActiveCfg = Release|Any CPU
{DA3F55CA-6B95-4A85-A3D6-2997C3149A63}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand All @@ -178,6 +192,7 @@ Global
{3380ADC3-A691-4B07-9FE3-CB5306974965} = {91DCFC76-6636-4AC1-B81C-7F8AE1F22116}
{EB46905A-F7B4-4BDC-B376-6091264D6303} = {91DCFC76-6636-4AC1-B81C-7F8AE1F22116}
{407EB5A5-8B4F-4F7D-80BA-E39AB6AD013C} = {91DCFC76-6636-4AC1-B81C-7F8AE1F22116}
{DA3F55CA-6B95-4A85-A3D6-2997C3149A63} = {837E2941-F1CC-41EF-A652-B605101B2E84}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {61D239F9-888B-4D01-84BC-9276C92383EA}
Expand Down
1 change: 1 addition & 0 deletions TeachingRecordSystem/lib/formflow
Submodule formflow added at cca65c
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using TeachingRecordSystem.Core.DataStore.Postgres.Models;

namespace TeachingRecordSystem.Core.DataStore.Postgres.Mappings;

public class JourneyStateMapping : IEntityTypeConfiguration<JourneyState>
{
public void Configure(EntityTypeBuilder<JourneyState> builder)
{
builder.ToTable("journey_states");
builder.HasKey(s => s.InstanceId);
builder.Property(s => s.InstanceId).IsRequired().HasMaxLength(300);
builder.Property(s => s.UserId).IsRequired();
builder.Property(s => s.State).IsRequired();
builder.Property(s => s.Created).IsRequired();
builder.Property(s => s.Updated).IsRequired();
}
}
Loading

0 comments on commit 113665a

Please sign in to comment.