@@ -9,6 +9,7 @@ import { currentFile, notIsfs, openLowCodeEditors, outputChannel } from "../util
99export class LowCodeEditorProvider implements vscode . CustomTextEditorProvider {
1010 private readonly _rule : string = "/ui/interop/rule-editor" ;
1111 private readonly _dtl : string = "/ui/interop/dtl-editor" ;
12+ private readonly _bpl : string = "/ui/interop/bpl-editor" ;
1213
1314 private _errorMessage ( detail : string ) {
1415 return vscode . window
@@ -51,10 +52,11 @@ export class LowCodeEditorProvider implements vscode.CustomTextEditorProvider {
5152 // Check that the class exists on the server and is a rule or DTL class
5253 let webApp : string ;
5354 const queryData = await api . actionQuery (
54- "SELECT $LENGTH(rule.Name) AS Rule, $LENGTH(dtl.Name) AS DTL " +
55+ "SELECT $LENGTH(rule.Name) AS Rule, $LENGTH(dtl.Name) AS DTL, $LENGTH(bpl.Name) AS BPL " +
5556 "FROM %Dictionary.ClassDefinition AS dcd " +
5657 "LEFT OUTER JOIN %Dictionary.ClassDefinition_SubclassOf('Ens.Rule.Definition') AS rule ON dcd.Name = rule.Name " +
5758 "LEFT OUTER JOIN %Dictionary.ClassDefinition_SubclassOf('Ens.DataTransformDTL') AS dtl ON dcd.Name = dtl.Name " +
59+ "LEFT OUTER JOIN %Dictionary.ClassDefinition_SubclassOf('Ens.BusinessProcessBPL') AS bpl ON dcd.Name = bpl.Name " +
5860 "WHERE dcd.Name = ?" ,
5961 [ className ]
6062 ) ;
@@ -70,11 +72,20 @@ export class LowCodeEditorProvider implements vscode.CustomTextEditorProvider {
7072 ) ;
7173 }
7274 webApp = this . _dtl ;
75+ } else if ( queryData . result . content [ 0 ] . BPL ) {
76+ if ( lt ( api . config . serverVersion , "2026.1.0" ) ) {
77+ return this . _errorMessage (
78+ "Opening the BPL editor in VS Code requires InterSystems IRIS version 2026.1 or above."
79+ ) ;
80+ }
81+ webApp = this . _bpl ;
7382 } else {
74- // Class exists but is not a rule or DTL class
75- return this . _errorMessage ( `${ className } is neither a rule definition class nor a DTL transformation class.` ) ;
83+ // Class exists but is not a rule, BPL, or DTL class
84+ return this . _errorMessage (
85+ `${ className } is not a rule definition, DTL transformation, or BPL business process class.`
86+ ) ;
7687 }
77- sendLowCodeTelemetryEvent ( webApp == this . _rule ? "rule" : "dtl" , document . uri . scheme ) ;
88+ sendLowCodeTelemetryEvent ( webApp == this . _rule ? "rule" : webApp == this . _bpl ? "bpl" : "dtl" , document . uri . scheme ) ;
7889
7990 // Add this document to the Set of open low-code editors
8091 const documentUriString = document . uri . toString ( ) ;
@@ -103,9 +114,12 @@ export class LowCodeEditorProvider implements vscode.CustomTextEditorProvider {
103114 </head>
104115 <body>
105116 <div id="content">
106- <iframe id="editor" title="Low-Code Editor" src="${ targetOrigin } ${ api . config . pathPrefix } ${ webApp } /index.html?$NAMESPACE=${ api . config . ns . toUpperCase ( ) } &VSCODE=1${ ! vscode . workspace . fs . isWritableFileSystem ( document . uri . scheme ) ? "&READONLY=1" : "" } &${
107- webApp == this . _rule ? "rule" : "DTL"
108- } =${ className } " width="100%" height="100%" frameborder="0"></iframe>
117+ <iframe id="editor" title="Low-Code Editor" src="${ targetOrigin } ${ api . config . pathPrefix } ${ webApp } /index.html?${ [
118+ `$NAMESPACE=${ api . ns } ` ,
119+ "VSCODE=1" ,
120+ ...( ! vscode . workspace . fs . isWritableFileSystem ( document . uri . scheme ) ? [ "READONLY=1" ] : [ ] ) ,
121+ `${ webApp == this . _rule ? "rule" : webApp == this . _bpl ? "BP" : "DTL" } =${ className } ` ,
122+ ] . join ( "&" ) } " width="100%" height="100%" frameborder="0"></iframe>
109123 </div>
110124 <script>
111125 (function() {
0 commit comments