diff --git a/.gitignore b/.gitignore
index fdf72c1bfc80440d50f30bda667a7ee9f31ca285..8db35957c78ef5cdd3e9999b47416d97b690e2b3 100644
--- a/.gitignore
+++ b/.gitignore
@@ -249,3 +249,4 @@ paket-files/
.fake/
/WorkFlowCore/WorkFlowCore.Host/Data
/WorkFlowCore/.vscode
+/WorkFlowCore/WorkFlowCore.Host/appsettings.Development.json
diff --git a/WorkFlowCore/WorkFlowCore.Framework/Migrations/20230228133009_subprocess.Designer.cs b/WorkFlowCore/WorkFlowCore.Framework/Migrations/20230228133009_subprocess.Designer.cs
new file mode 100644
index 0000000000000000000000000000000000000000..ac3c67a56260cde5db45819cbd59644da27b7e30
--- /dev/null
+++ b/WorkFlowCore/WorkFlowCore.Framework/Migrations/20230228133009_subprocess.Designer.cs
@@ -0,0 +1,275 @@
+//
+using System;
+using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Infrastructure;
+using Microsoft.EntityFrameworkCore.Migrations;
+using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
+using WorkFlowCore.Framework.Repositories4EF;
+
+namespace WorkFlowCore.Framework.Migrations
+{
+ [DbContext(typeof(WorkflowDbContext))]
+ [Migration("20230228133009_subprocess")]
+ partial class subprocess
+ {
+ protected override void BuildTargetModel(ModelBuilder modelBuilder)
+ {
+#pragma warning disable 612, 618
+ modelBuilder
+ .HasAnnotation("Relational:MaxIdentifierLength", 64)
+ .HasAnnotation("ProductVersion", "5.0.13");
+
+ modelBuilder.Entity("WorkFlowCore.WorkTasks.WorkStepInfo", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("char(36)");
+
+ b.Property("Comment")
+ .HasColumnType("longtext");
+
+ b.Property("CreatedUserId")
+ .HasColumnType("longtext");
+
+ b.Property("CreationTime")
+ .HasColumnType("datetime(6)");
+
+ b.Property("Deleted")
+ .HasColumnType("bit(1)");
+
+ b.Property("DeletedTime")
+ .HasColumnType("datetime(6)");
+
+ b.Property("DeletedUserId")
+ .HasColumnType("longtext");
+
+ b.Property("FormData")
+ .HasColumnType("longtext");
+
+ b.Property("FromForwardStepId")
+ .HasColumnType("char(36)");
+
+ b.Property("FromNodeId")
+ .HasColumnType("char(36)");
+
+ b.Property("FromNodeName")
+ .HasColumnType("longtext");
+
+ b.Property("GroupId")
+ .HasColumnType("longtext");
+
+ b.Property("HandleType")
+ .HasColumnType("int");
+
+ b.Property("HandleUser_Id")
+ .HasColumnType("longtext");
+
+ b.Property("HandleUser_Name")
+ .HasColumnType("longtext");
+
+ b.Property("HandlerTime")
+ .HasColumnType("datetime(6)");
+
+ b.Property("IsHandled")
+ .HasColumnType("bit(1)");
+
+ b.Property("IsRead")
+ .HasColumnType("bit(1)");
+
+ b.Property("ModifiedTime")
+ .HasColumnType("datetime(6)");
+
+ b.Property("ModifiedUserId")
+ .HasColumnType("longtext");
+
+ b.Property("NodeId")
+ .HasColumnType("char(36)");
+
+ b.Property("NodeName")
+ .HasColumnType("longtext");
+
+ b.Property("PreStepGroupId")
+ .HasColumnType("longtext");
+
+ b.Property("ReadTime")
+ .HasColumnType("datetime(6)");
+
+ b.Property("ResourceIds")
+ .HasColumnType("longtext");
+
+ b.Property("SubProcessNode_NodeId")
+ .HasColumnType("char(36)");
+
+ b.Property("SubProcessNode_WorkStepId")
+ .HasColumnType("char(36)");
+
+ b.Property("WorkStepType")
+ .HasColumnType("int");
+
+ b.Property("WorkTaskId")
+ .HasColumnType("char(36)");
+
+ b.HasKey("Id");
+
+ b.ToTable("WorkStepInfos");
+ });
+
+ modelBuilder.Entity("WorkFlowCore.WorkTasks.WorkTaskInfo", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("char(36)");
+
+ b.Property("CreatedUserId")
+ .HasColumnType("longtext");
+
+ b.Property("CreationTime")
+ .HasColumnType("datetime(6)");
+
+ b.Property("Deleted")
+ .HasColumnType("bit(1)");
+
+ b.Property("DeletedTime")
+ .HasColumnType("datetime(6)");
+
+ b.Property("DeletedUserId")
+ .HasColumnType("longtext");
+
+ b.Property("EntityFullName")
+ .HasColumnType("longtext");
+
+ b.Property("EntityKeyValue")
+ .HasColumnType("longtext");
+
+ b.Property("FormData")
+ .HasColumnType("longtext");
+
+ b.Property("IsSimulation")
+ .HasColumnType("bit(1)");
+
+ b.Property("ModifiedTime")
+ .HasColumnType("datetime(6)");
+
+ b.Property("ModifiedUserId")
+ .HasColumnType("longtext");
+
+ b.Property("Name")
+ .HasColumnType("longtext");
+
+ b.Property("WorkTaskStatus")
+ .HasColumnType("int");
+
+ b.Property("WorkflowId_Id")
+ .HasColumnType("char(36)");
+
+ b.Property("WorkflowId_VersionId")
+ .HasColumnType("int");
+
+ b.HasKey("Id");
+
+ b.ToTable("WorkTaskInfos");
+ });
+
+ modelBuilder.Entity("WorkFlowCore.Workflows.Workflow", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("char(36)");
+
+ b.Property("ActiveVersion")
+ .HasColumnType("int");
+
+ b.Property("CreatedUserId")
+ .HasColumnType("longtext");
+
+ b.Property("CreationTime")
+ .HasColumnType("datetime(6)");
+
+ b.Property("Deleted")
+ .HasColumnType("bit(1)");
+
+ b.Property("DeletedTime")
+ .HasColumnType("datetime(6)");
+
+ b.Property("DeletedUserId")
+ .HasColumnType("longtext");
+
+ b.Property("Description")
+ .HasMaxLength(500)
+ .HasColumnType("varchar(500)");
+
+ b.Property("ModifiedTime")
+ .HasColumnType("datetime(6)");
+
+ b.Property("ModifiedUserId")
+ .HasColumnType("longtext");
+
+ b.Property("Name")
+ .IsRequired()
+ .HasMaxLength(50)
+ .HasColumnType("varchar(50)");
+
+ b.Property("WorkflowNo")
+ .IsRequired()
+ .HasMaxLength(50)
+ .HasColumnType("varchar(50)");
+
+ b.HasKey("Id");
+
+ b.ToTable("Workflows");
+ });
+
+ modelBuilder.Entity("WorkFlowCore.Workflows.WorkflowVersionInfo", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("char(36)");
+
+ b.Property("AllNodes")
+ .HasColumnType("longtext");
+
+ b.Property("CreatedUserId")
+ .HasColumnType("longtext");
+
+ b.Property("CreationTime")
+ .HasColumnType("datetime(6)");
+
+ b.Property("Deleted")
+ .HasColumnType("bit(1)");
+
+ b.Property("DeletedTime")
+ .HasColumnType("datetime(6)");
+
+ b.Property("DeletedUserId")
+ .HasColumnType("longtext");
+
+ b.Property("Description")
+ .HasMaxLength(2000)
+ .HasColumnType("varchar(2000)");
+
+ b.Property("DrawingInfo")
+ .HasColumnType("longtext");
+
+ b.Property("ModifiedTime")
+ .HasColumnType("datetime(6)");
+
+ b.Property("ModifiedUserId")
+ .HasColumnType("longtext");
+
+ b.Property("NodeMaps")
+ .HasColumnType("longtext");
+
+ b.Property("VersionNo")
+ .HasColumnType("int");
+
+ b.Property("WorkflowId")
+ .HasColumnType("char(36)");
+
+ b.HasKey("Id");
+
+ b.ToTable("WorkflowVersionInfos");
+ });
+#pragma warning restore 612, 618
+ }
+ }
+}
diff --git a/WorkFlowCore/WorkFlowCore.Framework/Migrations/20230228133009_subprocess.cs b/WorkFlowCore/WorkFlowCore.Framework/Migrations/20230228133009_subprocess.cs
new file mode 100644
index 0000000000000000000000000000000000000000..0a06d2e3168bcc72a31cc36fd4be02be8a90b66a
--- /dev/null
+++ b/WorkFlowCore/WorkFlowCore.Framework/Migrations/20230228133009_subprocess.cs
@@ -0,0 +1,36 @@
+using System;
+using Microsoft.EntityFrameworkCore.Migrations;
+
+namespace WorkFlowCore.Framework.Migrations
+{
+ public partial class subprocess : Migration
+ {
+ protected override void Up(MigrationBuilder migrationBuilder)
+ {
+ migrationBuilder.AddColumn(
+ name: "SubProcessNode_NodeId",
+ table: "WorkStepInfos",
+ type: "char(36)",
+ nullable: true,
+ collation: "ascii_general_ci");
+
+ migrationBuilder.AddColumn(
+ name: "SubProcessNode_WorkStepId",
+ table: "WorkStepInfos",
+ type: "char(36)",
+ nullable: true,
+ collation: "ascii_general_ci");
+ }
+
+ protected override void Down(MigrationBuilder migrationBuilder)
+ {
+ migrationBuilder.DropColumn(
+ name: "SubProcessNode_NodeId",
+ table: "WorkStepInfos");
+
+ migrationBuilder.DropColumn(
+ name: "SubProcessNode_WorkStepId",
+ table: "WorkStepInfos");
+ }
+ }
+}
diff --git a/WorkFlowCore/WorkFlowCore.Framework/Migrations/WorkflowDbContextModelSnapshot.cs b/WorkFlowCore/WorkFlowCore.Framework/Migrations/WorkflowDbContextModelSnapshot.cs
index 343a83dddf126faefb28b0068dfcd915c820335f..4fc9a153543374b0e53c7bbf6b0bfdd4b716d5f3 100644
--- a/WorkFlowCore/WorkFlowCore.Framework/Migrations/WorkflowDbContextModelSnapshot.cs
+++ b/WorkFlowCore/WorkFlowCore.Framework/Migrations/WorkflowDbContextModelSnapshot.cs
@@ -95,6 +95,12 @@ namespace WorkFlowCore.Framework.Migrations
b.Property("ResourceIds")
.HasColumnType("longtext");
+ b.Property("SubProcessNode_NodeId")
+ .HasColumnType("char(36)");
+
+ b.Property("SubProcessNode_WorkStepId")
+ .HasColumnType("char(36)");
+
b.Property("WorkStepType")
.HasColumnType("int");
diff --git a/WorkFlowCore/WorkFlowCore.Framework/Repositories/UnitOfWork.cs b/WorkFlowCore/WorkFlowCore.Framework/Repositories/UnitOfWork.cs
index 75df0bbdd173e3abb591ded949f8577c3c56d177..1d43d3fef34e384596ea643a7e576211782fbea2 100644
--- a/WorkFlowCore/WorkFlowCore.Framework/Repositories/UnitOfWork.cs
+++ b/WorkFlowCore/WorkFlowCore.Framework/Repositories/UnitOfWork.cs
@@ -11,9 +11,11 @@ namespace WorkFlowCore.Framework.Repositories
private List