From 8809f6f87b075d36a7b6af8c1160cfd1b9af256b Mon Sep 17 00:00:00 2001 From: Ester Uras Date: Mon, 31 Aug 2026 14:21:14 +0200 Subject: [PATCH 1/8] release notes --- .../releasenotes/studio-pro/web-extensibility-api.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/content/en/docs/releasenotes/studio-pro/web-extensibility-api.md b/content/en/docs/releasenotes/studio-pro/web-extensibility-api.md index e22b6fda12b..6cf99335727 100644 --- a/content/en/docs/releasenotes/studio-pro/web-extensibility-api.md +++ b/content/en/docs/releasenotes/studio-pro/web-extensibility-api.md @@ -8,6 +8,15 @@ numberless_headings: true These release notes cover changes to the [Extensibility API for Web Developers](/apidocs-mxsdk/apidocs/extensibility-api/). +## Version 11.15.0 +* We fixed an issue when creating or searching for `CustomBlobDocuments` would give unexpected results when called before the project was initialized. We added `projectOpened` and `projectClosing` events through the `studioPro.app.projectManager` api. We also added the method `getProjectMetadata`, allowing developers to know when the project is available in order to be able to create or query `CustomBlobDocuments`. +* We also added `projectClosing` event in the `studioPro.app.projectManager` api to allow the developer to perform any cleanup functions that were dependent on the current project. Both events contain the current open project as their payload. +* We fixed the issue that `CustomBlobDocumentApi` would return null when calling `getDocumentsOfType` when the project was not yet initialized. It now throws an error instead of returning null. Using `studioPro.app.projectManager.getProjectMetadata` will allow a developer to know when it is safe to call it. +* We added `javaActionQualifiedName` to the `CustomBlobDocumentRegistrationOptions`, which allows the Studio Pro user to link a blob document type to an existing `Java Action`, allowing the user to drag a `CustomBlobDocument` straight into a `Microflow` from the `App Explorer`, creating a new `JavaActionActivity` for the `CustomBlobDocument` type. +* We now make sure that two different extensions cannot use the same prefixes for their consistency error codes. +* We added readable names and descriptions for each permission that an extension requires in the Extensions Overview. +* We fixed a bug where `CustomBlobDocument` type names were not displayed as their registered type in the `Commit` pane in version controlled apps. + ## Version 11.13.0 * We updated the progress dialog cancellation behavior: the process now waits for the cancelled step to finish before resolving, rather than immediately returning a snapshot of the progress at the time of cancellation. A new `resolveImmediatelyOnCancel` parameter restores the previous behavior. From 5e9a0b358bab730ff7ee801be7a45c91a8feb0f9 Mon Sep 17 00:00:00 2001 From: Ester Uras Date: Mon, 31 Aug 2026 14:26:39 +0200 Subject: [PATCH 2/8] Add java actions for blobs documentation, plus some extra data in the blob documentaion --- .../consistency-checks.md | 2 + .../custom-blob-document-api.md | 41 ++- .../java-action-activities-blob-documents.md | 268 ++++++++++++++++++ 3 files changed, 309 insertions(+), 2 deletions(-) create mode 100644 content/en/docs/apidocs-mxsdk/apidocs/studio-pro-11/extensibility-api/web/web-extensions-howtos/java-action-activities-blob-documents.md diff --git a/content/en/docs/apidocs-mxsdk/apidocs/studio-pro-11/extensibility-api/web/web-extensions-howtos/consistency-checks.md b/content/en/docs/apidocs-mxsdk/apidocs/studio-pro-11/extensibility-api/web/web-extensions-howtos/consistency-checks.md index d216d63c0e6..7764516e68d 100644 --- a/content/en/docs/apidocs-mxsdk/apidocs/studio-pro-11/extensibility-api/web/web-extensions-howtos/consistency-checks.md +++ b/content/en/docs/apidocs-mxsdk/apidocs/studio-pro-11/extensibility-api/web/web-extensions-howtos/consistency-checks.md @@ -104,6 +104,8 @@ export const component: IComponent = { Every `errorCode` returned by your check function must be listed in `reservedErrorCodes`. You cannot use the Mendix reserved prefixes `cw`, `ce`, or `ci`during registration or the check will fail and a generic error message will appear in the **Errors** pane. +It is also not possible for your extension to use error codes that a different extension has already reserved. The api will also fail in that case. + {{< figure src="/attachments/apidocs-mxsdk/apidocs/extensibility-api/web/consistencyChecks/generic_error.png" alt="" >}} This error also appears if one of your checks throws an unexpected exception. To find out what the exception was, check the Mendix logs. diff --git a/content/en/docs/apidocs-mxsdk/apidocs/studio-pro-11/extensibility-api/web/web-extensions-howtos/custom-blob-document-api.md b/content/en/docs/apidocs-mxsdk/apidocs/studio-pro-11/extensibility-api/web/web-extensions-howtos/custom-blob-document-api.md index d28a3f5e511..54758529c93 100644 --- a/content/en/docs/apidocs-mxsdk/apidocs/studio-pro-11/extensibility-api/web/web-extensions-howtos/custom-blob-document-api.md +++ b/content/en/docs/apidocs-mxsdk/apidocs/studio-pro-11/extensibility-api/web/web-extensions-howtos/custom-blob-document-api.md @@ -19,6 +19,8 @@ Before starting this how-to, make sure you have completed the following prerequi Studio Pro allows you to extend its metamodel by adding custom document types. These documents can store arbitrary data that can be serialized as strings. When you register an editor (a user-defined UI component) for a specific document type, documents of that type appear in the UI alongside built-in document types such as constants, Java actions, and pages. They appear in the **New Document** and **Find Advanced** dialogs, context menus for adding documents, the App Explorer, and other UI elements that display Studio Pro documents. You can register custom editors to appear as tabs or as modal dialogs. +**It is also possible to add consistency checks and java action activities for Custom Blob Documents. Please see the respective tutorials at [Consistency Checks](/apidocs-mxsdk/apidocs/web-extensibility-api-11/consistency-checks/) and [Java Action Activities](/apidocs-mxsdk/apidocs/web-extensibility-api-11/java-action-activities-blob-documents/).** + ## Registering a New Document Type To register a new document type, do the following: @@ -28,7 +30,7 @@ To register a new document type, do the following: ```typescript {hl_lines=["8-24"]} import { IComponent, getStudioProApi } from "@mendix/extensions-api"; - import { personDarkThemeIcon, personDocumentType, personLightThemeIcon } from "../model/constants"; + import { personDarkThemeIcon, personDocumentType, personLightThemeIcon, personReadableDocumentType } from "../model/constants"; import { PersonInfo } from "../model/PersonInfo"; export const component: IComponent = { @@ -36,7 +38,7 @@ To register a new document type, do the following: const studioPro = getStudioProApi(componentContext); await studioPro.app.model.customBlobDocuments.registerDocumentType({ type: personDocumentType, - readableTypeName: 'Person', + readableTypeName: personReadableDocumentType, defaultContent: { firstName: '', lastName: '', @@ -60,6 +62,7 @@ To register a new document type, do the following: ```typescript export const personDocumentType = 'myextension.Person'; + export const personReadableDocumentType = 'Person'; export const personLightThemeIcon = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAGKADAAQAAAABAAAAGAAAAADiNXWtAAABKElEQVRIDd2Vyw3CMBBEAxIUAWVQBxIcKIBiuNAAFVAIV2iAA2cKoAGYF9nIctaxscIBRhrZ2Z3d9T9N8++YaoIb8ShexYcjfWz40FRhraib+MwQDdpijKXci7nEsZ8YYrOoSe6LEdsLpurFtW1yudiskjXPFSaHufGciFxwqZ9cLcJNWXnjAK2Zi7NdOsKcjlwdcIlygaV+crUIl8jbwnauj5F4CY2ujw0fmiTCAndDtXC2g+HzNq8JJVau9m2Jl+CkKAYxEbfi2ZE+Nnxo4jjeqQ5Sx3QnZThTH4gNX5yc7/cx9WLavovGKJfizJG+NXKSJy+afO2raI3oE1vyqaAA+OpjRwHWtqYIMdZekdMEUy15/NBkl8WsICMbz4ng2A3+y1TOH8ALNqHxhf/P+xwAAAAASUVORK5CYII='; export const personDarkThemeIcon = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAABHNCSVQICAgIfAhkiAAAAWdJREFUSIm1ljFuwkAQRd/giFTkABS5gMsolBRcIFBwCOTGNUfgDtDRJ9yDioaCKlJ8B0dYmyLjZGLtrh0Jj7SyNPP3f894dtbinHP0aIM+yQHuYkERuQdegDnwBIw1VABH4BV4c86VQRIXMGABXADXsi7AIsjjIR4AG0NwAnIgBUa6UvWdDG4DDLoI1OQlkAFJJMtEMWUtEhXQstTksxCxR2hmRP6UCwMamppnXcnN/sx8k6FPYGlqHixLRCAx32RZ++05mOtz65y7Btsu3I1XYNvgwmZwJty1XbNINYOzL4MxgIg8/Pftjb1bLmgZFSJSiAgiMvHEJhorYhxWoAY+Gt9RnyvP3lUDY/f+ipr67fmuX258U6ACPoEd8Kxrp74KmBp8rhz7H58JetsUWCtRcwZVwLqtTTsdNM3kAHzoOtg3V0z8oCmov1FhwP0NO93U77g2Qje5cETJvHaLKzMqcAvr/a/iC+JcVEP5CMhEAAAAAElFTkSuQmCC'; ``` @@ -267,6 +270,40 @@ In the next highlighted block, document contents are fetched whenever a new docu The code then provides a way to save changes. +### Creating a Document from Code {#creating-a-document-from-code} + +It is also possible to create a new document directly using the api, by using the `createDocument` method. It requires a container ID (a module or a folder), type, content, and the name of the actual document. It is important to remember that documents can only be created if the project is currently initialized. When an extension first load when the containing project gets opened, its database will not be built yet. After the extension updates and gets reloaded, it will be. So it is advisable to check if the project is currently available before creating (or updating) documents. + +```typescript +const project: ProjectMetadata | null = await studioPro.app.projectManager.getProjectMetadata(); + +if (project !== null){ + await studioPro.app.model.customBlobDocuments.createDocument({ + containerId: myModuleContainer.$ID, + type: personReadableDocumentType, + content: { + firstName: 'John', + lastName: 'Doe', + age: 30, + email: 'john.doe@info.com' + }, + documentName: "person_document" + }); +} +``` + +### Updating a Document from Code + +It is also possible to update an existing document from the api, using the `updateDocumentContent` method. It is also necessary for the project to be initialized, or the document will not be found. + +```typescript +const project: ProjectMetadata | null = await studioPro.app.projectManager.getProjectMetadata(); + +if (project !== null){ + await studioPro.app.model.customBlobDocuments.updateDocumentContent(documentId, newContent); +} +``` + ### Update Build and Manifest Files The highlighted text in `build-extension.mjs` and `manifest.json` shows the changes necessary to ensure the `editor` entry point builds and loads properly. diff --git a/content/en/docs/apidocs-mxsdk/apidocs/studio-pro-11/extensibility-api/web/web-extensions-howtos/java-action-activities-blob-documents.md b/content/en/docs/apidocs-mxsdk/apidocs/studio-pro-11/extensibility-api/web/web-extensions-howtos/java-action-activities-blob-documents.md new file mode 100644 index 00000000000..6972b0b98b8 --- /dev/null +++ b/content/en/docs/apidocs-mxsdk/apidocs/studio-pro-11/extensibility-api/web/web-extensions-howtos/java-action-activities-blob-documents.md @@ -0,0 +1,268 @@ +--- +title: "Java Action Activities for Custom Blob Documents" +linktitle: "Java Action Activities" +url: /apidocs-mxsdk/apidocs/web-extensibility-api-11/java-action-activities-blob-documents/ +description: "Describes how to allow a Custom Blob Document to have its own Java Action Activity in a Microflow" +--- + +## Introduction + +Java Actions can have Custom Blob documents as a parameter. It is possible to link that java action directly to a document type when the type is registered. This allows the user of Studio Pro to simply drag a blob document from the App Explorer directly into a Microflow, and a new Java Action Activity will be automatically generated with that exact Blob document as the parameter value for the Java Action. + +## Prerequisites + +* This how-to uses the results of [Get Started with the Web Extensibility API](/apidocs-mxsdk/apidocs/web-extensibility-api-11/getting-started/). Complete that how-to before starting this one. +* Familiarize yourself with creating custom documents as described in [Custom Blob Documents](/apidocs-mxsdk/apidocs/web-extensibility-api-11/custom-blob-document-api/). Also useful to know about [consistency checks for blob documents](/apidocs-mxsdk/apidocs/web-extensibility-api-11/consistency-checks/). + +## Registering a Custom Blob Document with a Java Action +If the Java Action which contains a Blob Document type as its parameter already exists in your solution, you can simply use its qualified name during the registration call of your Blob Document type. The registration method will trigger when the Studio Pro app opens and extensions get loaded, and the two will be linked. + +```typescript + async loaded(componentContext) { + const studioPro = getStudioProApi(componentContext); + await studioPro.app.model.customBlobDocuments.registerDocumentType({ + type: personDocumentType, + readableTypeName: 'Person', + defaultContent: { + firstName: '', + lastName: '', + age: 0, + email: '' + }, + javaActionQualifiedName: 'MyModule.MyJavaAction' + }); + + ... +} +``` + +If you want to create the Java Action that has your new Blob Document Type as a parameter at the same time as registering the document, you can do so like shown below, but be aware that the Java Action will be created every time your extension gets loaded. This code below is a simple example to show how to create a Java Action and assign its parameter types to a Blob Document type. + +```typescript + + async loaded(componentContext) { + const studioPro = getStudioProApi(componentContext); + + const moduleName = "MyModule"; + const javaActionName = "MyJavaAction"; + + await createJavaActionWithBlobDocumentParameter(studioPro, moduleName, javaActionName, personDocumentType, "Person"); + + await studioPro.app.model.customBlobDocuments.registerDocumentType({ + type: personDocumentType, + readableTypeName: 'Person', + defaultContent: { + firstName: '', + lastName: '', + age: 0, + email: '' + }, + javaActionQualifiedName: `${moduleName}.${javaActionName}` + }); + + ... +} + +async function createJavaActionWithBlobDocumentParameter(studioPro: StudioProApi, moduleName: string, javaActionName: string, customDocumentTypeName: string, customDocumentReadableTypeName: string) { + const module = await studioPro.app.model.modules.getModule(moduleName); + + if (!module) { + throw new Error(`Module was not found.`); + } + + const javaActions = studioPro.app.model.javaActions; + + const javaAction = await javaActions.createUnit(module.$ID, { + name: javaActionName + }); + + const parameterType = await javaActions.createElement( + "CodeActions$CustomBlobDocumentParameterType" + ); + + parameterType.customDocumentTypeName = customDocumentTypeName; + parameterType.customDocumentReadableTypeName = customDocumentReadableTypeName; + + const parameter = await javaActions.createElement("JavaActions$JavaActionParameter", { + name: "document" + }); + + parameter.actionParameterType = parameterType; + + javaAction.actionParameters.push(parameter); + + await javaActions.save(javaAction); + + return javaAction; +} + +``` + +### Limitations and Suggestions + +A Custom Blob Document and Java Action relationship is one to one. There can only be one Java Action per document type. If an extension tries to link a Java Action that is already linked to another type, the api will throw an error. +It is also advisable to write some [consistency checks](/apidocs-mxsdk/apidocs/web-extensibility-api-11/consistency-checks/) that detect when the Java Action is renamed or deleted, or its parameter types get changed by the user. So it is good practice to add the `javaActionQualifiedName` property to the contents of the Custom Blob Document as well, so that it is included in the document data when the consistency checks run. See below for a few sample consistency checks. + +### Sample type that keeps track of the java action name +```typescript +export type JavaActionDocument = { + javaActionQualifiedName: string | undefined; + renamedJavaActionQualifiedName?: string | undefined; + someValue?: string | undefined; +}; +``` + +### Consistency checks for lost action and parameter types +```typescript +const withJavaActionDocumentType = "myextension.JavaActionDocument"; + +const wrongActionParameterErrorCode = "WRNJAP"; +const noJavaActionErrorCode = "NOJAA"; +const wrongNamedJavaActionErrorCode = "WRNJAA"; +const reservedErrorCodes = [wrongActionParameterErrorCode, noJavaActionErrorCode, wrongNamedJavaActionErrorCode]; + +async function getConsistencyCheck(studioPro: StudioProApi) { + return async (data: JavaActionDocument) => { + const errors: ConsistencyError[] = []; + + if (!data.javaActionQualifiedName || data.javaActionQualifiedName.trim().length === 0) { + errors.push({ + errorCode: noJavaActionErrorCode, + errorDescription: `The Document of type ${withJavaActionDocumentType} must have a java action associated with it.`, + severity: "error", + elementText: "Parameter" + }); + } + + const [action] = await studioPro.app.model.javaActions.loadAll(unit => { + const name = `${unit.moduleName}.${unit.name}`; + return name === data.javaActionQualifiedName || name === data.renamedJavaActionQualifiedName; + }); + + const dependentElementIds: string[] = []; + + if (!action) { + errors.push({ + errorCode: noJavaActionErrorCode, + errorDescription: `The Document of type ${withJavaActionDocumentType} must have a java action associated with it.`, + severity: "error", + elementText: "Parameter" + }); + + return { + errors, + dependentElementIds + }; + } else dependentElementIds.push(action.$ID); // track the JavaAction as a dependency of this document. + + if (data.renamedJavaActionQualifiedName && data.renamedJavaActionQualifiedName !== data.javaActionQualifiedName) { + errors.push({ + errorCode: wrongNamedJavaActionErrorCode, + errorDescription: `The Java action was renamed from ${data.javaActionQualifiedName} to ${data.renamedJavaActionQualifiedName}.`, + severity: "error", + elementText: "Name" + }); + + return { + errors, + dependentElementIds + }; + } + + const blobDocumentParameters = action.actionParameters.filter( + parameter => parameter.actionParameterType.$Type === "CodeActions$CustomBlobDocumentParameterType" + ); + + const correctTypeParameter = blobDocumentParameters.filter( + parameter => + parameter.actionParameterType.$Type === "CodeActions$CustomBlobDocumentParameterType" && + parameter.actionParameterType.customDocumentTypeName === withJavaActionDocumentType + ); + + const wrongTypeParameter = blobDocumentParameters.filter( + parameter => + parameter.actionParameterType.$Type === "CodeActions$CustomBlobDocumentParameterType" && + parameter.actionParameterType.customDocumentTypeName !== withJavaActionDocumentType + ); + + if (correctTypeParameter.length !== 1 || wrongTypeParameter.length > 0) { + errors.push({ + errorCode: wrongActionParameterErrorCode, + errorDescription: `The Java Action "${data.javaActionQualifiedName}" must have a single parameter of type ${withJavaActionDocumentType}.`, + severity: "error", + elementText: "Parameter" + }); + } + + return { + errors, + dependentElementIds + }; + }; +} +``` + +### Tracking JavaAction renamed or re-added with same name after deletion + Using events from `studioPro.app.projectChanges` it is possible to know when the Java Action gets renamed or re-added with the same name: + + ```typescript + studioPro.app.projectChanges.addEventListener("elementsRenamed", async ({ elements }) => { + const javaActionsRenamed = elements.filter(element => element.documentType === "JavaActions$JavaAction"); + + const javaActionBlobDocuments = await studioPro.app.model.customBlobDocuments.getDocumentsOfType(withJavaActionDocumentType); + for (const doc of javaActionBlobDocuments) { + const d = await studioPro.app.model.customBlobDocuments.getDocumentById(doc.id); + + if ("document" in d && d.document) { + for (const javaActionRenamed of javaActionsRenamed) { + // renamed JavaAction's old name matches our JavaAction, so we track the new name. + if (javaActionRenamed.oldName.qualifiedName === d.document.contents.javaActionQualifiedName) { + d.document.contents.renamedJavaActionQualifiedName = javaActionRenamed.newName.qualifiedName; + + // always save the document so that the consistency checks run again + await studioPro.app.model.customBlobDocuments.updateDocumentContent(d.document.$ID, d.document.contents); + } + + // renamed JavaAction new name matches our name, we can stop tracking the rename + if (javaActionRenamed.newName.qualifiedName === d.document.contents.javaActionQualifiedName) { + d.document.contents.renamedJavaActionQualifiedName = undefined; + + // always save the document so that the consistency checks run again + await studioPro.app.model.customBlobDocuments.updateDocumentContent(d.document.$ID, d.document.contents); + } + } + } + } +}); + +studioPro.app.projectChanges.addEventListener("documentAdded", async ({ document }) => { + const javaActionDocuments = await studioPro.app.model.customBlobDocuments.getDocumentsOfType(withJavaActionDocumentType); + + for (const doc of javaActionDocuments) { + const d = await studioPro.app.model.customBlobDocuments.getDocumentById(doc.id); + + if ("document" in d && d.document) { + const javaAction = (await studioPro.app.model.javaActions.loadAll(ja => ja.$ID === document.documentId)).find( + ja => ja.$ID === document.documentId + ); + + if (javaAction) { + const qualifiedName = (javaAction as JavaActions.JavaAction & { $QualifiedName: string }).$QualifiedName; + + // new JavaAction is in fact our own + if (d.document.contents.javaActionQualifiedName === qualifiedName) { + d.document.contents.javaActionQualifiedName = qualifiedName; + d.document.contents.renamedJavaActionQualifiedName = undefined; + + // trigger the change to run consistency checks again, since this new + // action is probably missing the required parameters of the correct type. + await studioPro.app.model.customBlobDocuments.updateDocumentContent(d.document.$ID, d.document.contents); + } + } + } + } +}); + ``` +{{% alert color="info" %}} + Studio Pro does not track the deletion or renaming of Java Actions that are linked to Custom Blob Documents. So these consistency checks suggested here can help an extension developer handle those cases. It is important to remember that these code samples are simple examples meant to be used as a basis for your own production code. +{{% /alert %}} \ No newline at end of file From 034602c7e72fc98b4306e5585393ae1653b3eb29 Mon Sep 17 00:00:00 2001 From: Ester Uras Date: Mon, 31 Aug 2026 14:26:56 +0200 Subject: [PATCH 3/8] project-related apis documentation --- .../web/web-extensions-howtos/projects.md | 112 ++++++++++++++++++ 1 file changed, 112 insertions(+) create mode 100644 content/en/docs/apidocs-mxsdk/apidocs/studio-pro-11/extensibility-api/web/web-extensions-howtos/projects.md diff --git a/content/en/docs/apidocs-mxsdk/apidocs/studio-pro-11/extensibility-api/web/web-extensions-howtos/projects.md b/content/en/docs/apidocs-mxsdk/apidocs/studio-pro-11/extensibility-api/web/web-extensions-howtos/projects.md new file mode 100644 index 00000000000..713cfb3b9d9 --- /dev/null +++ b/content/en/docs/apidocs-mxsdk/apidocs/studio-pro-11/extensibility-api/web/web-extensions-howtos/projects.md @@ -0,0 +1,112 @@ +--- +title: "Project Related APIs" +linktitle: "Project related APIs" +url: /apidocs-mxsdk/apidocs/web-extensibility-api-11/projects/ +--- + +## Introduction + +This how-to describes the apis that allow the use to get information about the current project or document events. + +## Prerequisites + +{{% alert="info" %}} +If you are using Studio Pro 11.0–11.5 and your extension includes menus, your existing menu code will not work when you upgrade to Studio Pro 11.6. To restore full functionality and support, upgrade to the Extensibility API 11.6 and follow the steps in the [Migration Guide](/apidocs-mxsdk/apidocs/web-extensibility-api-11/migration-guide/). +{{% /alert%}} + +Before starting this how-to, complete the following prerequisites: + +* This how-to uses the results of [Get Started with the Web Extensibility API](/apidocs-mxsdk/apidocs/web-extensibility-api-11/getting-started/). Complete that how-to before starting this one. + +### IElementChangesApi + +This api provides some useful events that relate to elements (documents or entities). + +* documentsChanged +* documentAdded +* elementsRenamed + +| Event | Description | Payload | +|-----------------------|---------------------------------------------|------------------------------| +| `documentsChanged` | Contains a list of changed documents | Array of `DocumentInfo` | +| `documentAdded` | A single document that was added | A single `DocumentInfo` | +| `elementsRenamed` | Contains a list of renamed elements | Array of `ElementRenameInfo` | + +## DocumentInfo Properties + +| Property | Type | Description | +|----------------|--------|--------------------------------------------------------------------------------------| +| `documentId` | string | The ID of the document | +| `documentType` | string | The type of the document e.g. "Microflows$Microflow or "myExtension.MyBlobDocument" | +| `documentName` | string | The name of the document | +| `moduleName` | string | Optional name of the containing module. | + +## ElementRenameInfo Properties + +| Property | Type | Description | +|----------------|-------------|------------------------------------------------------| +| `oldName` | ElementName | The old name of the document | +| `newName` | ElementName | The new name of the document | +| `documentType` | string | The type of the document e.g. "Microflows$Microflow | + +## ElementName Properties + +| Property | Type | Description | +|------------------|--------|---------------------------------------------| +| `qualifiedName` | string | The qualified name of the document | +| `name` | string | The name of the document | + +These events can be very useful when working with [Consistency Checks](/apidocs-mxsdk/apidocs/web-extensibility-api-11/consistency-checks/) for Custom Blob Documents. + +## How to listen to an event + +```typescript +studioPro.app.projectChanges.addEventListener("documentsChanged", async ({ documents }) => { + ... +} +studioPro.app.projectChanges.addEventListener("documentAdded", async ({ document }) => { + ... +} +studioPro.app.projectChanges.addEventListener("elementsRenamed", async ({ elements }) => { + ... +} +``` + +### IPublicProjectManagerApi + +This api provides some useful events and methods that relate to the current Studio Pro project. + +* projectOpened +* projectClosing +* getProjectMetadata + +| Event | Description | Payload | +|-----------------------|------------------------------------------------------------|-------------------| +| `projectOpened` | Triggers when the project is initialized | `ProjectMetadata` | +| `projectClosing` | Triggers when the project is closing, unloading extensions | `ProjectMetadata` | + +## ProjectMetadata Properties + +| Property | Type | Description | +|----------------|--------|----------------------------------| +| `projectId` | string | The ID of the project | +| `projectFile` | string | The file path of the project | +| `projectName` | string | The name of the project | +| `caption` | string | The description of the project | + +These events can be very useful when working with [Consistency Checks](/apidocs-mxsdk/apidocs/web-extensibility-api-11/consistency-checks/) for Custom Blob Documents. + +## How to listen to an event + +```typescript +studioPro.app.projectManager.addEventListener("projectOpened", async ({ project }) => { + ... +} +studioPro.app.projectManager.addEventListener("projectClosing", async ({ project }) => { + ... +} +``` + +## Getting the Current Project + +This api also provides a method `getProjectMetadata` which can be used whenever an extension needs to perform an action that requires the project to be initialized, like [creating a blob document](/apidocs-mxsdk/apidocs/web-extensibility-api-11/custom-blob-document-api/{#creating-a-document-from-code}). It returns a `ProjectMetadata` object that can also be `null`. \ No newline at end of file From 4573ad2d2381b6f4956bfd3ba575a73a84e3f503 Mon Sep 17 00:00:00 2001 From: Quinn Tracy <142489060+quinntracy@users.noreply.github.com> Date: Thu, 10 Sep 2026 15:43:06 +0200 Subject: [PATCH 4/8] Review Consistency Checks --- .../web/web-extensions-howtos/consistency-checks.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/content/en/docs/apidocs-mxsdk/apidocs/studio-pro-11/extensibility-api/web/web-extensions-howtos/consistency-checks.md b/content/en/docs/apidocs-mxsdk/apidocs/studio-pro-11/extensibility-api/web/web-extensions-howtos/consistency-checks.md index 7764516e68d..847b3b151da 100644 --- a/content/en/docs/apidocs-mxsdk/apidocs/studio-pro-11/extensibility-api/web/web-extensions-howtos/consistency-checks.md +++ b/content/en/docs/apidocs-mxsdk/apidocs/studio-pro-11/extensibility-api/web/web-extensions-howtos/consistency-checks.md @@ -102,9 +102,7 @@ export const component: IComponent = { } ``` -Every `errorCode` returned by your check function must be listed in `reservedErrorCodes`. You cannot use the Mendix reserved prefixes `cw`, `ce`, or `ci`during registration or the check will fail and a generic error message will appear in the **Errors** pane. - -It is also not possible for your extension to use error codes that a different extension has already reserved. The api will also fail in that case. +Every `errorCode` returned by your check function must be listed in `reservedErrorCodes`. You cannot use the Mendix reserved prefixes `cw`, `ce`, or `ci` during registration, or the check will fail and a generic error message will appear in the **Errors** pane. In addition, error codes reserved by another extension cannot be reused, or the API will fail. {{< figure src="/attachments/apidocs-mxsdk/apidocs/extensibility-api/web/consistencyChecks/generic_error.png" alt="" >}} From 46d73c8bf3bad20ceed807f33783b2da35809be0 Mon Sep 17 00:00:00 2001 From: Quinn Tracy <142489060+quinntracy@users.noreply.github.com> Date: Thu, 10 Sep 2026 16:02:23 +0200 Subject: [PATCH 5/8] Review Custom Blob Documents --- .../web/web-extensions-howtos/custom-blob-document-api.md | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/content/en/docs/apidocs-mxsdk/apidocs/studio-pro-11/extensibility-api/web/web-extensions-howtos/custom-blob-document-api.md b/content/en/docs/apidocs-mxsdk/apidocs/studio-pro-11/extensibility-api/web/web-extensions-howtos/custom-blob-document-api.md index 54758529c93..7e3f95cd735 100644 --- a/content/en/docs/apidocs-mxsdk/apidocs/studio-pro-11/extensibility-api/web/web-extensions-howtos/custom-blob-document-api.md +++ b/content/en/docs/apidocs-mxsdk/apidocs/studio-pro-11/extensibility-api/web/web-extensions-howtos/custom-blob-document-api.md @@ -17,9 +17,7 @@ Before starting this how-to, make sure you have completed the following prerequi ## Custom Document Model -Studio Pro allows you to extend its metamodel by adding custom document types. These documents can store arbitrary data that can be serialized as strings. When you register an editor (a user-defined UI component) for a specific document type, documents of that type appear in the UI alongside built-in document types such as constants, Java actions, and pages. They appear in the **New Document** and **Find Advanced** dialogs, context menus for adding documents, the App Explorer, and other UI elements that display Studio Pro documents. You can register custom editors to appear as tabs or as modal dialogs. - -**It is also possible to add consistency checks and java action activities for Custom Blob Documents. Please see the respective tutorials at [Consistency Checks](/apidocs-mxsdk/apidocs/web-extensibility-api-11/consistency-checks/) and [Java Action Activities](/apidocs-mxsdk/apidocs/web-extensibility-api-11/java-action-activities-blob-documents/).** +Studio Pro allows you to extend its metamodel by adding custom document types. These documents can store arbitrary data that can be serialized as strings. When you register an editor (a user-defined UI component) for a specific document type, documents of that type appear in the UI alongside built-in document types such as constants, Java actions, and pages. They appear in the **New Document** and **Find Advanced** dialogs, context menus for adding documents, the App Explorer, and other UI elements that display Studio Pro documents. You can register custom editors to appear as tabs or as modal dialogs. You can also add [Consistency Checks](/apidocs-mxsdk/apidocs/web-extensibility-api-11/consistency-checks/) and [Java Action Activities](/apidocs-mxsdk/apidocs/web-extensibility-api-11/java-action-activities-blob-documents/) for custom blob documents. ## Registering a New Document Type @@ -272,7 +270,7 @@ The code then provides a way to save changes. ### Creating a Document from Code {#creating-a-document-from-code} -It is also possible to create a new document directly using the api, by using the `createDocument` method. It requires a container ID (a module or a folder), type, content, and the name of the actual document. It is important to remember that documents can only be created if the project is currently initialized. When an extension first load when the containing project gets opened, its database will not be built yet. After the extension updates and gets reloaded, it will be. So it is advisable to check if the project is currently available before creating (or updating) documents. +The `createDocument` method creates a new document and requires a container ID (a module or a folder), a type, content, and a document name. Documents can only be created when the project is initialized: when an extension first loads as its containing project opens, the project database is not yet built. It becomes available after the extension updates and reloads. Check that the project is available before creating or updating documents. ```typescript const project: ProjectMetadata | null = await studioPro.app.projectManager.getProjectMetadata(); From ab64f86ced8932934ebb2859f04a4d099e5ce3cb Mon Sep 17 00:00:00 2001 From: Quinn Tracy <142489060+quinntracy@users.noreply.github.com> Date: Thu, 10 Sep 2026 16:41:45 +0200 Subject: [PATCH 6/8] Review Java Action Activities --- .../java-action-activities-blob-documents.md | 36 +++++++++++-------- 1 file changed, 21 insertions(+), 15 deletions(-) diff --git a/content/en/docs/apidocs-mxsdk/apidocs/studio-pro-11/extensibility-api/web/web-extensions-howtos/java-action-activities-blob-documents.md b/content/en/docs/apidocs-mxsdk/apidocs/studio-pro-11/extensibility-api/web/web-extensions-howtos/java-action-activities-blob-documents.md index 6972b0b98b8..5c6b818c6b0 100644 --- a/content/en/docs/apidocs-mxsdk/apidocs/studio-pro-11/extensibility-api/web/web-extensions-howtos/java-action-activities-blob-documents.md +++ b/content/en/docs/apidocs-mxsdk/apidocs/studio-pro-11/extensibility-api/web/web-extensions-howtos/java-action-activities-blob-documents.md @@ -1,13 +1,13 @@ --- title: "Java Action Activities for Custom Blob Documents" linktitle: "Java Action Activities" -url: /apidocs-mxsdk/apidocs/web-extensibility-api-11/java-action-activities-blob-documents/ -description: "Describes how to allow a Custom Blob Document to have its own Java Action Activity in a Microflow" +url: /apidocs-mxsdk/apidocs/web-extensibility-api-11/java-action-activities/ +description: "Describes how to allow a Custom Blob Document to have its own Java Action activity in a microflow" --- ## Introduction -Java Actions can have Custom Blob documents as a parameter. It is possible to link that java action directly to a document type when the type is registered. This allows the user of Studio Pro to simply drag a blob document from the App Explorer directly into a Microflow, and a new Java Action Activity will be automatically generated with that exact Blob document as the parameter value for the Java Action. +Java Actions can have Custom Blob Documents as a parameter. You can link the Java Action directly to a document type when the type is registered. This allows the user to drag a Custom Blob Document from the **App Explorer** directly into a microflow, and a new Java Action Activity is automatically generated with that exact Blob Document as the parameter value for the Java Action. ## Prerequisites @@ -15,7 +15,8 @@ Java Actions can have Custom Blob documents as a parameter. It is possible to li * Familiarize yourself with creating custom documents as described in [Custom Blob Documents](/apidocs-mxsdk/apidocs/web-extensibility-api-11/custom-blob-document-api/). Also useful to know about [consistency checks for blob documents](/apidocs-mxsdk/apidocs/web-extensibility-api-11/consistency-checks/). ## Registering a Custom Blob Document with a Java Action -If the Java Action which contains a Blob Document type as its parameter already exists in your solution, you can simply use its qualified name during the registration call of your Blob Document type. The registration method will trigger when the Studio Pro app opens and extensions get loaded, and the two will be linked. + +If the Java Action that contains a Blob Document type as its parameter already exists in your extension, you can use its qualified name during the registration call of your Blob Document type. The registration method triggers when the app opens and extensions are loaded, linking the two. ```typescript async loaded(componentContext) { @@ -36,7 +37,7 @@ If the Java Action which contains a Blob Document type as its parameter already } ``` -If you want to create the Java Action that has your new Blob Document Type as a parameter at the same time as registering the document, you can do so like shown below, but be aware that the Java Action will be created every time your extension gets loaded. This code below is a simple example to show how to create a Java Action and assign its parameter types to a Blob Document type. +If you want to create the Java Action that has your new Blob Document Type as a parameter at the same time as registering the document, you can do so as shown below. However, be aware that the Java Action will be created every time your extension gets loaded. This code below is a simple example to show how to create a Java Action and assign its parameter types to a Blob Document type. ```typescript @@ -98,12 +99,8 @@ async function createJavaActionWithBlobDocumentParameter(studioPro: StudioProApi ``` -### Limitations and Suggestions - -A Custom Blob Document and Java Action relationship is one to one. There can only be one Java Action per document type. If an extension tries to link a Java Action that is already linked to another type, the api will throw an error. -It is also advisable to write some [consistency checks](/apidocs-mxsdk/apidocs/web-extensibility-api-11/consistency-checks/) that detect when the Java Action is renamed or deleted, or its parameter types get changed by the user. So it is good practice to add the `javaActionQualifiedName` property to the contents of the Custom Blob Document as well, so that it is included in the document data when the consistency checks run. See below for a few sample consistency checks. +### Sample Type That Keeps Track of the Java Action Name -### Sample type that keeps track of the java action name ```typescript export type JavaActionDocument = { javaActionQualifiedName: string | undefined; @@ -112,7 +109,7 @@ export type JavaActionDocument = { }; ``` -### Consistency checks for lost action and parameter types +### Consistency Checks for Lost Action and Parameter Types ```typescript const withJavaActionDocumentType = "myextension.JavaActionDocument"; @@ -202,8 +199,9 @@ async function getConsistencyCheck(studioPro: StudioProApi) { } ``` -### Tracking JavaAction renamed or re-added with same name after deletion - Using events from `studioPro.app.projectChanges` it is possible to know when the Java Action gets renamed or re-added with the same name: +### Tracking Java Action Renamed or Re-Added with Same Name After Deletion + +Using events from `studioPro.app.projectChanges`, you can track when a Java Action is renamed or re-added with the same name: ```typescript studioPro.app.projectChanges.addEventListener("elementsRenamed", async ({ elements }) => { @@ -263,6 +261,14 @@ studioPro.app.projectChanges.addEventListener("documentAdded", async ({ document } }); ``` + {{% alert color="info" %}} - Studio Pro does not track the deletion or renaming of Java Actions that are linked to Custom Blob Documents. So these consistency checks suggested here can help an extension developer handle those cases. It is important to remember that these code samples are simple examples meant to be used as a basis for your own production code. -{{% /alert %}} \ No newline at end of file +Studio Pro does not track the deletion or renaming of Java Actions that are linked to Custom Blob Documents. These consistency checks can help you handle those cases. These code samples are simple examples to use as a basis for your own production code. +{{% /alert %}} + + +## Limitations + +A Custom Blob Document and Java Action relationship is one-to-one. There can only be one Java Action per document type. If an extension tries to link a Java Action that is already linked to another type, the API will throw an error. + +It is recommended to write some [consistency checks](/apidocs-mxsdk/apidocs/web-extensibility-api-11/consistency-checks/) to detect when the Java Action is renamed or deleted, or when its parameter types change. Add the `javaActionQualifiedName` property to the Custom Blob Document contents so it is included in the document data when the consistency checks run. \ No newline at end of file From b77b4d4c41dfb2da4886978c6680214d154f9867 Mon Sep 17 00:00:00 2001 From: Quinn Tracy <142489060+quinntracy@users.noreply.github.com> Date: Fri, 11 Sep 2026 12:15:06 +0200 Subject: [PATCH 7/8] Review Projects API --- .../web/web-extensions-howtos/projects.md | 74 +++++++++---------- 1 file changed, 36 insertions(+), 38 deletions(-) diff --git a/content/en/docs/apidocs-mxsdk/apidocs/studio-pro-11/extensibility-api/web/web-extensions-howtos/projects.md b/content/en/docs/apidocs-mxsdk/apidocs/studio-pro-11/extensibility-api/web/web-extensions-howtos/projects.md index 713cfb3b9d9..b413a45bc13 100644 --- a/content/en/docs/apidocs-mxsdk/apidocs/studio-pro-11/extensibility-api/web/web-extensions-howtos/projects.md +++ b/content/en/docs/apidocs-mxsdk/apidocs/studio-pro-11/extensibility-api/web/web-extensions-howtos/projects.md @@ -6,7 +6,7 @@ url: /apidocs-mxsdk/apidocs/web-extensibility-api-11/projects/ ## Introduction -This how-to describes the apis that allow the use to get information about the current project or document events. +This how-to describes the APIs that allow users to get information about the current project or document events. ## Prerequisites @@ -14,51 +14,49 @@ This how-to describes the apis that allow the use to get information about the c If you are using Studio Pro 11.0–11.5 and your extension includes menus, your existing menu code will not work when you upgrade to Studio Pro 11.6. To restore full functionality and support, upgrade to the Extensibility API 11.6 and follow the steps in the [Migration Guide](/apidocs-mxsdk/apidocs/web-extensibility-api-11/migration-guide/). {{% /alert%}} -Before starting this how-to, complete the following prerequisites: - -* This how-to uses the results of [Get Started with the Web Extensibility API](/apidocs-mxsdk/apidocs/web-extensibility-api-11/getting-started/). Complete that how-to before starting this one. +This how-to uses the results of [Get Started with the Web Extensibility API](/apidocs-mxsdk/apidocs/web-extensibility-api-11/getting-started/). Complete that how-to before starting this one. ### IElementChangesApi -This api provides some useful events that relate to elements (documents or entities). +This API provides events that relate to elements (documents or entities). -* documentsChanged -* documentAdded -* elementsRenamed +* `documentsChanged` +* `documentAdded` +* `elementsRenamed` | Event | Description | Payload | |-----------------------|---------------------------------------------|------------------------------| -| `documentsChanged` | Contains a list of changed documents | Array of `DocumentInfo` | -| `documentAdded` | A single document that was added | A single `DocumentInfo` | -| `elementsRenamed` | Contains a list of renamed elements | Array of `ElementRenameInfo` | +| `documentsChanged` | Contains a list of changed documents. | Array of `DocumentInfo` | +| `documentAdded` | A single document that was added. | A single `DocumentInfo` | +| `elementsRenamed` | Contains a list of renamed elements. | Array of `ElementRenameInfo` | -## DocumentInfo Properties +## `DocumentInfo` Properties | Property | Type | Description | |----------------|--------|--------------------------------------------------------------------------------------| -| `documentId` | string | The ID of the document | -| `documentType` | string | The type of the document e.g. "Microflows$Microflow or "myExtension.MyBlobDocument" | -| `documentName` | string | The name of the document | +| `documentId` | string | The ID of the document. | +| `documentType` | string | The type of the document (for example, `Microflows$Microflow` or `myExtension.MyBlobDocument`). | +| `documentName` | string | The name of the document. | | `moduleName` | string | Optional name of the containing module. | -## ElementRenameInfo Properties +## `ElementRenameInfo` Properties | Property | Type | Description | |----------------|-------------|------------------------------------------------------| -| `oldName` | ElementName | The old name of the document | -| `newName` | ElementName | The new name of the document | -| `documentType` | string | The type of the document e.g. "Microflows$Microflow | +| `oldName` | ElementName | The old name of the document. | +| `newName` | ElementName | The new name of the document. | +| `documentType` | string | The type of the document (for example, `Microflows$Microflow`). | -## ElementName Properties +## `ElementName` Properties | Property | Type | Description | |------------------|--------|---------------------------------------------| -| `qualifiedName` | string | The qualified name of the document | -| `name` | string | The name of the document | +| `qualifiedName` | string | The qualified name of the document. | +| `name` | string | The name of the document. | -These events can be very useful when working with [Consistency Checks](/apidocs-mxsdk/apidocs/web-extensibility-api-11/consistency-checks/) for Custom Blob Documents. +These events are useful when working with [Consistency Checks](/apidocs-mxsdk/apidocs/web-extensibility-api-11/consistency-checks/) for Custom Blob Documents. -## How to listen to an event +## How to Listen to an Event ```typescript studioPro.app.projectChanges.addEventListener("documentsChanged", async ({ documents }) => { @@ -74,29 +72,29 @@ studioPro.app.projectChanges.addEventListener("elementsRenamed", async ({ elemen ### IPublicProjectManagerApi -This api provides some useful events and methods that relate to the current Studio Pro project. +This API provides events and methods that relate to the current Studio Pro project. -* projectOpened -* projectClosing -* getProjectMetadata +* `projectOpened` +* `projectClosing` +* `getProjectMetadata` | Event | Description | Payload | |-----------------------|------------------------------------------------------------|-------------------| -| `projectOpened` | Triggers when the project is initialized | `ProjectMetadata` | -| `projectClosing` | Triggers when the project is closing, unloading extensions | `ProjectMetadata` | +| `projectOpened` | Triggers when the project is initialized. | `ProjectMetadata` | +| `projectClosing` | Triggers when the project is closing, unloading extensions. | `ProjectMetadata` | -## ProjectMetadata Properties +## `ProjectMetadata` Properties | Property | Type | Description | |----------------|--------|----------------------------------| -| `projectId` | string | The ID of the project | -| `projectFile` | string | The file path of the project | -| `projectName` | string | The name of the project | -| `caption` | string | The description of the project | +| `projectId` | string | The ID of the project. | +| `projectFile` | string | The file path of the project. | +| `projectName` | string | The name of the project. | +| `caption` | string | The description of the project. | -These events can be very useful when working with [Consistency Checks](/apidocs-mxsdk/apidocs/web-extensibility-api-11/consistency-checks/) for Custom Blob Documents. +These events are useful when working with [Consistency Checks](/apidocs-mxsdk/apidocs/web-extensibility-api-11/consistency-checks/) for Custom Blob Documents. -## How to listen to an event +## How to Listen to an Event ```typescript studioPro.app.projectManager.addEventListener("projectOpened", async ({ project }) => { @@ -109,4 +107,4 @@ studioPro.app.projectManager.addEventListener("projectClosing", async ({ project ## Getting the Current Project -This api also provides a method `getProjectMetadata` which can be used whenever an extension needs to perform an action that requires the project to be initialized, like [creating a blob document](/apidocs-mxsdk/apidocs/web-extensibility-api-11/custom-blob-document-api/{#creating-a-document-from-code}). It returns a `ProjectMetadata` object that can also be `null`. \ No newline at end of file +This API provides a `getProjectMetadata` method that you can use whenever an extension needs to perform an action requiring an initialized project, such as [creating a blob document](/apidocs-mxsdk/apidocs/web-extensibility-api-11/custom-blob-document-api/{#creating-a-document-from-code}). It returns a `ProjectMetadata` object that can also be `null`. \ No newline at end of file From f070d0a8ee02806ceae995b1d0b11dd3cd7abc43 Mon Sep 17 00:00:00 2001 From: Quinn Tracy <142489060+quinntracy@users.noreply.github.com> Date: Fri, 11 Sep 2026 16:33:00 +0200 Subject: [PATCH 8/8] Revise API names and header nesting --- .../web/web-extensions-howtos/projects.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/content/en/docs/apidocs-mxsdk/apidocs/studio-pro-11/extensibility-api/web/web-extensions-howtos/projects.md b/content/en/docs/apidocs-mxsdk/apidocs/studio-pro-11/extensibility-api/web/web-extensions-howtos/projects.md index b413a45bc13..a03dda48062 100644 --- a/content/en/docs/apidocs-mxsdk/apidocs/studio-pro-11/extensibility-api/web/web-extensions-howtos/projects.md +++ b/content/en/docs/apidocs-mxsdk/apidocs/studio-pro-11/extensibility-api/web/web-extensions-howtos/projects.md @@ -16,7 +16,7 @@ If you are using Studio Pro 11.0–11.5 and your extension includes menus, your This how-to uses the results of [Get Started with the Web Extensibility API](/apidocs-mxsdk/apidocs/web-extensibility-api-11/getting-started/). Complete that how-to before starting this one. -### IElementChangesApi +## Element Changes API This API provides events that relate to elements (documents or entities). @@ -30,7 +30,7 @@ This API provides events that relate to elements (documents or entities). | `documentAdded` | A single document that was added. | A single `DocumentInfo` | | `elementsRenamed` | Contains a list of renamed elements. | Array of `ElementRenameInfo` | -## `DocumentInfo` Properties +### `DocumentInfo` Properties | Property | Type | Description | |----------------|--------|--------------------------------------------------------------------------------------| @@ -39,7 +39,7 @@ This API provides events that relate to elements (documents or entities). | `documentName` | string | The name of the document. | | `moduleName` | string | Optional name of the containing module. | -## `ElementRenameInfo` Properties +### `ElementRenameInfo` Properties | Property | Type | Description | |----------------|-------------|------------------------------------------------------| @@ -47,7 +47,7 @@ This API provides events that relate to elements (documents or entities). | `newName` | ElementName | The new name of the document. | | `documentType` | string | The type of the document (for example, `Microflows$Microflow`). | -## `ElementName` Properties +### `ElementName` Properties | Property | Type | Description | |------------------|--------|---------------------------------------------| @@ -56,7 +56,7 @@ This API provides events that relate to elements (documents or entities). These events are useful when working with [Consistency Checks](/apidocs-mxsdk/apidocs/web-extensibility-api-11/consistency-checks/) for Custom Blob Documents. -## How to Listen to an Event +### How to Listen to an Event ```typescript studioPro.app.projectChanges.addEventListener("documentsChanged", async ({ documents }) => { @@ -70,7 +70,7 @@ studioPro.app.projectChanges.addEventListener("elementsRenamed", async ({ elemen } ``` -### IPublicProjectManagerApi +## Project Manager API This API provides events and methods that relate to the current Studio Pro project. @@ -83,7 +83,7 @@ This API provides events and methods that relate to the current Studio Pro proje | `projectOpened` | Triggers when the project is initialized. | `ProjectMetadata` | | `projectClosing` | Triggers when the project is closing, unloading extensions. | `ProjectMetadata` | -## `ProjectMetadata` Properties +### `ProjectMetadata` Properties | Property | Type | Description | |----------------|--------|----------------------------------| @@ -94,7 +94,7 @@ This API provides events and methods that relate to the current Studio Pro proje These events are useful when working with [Consistency Checks](/apidocs-mxsdk/apidocs/web-extensibility-api-11/consistency-checks/) for Custom Blob Documents. -## How to Listen to an Event +### How to Listen to an Event ```typescript studioPro.app.projectManager.addEventListener("projectOpened", async ({ project }) => { @@ -105,6 +105,6 @@ studioPro.app.projectManager.addEventListener("projectClosing", async ({ project } ``` -## Getting the Current Project +### Getting the Current Project This API provides a `getProjectMetadata` method that you can use whenever an extension needs to perform an action requiring an initialized project, such as [creating a blob document](/apidocs-mxsdk/apidocs/web-extensibility-api-11/custom-blob-document-api/{#creating-a-document-from-code}). It returns a `ProjectMetadata` object that can also be `null`. \ No newline at end of file