@@ -8,19 +8,19 @@ import { FlowVariable } from "./FlowVariable";
88
99export class Flow {
1010 /**
11- * Metadata Tags of Salesforce Flow Elements
11+ * Metadata Tags of Salesforce Flow Attributes
1212 */
13- public static readonly FLOW_METADATA_TAGS = [
13+ public static readonly ATTRIBUTE_TAGS = [
1414 "description" , "apiVersion" , "processMetadataValues" , "processType" ,
1515 "interviewLabel" , "label" , "status" , "runInMode" , "startElementReference" ,
1616 "isTemplate" , "fullName" , "timeZoneSidKey" ,
1717 "isAdditionalPermissionRequiredToRun" , "migratedFromWorkflowRuleName" ,
1818 "triggerOrder" , "environments" , "segment" ,
1919 ] as const ;
2020 /**
21- * Categorized flow contents that should be used in the rule implementation
21+ * Metadata Tags of Salesforce Flow Nodes
2222 */
23- public static readonly FLOW_NODES = [
23+ public static readonly NODE_TAGS = [
2424 "actionCalls" ,
2525 "apexPluginCalls" ,
2626 "assignments" ,
@@ -41,11 +41,8 @@ export class Flow {
4141 "transforms" ,
4242 "customErrors" ,
4343 ] as const ;
44- public static readonly FLOW_RESOURCES = [ "textTemplates" , "stages" ] as const ;
45- public static readonly FLOW_VARIABLES = [ "choices" , "constants" , "dynamicChoiceSets" , "formulas" , "variables" ] as const ;
46- /**
47- * Categorized flow contents that should be used in the rule implementation
48- */
44+ public static readonly RESOURCE_TAGS = [ "textTemplates" , "stages" ] as const ;
45+ public static readonly VARIABLE_TAGS = [ "choices" , "constants" , "dynamicChoiceSets" , "formulas" , "variables" ] as const ;
4946 public elements ?: FlowElement [ ] ;
5047 public fsPath ?: string ;
5148 public uri ?: string ; // General source URI/path (file or virtual); set from constructor input
@@ -120,31 +117,31 @@ export class Flow {
120117 continue ;
121118 }
122119 const data = this . xmldata [ nodeType ] ;
123- if ( Flow . FLOW_METADATA_TAGS . includes ( nodeType as any ) ) {
120+ if ( Flow . ATTRIBUTE_TAGS . includes ( nodeType as any ) ) {
124121 if ( Array . isArray ( data ) ) {
125122 for ( const node of data ) {
126123 allNodes . push ( new FlowMetadata ( node . name , nodeType , node ) ) ;
127124 }
128125 } else {
129126 allNodes . push ( new FlowMetadata ( data . name , nodeType , data ) ) ;
130127 }
131- } else if ( Flow . FLOW_VARIABLES . includes ( nodeType as any ) ) {
128+ } else if ( Flow . VARIABLE_TAGS . includes ( nodeType as any ) ) {
132129 if ( Array . isArray ( data ) ) {
133130 for ( const node of data ) {
134131 allNodes . push ( new FlowVariable ( node . name , nodeType , node ) ) ;
135132 }
136133 } else {
137134 allNodes . push ( new FlowVariable ( data . name , nodeType , data ) ) ;
138135 }
139- } else if ( Flow . FLOW_NODES . includes ( nodeType as any ) ) {
136+ } else if ( Flow . NODE_TAGS . includes ( nodeType as any ) ) {
140137 if ( Array . isArray ( data ) ) {
141138 for ( const node of data ) {
142139 allNodes . push ( new FlowNode ( node . name , nodeType , node ) ) ;
143140 }
144141 } else {
145142 allNodes . push ( new FlowNode ( data . name , nodeType , data ) ) ;
146143 }
147- } else if ( Flow . FLOW_RESOURCES . includes ( nodeType as any ) ) {
144+ } else if ( Flow . RESOURCE_TAGS . includes ( nodeType as any ) ) {
148145 if ( Array . isArray ( data ) ) {
149146 for ( const node of data ) {
150147 allNodes . push ( new FlowResource ( node . name , nodeType , node ) ) ;
0 commit comments