-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathWorkFlowAction.cs
More file actions
93 lines (82 loc) · 2.95 KB
/
WorkFlowAction.cs
File metadata and controls
93 lines (82 loc) · 2.95 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
using System;
using System.Collections.Generic;
using System.Text;
using System.Xml;
namespace RustyLogic.RedDotNet
{
// TODO: FINISH CLASS - THIS VERSION IS ONLY AN OUTLINE DRAFT - NOT FOR USEAGE
public class WorkFlowAction : RedDotObject
{
// TODO: SPLIT OUT REACTIONS - SPLIT THIS CLASS INTO 2 - ACTIONS & REACTIONS
public enum ActionType
{
None = 0,
ContentWorkflow = 1115,
StructureWorkflow = 1116,
PageCreated_Action = 1120,
PageChanged_Action = 1125,
PageDeleted_Action = 1130,
PageConnectedToLink_Action = 1140,
PageDisconnectedFromLink_Action = 1145,
ReleasePage_Reaction = 1155,
ReleaseByWebComplianceManager_Reaction = 1156,
ReleaseOfAStructure_Reaction = 1157,
EmailNotification_Reaction = 1170,
PageForwarding_Reaction = 1175,
PageEscalated_Action = 1177,
StartPublication_Reaction = 1178,
PageReleased_Action = 1185,
PageRejected_Action = 1190,
PageTransferredToOtherLanguageVariants_Reaction = 1200,
AutomaticResubmission_Reaction = 1205,
PageTranslated_Action = 1210,
AssignKeywordToPage_Reaction = 1310,
AssignKeywordToStructureElement_Reaction = 1315,
PageAttachedToStructure_Reaction = 1340,
PageDisconnectedFromStructure_Reaction = 1345,
WriteWorkflowXmlFile = 1225
};
private string _value;
public string Name
{
get { return _value; }
set { _value = value; }
}
private ActionType _type;
public ActionType Type
{
get { return _type; }
set { _type = value; }
}
public string Path
{
get
{
string path = null;
if (_type == ActionType.WriteWorkflowXmlFile)
{
path = XmlNode.Attributes.GetNamedItem("path").Value;
}
return path;
}
}
internal WorkFlowAction(XmlNode xmlNode) : base(xmlNode) { }
internal WorkFlowAction(Guid guid) : base(guid) { }
protected override XmlNode LoadXml()
{
string rqlStatement =
"<IODATA>" +
"<WORKFLOW>" +
"WORKFLOWACTION action=\"load\" guid=\"" + GuidString + "\" />" +
"</WORKFLOW>" +
"</IODATA>";
xmlDoc.LoadXml(Session.Execute(rqlStatement));
return xmlDoc.GetElementsByTagName("WORKFLOWACTION")[0];
}
protected override void LoadBasics(XmlNode xmlNode)
{
_value = xmlNode.Attributes.GetNamedItem("value").Value;
_type = (ActionType)int.Parse(xmlNode.Attributes.GetNamedItem("elementtype").Value);
}
}
}