초기 커밋.
This commit is contained in:
23
DDUtilityApp/WORKFLOW/DATA/DynamicActivity.cs
Normal file
23
DDUtilityApp/WORKFLOW/DATA/DynamicActivity.cs
Normal 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; }
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
17
DDUtilityApp/WORKFLOW/DATA/FlowBase.cs
Normal file
17
DDUtilityApp/WORKFLOW/DATA/FlowBase.cs
Normal 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; }
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
19
DDUtilityApp/WORKFLOW/DATA/FlowDecision.cs
Normal file
19
DDUtilityApp/WORKFLOW/DATA/FlowDecision.cs
Normal 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; }
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
20
DDUtilityApp/WORKFLOW/DATA/FlowStep.cs
Normal file
20
DDUtilityApp/WORKFLOW/DATA/FlowStep.cs
Normal 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; }
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
61
DDUtilityApp/WORKFLOW/DATA/Flowchart.cs
Normal file
61
DDUtilityApp/WORKFLOW/DATA/Flowchart.cs
Normal 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();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
33
DDUtilityApp/WORKFLOW/DATA/Parameter.cs
Normal file
33
DDUtilityApp/WORKFLOW/DATA/Parameter.cs
Normal 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;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
27
DDUtilityApp/WORKFLOW/DATA/ViewState.cs
Normal file
27
DDUtilityApp/WORKFLOW/DATA/ViewState.cs
Normal 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)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user