초기 커밋.

This commit is contained in:
2025-02-03 11:02:48 +09:00
parent a7d46f415f
commit fe9aa0799f
2334 changed files with 674826 additions and 0 deletions

View File

@@ -0,0 +1,23 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace DDUtilityApp.WORKFLOW.DATA
{
public class DynamicActivity
{
public List<Parameter> Parameters { get; set; } = new List<Parameter>();
public Parameter Result { get; set; }
public ViewState ViewState { get; set; }
}
}

View File

@@ -0,0 +1,17 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace DDUtilityApp.WORKFLOW.DATA
{
public class FlowBase
{
public ViewState ViewState { get; set; }
}
}

View File

@@ -0,0 +1,19 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace DDUtilityApp.WORKFLOW.DATA
{
public class FlowDecision : FlowBase
{
public FlowBase True { get; set; }
public FlowBase False { get; set; }
}
}

View File

@@ -0,0 +1,20 @@
using DDUtilityApp.DATA;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace DDUtilityApp.WORKFLOW.DATA
{
public class FlowStep : FlowBase
{
public DynamicActivity DynamicActivity { get; set; }
public FlowBase Next { get; set; }
}
}

View File

@@ -0,0 +1,61 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Xml;
using JWH;
namespace DDUtilityApp.WORKFLOW.DATA
{
public class Flowchart
{
public List<Parameter> Variables { get; set; } = new List<Parameter>();
public ViewState ViewState { get; set; }
public FlowBase StartNode { get; set; }
public string DisplayName { get; set; }
public Flowchart()
{
}
public Flowchart(XmlNode root)
{
//this.DisplayName = root.Attributes[$"DisplayName"].Value;
foreach(XmlAttribute attribute in root.Attributes)
if (string.Compare(attribute.Name, "DisplayName", true) == 0) this.DisplayName = attribute.Value;
// Variables
XmlNode nodeVariables = root.GetSingleNodeByName($"Flowchart.Variables");
if (nodeVariables != null)
{
Parameter[] variables = this.GetVariables(nodeVariables);
if (variables.Length > 0) this.Variables.AddRange(variables);
}
// ViewState
XmlNode nodeViewState = root.GetSingleNodeByName($"sap:WorkflowViewStateService.ViewState");
if (nodeViewState != null) this.ViewState = new ViewState(nodeViewState);
}
private Parameter[] GetVariables(XmlNode node)
{
List<Parameter> lstVariables = new List<Parameter>();
foreach (XmlNode nodeVariable in node.ChildNodes)
{
if (string.Compare(nodeVariable.Name, "Variable", true) != 0) continue;
Parameter variable = new Parameter(nodeVariable);
if (variable != null) lstVariables.Add(variable);
}
return lstVariables.ToArray();
}
}
}

View File

@@ -0,0 +1,33 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Xml;
namespace DDUtilityApp.WORKFLOW.DATA
{
public class Parameter
{
public string Name { get; set; }
public string Type { get; set; }
public Parameter()
{
}
public Parameter(XmlNode node)
{
foreach (XmlAttribute attribute in node.Attributes)
{
if (string.Compare(attribute.Name, "Name", true) == 0) this.Name = attribute.Value;
if (string.Compare(attribute.Name, "x:TypeArguments", true) == 0) this.Type = attribute.Value;
}
}
}
}

View File

@@ -0,0 +1,27 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Xml;
namespace DDUtilityApp.WORKFLOW.DATA
{
public class ViewState
{
public Dictionary<string, object> Dictionary { get; set; } = new Dictionary<string, object>();
public ViewState()
{
}
public ViewState(XmlNode node)
{
}
}
}