@@ -62,12 +62,8 @@ Method UserAction(Type As %Integer, Name As %String, InternalName As %String, Se
62
62
63
63
// Deal with Business Processes and Rules
64
64
// Note: Business Processes and Rules do not have a 'new document' User Action, and thus must be added like this
65
- if (('isInSourceControl ) && (##class (SourceControl.Git.Utils ).Type (InternalName ) = " cls" )) {
66
- set name = $piece (InternalName ," .CLS" ,1 )
67
- set exists = ##class (%Dictionary.CompiledClass ).%ExistsId (name )
68
- if (exists && ($classmethod (name ," %Extends" ," Ens.BusinessProcess" ) || $classmethod (name ," %Extends" ," Ens.Rule.Definition" ))) {
69
- do ..AddToSourceControl (InternalName )
70
- }
65
+ if (('isInSourceControl )) {
66
+ do ..CheckBusinessProcessesAndRules (InternalName )
71
67
}
72
68
73
69
if '$data (tAction ) {
@@ -382,6 +378,8 @@ Method OnAfterSave(InternalName As %String, Object As %RegisteredObject = {$$$NU
382
378
$$$ThrowOnError(##class (SourceControl.Git.Change ).SetUncommitted (filename , " edit" , InternalName , $username , " " , 1 , " " , " " , 0 ))
383
379
}
384
380
}
381
+ } else {
382
+ do ..CheckBusinessProcessesAndRules (InternalName )
385
383
}
386
384
}
387
385
} catch e {
@@ -546,4 +544,18 @@ Method CheckCommitterIdentity(Settings As SourceControl.Git.Settings, ByRef Acti
546
544
return 0
547
545
}
548
546
547
+ /// Deal with Business Processes and Rules
548
+ Method CheckBusinessProcessesAndRules (InternalName As %String ) As %Status
549
+ {
550
+ // Note: Business Processes and Rules are not added through normal user action processes because of upstream hook issues,
551
+ // so we have to add them like this
552
+ if (##class (SourceControl.Git.Utils ).Type (InternalName ) = " cls" ) {
553
+ set name = $piece (InternalName ," .CLS" ,1 )
554
+ set exists = ##class (%Dictionary.CompiledClass ).%ExistsId (name )
555
+ if (exists && ($classmethod (name ," %Extends" ," Ens.BusinessProcess" ) || $classmethod (name ," %Extends" ," Ens.Rule.Definition" ))) {
556
+ do ..AddToSourceControl (InternalName )
557
+ }
558
+ }
559
+ }
560
+
549
561
}
0 commit comments