From f8ee8bed1b21c9d52d792679a788975074a2ed27 Mon Sep 17 00:00:00 2001 From: Cristian-Venticinque Date: Mon, 20 Apr 2026 15:34:05 -0300 Subject: [PATCH 01/36] Fixing DW example --- modules/ROOT/pages/imp-implement-api-specs.adoc | 5 ++++- modules/ROOT/pages/tut-af-debug-am-flights.adoc | 5 ++++- modules/ROOT/pages/tut-af-implement-am-flights-api.adoc | 5 ++++- modules/ROOT/pages/tut-af-integrate-use-dataweave.adoc | 9 ++++++--- 4 files changed, 18 insertions(+), 6 deletions(-) diff --git a/modules/ROOT/pages/imp-implement-api-specs.adoc b/modules/ROOT/pages/imp-implement-api-specs.adoc index ad5d6362e..a4816a3cc 100644 --- a/modules/ROOT/pages/imp-implement-api-specs.adoc +++ b/modules/ROOT/pages/imp-implement-api-specs.adoc @@ -288,7 +288,7 @@ image::get-flights-select-listener.png["HTTP listener highlighted in the impleme --- payload map ( payload01 , indexOfPayload01 ) -> { ID: payload01.ID, - code: (payload01.code1 default "") ++ (payload01.code2 default ""), + code: (payload01.code1 as String default "") ++ (payload01.code2 as String default ""), price: payload01.price default 0, departureDate: payload01.takeOffDate as String default "", origin: payload01.fromAirport default "", @@ -307,6 +307,9 @@ image::get-flights-select-listener.png["HTTP listener highlighted in the impleme -- ==== ++ +NOTE: The `++` operator concatenates `String` values. The database connector can infer `code1` and `code2` as a non-`String` type (or as nullable). Use `as String` with `default ""` for each part so the transform matches the `departureDate` line in the same object, nulls are handled, and the `++` expression type-checks in the editor. ++ . In Anypoint Code Builder, open your `interface.xml` file. . Locate the `get:\flights:american-flights-api-config` flow: + diff --git a/modules/ROOT/pages/tut-af-debug-am-flights.adoc b/modules/ROOT/pages/tut-af-debug-am-flights.adoc index 0fb01716b..2a4bc1724 100644 --- a/modules/ROOT/pages/tut-af-debug-am-flights.adoc +++ b/modules/ROOT/pages/tut-af-debug-am-flights.adoc @@ -67,7 +67,7 @@ In the configuration XML, provide this `` configuration: --- payload map ( payload01 , indexOfPayload01 ) -> { ID: payload01.ID, - code: (payload01.code1 default "") ++ (payload01.code2 default ""), + code: (payload01.code1 as String default "") ++ (payload01.code2 as String default ""), price: payload01.price default 0, departureDate: payload01.takeOffDate as String default "", origin: payload01.fromAirport default "", @@ -95,6 +95,9 @@ In the configuration XML, provide this `` configuration: .. Set Variable component .. Logger component ==== ++ +NOTE: The `++` operator concatenates `String` values. The database connector can infer `code1` and `code2` as a non-`String` type (or as nullable). Use `as String` with `default ""` for each part so the transform matches the `departureDate` line in the same object, nulls are handled, and the `++` expression type-checks in the editor. ++ . Proceed to <>. + Learn to set up breakpoints to pause execution of your app. diff --git a/modules/ROOT/pages/tut-af-implement-am-flights-api.adoc b/modules/ROOT/pages/tut-af-implement-am-flights-api.adoc index 383010a0c..01b782f48 100644 --- a/modules/ROOT/pages/tut-af-implement-am-flights-api.adoc +++ b/modules/ROOT/pages/tut-af-implement-am-flights-api.adoc @@ -171,7 +171,7 @@ image::get-flights-select-listener.png["HTTP listener highlighted in the impleme --- payload map ( payload01 , indexOfPayload01 ) -> { ID: payload01.ID, - code: (payload01.code1 default "") ++ (payload01.code2 default ""), + code: (payload01.code1 as String default "") ++ (payload01.code2 as String default ""), price: payload01.price default 0, departureDate: payload01.takeOffDate as String default "", origin: payload01.fromAirport default "", @@ -190,6 +190,9 @@ image::get-flights-select-listener.png["HTTP listener highlighted in the impleme -- ==== ++ +NOTE: The `++` operator concatenates `String` values. The database connector can infer `code1` and `code2` as a non-`String` type (or as nullable). Use `as String` with `default ""` for each part so the transform matches the `departureDate` line in the same object, nulls are handled, and the `++` expression type-checks in the editor. ++ . In Anypoint Code Builder, open your `interface.xml` file. . Locate the `get:\flights:american-flights-api-config` flow: + diff --git a/modules/ROOT/pages/tut-af-integrate-use-dataweave.adoc b/modules/ROOT/pages/tut-af-integrate-use-dataweave.adoc index 89476774c..f99993d18 100644 --- a/modules/ROOT/pages/tut-af-integrate-use-dataweave.adoc +++ b/modules/ROOT/pages/tut-af-integrate-use-dataweave.adoc @@ -313,7 +313,7 @@ To find the required JSON structure, search for the JSON example under the GET m Use DataWeave to transform the response: -. In the configuration XML, replace the script within the `` with a DataWeave mapping: +. In the configuration XML, replace the script in the CDATA block (``) with a DataWeave mapping: + [source,xml] -- @@ -326,7 +326,7 @@ Use DataWeave to transform the response: --- payload map ( payload01 , indexOfPayload01 ) -> { ID: payload01.ID, - code: (payload01.code1 default "") ++ (payload01.code2 default ""), + code: (payload01.code1 as String default "") ++ (payload01.code2 as String default ""), price: payload01.price default 0, departureDate: payload01.takeOffDate as String default "", origin: payload01.fromAirport default "", @@ -342,6 +342,9 @@ Use DataWeave to transform the response: -- ++ +NOTE: The `++` operator concatenates `String` values. The database connector can infer `code1` and `code2` as a non-`String` type (or as nullable). Use `as String` with `default ""` for each part so the transform matches the `departureDate` line in the same object, nulls are handled, and the `++` expression type-checks in the editor. ++ . Review your configuration XML: + [source,xml] @@ -372,7 +375,7 @@ Use DataWeave to transform the response: --- payload map ( payload01 , indexOfPayload01 ) -> { ID: payload01.ID, - code: (payload01.code1 default "") ++ (payload01.code2 default ""), + code: (payload01.code1 as String default "") ++ (payload01.code2 as String default ""), price: payload01.price default 0, departureDate: payload01.takeOffDate as String default "", origin: payload01.fromAirport default "", From eb389075a7facd01fb51466725ea881e82c96f5e Mon Sep 17 00:00:00 2001 From: Cristian-Venticinque Date: Wed, 22 Apr 2026 15:05:51 -0300 Subject: [PATCH 02/36] Adding Salesforce connector example --- .../pages/_partials/acb-component-info.adoc | 110 +++++++++++++++++- .../pages/int-configure-components-add.adoc | 1 + 2 files changed, 106 insertions(+), 5 deletions(-) diff --git a/modules/ROOT/pages/_partials/acb-component-info.adoc b/modules/ROOT/pages/_partials/acb-component-info.adoc index 2a83c451c..6641a64ba 100644 --- a/modules/ROOT/pages/_partials/acb-component-info.adoc +++ b/modules/ROOT/pages/_partials/acb-component-info.adoc @@ -182,7 +182,7 @@ Includes On-Error Continue (``) and On-Error Propagate (` @@ -302,6 +304,104 @@ Your configuration XML file now looks similar to the following: ---- + +. Add another component to your flow. ++ +For example, add the *Create* operation from Anypoint Connector for Salesforce to insert an Account record. ++ +Use this pattern when your flow receives data through an HTTP Listener and must create Salesforce records. +If you completed the earlier steps that add *Set payload* with a fixed string, remove or replace that processor so you can shape the payload before *Create*. ++ +For more information about using *Create* with Account records, see xref:salesforce-connector::salesforce-connector-examples.adoc[]. ++ +.. In the configuration XML, add a global Salesforce connection element above your `` element (not inside the flow). ++ +Use configuration properties for credentials instead of literals; for example: ++ +[source,xml] +---- + + + +---- ++ +For more information about connection types and authentication fields, see xref:salesforce-connector::index.adoc[]. ++ +.. In the canvas, click the image:icon-plus.png["",15,15] (*Add component*) icon after *HTTP Listener*. +.. In the *Add Component* panel, search for *Set payload*, and add the component. +.. Configure *Set payload* with a DataWeave expression that builds a JSON object whose fields match your HTTP API (they need not match Salesforce field names yet). ++ +For example, use *fx* to enter DataWeave with `output application/json` and sample fields such as `companyName`, `industry`, and `phoneNumber`. ++ +Alternatively, add *Transform Message* and use the same DataWeave in ``. ++ +For more information about *Transform Message*, see xref:anypoint-code-builder::acb-component-transform.adoc[]. ++ +.. From the canvas, click the image:icon-plus.png["",15,15] (*Add component*) icon after *Set payload* (or *Transform Message*). +.. In the *Add Component* panel, click *Connectors*, select *Salesforce*, and select *Create*. +.. In the configuration panel for *Create*, set: ++ +-- +* *Connection config*: The global Salesforce configuration name (for example, `Salesforce_Config`). +* *Type*: `Account`. +* *Records*: A DataWeave expression that resolves to the records to create. ++ +If the incoming payload uses different property names than Salesforce expects, map those properties in *Records*, as shown in the configuration XML example that follows. +If the payload is already an array of Java objects with Salesforce field names (`output application/java`), you can use `#[payload]`. +-- ++ +[TIP] +==== +If *Type* stays empty until you establish a working Salesforce connection, set `type="Account"` on `` in the configuration XML. +For more information about connector fields for this operation, see xref:salesforce-connector::index.adoc[]. +==== ++ +[NOTE] +==== +Picklist fields such as *Industry* must use values that exist in your Salesforce organization. +==== ++ +The following configuration XML listens on `/accounts`, builds a JSON payload, maps it to Account fields inside ``, and calls *Create*. +Align `config-ref` on `` with the `name` of your `` (for example, `config-ref` from the earlier steps in this topic). ++ +[source,xml] +---- + + + + + + + + + + + + + #[%dw 2.0 +output application/java +--- +[{ + Name: payload.companyName, + Industry: payload.industry, + Phone: payload.phoneNumber +}]] + + + + +---- ++ +If the message payload is already an array of Java objects with Salesforce field names, you can omit `` and set *Records* to `#[payload]`, or use a self-closing `` element with that default. ++ +You can achieve the same result by adding *Transform Message* with `output application/java` followed by `` with *Records* set to `#[payload]`. // end::add-components[] // diff --git a/modules/ROOT/pages/int-configure-components-add.adoc b/modules/ROOT/pages/int-configure-components-add.adoc index 72887710b..fdf153bf4 100644 --- a/modules/ROOT/pages/int-configure-components-add.adoc +++ b/modules/ROOT/pages/int-configure-components-add.adoc @@ -1,5 +1,6 @@ = Adding a Component to Your Project :page-deployment-options: cloud-ide, desktop-ide +:open-config-xml: In the Explorer, open the configuration XML file for your project: include::reuse::partial$beta-banner.adoc[tag="anypoint-code-builder"] From ccb9b3689835165b50a69b966e8cd4da4b188130 Mon Sep 17 00:00:00 2001 From: Cristian-Venticinque Date: Thu, 23 Apr 2026 14:54:51 -0300 Subject: [PATCH 03/36] Adding new topic to cover JDBC Driver configuration Updated nav, created new topic with info from tutorial to fill a gap. Updated page aliases in preparation for the tutorial removal. --- modules/ROOT/nav.adoc | 3 +- .../ROOT/pages/int-configure-components.adoc | 1 + ...nt-configure-database-jdbc-dependency.adoc | 66 +++++++++++++++++++ .../tut-af-integrate-connect-to-a-db.adoc | 1 - 4 files changed, 69 insertions(+), 2 deletions(-) create mode 100644 modules/ROOT/pages/int-configure-database-jdbc-dependency.adoc diff --git a/modules/ROOT/nav.adoc b/modules/ROOT/nav.adoc index c0f703175..758ddf068 100644 --- a/modules/ROOT/nav.adoc +++ b/modules/ROOT/nav.adoc @@ -85,8 +85,9 @@ ** xref:int-configure-components.adoc[] *** xref:int-configure-components-add.adoc[] *** xref:int-configure-dw-expressions.adoc[] -*** xref:int-configure-components-check-connection.adoc[] *** xref:int-configure-components-import-connector-exchange.adoc[] +*** xref:int-configure-database-jdbc-dependency.adoc[] +*** xref:int-configure-components-check-connection.adoc[] *** xref:int-configure-components-open-from-xml.adoc[] ** xref:int-create-secure-configs.adoc[] ** xref:int-trigger-flows.adoc[] diff --git a/modules/ROOT/pages/int-configure-components.adoc b/modules/ROOT/pages/int-configure-components.adoc index 990c8b8fc..2abce4415 100644 --- a/modules/ROOT/pages/int-configure-components.adoc +++ b/modules/ROOT/pages/int-configure-components.adoc @@ -13,6 +13,7 @@ Common tasks include the following: * xref:int-configure-dw-expressions.adoc[Configure Expressions] * <> * <> +* xref:int-configure-database-jdbc-dependency.adoc[Add a JDBC driver for the Database connector] * <> == Before You Begin diff --git a/modules/ROOT/pages/int-configure-database-jdbc-dependency.adoc b/modules/ROOT/pages/int-configure-database-jdbc-dependency.adoc new file mode 100644 index 000000000..67c633119 --- /dev/null +++ b/modules/ROOT/pages/int-configure-database-jdbc-dependency.adoc @@ -0,0 +1,66 @@ += Add a JDBC Driver for the Database Connector +:page-deployment-options: cloud-ide, desktop-ide +:page-aliases: connect-to-a-db.adoc + +include::reuse::partial$beta-banner.adoc[tag="anypoint-code-builder"] + +When you use Anypoint Connector for Database with a JDBC database, add the JDBC driver to your project as a Maven dependency. Declare the driver as a *shared library* in the Mule Maven Plugin so the packaged application loads the driver correctly at runtime. + +The following steps use a MySQL driver as a concrete example. For other databases, substitute the `groupId`, `artifactId`, and `version` coordinates from your vendor documentation, and use the same `sharedLibraries` pattern with matching coordinates. + +[[add-jdbc-dependency]] +== Add the JDBC Driver Dependency + +. Open the *Explorer* view (Cmd+Shift+e on Mac, or Ctrl+Shift+e on Windows), and open the `pom.xml` file at the root of your project. +. Inside the `` element, add a dependency for the JDBC driver. ++ +The following example adds the MySQL Connector/J artifact: ++ +[source,xml] +---- + + mysql + mysql-connector-java + 8.0.29 + +---- ++ +image::add-mysql-driver-dependency.png["pom.xml with new dependency highlighted"] +. If Anypoint Code Builder prompts that a build file was modified and asks whether to synchronize the Java classpath or configuration, click *Yes*. + +[[declare-shared-library]] +== Declare the Driver as a Shared Library + +Register the same driver artifact in the `mule-maven-plugin` so Mule treats it as a shared library when packaging the app. + +. In `pom.xml`, locate the `` entry for `org.mule.tools.maven` / `mule-maven-plugin`. +. Update the `` element for that plugin. ++ +If the `mule-maven-plugin` uses an empty `` element, replace that element with a `` block that contains ``, as shown in the following example. +If `` already contains other elements, add the `` block from the example inside your existing `` element. Do not remove unrelated configuration. ++ +[source,xml] +---- + + org.mule.tools.maven + mule-maven-plugin + ${mule.maven.plugin.version} + true + + + + mysql + mysql-connector-java + + + + +---- ++ +The `groupId` and `artifactId` inside `` must match the JDBC dependency you added in <>. +. If you are prompted again to synchronize the Java classpath or configuration, click *Yes*. + +== See Also + +* xref:int-configure-components-check-connection.adoc[] +* xref:int-configure-components-import-connector-exchange.adoc[] diff --git a/modules/ROOT/pages/tut-af-integrate-connect-to-a-db.adoc b/modules/ROOT/pages/tut-af-integrate-connect-to-a-db.adoc index 80809e194..419b8effb 100644 --- a/modules/ROOT/pages/tut-af-integrate-connect-to-a-db.adoc +++ b/modules/ROOT/pages/tut-af-integrate-connect-to-a-db.adoc @@ -1,6 +1,5 @@ = Connecting to a Database from the App :page-deployment-options: cloud-ide, desktop-ide -:page-aliases: connect-to-a-db.adoc :page-pagination: include::reuse::partial$beta-banner.adoc[tag="anypoint-code-builder"] From 24c6b0564fe46cb55a6d5f21170510b48585a1c3 Mon Sep 17 00:00:00 2001 From: Cristian-Venticinque Date: Thu, 23 Apr 2026 15:04:08 -0300 Subject: [PATCH 04/36] Updating DW config topic to include Mapping fields info from the tutorial. --- .../pages/int-configure-dw-expressions.adoc | 91 ++++++++++++++++++- .../pages/tut-af-integrate-use-dataweave.adoc | 1 - 2 files changed, 89 insertions(+), 3 deletions(-) diff --git a/modules/ROOT/pages/int-configure-dw-expressions.adoc b/modules/ROOT/pages/int-configure-dw-expressions.adoc index 34eacad5d..06bd6ff3b 100644 --- a/modules/ROOT/pages/int-configure-dw-expressions.adoc +++ b/modules/ROOT/pages/int-configure-dw-expressions.adoc @@ -1,7 +1,11 @@ = Using DataWeave Expressions and Transformations in Anypoint Code Builder -:page-aliases: int-use-dw-to-transform-data.adoc, int-address-dw-errors.adoc, int-import-dw-libraries.adoc +:page-aliases: int-use-dw-to-transform-data.adoc, int-address-dw-errors.adoc, int-import-dw-libraries.adoc, use-dataweave.adoc -DataWeave is the MuleSoft programming language for data transformation and for defining expressions. Use DataWeave to process Mule event data, such as `payload`, `attributes`, and `vars`, in connector operations and other components. Develop DataWeave expressions and transformations in your Mule applications using the *Expression Field*, *Expression Builder*, or *Transformation Builder*, or by editing the configuration XML. Generate DataWeave transformations with AI help by providing input and output sample data, metadata, or both. AI-powered auto mapping provides comprehensive error feedback for GenAI actions, including authorization, metadata, and request limits, ensuring a more reliable and guided mapping experience. + + +DataWeave is the MuleSoft programming language for data transformation and for defining expressions. + +Use DataWeave to process Mule event data, such as `payload`, `attributes`, and `vars`, in connector operations and other components. Develop DataWeave expressions and transformations in your Mule applications using the *Expression Field*, *Expression Builder*, or *Transformation Builder*, or by editing the configuration XML. Generate DataWeave transformations with AI help by providing input and output sample data, metadata, or both. AI-powered auto mapping provides comprehensive error feedback for GenAI actions, including authorization, metadata, and request limits, ensuring a more reliable and guided mapping experience. image::int-dw-transform-ui.png["A configuration panel showing three numbered callouts: 1) fx button for Expression Field, 2) Expression Builder button, and 3) Transformation Builder button"] @@ -554,6 +558,87 @@ output application/json toUpper('hello')]" doc:name="Set payload" doc:id="xiyfpa" /> -- +[[map-payload-to-api-contract]] +== Map Payload Fields to Match Your API Specification + +Backend systems and databases often return JSON or Java objects whose field names and nesting do not match the body models defined in your REST API specification (RAML, OAS, or the examples published to Anypoint Exchange). Use a *Transform Message* component (``) with a DataWeave script so the Mule message payload matches what your API contract describes before the response leaves your flow. + +Use the response examples or data types from your API project, or open the published asset in Anypoint Exchange, as the source of truth for names, types, and structure. For help locating a published API in Exchange, see xref:des-publish-api-spec-to-exchange.adoc#locate-api[Locate Your API in Exchange]. + +Compare the *target* shape (contract) with the *source* shape (connector output). The following table illustrates a generic mismatch between an array of records from a connector and the array your API returns to clients. + +[%header,%autowidth.spread,cols="1a,1a"] +|=== +| Target structure (API example) | Source structure (example connector output) + +| +[source,json] +---- +[ + { + "recordId": "A-100", + "displayName": "Sample item", + "inStock": true + } +] +---- +| +[source,json] +---- +[ + { + "id": 100, + "title": "Sample item", + "qty": 12 + } +] +---- +|=== + +To reshape an array payload, use `map` with `default` (and casts as needed) so missing or null fields do not break the transform: + +. Add or open a *Transform Message* component after the operation that produces the payload you need to reshape (for example, after a database *Select*). +. In ``, set `output` to the same media type your API expects (often `application/json`). +. Map each source element to the contract fields. ++ +The following DataWeave example maps the generic source fields `id`, `title`, and `qty` to `recordId`, `displayName`, and `inStock`: ++ +[source,dataweave] +---- +%dw 2.0 +output application/json +--- +payload map (row) -> { + recordId: (row.id as String) default "", + displayName: row.title default "", + inStock: (row.qty default 0) > 0 +} +---- ++ +Embed the script in your configuration XML inside a CDATA block, for example: ++ +[source,xml] +---- + + + { + recordId: (row.id as String) default "", + displayName: row.title default "", + inStock: (row.qty default 0) > 0 +} + ]]> + + +---- + +For nested objects (for example, an address object with street and postal code), build nested objects on the right-hand side of the mapping using `{ }` and map each child field explicitly. For concatenated or derived fields, use string concatenation, `++`, or other DataWeave functions as needed. + +After you implement an API with a separate interface and implementation layer, keep the transform aligned with the specification your interface enforces. For the scaffolding workflow, see xref:imp-implement-api-specs.adoc[]. + [[import-library]] == Import a DataWeave Library @@ -589,4 +674,6 @@ When complete, Anypoint Code Builder shows a message that the dependency was suc * xref:int-debug-mule-apps.adoc[] * xref:troubleshoot-dataweave.adoc[] * xref:int-create-integrations.adoc#add-components[Add a Component to Your Project] +* xref:imp-implement-api-specs.adoc[] +* xref:des-publish-api-spec-to-exchange.adoc#locate-api[Locate Your API in Exchange] * xref:acb-reference.adoc[] diff --git a/modules/ROOT/pages/tut-af-integrate-use-dataweave.adoc b/modules/ROOT/pages/tut-af-integrate-use-dataweave.adoc index 89476774c..0ab533a15 100644 --- a/modules/ROOT/pages/tut-af-integrate-use-dataweave.adoc +++ b/modules/ROOT/pages/tut-af-integrate-use-dataweave.adoc @@ -1,6 +1,5 @@ = Transforming Flight Data with DataWeave :page-deployment-options: cloud-ide, desktop-ide -:page-aliases: use-dataweave.adoc :page-pagination: include::reuse::partial$beta-banner.adoc[tag="anypoint-code-builder"] From 07f195e2560f5058e8504a3a1d550daf8e99df64 Mon Sep 17 00:00:00 2001 From: Cristian-Venticinque Date: Thu, 23 Apr 2026 15:34:13 -0300 Subject: [PATCH 05/36] Adding Create REST API Spec section using info from tutorial. --- modules/ROOT/pages/des-create-api-specs.adoc | 68 +++++++++++++++++++- 1 file changed, 65 insertions(+), 3 deletions(-) diff --git a/modules/ROOT/pages/des-create-api-specs.adoc b/modules/ROOT/pages/des-create-api-specs.adoc index bc465be3d..f1f41e512 100644 --- a/modules/ROOT/pages/des-create-api-specs.adoc +++ b/modules/ROOT/pages/des-create-api-specs.adoc @@ -8,14 +8,15 @@ Use Anypoint Code Builder to create, import, and test API specs before publishin . Create a API spec project in Anypoint Code Builder from the IDE or by importing the spec from MuleSoft VCS: -* <> +* <> (example uses OAS 3.0 (YAML)) +* <> * <> . <>. . <>. . <>. -Use the <> API spec to explore the functionality of Anypoint Code Builder. +Use the <> API spec to explore the functionality of Anypoint Code Builder with OAS, or follow <> for a RAML-first project. == Before You Begin @@ -79,6 +80,67 @@ image::des-oas-create.png[New OAS 3.0 (YAML) API project] + As you enter elements, use xref:start-discover-ui.adoc#auto-complete[auto-complete] (or press Ctrl+Space) to display available options within the context. +[[create-raml-rest-api-spec]] +== Create a REST API Specification Using RAML 1.0 + +To create a REST API specification project that uses RAML 1.0: + +// Open the ACB IDE +include::partial$acb-reusable-steps.adoc[tags="open-ide"] ++ +image::anypoint-code-builder-view.png["Anypoint Code Builder icon highlighted in the activity bar"] +. From *Create*, click *Design an API*: ++ +image::design-api-1.png["*Design an API* link highlighted in the *Create* section"] + +. Complete the *API Specification* form: ++ +[%header,cols="20a,60a"] +|=== +| Field Name | Field Value + +| *Project Name* | Unique name for your project. + +This name is used as the API spec title in Exchange, the name of the spec file, and the name of the project's root directory. + +include::partial$acb-reusable-steps.adoc[tags=no-project-name-reuse] +| *Project Location* | Your home directory or another directory you create. + +See xref:start-add-folders.adoc[]. + +include::partial$acb-reusable-steps.adoc[tags=proj-directory-warn] +| *API Type* | *REST API* + +| *API Specification Language* | *RAML 1.0* + +Anypoint Code Builder also supports *RAML 0.8* and OAS formats. For the full list, see xref:des-designing-api-specs.adoc#supported-spec-languages[Supported OAS and RAML Versions]. +|=== +. Click *Create Project*. ++ +If prompted, trust the authors of the files in the folder. ++ +When the project is ready for editing, the API project opens your root RAML file in the Editor view. The file name matches the project name you provided (for example, `my-inventory-api.raml`). +. Continue designing your RAML spec in the Editor view. ++ +Use xref:start-discover-ui.adoc#auto-complete[auto-complete] (Ctrl+Space or Cmd+Space) to add resources, methods, traits, and other RAML constructs in context. ++ +To add reusable data types and examples from Anypoint Exchange, add fragment dependencies to the project and reference them with `!include` directives in RAML. For step-by-step procedures, see xref:des-create-api-fragments.adoc[]. ++ +When you want to try requests against your examples, <> and <> the same way you do for OAS projects. + +.Optional starter RAML for a `/items` resource +[%collapsible] +==== +[source,raml,linenums] +---- +#%RAML 1.0 +title: Example Items API + +/items: + get: + description: List items +---- +==== + [[import-spec]] == Import an API Specification from MuleSoft VCS @@ -288,6 +350,6 @@ If you created an OAS 3.0 (YAML) project, you can replace the initial spec with * xref:tutorials.adoc[] * xref:access-management::business-groups.adoc[] * xref:start-discover-ui.adoc#use-autocomplete[Use Auto-Complete in the Editors] -* xref:tut-af-design-am-flights-api.adoc[] Tutorial +* xref:des-create-api-fragments.adoc[] * xref:des-delete-api-projects.adoc[] * xref:start-workspaces.adoc[] \ No newline at end of file From afa8ac81b5ba4e1ef7c0f67e984777694c0cdb0b Mon Sep 17 00:00:00 2001 From: Cristian-Venticinque Date: Thu, 23 Apr 2026 16:00:56 -0300 Subject: [PATCH 06/36] Adding info about Watching Payload media type in Debugging topic. Updating aliases for tutorial removal --- modules/ROOT/pages/int-debug-mule-apps.adoc | 30 ++++++++++++++++++- .../ROOT/pages/tut-af-debug-am-flights.adoc | 1 - 2 files changed, 29 insertions(+), 2 deletions(-) diff --git a/modules/ROOT/pages/int-debug-mule-apps.adoc b/modules/ROOT/pages/int-debug-mule-apps.adoc index 1e8b1e017..535eed6be 100644 --- a/modules/ROOT/pages/int-debug-mule-apps.adoc +++ b/modules/ROOT/pages/int-debug-mule-apps.adoc @@ -1,6 +1,6 @@ = Debugging Mule Applications :page-deployment-options: cloud-ide, desktop-ide -:page-aliases: debug-add-breakpoint.adoc, debug-add-components.adoc, debug-run-debug-sessions.adoc, debug-a-mule-application.adoc, debugging-mule-apps.adoc +:page-aliases: debug-add-breakpoint.adoc, debug-add-components.adoc, debug-add-logger-set-variables.adoc, debug-run-debug-sessions.adoc, debug-a-mule-application.adoc, debugging-mule-apps.adoc include::reuse::partial$beta-banner.adoc[tag="anypoint-code-builder"] @@ -21,6 +21,8 @@ Breakpoints are markers that you add on line numbers in a configuration XML file + For example, trigger an HTTP Listener or configure a Scheduler component. . When the execution stops at a breakpoint, use the <> to navigate, inspect, and fix issues. ++ +To compare payload media type before and after a Transform Message component, see <>. . After addressing an issue at a breakpoint, redeploy (<>) the running instance of your application. . Execute your flow again, and continue debugging until you address all issues. . <>. @@ -53,6 +55,32 @@ Keyboard shortcut: Cmd+Shift+d (Mac) or Ctrl+Shift+d (Windows) . *Breakpoint* icon: Identifies a line in the configuration XML to pause execution of the flow so that you can check for and fix any issues. . *Breakpoint* icon: Identifies a component that contains one or more breakpoints. +[[watch-payload-mediatype]] +== Watch the Payload Media Type Around a Transform + +When a *Transform Message* component (``) converts the Mule message payload, the effective media type string often changes. For example, data coming from a Java-based connector can appear as `application/java` before the transform and as `application/json` after you set `output application/json` in DataWeave. + +The DataWeave metadata accessor `^mediaType` on `payload` exposes that type string while you debug. + +To watch the value change: + +. <>, and trigger a flow that includes a Transform Message component after a connector or other operation that produces a payload you transform. +. Pause execution on a breakpoint *before* the Transform Message component (for example, on a database Select or Set Variable component that precedes the transform in the same flow). +. In the *Run and Debug* sidebar, open the *Watch* panel. +. Click the *+* icon and add this expression: ++ +[source,text] +---- +payload.^mediaType +---- ++ +image::tut-debug-mediatype-java.png["The Watch panel displaying a payload type of application/java"] +. On the <>, click *Step Over* until execution advances to or through the Transform Message component. +. Notice how the watch expression updates after the transform sets the new output format, for example: ++ +image::tut-debug-mediatype-json.png["The Watch panel displaying a payload type of application/json"] + +For DataWeave transformations and expressions, see xref:int-configure-dw-expressions.adoc[]. [[add-breakpoint]] == Add a Breakpoint diff --git a/modules/ROOT/pages/tut-af-debug-am-flights.adoc b/modules/ROOT/pages/tut-af-debug-am-flights.adoc index 0fb01716b..9a33292ba 100644 --- a/modules/ROOT/pages/tut-af-debug-am-flights.adoc +++ b/modules/ROOT/pages/tut-af-debug-am-flights.adoc @@ -1,6 +1,5 @@ = Debugging the American Flights App :page-deployment-options: cloud-ide, desktop-ide -:page-aliases: debug-add-logger-set-variables.adoc :page-pagination: include::reuse::partial$beta-banner.adoc[tag="anypoint-code-builder"] From 597c1da36ea3eb06394a37d26a3467cfc96a5f67 Mon Sep 17 00:00:00 2001 From: Cristian-Venticinque Date: Thu, 23 Apr 2026 16:55:18 -0300 Subject: [PATCH 07/36] Adding documentation path in replacement of the tutorial. Fixing title case --- .../ROOT/pages/des-create-api-fragments.adoc | 2 +- modules/ROOT/pages/des-create-api-specs.adoc | 2 +- modules/ROOT/pages/imp-implementing-apis.adoc | 2 +- .../ROOT/pages/int-configure-components.adoc | 2 +- ...nt-configure-database-jdbc-dependency.adoc | 2 +- .../pages/int-configure-dw-expressions.adoc | 4 ++-- modules/ROOT/pages/int-debug-mule-apps.adoc | 2 +- modules/ROOT/pages/int-trigger-flows.adoc | 2 +- modules/ROOT/pages/tutorials.adoc | 24 ++++++++++++++++++- 9 files changed, 32 insertions(+), 10 deletions(-) diff --git a/modules/ROOT/pages/des-create-api-fragments.adoc b/modules/ROOT/pages/des-create-api-fragments.adoc index a0686b4df..b43ea430f 100644 --- a/modules/ROOT/pages/des-create-api-fragments.adoc +++ b/modules/ROOT/pages/des-create-api-fragments.adoc @@ -41,7 +41,7 @@ Before adding fragments: * xref:start-acb.adoc[Set up and access the web or desktop IDE]. * Understand the basics of designing API specifications. + -See the xref:tutorials.adoc[] for details. +To see where adding fragments fits in the journey from API design through deployment, see xref:tutorials.adoc#modular-learning-paths[Take Your API Specification from Design Through Deployment in Mule]. * Have some familiarity with xref:access-management::business-groups.adoc[business groups]. + When you publish your API fragment to Exchange from Anypoint Code Builder, the IDE requests the name of the business group. See xref:access-management::business-groups.adoc[]. diff --git a/modules/ROOT/pages/des-create-api-specs.adoc b/modules/ROOT/pages/des-create-api-specs.adoc index f1f41e512..8fa3f96f1 100644 --- a/modules/ROOT/pages/des-create-api-specs.adoc +++ b/modules/ROOT/pages/des-create-api-specs.adoc @@ -16,7 +16,7 @@ Use Anypoint Code Builder to create, import, and test API specs before publishin . <>. . <>. -Use the <> API spec to explore the functionality of Anypoint Code Builder with OAS, or follow <> for a RAML-first project. +Use the <> API spec to explore the functionality of Anypoint Code Builder with OAS, or see <> for a RAML-first project. == Before You Begin diff --git a/modules/ROOT/pages/imp-implementing-apis.adoc b/modules/ROOT/pages/imp-implementing-apis.adoc index c0dff277a..9da3596ca 100644 --- a/modules/ROOT/pages/imp-implementing-apis.adoc +++ b/modules/ROOT/pages/imp-implementing-apis.adoc @@ -20,7 +20,7 @@ The methods for implementing APIs using Anypoint Code Builder are: // TODO: Include a link to gRPC Connector docs. * xref:imp-implement-local-apis.adoc[Scaffold an API] into an implementation project without first publishing it to Anypoint Exchange, enabling iterative design and implementation. -After scaffolding an API specification into an interface, you are ready to develop, test, and deploy your Mule app as described in xref:int-developing-integrations.adoc[]. To understand how an integration project can implement an API specification, see the tutorial xref:tut-af-implement-am-flights-api.adoc[]. +After scaffolding an API specification into an interface, you are ready to develop, test, and deploy your Mule app as described in xref:int-developing-integrations.adoc[]. For the ordered topics from API design through deployment, see xref:tutorials.adoc#modular-learning-paths[Take Your API Specification from Design Through Deployment. == Source Control for Implementation Projects diff --git a/modules/ROOT/pages/int-configure-components.adoc b/modules/ROOT/pages/int-configure-components.adoc index 2abce4415..a49d862a6 100644 --- a/modules/ROOT/pages/int-configure-components.adoc +++ b/modules/ROOT/pages/int-configure-components.adoc @@ -13,7 +13,7 @@ Common tasks include the following: * xref:int-configure-dw-expressions.adoc[Configure Expressions] * <> * <> -* xref:int-configure-database-jdbc-dependency.adoc[Add a JDBC driver for the Database connector] +* xref:int-configure-database-jdbc-dependency.adoc[Add a JDBC Driver for the Database Connector] * <> == Before You Begin diff --git a/modules/ROOT/pages/int-configure-database-jdbc-dependency.adoc b/modules/ROOT/pages/int-configure-database-jdbc-dependency.adoc index 67c633119..3a0e8b690 100644 --- a/modules/ROOT/pages/int-configure-database-jdbc-dependency.adoc +++ b/modules/ROOT/pages/int-configure-database-jdbc-dependency.adoc @@ -1,4 +1,4 @@ -= Add a JDBC Driver for the Database Connector += Adding a JDBC Driver for the Database Connector :page-deployment-options: cloud-ide, desktop-ide :page-aliases: connect-to-a-db.adoc diff --git a/modules/ROOT/pages/int-configure-dw-expressions.adoc b/modules/ROOT/pages/int-configure-dw-expressions.adoc index 06bd6ff3b..0f69de369 100644 --- a/modules/ROOT/pages/int-configure-dw-expressions.adoc +++ b/modules/ROOT/pages/int-configure-dw-expressions.adoc @@ -569,7 +569,7 @@ Compare the *target* shape (contract) with the *source* shape (connector output) [%header,%autowidth.spread,cols="1a,1a"] |=== -| Target structure (API example) | Source structure (example connector output) +| Target Structure (API example) | Source structure (example connector output) | [source,json] @@ -619,7 +619,7 @@ Embed the script in your configuration XML inside a CDATA block, for example: + [source,xml] ---- - + >, and trigger a flow that includes a Transform Message component after a connector or other operation that produces a payload you transform. +. <>, and trigger a flow that includes a Transform Message component after a connector or other operation that produces a payload you transform. . Pause execution on a breakpoint *before* the Transform Message component (for example, on a database Select or Set Variable component that precedes the transform in the same flow). . In the *Run and Debug* sidebar, open the *Watch* panel. . Click the *+* icon and add this expression: diff --git a/modules/ROOT/pages/int-trigger-flows.adoc b/modules/ROOT/pages/int-trigger-flows.adoc index e4b2fa8f1..0be710cbc 100644 --- a/modules/ROOT/pages/int-trigger-flows.adoc +++ b/modules/ROOT/pages/int-trigger-flows.adoc @@ -16,7 +16,7 @@ A *Scheduler*, a *Flow Ref*, or any connector trigger or message source can init * Complete xref:start-acb.adoc[] for your IDE. * Make sure an integration or implementation project with an HTTP Listener (``) is available from the cloud or desktop IDE. + -To create a project, see xref:int-create-integrations.adoc[] or xref:imp-implementing-apis.adoc[], or follow the procedures in the tutorial xref:tut-af-amflights-overview.adoc[]. +To create a project, see xref:int-create-integrations.adoc[] or xref:imp-implementing-apis.adoc[], or follow xref:tutorials.adoc#modular-learning-paths[Take Your API Specification from Design Through Deployment]. [[trigger-urls]] == URLs for Triggering a Flow from an HTTP Listener diff --git a/modules/ROOT/pages/tutorials.adoc b/modules/ROOT/pages/tutorials.adoc index 271342361..3ec92835b 100644 --- a/modules/ROOT/pages/tutorials.adoc +++ b/modules/ROOT/pages/tutorials.adoc @@ -7,7 +7,29 @@ include::reuse::partial$beta-banner.adoc[tag="anypoint-code-builder"] //LOGO (web, desktop, or both) // include::partial$acb-ide-logos.adoc[tags="both-ides"] -Follow these hands-on tutorials to learn how to design, implement, and integrate APIs using Anypoint Code Builder. +Learn how to design, implement, integrate, and deploy APIs with Anypoint Code Builder. Work through these numbered product topics to move from API specification design to a deployed Mule application. For end-to-end examples on specific stacks or patterns, see <>. + +[[modular-learning-paths]] +== Take Your API Specification from Design Through Deployment + +The following topics guide you step by step from API specification design in the IDE to publishing the contract on Anypoint Exchange, building and configuring integration flows, importing and scaffolding the API into a Mule interface, and deploying the application to CloudHub or CloudHub 2.0. + +. xref:des-designing-api-specs.adoc[Designing API Specs and Fragments] for supported languages and the overall design workflow. +. xref:des-create-api-specs.adoc[Creating and Importing API Specifications], including the API Console and mocking service. +. Optionally xref:des-create-api-fragments.adoc[Creating and Using API Spec Fragments] for reusable types and examples from Anypoint Exchange. +. xref:des-publish-api-spec-to-exchange.adoc[Publishing API Projects to Exchange] so your team can discover and implement the contract. +. xref:int-create-integrations.adoc[Creating Integrations] and xref:int-configure-components.adoc[Configuring Components] in your flows. +. When you use the Database connector with JDBC, follow xref:int-configure-database-jdbc-dependency.adoc[Adding a JDBC Driver for the Database Connector]. +. xref:int-configure-dw-expressions.adoc#map-payload-to-api-contract[Mapping Payload Fields to Match Your API Specification] with DataWeave where backend data shapes differ from the contract. +. xref:imp-implement-api-specs.adoc[Implementing OAS, RAML, AsyncAPI, and GraphQL APIs] ++ +Import your API specification from Exchange, scaffold it into an interface in your project, then wire flows to your implementation. +. xref:int-developing-integrations.adoc[Developing Integrations], including xref:int-debug-mule-apps.adoc[Debugging Mule Applications] and xref:int-deploy-mule-apps.adoc[Deploying Mule Apps to CloudHub and CloudHub 2.0]. + +[[hands-on-tutorials]] +== Hands-On Tutorials + +Each tutorial is a self-contained walkthrough that applies Anypoint Code Builder to one integration style, API technology, or connector story from start to finish. * xref:tut-af-amflights-overview.adoc[]: + From 93a6317fa705380086b8a54c99c7b834a0a1641f Mon Sep 17 00:00:00 2001 From: Cristian-Venticinque Date: Fri, 24 Apr 2026 11:47:16 -0300 Subject: [PATCH 08/36] Removing American Flights tutorial from docs Adding page aliases, removing cross references --- modules/ROOT/nav.adoc | 14 - .../ROOT/pages/des-create-api-fragments.adoc | 5 +- modules/ROOT/pages/des-create-api-specs.adoc | 6 +- .../des-publish-api-spec-to-exchange.adoc | 1 + .../ROOT/pages/imp-implement-api-specs.adoc | 1 + modules/ROOT/pages/imp-implementing-apis.adoc | 2 +- ...nt-configure-database-jdbc-dependency.adoc | 2 +- .../pages/int-configure-dw-expressions.adoc | 2 +- .../ROOT/pages/int-create-integrations.adoc | 2 +- modules/ROOT/pages/int-debug-mule-apps.adoc | 2 +- modules/ROOT/pages/int-deploy-mule-apps.adoc | 2 +- modules/ROOT/pages/start-workspaces.adoc | 2 +- .../ROOT/pages/tut-af-amflights-overview.adoc | 51 -- .../ROOT/pages/tut-af-debug-am-flights.adoc | 346 ----------- .../ROOT/pages/tut-af-deploy-am-flights.adoc | 74 --- .../pages/tut-af-design-am-flights-api.adoc | 138 ----- ...sign-api-add-request-response-details.adoc | 318 ---------- ...sign-api-publish-api-spec-to-exchange.adoc | 75 --- .../tut-af-design-api-test-specification.adoc | 44 -- .../tut-af-implement-am-flights-api.adoc | 214 ------- .../pages/tut-af-integrate-am-flights.adoc | 255 -------- .../tut-af-integrate-connect-to-a-db.adoc | 181 ------ .../pages/tut-af-integrate-use-dataweave.adoc | 579 ------------------ modules/ROOT/pages/tutorials.adoc | 10 +- 24 files changed, 18 insertions(+), 2308 deletions(-) delete mode 100644 modules/ROOT/pages/tut-af-amflights-overview.adoc delete mode 100644 modules/ROOT/pages/tut-af-debug-am-flights.adoc delete mode 100644 modules/ROOT/pages/tut-af-deploy-am-flights.adoc delete mode 100644 modules/ROOT/pages/tut-af-design-am-flights-api.adoc delete mode 100644 modules/ROOT/pages/tut-af-design-api-add-request-response-details.adoc delete mode 100644 modules/ROOT/pages/tut-af-design-api-publish-api-spec-to-exchange.adoc delete mode 100644 modules/ROOT/pages/tut-af-design-api-test-specification.adoc delete mode 100644 modules/ROOT/pages/tut-af-implement-am-flights-api.adoc delete mode 100644 modules/ROOT/pages/tut-af-integrate-am-flights.adoc delete mode 100644 modules/ROOT/pages/tut-af-integrate-connect-to-a-db.adoc delete mode 100644 modules/ROOT/pages/tut-af-integrate-use-dataweave.adoc diff --git a/modules/ROOT/nav.adoc b/modules/ROOT/nav.adoc index 758ddf068..7320e6488 100644 --- a/modules/ROOT/nav.adoc +++ b/modules/ROOT/nav.adoc @@ -17,20 +17,6 @@ // TUTORIALS * xref:tutorials.adoc[] -** xref:tut-af-amflights-overview.adoc[] -*** xref:tut-af-design-am-flights-api.adoc[] -**** xref:tut-af-design-api-add-request-response-details.adoc[] -**** xref:tut-af-design-api-test-specification.adoc[] -**** xref:tut-af-design-api-publish-api-spec-to-exchange.adoc[] - -*** xref:tut-af-integrate-am-flights.adoc[] -**** xref:tut-af-integrate-connect-to-a-db.adoc[] -**** xref:tut-af-integrate-use-dataweave.adoc[] - -*** xref:tut-af-implement-am-flights-api.adoc[] -*** xref:tut-af-debug-am-flights.adoc[] -*** xref:tut-af-deploy-am-flights.adoc[] - ** xref:tut-local-api-specification.adoc[] ** xref:tut-graphql-implement-api.adoc[] diff --git a/modules/ROOT/pages/des-create-api-fragments.adoc b/modules/ROOT/pages/des-create-api-fragments.adoc index b43ea430f..cbd258b0a 100644 --- a/modules/ROOT/pages/des-create-api-fragments.adoc +++ b/modules/ROOT/pages/des-create-api-fragments.adoc @@ -1,6 +1,6 @@ = Creating and Using API Spec Fragments :page-deployment-options: cloud-ide, desktop-ide -:page-aliases: des-add-examples-to-specs.adoc +:page-aliases: des-add-examples-to-specs.adoc, add-request-response-details.adoc, tut-af-design-api-add-request-response-details.adoc include::reuse::partial$beta-banner.adoc[tag="anypoint-code-builder"] @@ -504,5 +504,6 @@ channels: == See Also * xref:des-publish-api-spec-to-exchange.adoc[] -* xref:tut-af-design-api-add-request-response-details.adoc[] Tutorial +* xref:des-create-api-specs.adoc#test-spec[Test Your API Spec Using the Mocking Service] +* xref:des-create-api-fragments.adoc#add-fragment-to-project[Add the API fragment from Exchange] * xref:des-delete-api-projects.adoc[] diff --git a/modules/ROOT/pages/des-create-api-specs.adoc b/modules/ROOT/pages/des-create-api-specs.adoc index 8fa3f96f1..b5267a033 100644 --- a/modules/ROOT/pages/des-create-api-specs.adoc +++ b/modules/ROOT/pages/des-create-api-specs.adoc @@ -1,6 +1,6 @@ = Creating and Importing API Specifications :page-deployment-options: cloud-ide, desktop-ide -:page-aliases: des-test-api-specs.adoc +:page-aliases: des-test-api-specs.adoc, ui-tut-design.adoc, tut-af-design-api-specification-from-scratch.adoc, design-api-specification.adoc, test-api-specification.adoc, tut-af-design-am-flights-api.adoc, tut-af-design-api-test-specification.adoc include::reuse::partial$beta-banner.adoc[tag="anypoint-code-builder"] @@ -24,7 +24,7 @@ Use the <> API spec to explore the functiona * xref:start-acb.adoc[Set up and access the web or desktop IDE]. * Understand the basics of designing API specs. + -See the xref:tutorials.adoc[] for details. +See xref:tutorials.adoc#modular-learning-paths[Take Your API Specification from Design Through Deployment] for a suggested order of topics. * Have some familiarity with xref:access-management::business-groups.adoc[business groups]. + When you publish your API spec to Exchange from Anypoint Code Builder, the IDE requests the name of the business group. See xref:access-management::business-groups.adoc[]. @@ -347,7 +347,7 @@ If you created an OAS 3.0 (YAML) project, you can replace the initial spec with * xref:start-acb.adoc[] -* xref:tutorials.adoc[] +* xref:tutorials.adoc#modular-learning-paths[Take Your API Specification from Design Through Deployment] * xref:access-management::business-groups.adoc[] * xref:start-discover-ui.adoc#use-autocomplete[Use Auto-Complete in the Editors] * xref:des-create-api-fragments.adoc[] diff --git a/modules/ROOT/pages/des-publish-api-spec-to-exchange.adoc b/modules/ROOT/pages/des-publish-api-spec-to-exchange.adoc index 8047f861e..29cdbc83e 100644 --- a/modules/ROOT/pages/des-publish-api-spec-to-exchange.adoc +++ b/modules/ROOT/pages/des-publish-api-spec-to-exchange.adoc @@ -1,5 +1,6 @@ = Publishing API Projects to Exchange :page-deployment-options: cloud-ide, desktop-ide +:page-aliases: publish-api-spec-to-exchange.adoc, tut-af-design-api-publish-api-spec-to-exchange.adoc include::reuse::partial$beta-banner.adoc[tag="anypoint-code-builder"] diff --git a/modules/ROOT/pages/imp-implement-api-specs.adoc b/modules/ROOT/pages/imp-implement-api-specs.adoc index ad5d6362e..b700dc07a 100644 --- a/modules/ROOT/pages/imp-implement-api-specs.adoc +++ b/modules/ROOT/pages/imp-implement-api-specs.adoc @@ -1,5 +1,6 @@ = Implementing OAS, RAML, AsyncAPI, and GraphQL APIs :page-deployment-options: cloud-ide, desktop-ide +:page-aliases: ui-tut-implement.adoc, implement-api-specification.adoc, implement-an-api-specification.adoc, tut-af-implement-am-flights-api.adoc include::reuse::partial$beta-banner.adoc[tag="anypoint-code-builder"] diff --git a/modules/ROOT/pages/imp-implementing-apis.adoc b/modules/ROOT/pages/imp-implementing-apis.adoc index 9da3596ca..9fdeb3b16 100644 --- a/modules/ROOT/pages/imp-implementing-apis.adoc +++ b/modules/ROOT/pages/imp-implementing-apis.adoc @@ -20,7 +20,7 @@ The methods for implementing APIs using Anypoint Code Builder are: // TODO: Include a link to gRPC Connector docs. * xref:imp-implement-local-apis.adoc[Scaffold an API] into an implementation project without first publishing it to Anypoint Exchange, enabling iterative design and implementation. -After scaffolding an API specification into an interface, you are ready to develop, test, and deploy your Mule app as described in xref:int-developing-integrations.adoc[]. For the ordered topics from API design through deployment, see xref:tutorials.adoc#modular-learning-paths[Take Your API Specification from Design Through Deployment. +After scaffolding an API specification into an interface, you are ready to develop, test, and deploy your Mule app as described in xref:int-developing-integrations.adoc[]. For the ordered topics from API design through deployment, see xref:tutorials.adoc#modular-learning-paths[Take Your API Specification from Design Through Deployment]. == Source Control for Implementation Projects diff --git a/modules/ROOT/pages/int-configure-database-jdbc-dependency.adoc b/modules/ROOT/pages/int-configure-database-jdbc-dependency.adoc index 3a0e8b690..23e560ff0 100644 --- a/modules/ROOT/pages/int-configure-database-jdbc-dependency.adoc +++ b/modules/ROOT/pages/int-configure-database-jdbc-dependency.adoc @@ -1,6 +1,6 @@ = Adding a JDBC Driver for the Database Connector :page-deployment-options: cloud-ide, desktop-ide -:page-aliases: connect-to-a-db.adoc +:page-aliases: connect-to-a-db.adoc, tut-af-integrate-connect-to-a-db.adoc include::reuse::partial$beta-banner.adoc[tag="anypoint-code-builder"] diff --git a/modules/ROOT/pages/int-configure-dw-expressions.adoc b/modules/ROOT/pages/int-configure-dw-expressions.adoc index 0f69de369..4577b6d82 100644 --- a/modules/ROOT/pages/int-configure-dw-expressions.adoc +++ b/modules/ROOT/pages/int-configure-dw-expressions.adoc @@ -1,5 +1,5 @@ = Using DataWeave Expressions and Transformations in Anypoint Code Builder -:page-aliases: int-use-dw-to-transform-data.adoc, int-address-dw-errors.adoc, int-import-dw-libraries.adoc, use-dataweave.adoc +:page-aliases: int-use-dw-to-transform-data.adoc, int-address-dw-errors.adoc, int-import-dw-libraries.adoc, use-dataweave.adoc, tut-af-integrate-use-dataweave.adoc diff --git a/modules/ROOT/pages/int-create-integrations.adoc b/modules/ROOT/pages/int-create-integrations.adoc index 35be09a39..b604b03ba 100644 --- a/modules/ROOT/pages/int-create-integrations.adoc +++ b/modules/ROOT/pages/int-create-integrations.adoc @@ -1,6 +1,6 @@ = Creating Integrations :page-deployment-options: cloud-ide, desktop-ide -:page-aliases: int-create-basic-integrations.adoc +:page-aliases: int-create-basic-integrations.adoc, ui-tut-integrate.adoc, create-basic-integration.adoc, develop-integration.adoc, tut-af-integrate-am-flights.adoc include::reuse::partial$beta-banner.adoc[tag="anypoint-code-builder"] diff --git a/modules/ROOT/pages/int-debug-mule-apps.adoc b/modules/ROOT/pages/int-debug-mule-apps.adoc index bd16e3ffd..e8b9ac779 100644 --- a/modules/ROOT/pages/int-debug-mule-apps.adoc +++ b/modules/ROOT/pages/int-debug-mule-apps.adoc @@ -1,6 +1,6 @@ = Debugging Mule Applications :page-deployment-options: cloud-ide, desktop-ide -:page-aliases: debug-add-breakpoint.adoc, debug-add-components.adoc, debug-add-logger-set-variables.adoc, debug-run-debug-sessions.adoc, debug-a-mule-application.adoc, debugging-mule-apps.adoc +:page-aliases: debug-add-breakpoint.adoc, debug-add-components.adoc, debug-add-logger-set-variables.adoc, debug-run-debug-sessions.adoc, debug-a-mule-application.adoc, debugging-mule-apps.adoc, tut-af-debug-am-flights.adoc include::reuse::partial$beta-banner.adoc[tag="anypoint-code-builder"] diff --git a/modules/ROOT/pages/int-deploy-mule-apps.adoc b/modules/ROOT/pages/int-deploy-mule-apps.adoc index 7ca715e9c..5e84f48a6 100644 --- a/modules/ROOT/pages/int-deploy-mule-apps.adoc +++ b/modules/ROOT/pages/int-deploy-mule-apps.adoc @@ -1,6 +1,6 @@ = Deploying Mule Apps to CloudHub and CloudHub 2.0 :page-deployment-options: cloud-ide, desktop-ide -:page-aliases: deploy-a-mule-application-to-cloudhub.adoc +:page-aliases: deploy-a-mule-application-to-cloudhub.adoc, tut-af-deploy-am-flights.adoc include::reuse::partial$beta-banner.adoc[tag="anypoint-code-builder"] diff --git a/modules/ROOT/pages/start-workspaces.adoc b/modules/ROOT/pages/start-workspaces.adoc index 8d7c3727a..f23e536b9 100644 --- a/modules/ROOT/pages/start-workspaces.adoc +++ b/modules/ROOT/pages/start-workspaces.adoc @@ -81,7 +81,7 @@ image::imp-local-api-open-workspace.png["A multi-root workspace in Explorer view You can ask MuleSoft Vibes to switch workspaces using natural language prompts, such as: -* "Open my American Flights workspace" +* "Open my Orders API workspace" * "Switch to the `` workspace" [[close-workspace]] diff --git a/modules/ROOT/pages/tut-af-amflights-overview.adoc b/modules/ROOT/pages/tut-af-amflights-overview.adoc deleted file mode 100644 index 1641319cb..000000000 --- a/modules/ROOT/pages/tut-af-amflights-overview.adoc +++ /dev/null @@ -1,51 +0,0 @@ -= Develop the American Flights App -:page-deployment-options: cloud-ide, desktop-ide -:page-pagination: next - -Use Anypoint Code Builder to create and implement an API specification that returns flight information from a MySQL database. - -. xref:tut-af-design-am-flights-api.adoc[]: - -* Start the American Flights API specification. -* Add a resource and methods. -* Add query parameters and nested resources. -* Add fragments and examples: -** Add API fragments from Exchange for a data type and examples to the American Flights API specification. -** Create your own examples for the specification. -** Add a custom message for a response. -. xref:tut-af-design-api-add-request-response-details.adoc[] -+ -Use the Mocking Service in the API Console to check the request and responses that you configured for American Flights API. -. xref:tut-af-design-api-publish-api-spec-to-exchange.adoc[]: -+ -Publish the American Flights API specification to Exchange so that other team members can find and implement it. -//develop example: -. Create an integration application for the American Flights example: - -.. xref:tut-af-integrate-am-flights.adoc[]: -+ -Start by creating a basic integration for the American Flights example. This integration provides some of the logic for processing requests from the American Flights API. -.. xref:tut-af-integrate-connect-to-a-db.adoc[]: - -* Import the Anypoint Connector for Database (Database Connector) from Exchange. -* Configure a database operation to connect to an external database from your Mule flow. -.. xref:tut-af-integrate-use-dataweave.adoc[]: -+ -Use DataWeave to transform and match flight data to your API specification. -//implement example: -. xref:tut-af-implement-am-flights-api.adoc[]: - -* Import your American Flights API specification from Anypoint Exchange. -* Scaffold the specification into the American Flights project that you are developing. -* Add logic to implement an endpoint in the API. -//debug example: -. xref:tut-af-debug-am-flights.adoc[]: - -* Prepare to debug your Mule application by adding Logger and Set Variable components to better understand the behavior of your flows. -* Set up breakpoints to stop your Mule application at specific points during a debug session. -* Run a debug session, and inspect the message and variables at different points during your application's execution. -//deploy example: -. xref:tut-af-deploy-am-flights.adoc[]: - -* Deploy your American Flights application to CloudHub. -* Enable your team to send requests to your API and return flight information from a database. diff --git a/modules/ROOT/pages/tut-af-debug-am-flights.adoc b/modules/ROOT/pages/tut-af-debug-am-flights.adoc deleted file mode 100644 index 9a33292ba..000000000 --- a/modules/ROOT/pages/tut-af-debug-am-flights.adoc +++ /dev/null @@ -1,346 +0,0 @@ -= Debugging the American Flights App -:page-deployment-options: cloud-ide, desktop-ide -:page-pagination: - -include::reuse::partial$beta-banner.adoc[tag="anypoint-code-builder"] - - -Debug your American Flights interface and implementation. - -== Before You Begin - -Complete these procedures: - -. xref:tut-af-design-am-flights-api.adoc[] -. xref:tut-af-integrate-am-flights.adoc[] -. xref:tut-af-implement-am-flights-api.adoc[] - -== Add Components - -To facilitate debugging, add Set Variable and Logger components to your American Flights implementation: - -. Open the implementation file (`implementation.xml`). -. After the Database Select operation (``) named *Query Flights*, add a Set Variable component: -+ -In the configuration XML, provide this `` configuration: -+ -[source,xml] ----- - ----- -. After the Transform component (``), add a Logger component with this configuration: -+ -[source,xml] ----- - ----- -+ -.Click for the complete implementation XML example. -[%collapsible] -==== -[source,xml] --- - - - - - - - - - //<1> - - - - - { - ID: payload01.ID, - code: (payload01.code1 default "") ++ (payload01.code2 default ""), - price: payload01.price default 0, - departureDate: payload01.takeOffDate as String default "", - origin: payload01.fromAirport default "", - destination: payload01.toAirport default "", - emptySeats: payload01.seatsAvailable default 0, - plane: { - "type": payload01.planeType default "", - totalSeats: payload01.totalSeats default 0 - } - } - ]]> - - - - - //<2> - - --- -[calloutlist] -.. Set Variable component -.. Logger component -==== -. Proceed to <>. -+ -Learn to set up breakpoints to pause execution of your app. - -[[add-breakpoint]] -== Add Breakpoints - -Add breakpoints to your American Flights project: - -. Open the _interface_ (`interface.xml`) for your American Flights project. -. Select the *Run and Debug* icon in the activity bar: -+ -image::run-and-debug.png["An interface XML file open in the code editor, with the Run and Debug icon highlighted"] -. In the interface file (`interface.xml`), add a breakpoint to the line that contains the `` component: -+ -image::add-breakpoint.png["An interface XML file open in the code editor, with a breakpoint enabled"] -+ -Alternatively, use F9 to add a breakpoint to the line. -. Open the implementation file (`implementation.xml`) for your American Flights project, and add breakpoints to the `` and `` components. -+ -. Notice that all the breakpoints are now listed in the *Breakpoints* panel: -+ -image::breakpoints-panel.png["A menu panel displaying three enabled breakpoints"] -. Proceed to <>. -+ -Run a debugging session, and inspect the message and variables at different points during your app's execution. - -[[debug]] -== Start a Debugging Session - -. From the *Run and Debug* menu, click *Debug Mule Application*: -+ -image::start-debugging.png["The Run and Debug and the Debug Mule Applications icons both highlighted"] -+ -The IDE packages the app and opens a new terminal that deploys the app to the embedded Mule runtime engine: -+ -image::packaged-and-running-terminals.png["A terminal window displaying application status as deployed"] -. Proceed to <>. - -[[test]] -== Test Your American Flights App - -After starting your debugging session: - -//open terminal -include::anypoint-code-builder::partial$acb-reusable-steps.adoc[tag="open-terminal"] -. In the terminal, use a `curl` command to make a GET request to the listener in the _interface_ (`interface.xml`) instead of the implementation: -+ -[source,URI] ----- -curl http://localhost:8081/api/flights ----- -+ -Notice the `_/api/flights_` in the URI for the listener in the interface. For more information about this step, see xref:int-trigger-flows.adoc#trigger-flow[Trigger a flow]. -. In your American Flights project, notice that the execution of the app stops at your first breakpoint: -+ -image::debug-stop-at-flow-ref.png["Stopping the flow at a breakpoint"] -+ -The breakpoint is located in your interface file (`interface.xml`). -. In your debug toolbar, click the *Step Over* button to continue execution to the next breakpoint, at the `` element in `implementation.xml`. -. In the *Run and Debug* sidebar, notice that the *Variables* panel provides information about the Mule event at the breakpoint: -+ -image::debugger-stop-db-select.png["Breakpoint in the configuration XML file where execution stops"] -. Click the *Step Over* button on your debug toolbar to continue execution to your next breakpoint, at the `` element. -. In the *Variables* panel, navigate to *Mule Message* > *Payload*, and notice that the database response is an array of flight data: -+ -image::debugger-stop-set-variable.png["Array of flight data in the payload"] -. Proceed to <>. - -[[watch]] -== Add a Watch Expression - -. From the *Run and Debug* sidebar, open the *Watch* panel. -. Click the *+* icon in the panel, and add the expression `payload.^mediaType`: -+ -image::debug-add-expression.png["A debug window displaying application variables, with the Add Expression button highlighted"] -. Click the *Step Over* button until your execution moves to the Transform Message component (``). -. Notice that the payload is `application/java`: -+ -image:tut-debug-mediatype-java.png["The Watch panel displaying a payload type of 'application/java'"] -. Continue clicking the *Step Over* button until you reach the Logger component (``). -. Notice that your payload transforms to `application/json`: -+ -image::tut-debug-mediatype-json.png["The Watch panel displaying a payload type of 'application/json'"] -. Click the *Continue* button in the debug toolbar, and notice that the app returns the response from the database to your REST client or browser. -+ -.Click for the complete implementation XML example. -[%collapsible] -==== -[source,JSON] --- -[ - { - "ID": 1, - "code": "rree0001", - "price": 541, - "departureDate": "2016-01-20T00:00:00", - "origin": "MUA", - "destination": "LAX", - "emptySeats": 0, - "plane": { - "type": "Boeing 787", - "totalSeats": 200 - } - }, - { - "ID": 2, - "code": "eefd0123", - "price": 300, - "departureDate": "2016-01-25T00:00:00", - "origin": "MUA", - "destination": "CLE", - "emptySeats": 7, - "plane": { - "type": "Boeing 747", - "totalSeats": 345 - } - }, - { - "ID": 3, - "code": "ffee0192", - "price": 300, - "departureDate": "2016-01-20T00:00:00", - "origin": "MUA", - "destination": "LAX", - "emptySeats": 0, - "plane": { - "type": "Boeing 777", - "totalSeats": 300 - } - }, - { - "ID": 4, - "code": "rree1000", - "price": 200, - "departureDate": "2016-01-20T00:00:00", - "origin": "MUA", - "destination": "CLE", - "emptySeats": 5, - "plane": { - "type": "Boeing 737", - "totalSeats": 150 - } - }, - { - "ID": 5, - "code": "rree1093", - "price": 142, - "departureDate": "2016-02-11T00:00:00", - "origin": "MUA", - "destination": "SFO", - "emptySeats": 1, - "plane": { - "type": "Boeing 737", - "totalSeats": 150 - } - }, - { - "ID": 6, - "code": "ffee1112", - "price": 954, - "departureDate": "2016-01-20T00:00:00", - "origin": "MUA", - "destination": "CLE", - "emptySeats": 100, - "plane": { - "type": "Boeing 787", - "totalSeats": 200 - } - }, - { - "ID": 7, - "code": "eefd1994", - "price": 676, - "departureDate": "2016-01-01T00:00:00", - "origin": "MUA", - "destination": "SFO", - "emptySeats": 0, - "plane": { - "type": "Boeing 777", - "totalSeats": 300 - } - }, - { - "ID": 8, - "code": "ffee2000", - "price": 300, - "departureDate": "2016-02-20T00:00:00", - "origin": "MUA", - "destination": "SFO", - "emptySeats": 30, - "plane": { - "type": "Boeing 737", - "totalSeats": 150 - } - }, - { - "ID": 9, - "code": "eefd3000", - "price": 900, - "departureDate": "2016-02-01T00:00:00", - "origin": "MUA", - "destination": "SFO", - "emptySeats": 0, - "plane": { - "type": "Boeing 737", - "totalSeats": 150 - } - }, - { - "ID": 10, - "code": "eefd4511", - "price": 900, - "departureDate": "2016-01-15T00:00:00", - "origin": "MUA", - "destination": "LAX", - "emptySeats": 100, - "plane": { - "type": "Boeing 777", - "totalSeats": 300 - } - }, - { - "ID": 11, - "code": "rree4567", - "price": 456, - "departureDate": "2016-01-20T00:00:00", - "origin": "MUA", - "destination": "SFO", - "emptySeats": 100, - "plane": { - "type": "Boeing 737", - "totalSeats": 150 - } - } -] --- -==== -. Proceed to <>. - -[[stop]] -== Stop the Debugging Session - -To stop your debugging session: - -. Click the *Stop* button on your debug toolbar: -+ -image::debugger-stop.png["Stopping a debugging session from the debug toolbar"] -. Proceed to xref:tut-af-deploy-am-flights.adoc[]. - diff --git a/modules/ROOT/pages/tut-af-deploy-am-flights.adoc b/modules/ROOT/pages/tut-af-deploy-am-flights.adoc deleted file mode 100644 index 562458858..000000000 --- a/modules/ROOT/pages/tut-af-deploy-am-flights.adoc +++ /dev/null @@ -1,74 +0,0 @@ -= Deploying the American Flights App -:page-deployment-options: cloud-ide, desktop-ide -:page-pagination: prev - -include::reuse::partial$beta-banner.adoc[tag="anypoint-code-builder"] - - -Deploy the American Flights application to CloudHub. After deploying to CloudHub, manage your application through Anypoint Runtime Manager. - -Anypoint Code Builder deploys Mule applications to the non-production *Sandbox* environment in CloudHub. - -== Before You Begin - -Complete these procedures: - -. xref:tut-af-design-am-flights-api.adoc[] -. xref:tut-af-integrate-am-flights.adoc[] -. xref:tut-af-implement-am-flights-api.adoc[] -. xref:tut-af-debug-am-flights.adoc[] -. Log in to Anypoint Platform from the IDE. If you do not log in, the IDE prompts you to log in when an operation that you perform requires authentication. You can follow the prompts in the UI to complete the login process when prompted. - - -== Deploy an Application to CloudHub - -. Open your project in Anypoint Code Builder. -. Click the image:icon-deploy.png["",20,20] (*Deploy to CloudHub*) icon when your configuration XML file is open, for example: -+ -image::deploy-to-cloudhub-icon-with-detail.png["Deploy to CloudHub "rocket" icon] -+ -Alternatively, open the Command Palette by pressing Cmd+Shift+p (Mac) or Ctrl+Shift+p (Windows), and provide this command: -+ -[source,command] ----- -MuleSoft: Deploy to CloudHub ----- -+ -image::deploy-to-cloudhub.png["MuleSoft: Deploy to CloudHub command highlighted"] -. If prompted, sign in to Anypoint Platform. -. When prompted, click *Deploy*. -+ -Anypoint Code Builder creates and opens a deployment file (`deploy.json`) for your review, for example: -+ -[source,json] --- -{ - "runtime": "4.4.0", - "workerSize": 0.1, - "applicationName": "american-ws-anypoint-code-builder" - "workers": 1, - "autoStart": true -} --- -+ -* The `applicationName` property defines part of the URL for accessing your application on CloudHub. -* The name must be unique across all applications deployed to your business group in CloudHub. -* The `runtime` version is the Mule runtime version you select when creating the integration. -+ -include::partial$acb-runtime-java.adoc[tags="runtime-version-note"] - -. After reviewing the deployment configuration, click *Deploy* to deploy the application to CloudHub: -+ -image::deploy-config-created.png["Deployment configuration file created pop-up message"] -. Select the *Sandbox* environment: -+ -image::select-deployment-environment.png["Design and Sandbox environment options highlighted"] -+ -Other environments are not supported. -+ -Anypoint Code Builder packages and deploys the application to CloudHub. -. After deployment completes, select *Open in Runtime Manager*. -. Select your application from the list applications. -. Check the domain name for your application and, optionally, test the application. -+ -For example, the name of the American Flights example on the EU cloud is similar to `+american-ws-anypoint-code-builder.eu-s1.cloudhub.io+`. To start the example, open your REST client or browser, and make a GET request to the URI, for example: `+http://american-ws-anypoint-code-builder.eu-s1.cloudhub.io/api/flights+` diff --git a/modules/ROOT/pages/tut-af-design-am-flights-api.adoc b/modules/ROOT/pages/tut-af-design-am-flights-api.adoc deleted file mode 100644 index 634fd779c..000000000 --- a/modules/ROOT/pages/tut-af-design-am-flights-api.adoc +++ /dev/null @@ -1,138 +0,0 @@ -= Designing the American Flights API Spec -//ACB UI links to ui-tut-design.adoc (DO NOT REMOVE WITHOUT UX/DEV ALIGNMENT) -:page-deployment-options: cloud-ide, desktop-ide -:page-aliases: ui-tut-design.adoc, tut-af-design-api-specification-from-scratch.adoc, design-api-specification.adoc -:page-pagination: - - -include::reuse::partial$beta-banner.adoc[tag="anypoint-code-builder"] - - -Use Anypoint Code Builder to create a REST API specification example called American Flights API. In this API, reuse API fragments from Anypoint Exchange, create data types and response examples, test your API using API Console, and publish the API as an asset to Exchange. - -After completing all API specification tasks, xref:tut-af-implement-am-flights-api.adoc[implement] the specification within an xref:tut-af-integrate-am-flights.adoc[integration]. For more information, see xref:tut-af-amflights-overview.adoc[]. - -[[prereqs]] -== Before You Begin - -* Set up and access the web or desktop IDE. -+ -See xref:start-acb.adoc[] for guidance. -* Have some familiarity with xref:access-management::business-groups.adoc[business groups]. -+ -API specifications belong to a business group. - -[[start-spec]] -== Start American Flights API - -Start creating the American Flights API specification: - -// Open the ACB IDE -include::partial$acb-reusable-steps.adoc[tags="open-ide"] -+ -image::acb-mulesoft-in-activity-bar.png["MuleSoft icon in the VS Code Activity Bar"] -. From *Create*, click *Design an API*: -+ -image::design-api-1.png["Link to Design an API in the MuleSoft panel"] -+ -If you receive the error *Mule DX API Component was not installed*, wait for Mule runtime engine to load and for background processes to complete. To monitor background processes, see xref:troubleshoot-loading-errors.adoc[]. -. Configure your API specification project using these values: -+ -[%header,cols="1a,1a"] -|=== -| Field Name | Field Value - -| *Project Name* | *American Flights API* + - Alternatively, provide a similar name of your choice. The name must be unique. The name of the project and specification file is based on the name you provide. -| *Project Location* | Your home directory or another directory you create (see xref:start-add-folders.adoc[]). -| *API Type* | *REST API* + -Anypoint Code Builder supports the REST API type for design. -| *API Specification Language* | *RAML 1.0* + -Anypoint Code Builder supports OAS (JSON), OAS (YAML), and RAML. -|=== -. Select *Create Project* to generate the American Flights API project file: `american-flights-api.raml`. -+ -The file name is based on the name you provide for the project: -+ -image::acb-api-project.png["Project for American Airlines API"] -. Proceed to <>. - -[[add-flight-resource]] -== Add a RAML Resource and Methods - -In American Flights API, start configuring the specification, and try its *GET* method from the API Console. - -//TODO: CREATE AN INCLUDE FOR THIS COMMON STEP (make description more generic for multiple) -. Before starting the configuration, open the *Output* panel to the *Mule DX Server* to track the progress of internal processing. -+ -To open the panel: - -.. Press Cmd+Shift+u (Mac) or Ctrl+Shift+u (Windows) to open the Output panel. -.. Select *Mule DX Server* from the drop-down menu in the panel. -+ -For more guidance, see xref:start-open-output-panel.adoc[]. -. In `american-flights-api.raml`, paste this RAML code for the `/flights` endpoint and `get` method into the file: -+ -[source,raml,linenums] --- -#%RAML 1.0 -title: American Flights API - -/flights: - get: --- -. On the next line directly under `get`, press Ctrl+Space to display all the available options, and select a `post` method: -+ -[source,RAML] ----- -#%RAML 1.0 -title: American Flights API - -/flights: - get: - post: ----- -. Click the API Console icon to display your specification in the console: -+ -image::acb-api-console.png["A specification with get and post methods"] -+ -.. Monitor *Mule DX Server* in the *Output* panel while the API Console loads. -.. Click your specification file in the editor to display endpoints for the specification file in API Console. -.. Wait for the endpoint icons to render in API Console. -+ -Endpoint and methods in the API Console: -+ -//NOTE internal: image modified to have heading "Documentation" -image::get-post-methods-api-console.png["GET and POST methods highlighted in *API Console*"] -. Proceed to <>. - -[[add-query-params-nested-resources]] -== Add Query Parameters and Nested Resources - -Add a nested resource (`/{ID}:`) to use for getting a flight based on its destination, and specify optional query parameters for the destinations (`queryParameters:`) as a set of `enum` values. - -. Replace your RAML content with this specification: -+ -[source,raml,linenums] --- -#%RAML 1.0 -title: American Flights API - -/flights: - get: - queryParameters: - destination: - required: false - enum: - - SFO - - LAX - - CLE - post: - - /{ID}: - get: --- -. View the nested resource in the API Console: -+ -image::sub-methods-api-console.png["API Console with nested resource"] -. Proceed to xref:tut-af-design-api-add-request-response-details.adoc[]. diff --git a/modules/ROOT/pages/tut-af-design-api-add-request-response-details.adoc b/modules/ROOT/pages/tut-af-design-api-add-request-response-details.adoc deleted file mode 100644 index 90144e219..000000000 --- a/modules/ROOT/pages/tut-af-design-api-add-request-response-details.adoc +++ /dev/null @@ -1,318 +0,0 @@ -= Adding Examples to the API Spec -:page-deployment-options: cloud-ide, desktop-ide -:page-aliases: add-request-response-details.adoc -:page-pagination: - -include::reuse::partial$beta-banner.adoc[tag="anypoint-code-builder"] - - -Add API fragments from Exchange for a data type and examples to the American Flights API specification. Then create your own examples for the specification, and add a custom message for a response. - -== Before You Begin - -Complete all the procedures in xref:tut-af-design-am-flights-api.adoc[]. - -== Add Fragments from Exchange to Your Project - -Add fragments to the project directory so that you can include them in your specification. - -* *Training: American Flight Data Type* fragment for an object that corresponds to the definition of a flight -* *Training: American Flights Example* fragment for data that the API returns - -To add the fragments: - -. In Anypoint Code Builder, open your American Flights API specification, `american-flights-api.raml`. -// Pointer to Command Palette -include::partial$acb-reusable-steps.adoc[tags="open-command-palette"] -. Provide this command: -+ -[source,command] ----- -MuleSoft: Add fragment dependency from Exchange ----- -. If prompted, log in to Anypoint Platform so that you can download an asset. -. In the *Search for Asset* field, provide the name of the data type asset to add: -+ -[source,command] ----- -Training: American Flight Data Type ----- -. Select the asset from the *Assets From Exchange* menu. -. Select the latest version of the asset, such as *v1.0.1*. -+ -The IDE adds the fragment as a dependency. When the process is complete, check for the `AmericanFlightDataType.raml` asset *Project Dependencies* area of the Explorer, for example: -+ -image:tut-design-frag-in-proj-dependencies.png["Fragments from Exchange in Project Dependencies"] -+ -The dependency is also listed in the `exchange.json` file for the project, in your project directory from the Explorer. -. From the Command Palette, add another fragment: -+ -[source,command] ----- -MuleSoft: Add fragment dependency from Exchange ----- -. Provide the name of the asset to add: -+ -[source,command] ----- -Training: American Flights Example ----- -. Select the latest version of the *American Flights Example* asset. -+ -The IDE adds the fragment as a dependency to *Project Dependencies* and `exchange.json`. -. Proceed to <>. - -[[include-fragments]] -== Include the Fragments in the Specification - -Use `!include` directives to add the fragments to the specification: - -* The `AmericanFlight` data type is defined in `AmericanFlightDataType.raml`. -* The `AmericanFlightsExample.raml` example is for a `200` response to the `get` request. - -To include the fragments: - -. Open *american-flight-api.raml* from the project directory in Explorer. -. Replace the existing content with this: -+ -[source,RAML] --- -#%RAML 1.0 -title: American Flights API - -types: //<1> - AmericanFlight: !include exchange_modules/68ef9520-24e9-4cf2-b2f5-620025690913/training-american-flight-data-type/1.0.1/AmericanFlightDataType.raml - -/flights: - get: - queryParameters: - destination: - required: false - enum: - - SFO - - LAX - - CLE - responses: - 200: - body: - application/json: //<2> - type: AmericanFlight[] - examples: //<3> - output: !include exchange_modules/68ef9520-24e9-4cf2-b2f5-620025690913/training-american-flights-example/1.0.1/AmericanFlightsExample.raml - - post: - - /{ID}: - get: --- -[calloutlist] -.. Uses `!include` to add the `AmericanFlight` object from `AmericanFlightDataType.raml` as a data type -+ -Note that you can use built-in functionality to insert the `!include` directive and file path from the specification file, for example: -+ -[loweralpha] -... After typing `AmericanFlight: ` (with a space at the end), click Ctrl+Spacebar, start typing `!include`, and select `!include` from the drop-down menu in the RAML file, for example: -+ -image::tut-api-include-directive.png["Include directive in RAML drop-down menu"] -... Follow the same process to add the example, selecting `exchange_modules` directory and progressing step-by-step to `AmericanFlightsDataType.raml`, for example: -+ -image::tut-api-include-path.png["Included path in RAML drop-down menu"] -.. Sets the format of the body of the response to JSON (`application/json`) and configures the type of the response as an array of `AmericanFlight` objects (`AmericanFlight[]`) -.. Adds the `AmericanFlightsExample.raml` example -. Proceed to <>. - -[[post-response-example]] -== Create and Include an Example for a Get Request by Flight ID - -Create an example for the post response, and include it in the specification. - -. In the Explorer, right-click on an empty space, and create a folder named `examples`. -+ -image::add-new-folder.png[alt="New Folder option highlighted in the context menu"] -. Right-click your `examples` folder, and create a new file named `AmericanFlightExample.raml`. -+ -image::create-american-fligh-example-file.png[alt="AmericanFlightExample.raml file highlighted"] -. In the open file, add this example: -+ -[source,raml] --- -#%RAML 1.0 NamedExample -value: - ID: 1 - code: ER38sd - price: 400 - departureDate: 2017/07/26 - origin: CLE - destination: SFO - emptySeats: 0 - plane: - type: Boeing 737 - totalSeats: 150 --- -. Return to your `american-flights-api.raml` file, and create a set of elements under `/{ID}/get` for responses: -+ -[source,raml] --- -#%RAML 1.0 -title: American Flights API - -types: - AmericanFlight: !include exchange_modules/68ef9520-24e9-4cf2-b2f5-620025690913/training-american-flight-data-type/1.0.1/AmericanFlightDataType.raml - -/flights: - get: - queryParameters: - destination: - required: false - enum: - - SFO - - LAX - - CLE - responses: - 200: - body: - application/json: - type: AmericanFlight[] - post: - - /{ID}: - get: - responses: //<1> - 200: - body: //<2> - application/json: - type: AmericanFlight - examples: //<3> - output: !include examples/AmericanFlightExample.raml --- -+ -[calloutlist] -.. Adds a response with a `200` code -.. Specifies the JSON format and type (`AmericanFlight`) of the *get* request body -.. Adds your example from the `/examples` directory as the content for the body of the request -. Proceed to <>. - -[[post-example]] -== Configure an Example for the Post Method - -Define an example for the `post` request: - -. Specify that a request to the `/flights:post` method requires an object of the `AmericanFlight` type: -+ -[source,raml,linenums] --- -#%RAML 1.0 -title: American Flights API - -types: - AmericanFlight: !include exchange_modules/68ef9520-24e9-4cf2-b2f5-620025690913/training-american-flight-data-type/1.0.1/AmericanFlightDataType.raml - -/flights: - get: - queryParameters: - destination: - required: false - enum: - - SFO - - LAX - - CLE - responses: - 200: - body: - application/json: - type: AmericanFlight[] - post: - body: //<1> - application/json: - type: AmericanFlight //<2> - - /{ID}: - get: - responses: - 200: - body: - application/json: - type: AmericanFlight - examples: - output: !include examples/AmericanFlightExample.raml --- -[calloutlist] -.. Specifies a JSON-formatted body for the `post` method -.. Configures `AmericanFlight` as the type for the `post` method -. Under your `/examples` folder, create a file named `AmericanFlightNoIDExample.raml`, and copy this example to the file: -+ -[source,raml] --- -#%RAML 1.0 NamedExample -value: - code: ER38sd - price: 400 - departureDate: 2017/07/26 - origin: CLE - destination: SFO - emptySeats: 0 - plane: - type: Boeing 737 - totalSeats: 150 --- -+ -To simulate a new flight record, this example does not provide an `ID` parameter. -. In the `american-flights-api.raml` file, add the example as a response to the `post` method, and include a custom message. -+ -.Notice the `!include` directive at number 5: -[source,RAML] ----- -#%RAML 1.0 -title: American Flights API - -types: - AmericanFlight: !include exchange_modules/68ef9520-24e9-4cf2-b2f5-620025690913/training-american-flight-data-type/1.0.1/AmericanFlightDataType.raml - -/flights: - get: - queryParameters: //<1> - destination: - required: false - enum: - - SFO - - LAX - - CLE - responses: //<2> - 200: - body: - application/json: - type: AmericanFlight[] - examples: - output: !include exchange_modules/68ef9520-24e9-4cf2-b2f5-620025690913/training-american-flights-example/1.0.1/AmericanFlightsExample.raml - - post: - body: - application/json: - type: AmericanFlight - examples: //<3> - input: !include examples/AmericanFlightNoIDExample.raml - responses: - 201: - body: - application/json: //<4> - example: - message: Flight added (but not really) - - /{ID}: - get: - responses: - 200: - body: - application/json: //<5> - type: AmericanFlight - examples: - output: !include examples/AmericanFlightExample.raml ----- -[calloutlist] -.. Select a destination. -.. Return an array of `AmericanFlight` objects for that destination. -.. Post an `AmericanFlight` object from an `examples/AmericanFlightNoIDExample.raml`. -.. Provide a custom message for a response in JSON format to the `post` method -.. Add your example from `examples/AmericanFlightExample.raml` as a response to the nested `get` request -//next step: -. Proceed to xref:test-api-specification.adoc[] to test the API endpoints. diff --git a/modules/ROOT/pages/tut-af-design-api-publish-api-spec-to-exchange.adoc b/modules/ROOT/pages/tut-af-design-api-publish-api-spec-to-exchange.adoc deleted file mode 100644 index ae5155ae5..000000000 --- a/modules/ROOT/pages/tut-af-design-api-publish-api-spec-to-exchange.adoc +++ /dev/null @@ -1,75 +0,0 @@ -= Publishing the API Spec to Anypoint Exchange -:page-deployment-options: cloud-ide, desktop-ide -:page-aliases: publish-api-spec-to-exchange.adoc -:page-pagination: - -include::reuse::partial$beta-banner.adoc[tag="anypoint-code-builder"] - - -Publish American Flights API specification to Exchange so that other team members can find and implement it. - -[[prereqs]] -== Before You Begin - -* If you haven't started the American Flight API specification, follow these procedures before attempting to publish: -+ -. xref:tut-af-design-am-flights-api.adoc[] -. xref:tut-af-design-api-add-request-response-details.adoc[] -. xref:tut-af-design-api-test-specification.adoc[] - -// Prereq bullet on familiarity with biz groups -include::partial$acb-reusable-steps.adoc[tags="prereq-business-groups"] - - -== Publish an API to Exchange - -To publish your API to Exchange: - -. In Anypoint Code Builder, open the specification for your American Flights API project, such as `american-flights-api.raml`. -// Pointer to Command Palette -include::partial$acb-reusable-steps.adoc[tags="open-command-palette"] -. Provide the following command: -+ -[source,command] ----- -MuleSoft: Publish API Project to Exchange ----- -+ -image::publish-to-exchange.png["MuleSoft: Publish API Project to Exchange highlighted in Command Palette"] -. If prompted, click *Allow*, and follow the prompts to sign in to Anypoint Platform. -. In *Select a Business Group*, find and select your business group for the project. -+ -For more information, see <>. -. Type a project name: *American Flights API*. -. Confirm the artifact ID: *American-Flights-API*. -. Confirm the asset version: *1.0.0*. -. Confirm the API version: *v1*. -The status bar shows the progress: -+ -image::publishing-to-exchange-dialog.png["Publishing API specification to Exchange notification highlighted"] - -. When prompted to implement the API now, select *No* to avoid scaffolding the American Flights API specification into your integration. -+ -Selecting *Yes* scaffolds the API specification into your project. Instead of scaffolding now, you will scaffold in xref:tut-af-implement-am-flights-api.adoc[]. - -== Locate Your API in Exchange - -After publishing your API specification, you can find it in Anypoint Exchange: - -. Navigate to Anypoint Platform and log in using your credentials. -+ --- -// Pointer to Platform URLs -include::partial$acb-reusable-steps.adoc[tags="platform-urls"] --- -. Navigate to Anypoint Exchange. -+ --- -// Pointer to Exchange URLs -include::partial$acb-reusable-steps.adoc[tags="exchange-urls"] --- -+ -. Notice that your API specification is listed as an asset. -+ -You can select the API, navigate through its summary, and see all the endpoints you defined in the previous tasks. -. Proceed to xref:tut-af-integrate-am-flights.adoc[] to start an integration app for American Flights. diff --git a/modules/ROOT/pages/tut-af-design-api-test-specification.adoc b/modules/ROOT/pages/tut-af-design-api-test-specification.adoc deleted file mode 100644 index f3906a1d8..000000000 --- a/modules/ROOT/pages/tut-af-design-api-test-specification.adoc +++ /dev/null @@ -1,44 +0,0 @@ -= Testing the API Spec with the Mocking Service -:page-deployment-options: cloud-ide, desktop-ide -:page-aliases: test-api-specification.adoc -:page-pagination: - -include::reuse::partial$beta-banner.adoc[tag="anypoint-code-builder"] - - -Use the Mocking Service in the API Console to check the GET request and response that you configured for American Flights API in xref:tut-af-design-api-add-request-response-details.adoc[]. - -== Before You Begin - -If you haven't started the American Flight API specification, complete these procedures before attempting to test: - -. xref:tut-af-design-am-flights-api.adoc[] -. xref:tut-af-design-api-add-request-response-details.adoc[] - -== Test Your API Specification - -. In Anypoint Code Builder, open the RAML file for your American Flights API specification (`american-flights-api.raml`). -. Click the *API Console* icon in the editor toolbar: -+ -image::api-console-button.png["API Console icon highlighted in the editor toolbar"] -. In API Console, select the `get` method for the `flights/` resource: -+ -image::select-get-method.png["get method for the flights/ resource highlighted in the API Console"] -. Click *Try It*: -+ -image::select-try-it-button.png["Try it button highlighted in the API Console"] -. Select the *destination* text box inside *Query Parameters* and verify that the three values you defined in your API specification appear: -+ -image::select-query-params.png["Values highlighted in the API Console"] -. Click *Send*. -. Verify that the API Console returns the response you defined with the imported fragment (`AmericanFlightsExample.raml`): -+ -image::api-console-reponse.png["A 200 OK response highlighted in the API Console"] -+ -The logic for selecting specific destinations is not yet implemented. -+ -Optionally, review your configured response examples when querying your mocked API endpoints. -//TODO: Consider adding something like this (and VERIFY FILE NAME des-sync-scm): -//In addition, synchronizing your API project with a source control management (SCM) system is a best practice. To understand source control options, see xref:des-sync-scm.adoc[]. It is beyond the scope of this tutorial to address SCM setup, which is recommended for projects intended for production releases. - -. Proceed to xref:tut-af-design-api-publish-api-spec-to-exchange.adoc[]. \ No newline at end of file diff --git a/modules/ROOT/pages/tut-af-implement-am-flights-api.adoc b/modules/ROOT/pages/tut-af-implement-am-flights-api.adoc deleted file mode 100644 index 383010a0c..000000000 --- a/modules/ROOT/pages/tut-af-implement-am-flights-api.adoc +++ /dev/null @@ -1,214 +0,0 @@ -= Implementing the American Flights API Spec -//The IDE UI links to ui-tut-implement.adoc (DO NOT REMOVE WITHOUT UX/DEV ALIGNMENT) -:page-deployment-options: cloud-ide, desktop-ide -:page-aliases: ui-tut-implement.adoc, implement-api-specification.adoc, implement-an-api-specification.adoc -:page-pagination: - -include::reuse::partial$beta-banner.adoc[tag="anypoint-code-builder"] - - -Import your American Flights API specification from Anypoint Exchange. Scaffold the specification into the American Flights project that you are developing, and add the logic to implement an endpoint in the API. - -== Before You Begin - -Complete these procedures: - -. xref:tut-af-design-am-flights-api.adoc[] -. xref:tut-af-integrate-am-flights.adoc[] - -== Import and Scaffold Your American Flights API Specification - -Import your American Flights API specification from Anypoint Exchange, and scaffold the specification into an interface for your American Flights integration project. - -. In Anypoint Code Builder, open your integration, `american-ws-anypoint-code-builder`. -+ -For information about this application, see xref:tut-af-integrate-am-flights.adoc[]. -// Pointer to Command Palette -include::partial$acb-reusable-steps.adoc[tags="open-command-palette"] - -. Provide this command: -+ -[source,command] ----- -MuleSoft: Import Asset from Exchange ----- -. Select *Rest API*: -+ -image::rest-api-asset-type.png["Rest API option highlighted after selecting MuleSoft: Import Asset from Exchange"] -. If prompted, log in to Anypoint Platform, allowing the extension to sign in and open an external web site and to open Visual Studio Code. -. Type the name of your American Flights API specification, for example: -+ -[source,spec name] ----- -American Flights API ----- -+ -For information about this specification, see xref:tut-af-design-am-flights-api.adoc[]. -. Wait for the IDE to load a list of matches to the name: -+ -image::select-api-asset-from-exchange.png["American Flights API asset is highlighted"] -. When prompted for a version, select the version of the API to import, such as `_1.0.0_`. -. Select *Yes* when prompted to scaffold the API dependency. -+ -This step adds the API specification as a dependency in your project's `pom.xml` file and creates a new configuration XML file, such as `american-flights-api.xml`: -+ -image::scafolded-mule-config-file.png["American-flights.xml file highlighted in the package explorer section"] -. Proceed to <>. - -[[tour-canvas]] -== Tour the Interface File - -Examine the scaffolded flows and error handlers for your interface in the canvas and configuration XML. - -image::scafolded-flow-canvas.png["The main flow is highlighted"] - -. From the *EXPLORER* menu, open the configuration file for your interface, `american-flight-api.xml`. -. Use the *Flow List* panel to navigate through flows: -+ -image::outline-list-select-flow.png["American-flights-api-main flow highlighted"] - -.. Expand the *Flow List* panel. -.. Select a flow from the list. -.. Click the flow in the canvas to highlight the flow in the configuration XML. -. In the configuration XML, locate the flows created for the endpoints in your API specification: - -* `get:\flights` -+ -[source,xml] ----- - - ----- -* `post:\flights` -+ -[source,xml] ----- - - ----- -* `get:\flights{ID}` -+ -[source,xml,linenums] ----- - - ----- -. Notice the automatically generated Error Handler components, for example: -+ -//TODO: WE SHOULD SHOW HOW TO DO SOME BASIC ERROR HANDLING... -+ -[source,xml] ----- - - - - - - - - - - - - - - - - - - - - - ----- - -. Proceed to <>. - -[[rename]] -== Name Your Interface and Implementation Files - -Provide descriptive names for the interface and implementation files in your American Flights project. The interface receives all incoming requests to your application. The scaffolded flows in the interface validate and route requests. The implementation provides the backend logic for calls to the interface. - -image::api-interface-rename.png["Rename option highlighted the context menu of american-flight-api-acb.xml file"] - -. Rename `american-flight-api-acb.xml` to `interface.xml` by right-clicking the file name, selecting *Rename*, and providing the new name. -. Rename `american-ws-anypoint-code-builder.xml` to `implementation.xml`. -. Proceed to <>. - -[[endpoint]] -== Configure an Endpoint through the Interface - -To receive HTTP requests through the interface, remove the HTTP listener from `implementation.xml`, and in your interface file (`interface.xml`), add a Flow Ref component (``) to the `getFlights` flow in your implementation. - -. Open `implementation.xml`. -+ -image::get-flights-select-listener.png["HTTP listener highlighted in the implementation.xml file"] -. Delete the *HTTP /flights* listener XML from the configuration XML: -+ -[source,xml] --- - --- -+ -.Click for the resulting flow. -[%collapsible] -==== -[source,xml] --- - - - - - - - - - - - { - ID: payload01.ID, - code: (payload01.code1 default "") ++ (payload01.code2 default ""), - price: payload01.price default 0, - departureDate: payload01.takeOffDate as String default "", - origin: payload01.fromAirport default "", - destination: payload01.toAirport default "", - emptySeats: payload01.seatsAvailable default 0, - plane: { - "type": payload01.planeType default "", - totalSeats: payload01.totalSeats default 0 - } - } - ]]> - - - - - --- -==== -. In Anypoint Code Builder, open your `interface.xml` file. -. Locate the `get:\flights:american-flights-api-config` flow: -+ -[source,xml] --- - - - --- -. Before the `` element in the flow, add a Flow Reference component (``) that references the flow `getFlights` in the implementation: -+ -[source,xml] --- - - - - --- -. Optional: Trigger a flow through your interface, and process the request with your implementation. -+ -For guidance, see xref:int-trigger-flows.adoc[]. -. Proceed to xref:tut-af-debug-am-flights.adoc[]. diff --git a/modules/ROOT/pages/tut-af-integrate-am-flights.adoc b/modules/ROOT/pages/tut-af-integrate-am-flights.adoc deleted file mode 100644 index 35f1bb84d..000000000 --- a/modules/ROOT/pages/tut-af-integrate-am-flights.adoc +++ /dev/null @@ -1,255 +0,0 @@ -= Integrating American Flights Processes -//ACB UI links to ui-tut-integrate.adoc (DO NOT REMOVE WITHOUT UX/DEV ALIGNMENT) -:page-deployment-options: cloud-ide, desktop-ide -:page-aliases: ui-tut-integrate.adoc, create-basic-integration.adoc, develop-integration.adoc -:page-pagination: - -include::reuse::partial$beta-banner.adoc[tag="anypoint-code-builder"] - - -Start by creating a basic integration for the American Flights example. This integration is a Mule application that provides some of the logic for processing requests from the American Flights API. - -== Before You Begin - -Complete these procedures: - -* xref:tut-af-design-am-flights-api.adoc[] (all tasks from creating the API specification to publishing the specification to Exchange) -* Installing a REST client such as Postman or Advanced REST Client. - -== Create a Mule Application - -Start an integration application for the American Flights example. - -include::partial$acb-reusable-steps.adoc[tags="open-ide"] -+ -image::acb-mulesoft-in-activity-bar.png["MuleSoft icon in the VS Code Activity Bar"] -. From *Create*, click *Develop an Integration*: -+ -image::develop-integration-option-mat.png["Develop an Integration link highlighted in the Getting started section"] -. Provide integration project properties to the *Develop an Integration* form: -+ -image::int-create-integration-scratch.png["Create integration project from scratch.", width=70%] - -.. Under *Project Name*, type `american-ws-anypoint-code-builder`. -.. Under *Project Location*, select *Browse*, and then select your home directory. -.. Under *Create*, select *Empty Project*. -.. Select *Mule runtime* and *Java* versions. -+ -//Info about downloads and versioning: -include::anypoint-code-builder::partial$acb-runtime-java.adoc[tags="runtime-java-download;runtime-version-note;runtime-java-defaults"] -. Click *Create Project*. -+ -//Info about download notifications and location: -include::partial$acb-runtime-java.adoc[tags="runtime-java-notification"] -. Proceed to <>. - -[[configure]] -== Configure an HTTP Listener Operation and Set a Payload - -The listener is for triggering the flow, and Set Payload provides some test data for the integration: - -. If the canvas and configuration XML for the project are not open, navigate to `american-ws-anypoint-code-builder.xml` from the Explorer. -+ -image::empty-canvas-state.png["american-ws-anypoint-code-builder.xml file shown in visual representation of its Mule flow and the Mule Configuration file"] -+ -[calloutlist] -.. The canvas provides space for a visual representation of your Mule flows or subflows. -.. The configuration XML editor displays the configuration file for your Mule application. -. Select *Build a Flow* from the canvas to create an empty flow within a Mule integration application. -. Change the default name of the flow from the canvas or from the configuration XML. -+ -[tabs] -==== -From the canvas:: -+ -Click *Flow name1* to open the configuration panel for the Flow component, change the flow name to `getFlights`, and click the check mark to set the new name. -+ -image::int-flow-name-ui.png["Change name of flow through canvas."] - -From the configuration XML:: -+ -Replace the default name of the flow (`name1`) with `getFlights`. -+ -[%header,cols="1a,1a"] -|=== -| Automatically Generated Flow Element | Renamed Flow Element - -| -[source, XML] ----- - - - ----- - -| -[source, XML] ----- - - - ----- -|=== -==== - -. Add the HTTP Listener component to your configuration XML: -.. In the canvas, after your *Flow* component, click the image:icon-plus.png["",15,15] (*Add component*) icon: -+ -image::main-tutorial-add-first-http-listener.png["Plus icon highlighted in the flow"] -.. Search for and select *Listener* from the *HTTP* results: -+ -image::main-tutorial-add-first-listener.png["Listener component highlighted in the Add Component section"] -+ -The configuration XML file adds the XML for the HTTP Listener into the `` element, for example: -+ -[source,XML] ----- - - - - ----- -. In the configuration XML, place your cursor before the opening tag, and copy the following code: -+ -[source,xml] ----- - - - ----- - -. In the configuration XML, configure the attributes for the HTTP Listener configuration ``: -+ -[source,xml] ----- - - - ----- -In `` and its child element ``, set the attributes to values provided in the example. -+ -Notice that the `name` attribute changes to `inbound-request`. The `doc:id` is randomly generated and does not require a change. -. Configure the attributes for the HTTP Listener configuration: -+ -[tabs] -==== -From the canvas:: -+ -Click the *Listener* operation to open its configuration panel, and set the HTTP Listener attributes to the following values: -+ -image::tut-int-listener-component-ui.png["Configure the Listener operation through its configuration panel."] -+ -[calloutlist] -.. Change the operation name to `HTTP /flights`. -.. Select `inbound-request` from the configuration reference dropdown menu. -.. Set the *Path* attribute to `flights`. - -From the configuration XML:: -+ -In ``, set the attributes to the values provided in the example. -+ -[source,xml] ----- - - - ----- -==== -. From the canvas, add a Set Payload component after your HTTP Listener operation. -. Configure the Set Payload component attributes: -+ -[tabs] -==== -From the canvas:: -+ -Click the Set Payload component to open its configuration panel, and set the attributes to the following values: -+ -image::tut-int-set-payload-component-ui.png["Configure the Set Payload component through its configuration panel."] -+ -[calloutlist] -.. Change the component name to `Set Response`. -.. Set the *Value* attribute to `Flight info`. -From the configuration XML:: -+ -In ``, set the attributes to the values provided in the example. -+ -[source,xml] ----- - - - - - - - - - ----- -+ --- -[calloutlist] -. Set the `value` attribute to `Flight info` and the `doc:name` to `Set Response`. --- -==== -[[check-connection]] -. Before `` in the configuration XML, click *Test Connection* to check the HTTP Listener connection. -+ -The UI provides status: - -* *Verifying connection inbound-request* indicates that the test is in progress. -* *Connection is valid* indicates a successful connection. -* *Invalid Connection Got status code: 500 when trying to resolve a Mule Runtime operation* indicates a connection error. -+ -A common code `500` error is `port 8081: Address already in use`. For port conflicts, configure a different port, such as `8082`, and retest the connection. -. After receiving the *Connection is valid* message, proceed to <>. - -[[run]] -== Run Your Application in Debug Mode - -// Pointer to Run and Debug -include::partial$acb-reusable-steps.adoc[tags="open-run-debug"] -. Click the image:icon-start-debug.png["",15,15] (*Start Debugging (F5)*) icon for *Debug Mule Application*: -+ -image::run-debugger.png["Run the debugger."] -+ -Anypoint Code Builder uses Maven to build and deploy your application to its embedded Mule runtime engine. -+ -Note that using *Run* > *Start without Debugging* produces an error. -//open terminal -include::anypoint-code-builder::partial$acb-reusable-steps.adoc[tag="open-terminal"] -+ -[source, terminal] ----- -******************************************************************************* -* - - + APPLICATION + - - * - - + DOMAIN + - - * - - + STATUS + - - * -******************************************************************************* -* american-ws-anypoint-code-builder-1.0.0-SNAPS * default * DEPLOYED * -******************************************************************************* ----- -. Proceed to <>. - -[[test]] -== Test Your Application - -Use the IDE's terminal to trigger the flow. - -. Submit a `curl` command from the terminal with the URL to the `/flights` endpoint to trigger the flow: -+ -[source,URI] ----- -curl http://0.0.0.0:8081/flights ----- -+ -For guidance, see xref:int-trigger-flows.adoc#trigger-flow[Trigger a Flow]. -. In your REST client or browser, check for the response *Flight info*. -+ -If you do not receive this response or if you receive a connection error, review your XML configuration, make sure your application is deployed, and recheck your HTTP Listener connection. -. After receiving the *Flight info* response, proceed to <>. - -[[stop]] -== Stop Your Application - -. In Anypoint Code Builder, select the stop icon from the toolbar: -+ -image::stop-mule-application.png["Stop icon highlighted in the toolbar"] -. Proceed to xref:tut-af-integrate-connect-to-a-db.adoc[] to import a connector from Exchange, and connect to an existing database that returns data about flights for the American Flights API. diff --git a/modules/ROOT/pages/tut-af-integrate-connect-to-a-db.adoc b/modules/ROOT/pages/tut-af-integrate-connect-to-a-db.adoc deleted file mode 100644 index 419b8effb..000000000 --- a/modules/ROOT/pages/tut-af-integrate-connect-to-a-db.adoc +++ /dev/null @@ -1,181 +0,0 @@ -= Connecting to a Database from the App -:page-deployment-options: cloud-ide, desktop-ide -:page-pagination: - -include::reuse::partial$beta-banner.adoc[tag="anypoint-code-builder"] - - -Use Anypoint Connector for Database (Database Connector) to connect to an external database from your Mule flow. - -== Before You Begin - -Complete xref:tut-af-integrate-am-flights.adoc[]. - -== Open Your American Flights Application - -. In Anypoint Code Builder, open `american-ws-anypoint-code-builder.xml`. -. Remove the `` component from the configuration XML: -+ -[source,xml] --- - --- - -== Add a Database Driver Dependency - -The Database Connector supports a variety of Java Database Connectivity (JDBC) databases. - -Provide the dependency for the `mySQL` driver: - -. Open the *Explorer* menu by pressing Cmd+Shift+e (Mac) or Ctrl+Shift+e (Windows). -. Open the `pom.xml` file. -. Add a new dependency within the `` element: -+ -[source,xml] --- - - mysql - mysql-connector-java - 8.0.29 - --- -+ -image::add-mysql-driver-dependency.png["pom.xml with new dependency highlighted"] -//TODO: hamburger menu -. If you receive a popup with the message `A build file was modified. Do you want to synchronize the Java classpath/configuration?`, select *Yes*. -. In the `pom.xml`, replace the existing `` element within your `mule-maven-plugin` with a new shared library: -+ -[source,xml,linenums] --- - - org.mule.tools.maven - mule-maven-plugin - ${mule.maven.plugin.version} - true - - - - mysql - mysql-connector-java - - - - --- -. If requested, accept *Yes* to sync the Java classpath. -. Proceed to <>. - -[[add-db-config]] -== Add a Database Connector Configuration - -. In Anypoint Code Builder, open `american-ws-anypoint-code-builder.xml`. -. In the configuration XML, add the following global `` configuration before the opening tag: -+ -[source,xml] ----- - - - - - -... ----- -.. Edit the attributes in `` to produce this XML configuration: -+ -[source,xml] --- - - - --- -. Review the complete configuration XML: -+ -[source,XML] --- - - - - - - - - - - - --- -+ -NOTE: The `getFlights` flow contains an expected error: `The content of element 'flow' is not complete.` This error is present until you add a connector later in this procedure. - -. Proceed to <>. - -[[write]] -== Write a Query to Return All Flights - -. From the canvas, click the image:icon-plus.png["",15,15] (*Add component*) icon after the HTTP Listener component. -. Add the *Select* operation for Anypoint Connector for Database (Database Connector). -+ -Either search for *Select* or navigate to the operation from *Connectors* > *Database* > *Select*. -. Provide this configuration for the Select operation: -+ -[tabs] -==== -From the canvas:: -+ -Click the *Select* operation to open its configuration panel, and set the Select attributes to the following values: -+ -image::tut-int-db-connector-ui.png["Configure the Select connector through its configuration panel."] -+ -[calloutlist] -.. Change the connector name to `Query Flights`. -.. Select `Database_Config` from the connector configuration dropdown menu. -.. Set *SQL Query Text* to `Select * FROM american`. - -From the configuration XML:: -+ -In ``, set the attributes to the values provided in the example. -+ -[source,XML] --- - - - - - --- -+ -Notice that the `config-ref` attribute references the database connection configuration in `` by its `name`. -==== - -. Review the complete configuration XML: -+ -[source,XML] --- - - - - - - - - - - - - - - - - --- -. Proceed to xref:tut-af-integrate-use-dataweave.adoc[] to learn how to use DataWeave to make the database response match examples in your American Flight API specification. diff --git a/modules/ROOT/pages/tut-af-integrate-use-dataweave.adoc b/modules/ROOT/pages/tut-af-integrate-use-dataweave.adoc deleted file mode 100644 index 0ab533a15..000000000 --- a/modules/ROOT/pages/tut-af-integrate-use-dataweave.adoc +++ /dev/null @@ -1,579 +0,0 @@ -= Transforming Flight Data with DataWeave -:page-deployment-options: cloud-ide, desktop-ide -:page-pagination: - -include::reuse::partial$beta-banner.adoc[tag="anypoint-code-builder"] - -Use DataWeave to transform and match flight data to your API spec. - -== Before You Begin - -Complete these procedures: - -. xref:tut-af-integrate-am-flights.adoc[] -. xref:tut-af-integrate-connect-to-a-db.adoc[] - -[[add-transform-component]] -== Add the Transform Message Component - -Add a Transform Message component to the flow so you can configure it to return the database payload as JSON in the next section. - -. In Anypoint Code Builder, open `american-ws-anypoint-code-builder.xml`. -. Add the Transform Message component below the *Database Select* operation. Use one of these methods: -+ -* *From the canvas:* Click the image:icon-plus.png["",15,15] (*Add component*) icon after the *Database Select* operation. In the menu, open *Core Processors* (or search for *transform*), then select *Transform Message*. -* *From the configuration XML:* Place your cursor inside the flow, after the closing tag of the *Database Select* element. Use auto-complete (Ctrl+Space or Cmd+Space), type `ee:transform` or `transform`, and select *Transform Message* from the list. -+ -The IDE inserts the component. If the inserted XML does not include `` and `` with an empty `` block, add that structure inside `` so you can add the DataWeave script in the next section. -+ -image::transform-with-output-json.png["Transform component highlighted"] -+ -.Example Transform Message component XML: -[source,xml] ----- - - - - - - - ----- - -[[return-payload]] -== Return the Payload as JSON - -. Open `american-ws-anypoint-code-builder.xml` if it is not already open (you added the Transform Message component in <>). -. Ensure the Transform Message component is present below *Database Select* (you added it in the previous section). In the configuration XML, add the `doc:name` value *Transform Message* or similar to the `` component: -+ ----- - -... ----- -. Within `` add a DataWeave script that outputs the message payload to a JSON format: -+ -[source,dataweave] --- - - - - - - - --- -. Deploy your app within the IDE by selecting *Run* > *Start Debugging (F5)*. -+ -For guidance, see xref:tut-af-integrate-am-flights.adoc#run[Run Your App in Debug Mode]. -. After the app deploys successfully, use a REST Client or browser to trigger a response. -+ -For guidance, see xref:tut-af-integrate-am-flights.adoc#test[Test Your App]. -. View the response data from the MySQL database, for example: -+ -[source,JSON] ----- -[ - { - "planeType": "Boeing 787", - "code2": "0001", - "takeOffDate": "2016-01-20T00:00:00", - "code1": "rree", - "fromAirport": "MUA", - "price": 541, - "seatsAvailable": 0, - "toAirport": "LAX", - "ID": 1, - "airlineName": "American Airlines", - "totalSeats": 200 - }, - ... -] ----- -+ -.Click for the complete response. -[%collapsible] -==== -[source,json] ----- -[ - { - "planeType": "Boeing 787", - "code2": "0001", - "takeOffDate": "2016-01-20T00:00:00", - "code1": "rree", - "fromAirport": "MUA", - "price": 541, - "seatsAvailable": 0, - "toAirport": "LAX", - "ID": 1, - "airlineName": "American Airlines", - "totalSeats": 200 - }, - { - "planeType": "Boeing 747", - "code2": "0123", - "takeOffDate": "2016-01-25T00:00:00", - "code1": "eefd", - "fromAirport": "MUA", - "price": 300, - "seatsAvailable": 7, - "toAirport": "CLE", - "ID": 2, - "airlineName": "American Airlines", - "totalSeats": 345 - }, - { - "planeType": "Boeing 777", - "code2": "0192", - "takeOffDate": "2016-01-20T00:00:00", - "code1": "ffee", - "fromAirport": "MUA", - "price": 300, - "seatsAvailable": 0, - "toAirport": "LAX", - "ID": 3, - "airlineName": "American Airlines", - "totalSeats": 300 - }, - { - "planeType": "Boeing 737", - "code2": "1000", - "takeOffDate": "2016-01-20T00:00:00", - "code1": "rree", - "fromAirport": "MUA", - "price": 200, - "seatsAvailable": 5, - "toAirport": "CLE", - "ID": 4, - "airlineName": "American Airlines", - "totalSeats": 150 - }, - { - "planeType": "Boeing 737", - "code2": "1093", - "takeOffDate": "2016-02-11T00:00:00", - "code1": "rree", - "fromAirport": "MUA", - "price": 142, - "seatsAvailable": 1, - "toAirport": "SFO", - "ID": 5, - "airlineName": "American Airlines", - "totalSeats": 150 - }, - { - "planeType": "Boeing 787", - "code2": "1112", - "takeOffDate": "2016-01-20T00:00:00", - "code1": "ffee", - "fromAirport": "MUA", - "price": 954, - "seatsAvailable": 100, - "toAirport": "CLE", - "ID": 6, - "airlineName": "American Airlines", - "totalSeats": 200 - }, - { - "planeType": "Boeing 777", - "code2": "1994", - "takeOffDate": "2016-01-01T00:00:00", - "code1": "eefd", - "fromAirport": "MUA", - "price": 676, - "seatsAvailable": 0, - "toAirport": "SFO", - "ID": 7, - "airlineName": "American Airlines", - "totalSeats": 300 - }, - { - "planeType": "Boeing 737", - "code2": "2000", - "takeOffDate": "2016-02-20T00:00:00", - "code1": "ffee", - "fromAirport": "MUA", - "price": 300, - "seatsAvailable": 30, - "toAirport": "SFO", - "ID": 8, - "airlineName": "American Airlines", - "totalSeats": 150 - }, - { - "planeType": "Boeing 737", - "code2": "3000", - "takeOffDate": "2016-02-01T00:00:00", - "code1": "eefd", - "fromAirport": "MUA", - "price": 900, - "seatsAvailable": 0, - "toAirport": "SFO", - "ID": 9, - "airlineName": "American Airlines", - "totalSeats": 150 - }, - { - "planeType": "Boeing 777", - "code2": "4511", - "takeOffDate": "2016-01-15T00:00:00", - "code1": "eefd", - "fromAirport": "MUA", - "price": 900, - "seatsAvailable": 100, - "toAirport": "LAX", - "ID": 10, - "airlineName": "American Airlines", - "totalSeats": 300 - }, - { - "planeType": "Boeing 737", - "code2": "4567", - "takeOffDate": "2016-01-20T00:00:00", - "code1": "rree", - "fromAirport": "MUA", - "price": 456, - "seatsAvailable": 100, - "toAirport": "SFO", - "ID": 11, - "airlineName": "American Airlines", - "totalSeats": 150 - } -] ----- -==== -+ -If the MySQL test server is not available, this error occurs: -+ -[[source,error]] ----- -Cannot get connection for URL jdbc:mysql://mudb.learn.mulesoft.com:3306/ : -Communications link failure. ----- -+ -To address the issue, try again until you get a successful response. -. Proceed to <>. - -[[restructure]] -== Transform the Response Data - -Transform the JSON output to the structure required by your API specification. - -Your *American Flights API* in Anypoint Exchange uses a different structure for its flight data than your request to the database returns. - -To find the required JSON structure, search for the JSON example under the GET method for your `/flights` endpoint. For guidance, see xref:publish-api-spec-to-exchange.adoc#locate-your-api-in-exchange[Locate Your API in Exchange] or open the https://anypoint.mulesoft.com/exchange/68ef9520-24e9-4cf2-b2f5-620025690913/training-american-flights-api/minor/2.0/console/method/%2373/[public version of the API on Exchange^]. - -[%header,%autowidth.spread,cols="1a,1a"] -|=== -| API Specification Response Structure | Actual Response Structure -| -[source,json] --- -[ - { - "code": "ER38sd", - "price": 400, - "departureDate": "2017/07/26", - "origin": "CLE", - "destination": "SFO", - "emptySeats": 0, - "plane": { - "type": "Boeing 737", - "totalSeats": 150 - } - } -] --- -| -[source,json] --- -[ - { - "planeType": "Boeing 787", - "code2": "0001", - "takeOffDate": "2016-01-20T00:00:00", - "code1": "rree", - "fromAirport": "MUA", - "price": 541, - "seatsAvailable": 0, - "toAirport": "LAX", - "ID": 1, - "airlineName": "American Airlines", - "totalSeats": 200 - } -] --- -|=== - -Use DataWeave to transform the response: - -. In the configuration XML, replace the script within the `` with a DataWeave mapping: -+ -[source,xml] --- - - - - { - ID: payload01.ID, - code: (payload01.code1 default "") ++ (payload01.code2 default ""), - price: payload01.price default 0, - departureDate: payload01.takeOffDate as String default "", - origin: payload01.fromAirport default "", - destination: payload01.toAirport default "", - emptySeats: payload01.seatsAvailable default 0, - plane: { - "type": payload01.planeType default "", - totalSeats: payload01.totalSeats default 0 - } - } - ]]> - - - --- -. Review your configuration XML: -+ -[source,xml] ----- - - - - - - - - - - - - - - - - - - - - { - ID: payload01.ID, - code: (payload01.code1 default "") ++ (payload01.code2 default ""), - price: payload01.price default 0, - departureDate: payload01.takeOffDate as String default "", - origin: payload01.fromAirport default "", - destination: payload01.toAirport default "", - emptySeats: payload01.seatsAvailable default 0, - plane: { - "type": payload01.planeType default "", - totalSeats: payload01.totalSeats default 0 - } - } - ]]> - - - - ----- -. Proceed to <>. - -[[run-test]] -== Run and Test Your App - -. Deploy your app within the IDE by executing to *Run* > *Start Debugging (F5)*. -+ -For guidance, see xref:tut-af-integrate-am-flights.adoc#run[Run Your App in Debug Mode]. -. After the app deploys successfully, use a REST Client or browser to trigger flow. -+ -For guidance, see xref:tut-af-integrate-am-flights.adoc#test[Test Your App]. -+ -Notice that the transformed data structure conforms to the API requirements, for example: -+ -[source,JSON] ----- -[ - { - "ID": 1, - "code": "rree0001", - "price": 541, - "departureDate": "2016-01-20T00:00:00", - "origin": "MUA", - "destination": "LAX", - "emptySeats": 0, - "plane": { - "type": "Boeing 787", - "totalSeats": 200 - } - }, - ... ----- -+ -[%collapsible] -.Click for the complete response. -==== -[source,JSON] ----- -[ - { - "ID": 1, - "code": "rree0001", - "price": 541, - "departureDate": "2016-01-20T00:00:00", - "origin": "MUA", - "destination": "LAX", - "emptySeats": 0, - "plane": { - "type": "Boeing 787", - "totalSeats": 200 - } - }, - { - "ID": 2, - "code": "eefd0123", - "price": 300, - "departureDate": "2016-01-25T00:00:00", - "origin": "MUA", - "destination": "CLE", - "emptySeats": 7, - "plane": { - "type": "Boeing 747", - "totalSeats": 345 - } - }, - { - "ID": 3, - "code": "ffee0192", - "price": 300, - "departureDate": "2016-01-20T00:00:00", - "origin": "MUA", - "destination": "LAX", - "emptySeats": 0, - "plane": { - "type": "Boeing 777", - "totalSeats": 300 - } - }, - { - "ID": 4, - "code": "rree1000", - "price": 200, - "departureDate": "2016-01-20T00:00:00", - "origin": "MUA", - "destination": "CLE", - "emptySeats": 5, - "plane": { - "type": "Boeing 737", - "totalSeats": 150 - } - }, - { - "ID": 5, - "code": "rree1093", - "price": 142, - "departureDate": "2016-02-11T00:00:00", - "origin": "MUA", - "destination": "SFO", - "emptySeats": 1, - "plane": { - "type": "Boeing 737", - "totalSeats": 150 - } - }, - { - "ID": 6, - "code": "ffee1112", - "price": 954, - "departureDate": "2016-01-20T00:00:00", - "origin": "MUA", - "destination": "CLE", - "emptySeats": 100, - "plane": { - "type": "Boeing 787", - "totalSeats": 200 - } - }, - { - "ID": 7, - "code": "eefd1994", - "price": 676, - "departureDate": "2016-01-01T00:00:00", - "origin": "MUA", - "destination": "SFO", - "emptySeats": 0, - "plane": { - "type": "Boeing 777", - "totalSeats": 300 - } - }, - { - "ID": 8, - "code": "ffee2000", - "price": 300, - "departureDate": "2016-02-20T00:00:00", - "origin": "MUA", - "destination": "SFO", - "emptySeats": 30, - "plane": { - "type": "Boeing 737", - "totalSeats": 150 - } - }, - { - "ID": 9, - "code": "eefd3000", - "price": 900, - "departureDate": "2016-02-01T00:00:00", - "origin": "MUA", - "destination": "SFO", - "emptySeats": 0, - "plane": { - "type": "Boeing 737", - "totalSeats": 150 - } - }, - { - "ID": 10, - "code": "eefd4511", - "price": 900, - "departureDate": "2016-01-15T00:00:00", - "origin": "MUA", - "destination": "LAX", - "emptySeats": 100, - "plane": { - "type": "Boeing 777", - "totalSeats": 300 - } - }, - { - "ID": 11, - "code": "rree4567", - "price": 456, - "departureDate": "2016-01-20T00:00:00", - "origin": "MUA", - "destination": "SFO", - "emptySeats": 100, - "plane": { - "type": "Boeing 737", - "totalSeats": 150 - } - } -] ----- -==== -. Stop your app. -+ -For guidance, see xref:tut-af-integrate-am-flights.adoc#stop[Stop Your App]. -. Proceed to xref:tut-af-implement-am-flights-api.adoc[]. diff --git a/modules/ROOT/pages/tutorials.adoc b/modules/ROOT/pages/tutorials.adoc index 3ec92835b..38c87c9bb 100644 --- a/modules/ROOT/pages/tutorials.adoc +++ b/modules/ROOT/pages/tutorials.adoc @@ -1,13 +1,13 @@ = Tutorials :page-deployment-options: cloud-ide, desktop-ide -:page-aliases: user-guide.adoc +:page-aliases: user-guide.adoc, tut-af-amflights-overview.adoc include::reuse::partial$beta-banner.adoc[tag="anypoint-code-builder"] //LOGO (web, desktop, or both) // include::partial$acb-ide-logos.adoc[tags="both-ides"] -Learn how to design, implement, integrate, and deploy APIs with Anypoint Code Builder. Work through these numbered product topics to move from API specification design to a deployed Mule application. For end-to-end examples on specific stacks or patterns, see <>. +Learn how to design, implement, integrate, and deploy APIs with Anypoint Code Builder. Work through these numbered product topics to move from API specification design to a deployed Mule application. For end-to-end walkthroughs that focus on one scenario each, see <>. [[modular-learning-paths]] == Take Your API Specification from Design Through Deployment @@ -29,11 +29,7 @@ Import your API specification from Exchange, scaffold it into an interface in yo [[hands-on-tutorials]] == Hands-On Tutorials -Each tutorial is a self-contained walkthrough that applies Anypoint Code Builder to one integration style, API technology, or connector story from start to finish. - -* xref:tut-af-amflights-overview.adoc[]: -+ -Use Anypoint Code Builder to design and implement an API specification example called American Flights API that returns flight information from a MySQL database. +Each linked tutorial is a self-contained walkthrough that applies Anypoint Code Builder to one integration style, API technology, or connector story from start to finish. * xref:tut-local-api-specification.adoc[]: + From 8c36e1913a3a780b286279d63d727ee0043b251e Mon Sep 17 00:00:00 2001 From: Cristian-Venticinque Date: Fri, 24 Apr 2026 12:52:50 -0300 Subject: [PATCH 09/36] Removing JDBC driver topic and references --- modules/ROOT/nav.adoc | 1 - .../ROOT/pages/int-configure-components.adoc | 3 +- ...nt-configure-database-jdbc-dependency.adoc | 66 ------------------- modules/ROOT/pages/tutorials.adoc | 1 - 4 files changed, 1 insertion(+), 70 deletions(-) delete mode 100644 modules/ROOT/pages/int-configure-database-jdbc-dependency.adoc diff --git a/modules/ROOT/nav.adoc b/modules/ROOT/nav.adoc index 7320e6488..31355c51a 100644 --- a/modules/ROOT/nav.adoc +++ b/modules/ROOT/nav.adoc @@ -72,7 +72,6 @@ *** xref:int-configure-components-add.adoc[] *** xref:int-configure-dw-expressions.adoc[] *** xref:int-configure-components-import-connector-exchange.adoc[] -*** xref:int-configure-database-jdbc-dependency.adoc[] *** xref:int-configure-components-check-connection.adoc[] *** xref:int-configure-components-open-from-xml.adoc[] ** xref:int-create-secure-configs.adoc[] diff --git a/modules/ROOT/pages/int-configure-components.adoc b/modules/ROOT/pages/int-configure-components.adoc index a49d862a6..7f23bac66 100644 --- a/modules/ROOT/pages/int-configure-components.adoc +++ b/modules/ROOT/pages/int-configure-components.adoc @@ -1,6 +1,6 @@ = Configuring Components :page-deployment-options: cloud-ide, desktop-ide -:page-aliases: int-work-with-code-snippets.adoc, work-with-code-snippets.adoc, create-xml-snippets.adoc +:page-aliases: int-work-with-code-snippets.adoc, work-with-code-snippets.adoc, create-xml-snippets.adoc, connect-to-a-db.adoc, tut-af-integrate-connect-to-a-db.adoc :open-config-xml: In the Explorer, open the configuration XML file for your project: include::reuse::partial$beta-banner.adoc[tag="anypoint-code-builder"] @@ -13,7 +13,6 @@ Common tasks include the following: * xref:int-configure-dw-expressions.adoc[Configure Expressions] * <> * <> -* xref:int-configure-database-jdbc-dependency.adoc[Add a JDBC Driver for the Database Connector] * <> == Before You Begin diff --git a/modules/ROOT/pages/int-configure-database-jdbc-dependency.adoc b/modules/ROOT/pages/int-configure-database-jdbc-dependency.adoc deleted file mode 100644 index 23e560ff0..000000000 --- a/modules/ROOT/pages/int-configure-database-jdbc-dependency.adoc +++ /dev/null @@ -1,66 +0,0 @@ -= Adding a JDBC Driver for the Database Connector -:page-deployment-options: cloud-ide, desktop-ide -:page-aliases: connect-to-a-db.adoc, tut-af-integrate-connect-to-a-db.adoc - -include::reuse::partial$beta-banner.adoc[tag="anypoint-code-builder"] - -When you use Anypoint Connector for Database with a JDBC database, add the JDBC driver to your project as a Maven dependency. Declare the driver as a *shared library* in the Mule Maven Plugin so the packaged application loads the driver correctly at runtime. - -The following steps use a MySQL driver as a concrete example. For other databases, substitute the `groupId`, `artifactId`, and `version` coordinates from your vendor documentation, and use the same `sharedLibraries` pattern with matching coordinates. - -[[add-jdbc-dependency]] -== Add the JDBC Driver Dependency - -. Open the *Explorer* view (Cmd+Shift+e on Mac, or Ctrl+Shift+e on Windows), and open the `pom.xml` file at the root of your project. -. Inside the `` element, add a dependency for the JDBC driver. -+ -The following example adds the MySQL Connector/J artifact: -+ -[source,xml] ----- - - mysql - mysql-connector-java - 8.0.29 - ----- -+ -image::add-mysql-driver-dependency.png["pom.xml with new dependency highlighted"] -. If Anypoint Code Builder prompts that a build file was modified and asks whether to synchronize the Java classpath or configuration, click *Yes*. - -[[declare-shared-library]] -== Declare the Driver as a Shared Library - -Register the same driver artifact in the `mule-maven-plugin` so Mule treats it as a shared library when packaging the app. - -. In `pom.xml`, locate the `` entry for `org.mule.tools.maven` / `mule-maven-plugin`. -. Update the `` element for that plugin. -+ -If the `mule-maven-plugin` uses an empty `` element, replace that element with a `` block that contains ``, as shown in the following example. -If `` already contains other elements, add the `` block from the example inside your existing `` element. Do not remove unrelated configuration. -+ -[source,xml] ----- - - org.mule.tools.maven - mule-maven-plugin - ${mule.maven.plugin.version} - true - - - - mysql - mysql-connector-java - - - - ----- -+ -The `groupId` and `artifactId` inside `` must match the JDBC dependency you added in <>. -. If you are prompted again to synchronize the Java classpath or configuration, click *Yes*. - -== See Also - -* xref:int-configure-components-check-connection.adoc[] -* xref:int-configure-components-import-connector-exchange.adoc[] diff --git a/modules/ROOT/pages/tutorials.adoc b/modules/ROOT/pages/tutorials.adoc index 38c87c9bb..4f95e882f 100644 --- a/modules/ROOT/pages/tutorials.adoc +++ b/modules/ROOT/pages/tutorials.adoc @@ -19,7 +19,6 @@ The following topics guide you step by step from API specification design in the . Optionally xref:des-create-api-fragments.adoc[Creating and Using API Spec Fragments] for reusable types and examples from Anypoint Exchange. . xref:des-publish-api-spec-to-exchange.adoc[Publishing API Projects to Exchange] so your team can discover and implement the contract. . xref:int-create-integrations.adoc[Creating Integrations] and xref:int-configure-components.adoc[Configuring Components] in your flows. -. When you use the Database connector with JDBC, follow xref:int-configure-database-jdbc-dependency.adoc[Adding a JDBC Driver for the Database Connector]. . xref:int-configure-dw-expressions.adoc#map-payload-to-api-contract[Mapping Payload Fields to Match Your API Specification] with DataWeave where backend data shapes differ from the contract. . xref:imp-implement-api-specs.adoc[Implementing OAS, RAML, AsyncAPI, and GraphQL APIs] + From 8dd8a030623fbb1220e33396ac55e6c70022bd5f Mon Sep 17 00:00:00 2001 From: Cristian-Venticinque Date: Fri, 24 Apr 2026 14:43:01 -0300 Subject: [PATCH 10/36] Removing DW section. --- .../pages/int-configure-dw-expressions.adoc | 81 ------------------- modules/ROOT/pages/tutorials.adoc | 2 +- 2 files changed, 1 insertion(+), 82 deletions(-) diff --git a/modules/ROOT/pages/int-configure-dw-expressions.adoc b/modules/ROOT/pages/int-configure-dw-expressions.adoc index 4577b6d82..07f141b95 100644 --- a/modules/ROOT/pages/int-configure-dw-expressions.adoc +++ b/modules/ROOT/pages/int-configure-dw-expressions.adoc @@ -558,87 +558,6 @@ output application/json toUpper('hello')]" doc:name="Set payload" doc:id="xiyfpa" /> -- -[[map-payload-to-api-contract]] -== Map Payload Fields to Match Your API Specification - -Backend systems and databases often return JSON or Java objects whose field names and nesting do not match the body models defined in your REST API specification (RAML, OAS, or the examples published to Anypoint Exchange). Use a *Transform Message* component (``) with a DataWeave script so the Mule message payload matches what your API contract describes before the response leaves your flow. - -Use the response examples or data types from your API project, or open the published asset in Anypoint Exchange, as the source of truth for names, types, and structure. For help locating a published API in Exchange, see xref:des-publish-api-spec-to-exchange.adoc#locate-api[Locate Your API in Exchange]. - -Compare the *target* shape (contract) with the *source* shape (connector output). The following table illustrates a generic mismatch between an array of records from a connector and the array your API returns to clients. - -[%header,%autowidth.spread,cols="1a,1a"] -|=== -| Target Structure (API example) | Source structure (example connector output) - -| -[source,json] ----- -[ - { - "recordId": "A-100", - "displayName": "Sample item", - "inStock": true - } -] ----- -| -[source,json] ----- -[ - { - "id": 100, - "title": "Sample item", - "qty": 12 - } -] ----- -|=== - -To reshape an array payload, use `map` with `default` (and casts as needed) so missing or null fields do not break the transform: - -. Add or open a *Transform Message* component after the operation that produces the payload you need to reshape (for example, after a database *Select*). -. In ``, set `output` to the same media type your API expects (often `application/json`). -. Map each source element to the contract fields. -+ -The following DataWeave example maps the generic source fields `id`, `title`, and `qty` to `recordId`, `displayName`, and `inStock`: -+ -[source,dataweave] ----- -%dw 2.0 -output application/json ---- -payload map (row) -> { - recordId: (row.id as String) default "", - displayName: row.title default "", - inStock: (row.qty default 0) > 0 -} ----- -+ -Embed the script in your configuration XML inside a CDATA block, for example: -+ -[source,xml] ----- - - - { - recordId: (row.id as String) default "", - displayName: row.title default "", - inStock: (row.qty default 0) > 0 -} - ]]> - - ----- - -For nested objects (for example, an address object with street and postal code), build nested objects on the right-hand side of the mapping using `{ }` and map each child field explicitly. For concatenated or derived fields, use string concatenation, `++`, or other DataWeave functions as needed. - -After you implement an API with a separate interface and implementation layer, keep the transform aligned with the specification your interface enforces. For the scaffolding workflow, see xref:imp-implement-api-specs.adoc[]. - [[import-library]] == Import a DataWeave Library diff --git a/modules/ROOT/pages/tutorials.adoc b/modules/ROOT/pages/tutorials.adoc index 4f95e882f..ed622be0b 100644 --- a/modules/ROOT/pages/tutorials.adoc +++ b/modules/ROOT/pages/tutorials.adoc @@ -19,7 +19,7 @@ The following topics guide you step by step from API specification design in the . Optionally xref:des-create-api-fragments.adoc[Creating and Using API Spec Fragments] for reusable types and examples from Anypoint Exchange. . xref:des-publish-api-spec-to-exchange.adoc[Publishing API Projects to Exchange] so your team can discover and implement the contract. . xref:int-create-integrations.adoc[Creating Integrations] and xref:int-configure-components.adoc[Configuring Components] in your flows. -. xref:int-configure-dw-expressions.adoc#map-payload-to-api-contract[Mapping Payload Fields to Match Your API Specification] with DataWeave where backend data shapes differ from the contract. +. xref:int-configure-dw-expressions.adoc[Using DataWeave Expressions and Transformations] to map, reshape, or validate data between connectors, processors, and your API layer. . xref:imp-implement-api-specs.adoc[Implementing OAS, RAML, AsyncAPI, and GraphQL APIs] + Import your API specification from Exchange, scaffold it into an interface in your project, then wire flows to your implementation. From 3e5b925acf3514937017362fefd2231e2a6c1629 Mon Sep 17 00:00:00 2001 From: Cristian-Venticinque Date: Fri, 24 Apr 2026 15:05:55 -0300 Subject: [PATCH 11/36] Removing DW media type section --- modules/ROOT/pages/int-debug-mule-apps.adoc | 29 --------------------- 1 file changed, 29 deletions(-) diff --git a/modules/ROOT/pages/int-debug-mule-apps.adoc b/modules/ROOT/pages/int-debug-mule-apps.adoc index e8b9ac779..4f2a99478 100644 --- a/modules/ROOT/pages/int-debug-mule-apps.adoc +++ b/modules/ROOT/pages/int-debug-mule-apps.adoc @@ -21,8 +21,6 @@ Breakpoints are markers that you add on line numbers in a configuration XML file + For example, trigger an HTTP Listener or configure a Scheduler component. . When the execution stops at a breakpoint, use the <> to navigate, inspect, and fix issues. -+ -To compare payload media type before and after a Transform Message component, see <>. . After addressing an issue at a breakpoint, redeploy (<>) the running instance of your application. . Execute your flow again, and continue debugging until you address all issues. . <>. @@ -55,33 +53,6 @@ Keyboard shortcut: Cmd+Shift+d (Mac) or Ctrl+Shift+d (Windows) . *Breakpoint* icon: Identifies a line in the configuration XML to pause execution of the flow so that you can check for and fix any issues. . *Breakpoint* icon: Identifies a component that contains one or more breakpoints. -[[watch-payload-mediatype]] -== Watch the Payload Media Type Around a Transform - -When a *Transform Message* component (``) converts the Mule message payload, the effective media type string often changes. For example, data coming from a Java-based connector can appear as `application/java` before the transform and as `application/json` after you set `output application/json` in DataWeave. - -The DataWeave metadata accessor `^mediaType` on `payload` exposes that type string while you debug. - -To watch the value change: - -. <>, and trigger a flow that includes a Transform Message component after a connector or other operation that produces a payload you transform. -. Pause execution on a breakpoint *before* the Transform Message component (for example, on a database Select or Set Variable component that precedes the transform in the same flow). -. In the *Run and Debug* sidebar, open the *Watch* panel. -. Click the *+* icon and add this expression: -+ -[source,text] ----- -payload.^mediaType ----- -+ -image::tut-debug-mediatype-java.png["The Watch panel displaying a payload type of application/java"] -. On the <>, click *Step Over* until execution advances to or through the Transform Message component. -. Notice how the watch expression updates after the transform sets the new output format, for example: -+ -image::tut-debug-mediatype-json.png["The Watch panel displaying a payload type of application/json"] - -For DataWeave transformations and expressions, see xref:int-configure-dw-expressions.adoc[]. - [[add-breakpoint]] == Add a Breakpoint From 6da304eaffd32bfdb7068abe74a2d17349e487e6 Mon Sep 17 00:00:00 2001 From: Cristian Date: Fri, 24 Apr 2026 16:43:33 -0300 Subject: [PATCH 12/36] W-21953173-Address-Jack-feedback-CP --- modules/ROOT/pages/int-debug-mule-apps.adoc | 70 +++++++++++++++++++-- modules/ROOT/pages/int-test-munit.adoc | 2 +- 2 files changed, 67 insertions(+), 5 deletions(-) diff --git a/modules/ROOT/pages/int-debug-mule-apps.adoc b/modules/ROOT/pages/int-debug-mule-apps.adoc index 1e8b1e017..58bb03349 100644 --- a/modules/ROOT/pages/int-debug-mule-apps.adoc +++ b/modules/ROOT/pages/int-debug-mule-apps.adoc @@ -31,7 +31,8 @@ For example, trigger an HTTP Listener or configure a Scheduler component. * xref:start-acb.adoc[Set up and access the web or desktop IDE]. * xref:int-create-integrations.adoc[Create an integration]. -== Debug Console Overview +[[debugger-view-overview]] +== Debugger View Overview image::debugger-view.png["Elements of the debugger view"] @@ -46,13 +47,15 @@ The Mule event includes message payload and attribute details, as well as Mule v . *Run and Debug* (MuleSoft) icon: Opens the *Run and Debug* panel, where you can click *Start Debugging (F5)* and find debugging information. + Keyboard shortcut: Cmd+Shift+d (Mac) or Ctrl+Shift+d (Windows) -. *Watch* panel: Helps you evaluate variables and expressions. +. *Watch* panel: Pin <> that re-evaluate whenever execution pauses. . *Call Stack* panel: Identifies the functions or procedures that are currently in the stack. -. *Breakpoints* panel: Lists all breakpoints in your Mule application. +. *Breakpoints* panel: Lists breakpoints by file and line, and includes <> to stop when any exception is thrown. . *Terminal* console: Displays the output of the Maven build process and the results of the deployment to the embedded Mule Runtime engine. . *Breakpoint* icon: Identifies a line in the configuration XML to pause execution of the flow so that you can check for and fix any issues. . *Breakpoint* icon: Identifies a component that contains one or more breakpoints. +Open the *Debug Console* tab in the panel area to <> while execution is paused. See <>. + [[add-breakpoint]] == Add a Breakpoint @@ -116,7 +119,33 @@ A breakpoint icon appears on the component and in the configuration XML for that + When execution reaches the breakpoint, processing pauses so you can inspect variables, payloads, and the execution state in the Debug panel. -NOTE: Batch execution is concurrent. Multiple record blocks can be processed in parallel, so breakpoints can trigger on different threads. The Debug panel displays each thread context separately so you can inspect each execution path. +NOTE: Batch execution is concurrent. Multiple record blocks can be processed in parallel, so breakpoints can trigger on different threads. The Debug panel displays each thread context so you can inspect each execution path. + +[[conditional-breakpoint]] +== Set a Conditional Breakpoint + +A conditional breakpoint uses a DataWeave expression so execution pauses at that line only when the expression evaluates to `true`. + +To set or change a breakpoint condition: + +. Add a breakpoint in the configuration XML. See <>. +. Right-click the breakpoint indicator in the gutter for that line. +. Select *Edit Breakpoint*. +. In the breakpoint editor, enter a DataWeave expression that uses the current Mule event. + +The gutter context menu for a breakpoint also includes *Remove Breakpoint*, *Disable Breakpoint*, and *Run to Line*. + +To review a condition later, hover the breakpoint in the gutter. A tooltip shows the configured expression in the form `Condition:` followed by your DataWeave expression. + +[[exception-breakpoints]] +== Stop When an Exception Is Thrown + +You can configure the debugger to pause whenever any exception is thrown, which helps you inspect failures without adding breakpoints to every path. + +. Open *Run and Debug*. +. In the *BREAKPOINTS* section, enable *All Exceptions*. ++ +If you enable *All Exceptions*, the debugger pauses as soon as an exception is thrown during a debug session. [[run-debug-mode]] == Run Your Application in Debug Mode @@ -211,6 +240,34 @@ Stop and restart the application without packaging new dependencies, such as new + Stop execution of the application. The next debugging session that you start packages the application with any new dependencies. +[[evaluate-dw-while-debugging]] +== Evaluate DataWeave While Debugging + +While execution is paused, you can run DataWeave against the current Mule event from the *Debug Console* or from pinned entries in the *Watch* panel. For the variables available in those expressions, see xref:dataweave::dataweave-variables-context.adoc[Predefined Mule event variables]. + +[[evaluate-dw-debug-console]] +=== Use the Debug Console + +. Start a debug session and pause execution at a breakpoint or after a step. See <> and <>. +. Open the *Debug Console* tab, or choose *View* > *Debug Console*. +. Ensure the input is set to *Expression*. Type a DataWeave expression and press Enter to evaluate it against the current message, attributes, variables, and other values visible to the debugger at the pause. ++ +The console shows each expression you run and its evaluated result for the current pause. + +The *Debug Console* is suited to check if needed as you step through a flow. + +[[evaluate-dw-watch]] +=== Use the Watch Panel + +. Open the *Watch* panel in the *Run and Debug* sidebar. +. Add an entry with *+* and enter a DataWeave expression. ++ +Whenever execution pauses, the debugger re-evaluates each watch expression and shows the result next to the expression, similar to the *Debug Console*. ++ +Watch expressions typically persist for later debug sessions in the same workspace, so you can keep inspecting the same values across runs. + +The *Watch* panel is suited to values you want to track on every pause without retyping them. + [[hot-deploy]] == Perform a Hot Deploy When Debugging @@ -232,3 +289,8 @@ image::deb-hot-deploy.png["Hot-deploy (lightning) icon in a running Mule applica To stop your debug session, in the *Run and Debug* panel, click the image:icon-stop.png["",15,15] (*Stop*) icon. The status bar no longer indicates that the application is running. + +== See Also + +* xref:dataweave::dataweave-variables-context.adoc[] +* xref:int-configure-dw-expressions.adoc[] diff --git a/modules/ROOT/pages/int-test-munit.adoc b/modules/ROOT/pages/int-test-munit.adoc index 513527593..397e8b4f9 100644 --- a/modules/ROOT/pages/int-test-munit.adoc +++ b/modules/ROOT/pages/int-test-munit.adoc @@ -451,7 +451,7 @@ Run your test in debug mode after adding breakpoints to the XML for your tests o . {open-project} . Add breakpoints to the XML for the Mule application or test suites. + -For guidance with breakpoints and the Mule event, see xref:int-debug-mule-apps.adoc[]. +For guidance with breakpoints, the Mule event, DataWeave in the *Watch* panel and *Debug Console*, conditional breakpoints, and exception breakpoints, see xref:int-debug-mule-apps.adoc[]. . Run your test with a debugging command using one of the following options: * From the *Testing* panel, click image:anypoint-code-builder::icon-munit-run-debug.png["",18,18] (*Debug test*) at any level (all tests, all tests in a suite, or a single test). From cc944b8e36b7e6e51b8ebb229565b70532a27425 Mon Sep 17 00:00:00 2001 From: Cristian Pose <101070178+Crispy-Salesforce@users.noreply.github.com> Date: Mon, 27 Apr 2026 11:09:24 -0300 Subject: [PATCH 13/36] Apply suggestions from Tasha Apply suggestions from Tasha Co-authored-by: Tasha Moore <93338373+tasmoore@users.noreply.github.com> --- modules/ROOT/pages/int-debug-mule-apps.adoc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/ROOT/pages/int-debug-mule-apps.adoc b/modules/ROOT/pages/int-debug-mule-apps.adoc index 58bb03349..84d33f32f 100644 --- a/modules/ROOT/pages/int-debug-mule-apps.adoc +++ b/modules/ROOT/pages/int-debug-mule-apps.adoc @@ -124,7 +124,7 @@ NOTE: Batch execution is concurrent. Multiple record blocks can be processed in [[conditional-breakpoint]] == Set a Conditional Breakpoint -A conditional breakpoint uses a DataWeave expression so execution pauses at that line only when the expression evaluates to `true`. +A conditional breakpoint uses a DataWeave expression, so execution pauses at that line only when the expression evaluates to `true`. To set or change a breakpoint condition: @@ -135,7 +135,7 @@ To set or change a breakpoint condition: The gutter context menu for a breakpoint also includes *Remove Breakpoint*, *Disable Breakpoint*, and *Run to Line*. -To review a condition later, hover the breakpoint in the gutter. A tooltip shows the configured expression in the form `Condition:` followed by your DataWeave expression. +To review a condition later, hover over the breakpoint in the gutter. A tooltip shows the configured expression in the form `Condition:` followed by your DataWeave expression. [[exception-breakpoints]] == Stop When an Exception Is Thrown @@ -262,7 +262,7 @@ The *Debug Console* is suited to check if needed as you step through a flow. . Open the *Watch* panel in the *Run and Debug* sidebar. . Add an entry with *+* and enter a DataWeave expression. + -Whenever execution pauses, the debugger re-evaluates each watch expression and shows the result next to the expression, similar to the *Debug Console*. +Whenever execution pauses, the debugger reevaluates each watch expression and shows the result next to the expression, similar to the *Debug Console*. + Watch expressions typically persist for later debug sessions in the same workspace, so you can keep inspecting the same values across runs. From b16cd6b5f81358f1c4be82ba656cafaf30438226 Mon Sep 17 00:00:00 2001 From: Cristian-Venticinque <46459586+Cristian-Venticinque@users.noreply.github.com> Date: Mon, 27 Apr 2026 17:54:29 -0300 Subject: [PATCH 14/36] Update modules/ROOT/pages/_partials/acb-component-info.adoc Co-authored-by: Tasha Moore <93338373+tasmoore@users.noreply.github.com> --- modules/ROOT/pages/_partials/acb-component-info.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/ROOT/pages/_partials/acb-component-info.adoc b/modules/ROOT/pages/_partials/acb-component-info.adoc index 6641a64ba..72df86446 100644 --- a/modules/ROOT/pages/_partials/acb-component-info.adoc +++ b/modules/ROOT/pages/_partials/acb-component-info.adoc @@ -361,7 +361,7 @@ For more information about connector fields for this operation, see xref:salesfo Picklist fields such as *Industry* must use values that exist in your Salesforce organization. ==== + -The following configuration XML listens on `/accounts`, builds a JSON payload, maps it to Account fields inside ``, and calls *Create*. +This configuration XML listens on `/accounts`, builds a JSON payload, maps it to Account fields inside ``, and calls *Create*. Align `config-ref` on `` with the `name` of your `` (for example, `config-ref` from the earlier steps in this topic). + [source,xml] From 0c6c53dfdcd8c3f185e8c5a81bdb9cc6e8c613fd Mon Sep 17 00:00:00 2001 From: Cristian-Venticinque <46459586+Cristian-Venticinque@users.noreply.github.com> Date: Mon, 27 Apr 2026 17:54:52 -0300 Subject: [PATCH 15/36] Update modules/ROOT/pages/_partials/acb-component-info.adoc Co-authored-by: Tasha Moore <93338373+tasmoore@users.noreply.github.com> --- modules/ROOT/pages/_partials/acb-component-info.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/ROOT/pages/_partials/acb-component-info.adoc b/modules/ROOT/pages/_partials/acb-component-info.adoc index 72df86446..2afc9be30 100644 --- a/modules/ROOT/pages/_partials/acb-component-info.adoc +++ b/modules/ROOT/pages/_partials/acb-component-info.adoc @@ -182,7 +182,7 @@ Includes On-Error Continue (``) and On-Error Propagate (` Date: Tue, 28 Apr 2026 11:21:27 -0300 Subject: [PATCH 16/36] Update modules/ROOT/pages/des-create-api-specs.adoc Co-authored-by: Beth Joson <88461166+bjoson-mulesoft@users.noreply.github.com> --- modules/ROOT/pages/des-create-api-specs.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/ROOT/pages/des-create-api-specs.adoc b/modules/ROOT/pages/des-create-api-specs.adoc index b5267a033..69952f87a 100644 --- a/modules/ROOT/pages/des-create-api-specs.adoc +++ b/modules/ROOT/pages/des-create-api-specs.adoc @@ -101,7 +101,7 @@ image::design-api-1.png["*Design an API* link highlighted in the *Create* sectio | *Project Name* | Unique name for your project. -This name is used as the API spec title in Exchange, the name of the spec file, and the name of the project's root directory. +This name is used as the API spec title in Exchange, as the name of the spec file, and as the name of the project's root directory. include::partial$acb-reusable-steps.adoc[tags=no-project-name-reuse] | *Project Location* | Your home directory or another directory you create. From 1755ab1794932858567b97a22e8c030a3162b315 Mon Sep 17 00:00:00 2001 From: Cristian-Venticinque Date: Tue, 28 Apr 2026 12:25:49 -0300 Subject: [PATCH 17/36] Replacing "prompt" with "message" in the context of agents. --- modules/ROOT/pages/af-agent-networks.adoc | 2 +- modules/ROOT/pages/af-create-agent-network.adoc | 2 +- ...af-define-your-agent-network-specification.adoc | 4 ++-- .../pages/af-deploy-agent-network-targets.adoc | 2 +- modules/ROOT/pages/af-project-files.adoc | 4 ++-- .../pages/af-publish-agent-network-assets.adoc | 2 +- .../ROOT/pages/int-ai-developing-integrations.adoc | 4 ++-- modules/ROOT/pages/mulesoft-vibes.adoc | 2 +- modules/ROOT/pages/start-workspaces.adoc | 2 +- modules/ROOT/pages/troubleshoot-generative-ai.adoc | 2 +- modules/ROOT/pages/vibes-api-ai-create-spec.adoc | 8 ++++---- modules/ROOT/pages/vibes-create-integrations.adoc | 8 ++++---- modules/ROOT/pages/vibes-get-started.adoc | 14 +++++++------- modules/ROOT/pages/vibes-prompt-examples.adoc | 4 ++-- modules/ROOT/pages/vibes-skills.adoc | 2 +- modules/ROOT/pages/vibes-workflows-commands.adoc | 6 +++--- 16 files changed, 34 insertions(+), 34 deletions(-) diff --git a/modules/ROOT/pages/af-agent-networks.adoc b/modules/ROOT/pages/af-agent-networks.adoc index 46b6d4e50..d72d9f8a8 100644 --- a/modules/ROOT/pages/af-agent-networks.adoc +++ b/modules/ROOT/pages/af-agent-networks.adoc @@ -170,7 +170,7 @@ a| * For complex reasoning: Gemini 3 Pro (Deep Think capabilities) |=== -Agent networks support text-based prompts and responses. Image and binary message types aren't supported. +Agent networks support text-based messages and responses. Image and binary message types aren't supported. [[a2a-protocol]] == A2A Protocol diff --git a/modules/ROOT/pages/af-create-agent-network.adoc b/modules/ROOT/pages/af-create-agent-network.adoc index b6c4ab78b..7858d3ea2 100644 --- a/modules/ROOT/pages/af-create-agent-network.adoc +++ b/modules/ROOT/pages/af-create-agent-network.adoc @@ -16,7 +16,7 @@ MuleSoft Vibes can help you create your project. For more information, see xref: . In the Anypoint Code Builder activity bar, click the agent icon image:af-acb-dev-agent-icon.png["",18,18]. . Describe your agent network, including the brokers, agents, MCP servers, and LLMs you want to connect. MuleSoft Vibes does the rest. -To get started, try one of these suggested prompts. +To get started, try one of these suggested messages. * Create a new agent network project called "Employee Onboarding." Add HR agent and CRM agent. * Build a travel planner broker that plans multi-city trips and generate a new agent network. diff --git a/modules/ROOT/pages/af-define-your-agent-network-specification.adoc b/modules/ROOT/pages/af-define-your-agent-network-specification.adoc index ebc7e7679..5e5be9967 100644 --- a/modules/ROOT/pages/af-define-your-agent-network-specification.adoc +++ b/modules/ROOT/pages/af-define-your-agent-network-specification.adoc @@ -19,7 +19,7 @@ MuleSoft Vibes can help you configure your agent network specification. For more . In the Anypoint Code Builder activity bar, click the agent icon image:af-acb-dev-agent-icon.png["",18,18]. . Give the agent information about your agent network, including the brokers, agents, MCP servers, and LLMs you want to connect. -To get started, try one of these suggested prompts. +To get started, try one of these suggested messages. * Help me build an agent network configuration for my Employee Onboarding project. * Revise my Employee Onboarding agent network project. Use OpenAI for the LLM. @@ -47,7 +47,7 @@ If you have existing Exchange assets to use in your agent network, add them to t . In the Anypoint Code Builder activity bar, click the agent icon image:af-acb-dev-agent-icon.png["",18,18]. . Tell the agent that you want to add Exchange assets to your project. MuleSoft Vibes does the rest. -To get started, try one of these suggested prompts. +To get started, try one of these suggested messages. * Add tools for background check processing in my Employee Onboarding project. * Add a Talent Pool MCP server to my Employee Onboarding agent network project. diff --git a/modules/ROOT/pages/af-deploy-agent-network-targets.adoc b/modules/ROOT/pages/af-deploy-agent-network-targets.adoc index faf2890a9..cac03fb6a 100644 --- a/modules/ROOT/pages/af-deploy-agent-network-targets.adoc +++ b/modules/ROOT/pages/af-deploy-agent-network-targets.adoc @@ -51,7 +51,7 @@ MuleSoft Vibes can help you deploy your agent network instances. For more inform . In the Anypoint Code Builder activity bar, click the agent icon image:af-acb-dev-agent-icon.png["",18,18]. . Tell the agent that you want to deploy your agent network. MuleSoft Vibes does the rest. -To get started, try one of these suggested prompts. +To get started, try one of these suggested messages. * Deploy my agent network project to the production environment. * Deploy the hello-world-network project to staging. diff --git a/modules/ROOT/pages/af-project-files.adoc b/modules/ROOT/pages/af-project-files.adoc index bd8b3736d..04265ddb3 100644 --- a/modules/ROOT/pages/af-project-files.adoc +++ b/modules/ROOT/pages/af-project-files.adoc @@ -13,7 +13,7 @@ The agent network YAML file defines a structured configuration for multi-agent s For example, think of the YAML as your organizational chart for digital labor. Each internal organization (for example, HR, IT, Sales, or Engineering) has a hierarchical structure through which actors collaborate. Jobs are split into tasks and assigned. -Just like with human labor, digital agents require coordination. We call these coordinators "brokers". These are special types of agents in your agent network capable of receiving a user prompt, identifying the goal, determining the necessary steps to be carried out, and delegating each step to the proper agent, even if the agent is part of a different broker. +Just like with human labor, digital agents require coordination. We call these coordinators "brokers". These are special types of agents in your agent network capable of receiving a user message, identifying the goal, determining the necessary steps to be carried out, and delegating each step to the proper agent, even if the agent is part of a different broker. The `agent-network.yaml` file uses these sections. @@ -311,7 +311,7 @@ Here's another example of instructions for a customer service broker. This broke 5. Summarize actions: Provide a clear, human-readable summary of the steps performed, including information about the created Slack channel and the on-call engineer assigned. ---- -You don't have to provide instructions like "split the prompt into tasks", or "select the best tool". The broker does that on its own. +You don't have to provide instructions like "split the message into tasks", or "select the best tool". The broker does that on its own. The `instructions` element has these properties. diff --git a/modules/ROOT/pages/af-publish-agent-network-assets.adoc b/modules/ROOT/pages/af-publish-agent-network-assets.adoc index a470b801b..ce32d4ac1 100644 --- a/modules/ROOT/pages/af-publish-agent-network-assets.adoc +++ b/modules/ROOT/pages/af-publish-agent-network-assets.adoc @@ -20,7 +20,7 @@ MuleSoft Vibes can help you publish your agent network specification to Anypoint . In the Anypoint Code Builder activity bar, click the agent icon image:af-acb-dev-agent-icon.png["",18,18]. . Tell the agent that you want to publish your agent network. MuleSoft Vibes does the rest. -To get started, try one of these suggested prompts. +To get started, try one of these suggested messages. * Publish my Employee Onboarding project. * Publish my agent network project version 1.0.0. diff --git a/modules/ROOT/pages/int-ai-developing-integrations.adoc b/modules/ROOT/pages/int-ai-developing-integrations.adoc index f81c2cd91..58e4393ab 100644 --- a/modules/ROOT/pages/int-ai-developing-integrations.adoc +++ b/modules/ROOT/pages/int-ai-developing-integrations.adoc @@ -9,7 +9,7 @@ To develop, manage, or maintain your applications, use MuleSoft Vibes in Anypoin * Deploying and managing instances * Managing custom metadata -All of these actions are driven by natural language prompts. +All of these actions are driven by natural language messages. When you generate an integration, MuleSoft Vibes transforms your business logic into a Mule application. The generated application includes: @@ -49,7 +49,7 @@ For details on configuring permissions and server connections, see xref:troubles == Provide Additional Context You can improve the accuracy of generated outputs by adding extra context to MuleSoft Vibes. -In addition to prompts, it accepts these types of input: +Besides the message you send in the panel, you can attach these types of input: * **Files** – Add a requirements file or other reference documents. * **Folders** – Provide an entire project folder for MuleSoft Vibes to consider. diff --git a/modules/ROOT/pages/mulesoft-vibes.adoc b/modules/ROOT/pages/mulesoft-vibes.adoc index d172c435d..9e4467630 100644 --- a/modules/ROOT/pages/mulesoft-vibes.adoc +++ b/modules/ROOT/pages/mulesoft-vibes.adoc @@ -4,7 +4,7 @@ MuleSoft Vibes is a purpose-built assistant for the development lifecycle, available directly in Anypoint Code Builder. -MuleSoft Vibes enables you to build, deploy, and manage your projects using natural language prompts. +MuleSoft Vibes enables you to build, deploy, and manage your projects using natural language messages. MuleSoft Vibes integrates with the xref:mulesoft-mcp-server::index.adoc[MuleSoft MCP Server], which provides a set of agentic tools that connect MuleSoft Vibes directly to your MuleSoft environment. Through this integration, MuleSoft Vibes can perform actions and retrieve data on your behalf, enabling capabilities such as: diff --git a/modules/ROOT/pages/start-workspaces.adoc b/modules/ROOT/pages/start-workspaces.adoc index f23e536b9..e24424274 100644 --- a/modules/ROOT/pages/start-workspaces.adoc +++ b/modules/ROOT/pages/start-workspaces.adoc @@ -79,7 +79,7 @@ image::imp-local-api-open-workspace.png["A multi-root workspace in Explorer view === Open a Workspace with MuleSoft Vibes -You can ask MuleSoft Vibes to switch workspaces using natural language prompts, such as: +You can ask MuleSoft Vibes to switch workspaces using natural language, such as: * "Open my Orders API workspace" * "Switch to the `` workspace" diff --git a/modules/ROOT/pages/troubleshoot-generative-ai.adoc b/modules/ROOT/pages/troubleshoot-generative-ai.adoc index 060d2f5a2..3582ae16d 100644 --- a/modules/ROOT/pages/troubleshoot-generative-ai.adoc +++ b/modules/ROOT/pages/troubleshoot-generative-ai.adoc @@ -4,7 +4,7 @@ The following errors sometimes occur when you use MuleSoft Vibes in Anypoint Cod == Unexpected Results When Using Mulesoft Vibes -If the generated flow doesn't return accurate or useful results for your prompt, try rewriting your prompt and follow the guidelines to xref:vibes-create-integrations.adoc#craft-ai-prompt[write an effective prompt]. +If the generated flow doesn't return accurate or useful results for your message, try rewriting your message and follow the guidelines to xref:vibes-create-integrations.adoc#craft-ai-prompt[write an effective message]. If results are still inconsistent, verify that your project context and Mulesoft Vibes settings are correctly configured. diff --git a/modules/ROOT/pages/vibes-api-ai-create-spec.adoc b/modules/ROOT/pages/vibes-api-ai-create-spec.adoc index 183d80936..761ab8005 100644 --- a/modules/ROOT/pages/vibes-api-ai-create-spec.adoc +++ b/modules/ROOT/pages/vibes-api-ai-create-spec.adoc @@ -2,9 +2,9 @@ :page-deployment-options: cloud-ide, desktop-ide :page-aliases: api-ai-create-spec.adoc -MuleSoft Vibes is a purpose-built assistant for the development lifecycle, available directly in Anypoint Code Builder. It provides a unified panel that lets you interact with AI features using natural language prompts. Mulesoft Vibes works with the embedded MuleSoft MCP Server (see xref:mulesoft-mcp-server::index.adoc[Mulesoft MCP Server]) to support capabilities such as deploying applications, managing instances, and creating new projects. +MuleSoft Vibes is a purpose-built assistant for the development lifecycle, available directly in Anypoint Code Builder. It provides a unified panel that lets you interact with AI features using natural language. Mulesoft Vibes works with the embedded MuleSoft MCP Server (see xref:mulesoft-mcp-server::index.adoc[Mulesoft MCP Server]) to support capabilities such as deploying applications, managing instances, and creating new projects. -One of these capabilities is AI-powered API specification generation. With Mulesoft Vibes, you can generate and mock API specifications from natural language prompts. This feature reduces the time spent on API design by simplifying the creation of syntax-heavy specifications. +One of these capabilities is AI-powered API specification generation. With Mulesoft Vibes, you can generate and mock API specifications from natural language. This feature reduces the time spent on API design by simplifying the creation of syntax-heavy specifications. [[before-you-begin]] == Before You Begin @@ -27,7 +27,7 @@ NOTE: Authentication happens through the user logged into Anypoint Code Builder. To design an API spec with Mulesoft Vibes: . Open Mulesoft Vibes from the toolbar or from the *Build Your Ecosystem with AI* card in the canvas. -. Enter a prompt that describes your API specification. +. Enter a message that describes your API specification. + Include these required details and consider including optional details to generate a more precise spec: + @@ -164,7 +164,7 @@ Optionally, provide a description, format, minimum and maximum length, default v Governance isn't included in the validation. [start=3] -. Enter your prompt in Mulesoft Vibes and submit it. +. Enter your message in Mulesoft Vibes and submit it. . Review the generated specification. . If *Auto-approve* is enabled, Mulesoft Vibes writes the generated API spec directly into your project files. . If *Auto-approve* is disabled, Mulesoft Vibes prompts you to approve or reject each file change before applying it. diff --git a/modules/ROOT/pages/vibes-create-integrations.adoc b/modules/ROOT/pages/vibes-create-integrations.adoc index 3079e086b..db3a76db1 100644 --- a/modules/ROOT/pages/vibes-create-integrations.adoc +++ b/modules/ROOT/pages/vibes-create-integrations.adoc @@ -58,17 +58,17 @@ The integration builder canvas appears with starting cards. To generate an integration with AI, click *Use Mulesoft Vibes* in the *Build an Ecosystem with AI* card. [[craft-ai-prompt]] -== Write Your Prompt +== Write Your Message -Before you create an integration, define what you want to achieve with the integration, for example, optimizing a business process. In the Mulesoft Vibes panel, enter your prompt using natural language. The clearer and more specific your prompt, the more accurate the generated integration. +Before you create an integration, define what you want to achieve with the integration, for example, optimizing a business process. In the Mulesoft Vibes panel, describe what you need using natural language. The clearer and more specific your message, the more accurate the generated integration. -Best practices for prompts: +Best practices for messages: * Be clear and precise. * Include triggering events (for example, sending an email when a new case is created). * Emphasize key MuleSoft components and connector operations (for example, HTTP Connector *Listener* and Email Connector *Send*). * Specify the data objects (for example, *Salesforce Account object*). -* Review your prompt before submitting it. +* Review your message before you submit it. After Mulesoft Vibes generates the initial integration, the code is written directly into your project. You can further customize it to fit your requirements. diff --git a/modules/ROOT/pages/vibes-get-started.adoc b/modules/ROOT/pages/vibes-get-started.adoc index abca878aa..2be4eb7e5 100644 --- a/modules/ROOT/pages/vibes-get-started.adoc +++ b/modules/ROOT/pages/vibes-get-started.adoc @@ -1,7 +1,7 @@ = Get Started with MuleSoft Vibes :page-aliases: a4d-get-started.adoc -MuleSoft Vibes helps you build APIs and integrations using natural language prompts directly in your development environment. +MuleSoft Vibes helps you build APIs and integrations by sending natural language messages directly in your development environment. == Use MuleSoft Vibes @@ -11,7 +11,7 @@ You can open MuleSoft Vibes from the: * Top navigation bar * *Build with AI* card in the project canvas -When you submit a prompt, MuleSoft Vibes processes it using the MuleSoft MCP Server and performs actions such as generating API specifications or integration flows. +When you send a message, MuleSoft Vibes processes it using the MuleSoft MCP Server and performs actions such as generating API specifications or integration flows. Depending on your configuration, MuleSoft Vibes can: @@ -23,7 +23,7 @@ Depending on your configuration, MuleSoft Vibes can: MuleSoft Vibes operates in two modes: * *Plan Mode* -MuleSoft Vibes analyzes your prompt and produces a step-by-step plan describing how it will accomplish the task. No actions are executed automatically in this mode. +MuleSoft Vibes analyzes your message and produces a step-by-step plan describing how it will accomplish the task. No actions are executed automatically in this mode. * *Act Mode* MuleSoft Vibes attempts to perform the actions outlined in the plan by using the MuleSoft MCP Server tools to modify files, create resources, or execute changes to your project. @@ -38,13 +38,13 @@ MuleSoft Vibes uses MuleSoft-optimized AI pipelines to generate high-quality cod The pipelines are exposed to MuleSoft Vibes through these MCP tools: * `generate_mule_flow` – Generates Mule integration flows. -* `generate_api_spec` – Generates API specifications from natural language prompts. +* `generate_api_spec` – Generates API specifications from natural language. Because these tools run on pipelines optimized specifically for MuleSoft use cases, users typically receive higher-quality code outputs (on average, 60% better) compared to generic generation. To ensure the best results: -* Verify that the MuleSoft MCP Server is loaded in MuleSoft Vibes prior to sending a prompt. +* Verify that the MuleSoft MCP Server is loaded in MuleSoft Vibes before you send a message. * Make sure MuleSoft Vibes is invoking these specialized tools. * Verify that all required prerequisites for MuleSoft Vibes and MCP Server are enabled in your environment. @@ -62,7 +62,7 @@ To add context: . Select files or folders to attach, paste the input or output from terminal, or paste a URL. . Confirm to add the context to your current task. -You can also add context directly from the prompt input box by typing `@`, which opens the same context selector. +You can also add context directly from the message input box by typing `@`, which opens the same context selector. These inputs are used as contextual references during generation. @@ -86,4 +86,4 @@ The available options include: == Skills in MuleSoft Vibes -xref:vibes-skills.adoc[Skills] are reusable instruction sets that load when your prompt matches a skill's description. For information about skills and MCP tools, see xref:vibes-skills.adoc[]. +xref:vibes-skills.adoc[Skills] are reusable instruction sets that load when your message matches a skill's description. For information about skills and MCP tools, see xref:vibes-skills.adoc[]. diff --git a/modules/ROOT/pages/vibes-prompt-examples.adoc b/modules/ROOT/pages/vibes-prompt-examples.adoc index 27a6775f8..6d14fd7bf 100644 --- a/modules/ROOT/pages/vibes-prompt-examples.adoc +++ b/modules/ROOT/pages/vibes-prompt-examples.adoc @@ -1,8 +1,8 @@ -= Mulesoft Vibes Example Prompts += Mulesoft Vibes Example Messages :page-aliases: a4d-prompt-examples.adoc -Use these example prompts to guide Mulesoft Vibes in completing common tasks. Customize the values to match your project or environment. +Use these example messages to guide Mulesoft Vibes in completing common tasks. Customize the values to match your project or environment. include::mulesoft-mcp-server::partial$agent-prompts.adoc[tag=app-deployment,leveloffset=+1] diff --git a/modules/ROOT/pages/vibes-skills.adoc b/modules/ROOT/pages/vibes-skills.adoc index ebdcb80ed..d5059a2d5 100644 --- a/modules/ROOT/pages/vibes-skills.adoc +++ b/modules/ROOT/pages/vibes-skills.adoc @@ -1,7 +1,7 @@ = Use Skills with MuleSoft Vibes :page-deployment-options: cloud-ide, desktop-ide -Skills are reusable instruction sets that MuleSoft Vibes activates only when they apply to your task. Each skill packages guidance and optional resources so MuleSoft Vibes can follow a consistent workflow without loading that material for unrelated prompts. +Skills are reusable instruction sets that MuleSoft Vibes activates only when they apply to your task. Each skill packages guidance and optional resources so MuleSoft Vibes can follow a consistent workflow without loading that material for unrelated messages. When your request matches a skill's description, MuleSoft Vibes uses the `use_skill` tool to load the full instructions and run them for that task. Unlike workspace rules that stay active across conversations, skills load as needed, which leaves more context available for other work. diff --git a/modules/ROOT/pages/vibes-workflows-commands.adoc b/modules/ROOT/pages/vibes-workflows-commands.adoc index a7ba3c00a..0d8621c56 100644 --- a/modules/ROOT/pages/vibes-workflows-commands.adoc +++ b/modules/ROOT/pages/vibes-workflows-commands.adoc @@ -10,7 +10,7 @@ Use rules to enforce organizational conventions, ensure consistent error handlin Rules can be defined at two levels: -* *Global* – Applies to all prompts sent to Mulesoft Vibes. +* *Global* – Applies to all messages sent to Mulesoft Vibes. * *Workspace* – Applies only to the active workspace. @@ -54,7 +54,7 @@ Workflows define a sequence of steps that Mulesoft Vibes executes to complete a == Add Commands Commands provide quick shortcuts for interacting with Mulesoft Vibes. -You can invoke any command by typing `/` in the prompt input box. +You can invoke any command by typing `/` in the message input box. Mulesoft Vibes includes several built-in commands: @@ -79,4 +79,4 @@ Rulesets help you: Because rules are written in natural language, you can describe expectations without needing formal configuration or code. -MuleSoft Vibes applies these rules automatically when processing prompts and executing workflows. \ No newline at end of file +MuleSoft Vibes applies these rules automatically when processing messages and executing workflows. \ No newline at end of file From 5525ee0ec9e93524ce93cecb80970db41acd9bc4 Mon Sep 17 00:00:00 2001 From: Cristian-Venticinque Date: Tue, 28 Apr 2026 14:30:13 -0300 Subject: [PATCH 18/36] Updating wording with code editor. --- .../pages/_partials/acb-component-info.adoc | 34 +++++++++---------- .../_partials/acb-open-packaged-sources.adoc | 2 +- .../pages/_partials/acb-reusable-steps.adoc | 2 +- .../ROOT/pages/imp-implement-api-specs.adoc | 6 ++-- .../ROOT/pages/int-ai-gen-flow-examples.adoc | 8 ++--- .../ROOT/pages/int-autodiscovery-config.adoc | 2 +- ...nt-configure-components-open-from-xml.adoc | 2 +- .../ROOT/pages/int-configure-components.adoc | 10 +++--- .../pages/int-configure-dw-expressions.adoc | 20 +++++------ modules/ROOT/pages/int-debug-mule-apps.adoc | 12 +++---- modules/ROOT/pages/int-test-munit.adoc | 14 ++++---- modules/ROOT/pages/start-discover-ui.adoc | 2 +- .../pages/troubleshoot-missing-features.adoc | 2 +- modules/ROOT/pages/troubleshooting.adoc | 2 +- .../ROOT/pages/vibes-create-integrations.adoc | 2 +- 15 files changed, 60 insertions(+), 60 deletions(-) diff --git a/modules/ROOT/pages/_partials/acb-component-info.adoc b/modules/ROOT/pages/_partials/acb-component-info.adoc index 2a83c451c..61ea83648 100644 --- a/modules/ROOT/pages/_partials/acb-component-info.adoc +++ b/modules/ROOT/pages/_partials/acb-component-info.adoc @@ -52,8 +52,8 @@ For reference documentation on specific connector and component configurations, // // tag::note-component-add-config[] -When adding components, you can start from the canvas or the configuration XML for your app. -You can configure components from their configuration panels in the canvas or from the XML. +When adding components, you can start from the canvas or the code editor for your app. +You can configure components from their configuration panels in the canvas or from the code editor. // end::note-component-add-config[] // @@ -64,7 +64,7 @@ In Anypoint Code Builder, both integrations and implementations are Mule applica include::reuse::partial$connectors/connectors-mule-apps.adoc[] -Built-in Anypoint connectors are available from the canvas and configuration XML for integration and implementation projects. These connectors include: +Built-in Anypoint connectors are available from the canvas and code editor for integration and implementation projects. These connectors include: * xref:a2a-connector::index.adoc[Anypoint Connector for Agent2Agent (A2A) (Beta) ()] (A2A Connector) * xref:agentforce-connector::index.adoc[Anypoint Connector for Agentforce ()] (Agentforce Connector) @@ -97,7 +97,7 @@ To find information about more connectors, see xref:connectors::introduction/int Use the Connection Management Configuration Panel to easily configure connections to third-party systems directly from the UI. -In this panel, you can create, edit, delete, and test connections directly within the IDE interface, automatically populate connection fields using metadata provided by the connector, and save and manage connection configurations without switching to the XML view. +In this panel, you can create, edit, delete, and test connections directly within the IDE interface, automatically populate connection fields using metadata provided by the connector, and save and manage connection configurations without switching to the code editor. To open the configuration panel: @@ -182,7 +182,7 @@ Includes On-Error Continue (``) and On-Error Propagate (` ---- -. Add another component, this time using the configuration XML. +. Add another component, this time using the code editor. + -In the configuration XML, place your cursor before the opening `` tag. Ensure that the cursor is not inside the `` element. Add the following code: +In the code editor, place your cursor before the opening `` tag. Ensure that the cursor is not inside the `` element. Add the following code: + // image::anypoint-code-builder::add-http-config-snippet.png["http:listener-config highlighted in the configuration XML menu"] + @@ -252,7 +252,7 @@ image::anypoint-code-builder::int-canvas-error.png["Listener error in the canvas + .. To determine where the error is, select the processor in the canvas. + -Anypoint Code Builder highlights its location within the configuration XML, and you can mouse over the issue for more information, for example: +Anypoint Code Builder highlights its location in the code editor, and you can mouse over the issue for more information, for example: + image::anypoint-code-builder::int-select-listener-config.png["Selecting configuration reference from configuration panel"] .. To fix the error, change the value of the `name` attribute in `http:listener-config` to match the name of the `config-ref` value in your `http:listener` configuration: @@ -327,11 +327,11 @@ The status bar shows the progress: * *Invalid Connection Got status code: 500 when trying to resolve a Mule Runtime operation* indicates a connection error. -== Test Connection from the Configuration XML +== Test Connection from the Code Editor -You can test the connection from the configuration XML. For example, to test an HTTP Listener connection, click *Test Connection* in the configuration XML: +You can test the connection from the code editor. For example, to test an HTTP Listener connection, click *Test Connection* in the code editor: -image::http-listener-test-connection.png["HTTP Listener Test Connection link in the configuration XML"] +image::http-listener-test-connection.png["HTTP Listener Test Connection link in the code editor"] The status bar shows the progress: @@ -426,14 +426,14 @@ xref:exchange::index.adoc[]. // // tag::open-component-from-xml[] -You can open a component and its configuration panel in the canvas from the XML editor. This feature is helpful, for example, if you want to configure the component from the UI, if a component is in another flow than the flow currently displayed in the canvas, or if the canvas is not open. +You can open a component and its configuration panel in the canvas from the code editor. This feature is helpful, for example, if you want to configure the component from the UI, if a component is in another flow than the flow currently displayed in the canvas, or if the canvas is not open. -. From the configuration XML, place your cursor within the component's XML. +. From the code editor, place your cursor within the component's XML. . Right-click and select *Configure Component in UI*. + This action displays the component in the canvas and opens its configuration panel, for example: + -image::anypoint-code-builder::acb-open-component-ui-from-xml.png["Opening a component in the canvas from the XML"] +image::anypoint-code-builder::acb-open-component-ui-from-xml.png["Opening a component in the canvas from the code editor"] // end::open-component-from-xml[] // diff --git a/modules/ROOT/pages/_partials/acb-open-packaged-sources.adoc b/modules/ROOT/pages/_partials/acb-open-packaged-sources.adoc index b8790b08e..1f1289871 100644 --- a/modules/ROOT/pages/_partials/acb-open-packaged-sources.adoc +++ b/modules/ROOT/pages/_partials/acb-open-packaged-sources.adoc @@ -208,7 +208,7 @@ The root of a project is the top-level folder that Anypoint Code Builder generat // step to test the project after opening // tag::test-project[] . Test your project: -.. In the open project, check for errors and make sure that the configuration XML and canvas load correctly, which indicates that component dependencies resolved. +.. In the open project, check for errors and make sure that the canvas and code editor load correctly, which indicates that component dependencies resolved. .. Check for any configurations to modify, such as ports or file paths in the configuration XML. .. Run and debug your project: + diff --git a/modules/ROOT/pages/_partials/acb-reusable-steps.adoc b/modules/ROOT/pages/_partials/acb-reusable-steps.adoc index 8274328c6..ff6c5776c 100644 --- a/modules/ROOT/pages/_partials/acb-reusable-steps.adoc +++ b/modules/ROOT/pages/_partials/acb-reusable-steps.adoc @@ -17,7 +17,7 @@ // tag::check-connection-http[] . Before starting your Mule app, confirm that the connection to the listener is successful: + -From the configuration XML, above the HTTP Listener configuration (``), click *Test Connection*. +From the code editor, above the HTTP Listener configuration (``), click *Test Connection*. * If the test succeeds, you see a *Connection is valid* message. * If the connection fails, an error message indicates that the connection was unsuccessful. If the app is running when you click *Test Connection*, this error message appears: `Invalid Connection Got status code: 500 when trying to resolve a Mule Runtime operation. Reason: 'Internal Server Error.` diff --git a/modules/ROOT/pages/imp-implement-api-specs.adoc b/modules/ROOT/pages/imp-implement-api-specs.adoc index b700dc07a..e49b60cce 100644 --- a/modules/ROOT/pages/imp-implement-api-specs.adoc +++ b/modules/ROOT/pages/imp-implement-api-specs.adoc @@ -165,7 +165,7 @@ For example, if the updated spec adds a new endpoint, the configuration XML for == Tour the Interface File -After you scaffold your API spec into an interface, examine the scaffolded flows and error handlers for your interface in the UI canvas and configuration XML. +After you scaffold your API spec into an interface, examine the scaffolded flows and error handlers for your interface in the UI canvas and code editor. image::imp-scaffolded-flow-canvas.png["Scaffolded flows in the Canvas"] @@ -175,7 +175,7 @@ image::imp-scaffolded-flow-canvas.png["Scaffolded flows in the Canvas"] + image::int-flow-list.png["Flow List example"] -. In the configuration XML, locate the flows created for the endpoints in your API spec. +. In the code editor, locate the flows created for the endpoints in your API spec. + .Example Flow [%collapsible] @@ -261,7 +261,7 @@ and add a Flow Ref component (``) to a flow in your interface file. . Open `implementation.xml`. + image::get-flights-select-listener.png["HTTP listener highlighted in the implementation.xml file"] -. Delete the *HTTP /flights* listener XML from the configuration XML: +. In the code editor, delete the *HTTP /flights* listener XML: + [source,xml] -- diff --git a/modules/ROOT/pages/int-ai-gen-flow-examples.adoc b/modules/ROOT/pages/int-ai-gen-flow-examples.adoc index 46ade2a7b..9c6323058 100644 --- a/modules/ROOT/pages/int-ai-gen-flow-examples.adoc +++ b/modules/ROOT/pages/int-ai-gen-flow-examples.adoc @@ -71,7 +71,7 @@ After reviewing and inserting the generated flow into your project: ---- + This example flow is configured to poll for new cases every 5000 milliseconds. -. Add the required configurations for your Salesforce instance and email inbox in your configuration XML. +. Add the required configurations for your Salesforce instance and email inbox in the code editor. The following is an example of the completed flow: @@ -165,7 +165,7 @@ The `type` attribute is set to `Account` to specify the object type to update. === Complete the Flow -To run this flow, add the required configurations for your Salesforce instance in your configuration XML. +To run this flow, add the required configurations for your Salesforce instance in the code editor. The following is an example of the completed flow: @@ -265,7 +265,7 @@ output application/java After reviewing and inserting the generated flow into your project: . Update the name of the database table and fields to match what is configured in your MySQL database. -. To run this flow, add the required configurations for your Salesforce instance in your configuration XML. +. To run this flow, add the required configurations for your Salesforce instance in the code editor. The following is an example of a completed flow: @@ -372,7 +372,7 @@ After reviewing and inserting the generated flow into your project: . Update the `watermarkColumn` in the Database *Listener* to whichever database column is used to indicate new records. + The values that are taken from this column are used to filter the contents of the next poll, so that only rows with a greater watermark value are processed. -. To run this flow, add the required configurations for your database and email inbox in your configuration XML. +. To run this flow, add the required configurations for your database and email inbox in the code editor. The following is an example of the completed flow: diff --git a/modules/ROOT/pages/int-autodiscovery-config.adoc b/modules/ROOT/pages/int-autodiscovery-config.adoc index f31e3da70..643c69c3c 100644 --- a/modules/ROOT/pages/int-autodiscovery-config.adoc +++ b/modules/ROOT/pages/int-autodiscovery-config.adoc @@ -68,7 +68,7 @@ You'll need the instance ID when configuring your Mule app for autodiscovery. ==== -- . In your Mule app in Anypoint Code Builder, use your API instance ID to pair your app to the API instance: -.. In the XML editor for your Mule app, add the `` element above `` elements in the app, for example: +.. In the code editor for your Mule app, add the `` element above `` elements in the app, for example: + [source,xml] ---- diff --git a/modules/ROOT/pages/int-configure-components-open-from-xml.adoc b/modules/ROOT/pages/int-configure-components-open-from-xml.adoc index afc99cbbf..25d22163e 100644 --- a/modules/ROOT/pages/int-configure-components-open-from-xml.adoc +++ b/modules/ROOT/pages/int-configure-components-open-from-xml.adoc @@ -1,4 +1,4 @@ -= Opening a Component in the Canvas from the XML Editor += Opening a Component in the Canvas from the Code Editor :page-deployment-options: cloud-ide, desktop-ide include::reuse::partial$beta-banner.adoc[tag="anypoint-code-builder"] diff --git a/modules/ROOT/pages/int-configure-components.adoc b/modules/ROOT/pages/int-configure-components.adoc index 7f23bac66..f2a335053 100644 --- a/modules/ROOT/pages/int-configure-components.adoc +++ b/modules/ROOT/pages/int-configure-components.adoc @@ -5,7 +5,7 @@ include::reuse::partial$beta-banner.adoc[tag="anypoint-code-builder"] -Configure connectors and processors within your implementation and integration projects from the canvas or configuration XML. +Configure connectors and processors within your implementation and integration projects from the canvas or the code editor. Common tasks include the following: @@ -122,14 +122,14 @@ To copy a component: Some components, like an HTTP Listener, can't be pasted to certain locations. An error message shows if a component can't be pasted to the location. == Disable Components -You can temporarily remove components from your flow without deleting them by disabling them directly from the canvas. This action is equivalent to commenting out code in the XML editor. +You can temporarily remove components from your flow without deleting them by disabling them directly from the canvas. This action is equivalent to commenting out code in the code editor. To disable a component: . Right-click a component in the canvas. . Select *Disable Component*. -Disabled components appear with a dashed outline and a disabled icon. In the XML editor, the component is wrapped in an XML comment (), preserving the code but preventing it from executing. +Disabled components appear with a dashed outline and a disabled icon. In the code editor, the component is wrapped in an XML comment (), preserving the code but preventing it from executing. Disabled components appear greyed out in the canvas and are ignored at runtime. === Re-enable a Disabled Component @@ -138,7 +138,7 @@ To restore a component: . Right-click the disabled component. . Select *Enable Component*. -This also removes the comment from the XML view. +This also removes the comment from the code editor. If you previously set a breakpoint on a component and then disable it, the breakpoint remains associated with the component but is inactive. + You can't add new breakpoints to a disabled component until it's re-enabled. @@ -173,7 +173,7 @@ include::partial$acb-component-info.adoc[tags="import-connector-exchange"] include::partial$acb-component-info.adoc[tags="check-connection"] [[open-component-from-xml]] -== Open a Component in the Canvas from the XML Editor +== Open a Component in the Canvas from the Code Editor //open from xml include::partial$acb-component-info.adoc[tags="open-component-from-xml"] diff --git a/modules/ROOT/pages/int-configure-dw-expressions.adoc b/modules/ROOT/pages/int-configure-dw-expressions.adoc index 07f141b95..8432bca61 100644 --- a/modules/ROOT/pages/int-configure-dw-expressions.adoc +++ b/modules/ROOT/pages/int-configure-dw-expressions.adoc @@ -5,7 +5,7 @@ DataWeave is the MuleSoft programming language for data transformation and for defining expressions. -Use DataWeave to process Mule event data, such as `payload`, `attributes`, and `vars`, in connector operations and other components. Develop DataWeave expressions and transformations in your Mule applications using the *Expression Field*, *Expression Builder*, or *Transformation Builder*, or by editing the configuration XML. Generate DataWeave transformations with AI help by providing input and output sample data, metadata, or both. AI-powered auto mapping provides comprehensive error feedback for GenAI actions, including authorization, metadata, and request limits, ensuring a more reliable and guided mapping experience. +Use DataWeave to process Mule event data, such as `payload`, `attributes`, and `vars`, in connector operations and other components. Develop DataWeave expressions and transformations in your Mule applications using the *Expression Field*, *Expression Builder*, or *Transformation Builder*, or in the code editor. Generate DataWeave transformations with AI help by providing input and output sample data, metadata, or both. AI-powered auto mapping provides comprehensive error feedback for GenAI actions, including authorization, metadata, and request limits, ensuring a more reliable and guided mapping experience. image::int-dw-transform-ui.png["A configuration panel showing three numbered callouts: 1) fx button for Expression Field, 2) Expression Builder button, and 3) Transformation Builder button"] @@ -134,7 +134,7 @@ To clear custom metadata, click the name of the custom metadata and then click * [[tab-functions]] === List DataWeave Functions and Get Documentation -To get a list of available functions from a component *Functions* tab, the *fx* field, or the auto complete menu in the XML editor: +To get a list of available functions from a component *Functions* tab, the *fx* field, or the auto complete menu in the code editor: . Open a component that has the *fx* expression field. + @@ -167,7 +167,7 @@ image:int-dw-fx-functions-tab-details.png["Function details popup showing comple [[tab-preview]] === Preview Output of DataWeave Expressions -Preview output of DataWeave expressions from the canvas or from the XML editor. The preview feature acts on sample data that you provide from the configuration XML for the payload (`payload`) or Mule variables (for example, `vars.somevar`) in your *fx* (expression) field. +Preview output of DataWeave expressions from the canvas or from the code editor. The preview feature acts on sample data that you provide from the configuration XML for the payload (`payload`) or Mule variables (for example, `vars.somevar`) in your *fx* (expression) field. To provide your own sample data, see <>. @@ -197,11 +197,11 @@ image:int-dw-fx-preview-tab-output.png["Expression Builder Preview tab displayin You can apply DataWeave selectors and functions to your sample data. To create sample data that has the structure and data types you expect, see <>. [[preview-results-xml]] -==== Preview Results from the XML Editor +==== Preview Results from the Code Editor -To preview the results from the configuration XML, hover over your DataWeave code, click the *Show Code Actions* icon, and click *Run Preview*: +To preview the results from the code editor, hover over your DataWeave code, click the *Show Code Actions* icon, and click *Run Preview*: -image::function-validation-run-preview.png["Code Actions menu in XML editor with 'Run Preview' option highlighted for executing DataWeave expressions"] +image::function-validation-run-preview.png["Code Actions menu in the code editor with 'Run Preview' option highlighted for executing DataWeave expressions"] Anypoint Code Builder opens a new *Preview Output* tab with the result of the function: @@ -448,13 +448,13 @@ You can create sample data in these formats: To create sample data for a Mule variable: . Open your project. -. In the XML editor, hover over the Mule event variable (such as `payload`), for example: +. In the code editor, hover over the Mule event variable (such as `payload`), for example: + -image::int-dw-sample-quick-fix-hover.png["XML editor with cursor hovering over payload variable, showing Quick Fix for creating sample data"] +image::int-dw-sample-quick-fix-hover.png["Code editor with cursor hovering over payload variable, showing Quick Fix for creating sample data"] . Click *Quick Fix* to open the *Quick Fix* menu. . Select *Create sample data for _your-value_*, such as *Create sample data for payload*, for example: + -image::int-dw-sample-quick-fix-create.png["Quick Fix menu displaying 'Create sample data for payload' option in the XML editor context menu"] +image::int-dw-sample-quick-fix-create.png["Quick Fix menu displaying 'Create sample data for payload' option in the code editor context menu"] . In the menu that opens, select a format, such as JSON, for the sample data. + image::dw-issue-sample-data-formats.png["Sample data format selection menu showing options including JSON, XML, CSV, Java, Text, YAML, Avro, Excel, and other supported formats"] @@ -470,7 +470,7 @@ Custom sample data files should be created under `src/main/resources/user-sample + See <> before adding sample data. + -Hover over the value in the XML editor to show the structure, data keys, and data types of your sample data, for example: +Hover over the value in the code editor to show the structure, data keys, and data types of your sample data, for example: + image::int-dw-sample-quick-fix-example-hover-xml.png["Hover over XML to display sample data"] . Preview your sample data in *Expression Builder*: diff --git a/modules/ROOT/pages/int-debug-mule-apps.adoc b/modules/ROOT/pages/int-debug-mule-apps.adoc index 0ca30ffb0..6e8ff72c8 100644 --- a/modules/ROOT/pages/int-debug-mule-apps.adoc +++ b/modules/ROOT/pages/int-debug-mule-apps.adoc @@ -51,7 +51,7 @@ Keyboard shortcut: Cmd+Shift+d (Mac) or Ctrl+Shift+d (Windows) . *Call Stack* panel: Identifies the functions or procedures that are currently in the stack. . *Breakpoints* panel: Lists breakpoints by file and line, and includes <> to stop when any exception is thrown. . *Terminal* console: Displays the output of the Maven build process and the results of the deployment to the embedded Mule Runtime engine. -. *Breakpoint* icon: Identifies a line in the configuration XML to pause execution of the flow so that you can check for and fix any issues. +. *Breakpoint* icon: Identifies a line in the code editor to pause execution of the flow so that you can check for and fix any issues. . *Breakpoint* icon: Identifies a component that contains one or more breakpoints. Open the *Debug Console* tab in the panel area to <> while execution is paused. See <>. @@ -93,7 +93,7 @@ image::debug-add-breakpoint-canvas.png["Add breakpoint to a component in the can . Select *Add Breakpoint*. + -A breakpoint icon appears on the component and in the configuration XML for that component. +A breakpoint icon appears on the component and in the code editor for that component. === Add a Breakpoint to a Batch Component @@ -103,16 +103,16 @@ Add a breakpoint to a batch component in the canvas UI or in a configuration XML // Pointer to Run and Debug include::partial$acb-reusable-steps.adoc[tags="open-run-debug"] -. In the canvas UI or XML editor, select the batch component where you want to pause execution. +. In the canvas UI or code editor, select the batch component where you want to pause execution. + You can add breakpoints to these components: * Batch Job (``) * Batch Step (``) * Batch Aggregator (``) -. Right-click the component in the canvas UI and select *Add Breakpoint*, or click the line number in the XML editor. +. Right-click the component in the canvas UI and select *Add Breakpoint*, or click the line number in the code editor. + -A breakpoint icon appears on the component and in the configuration XML for that component. +A breakpoint icon appears on the component and in the code editor for that component. . Run the application in debug mode. + @@ -127,7 +127,7 @@ A conditional breakpoint uses a DataWeave expression, so execution pauses at tha To set or change a breakpoint condition: -. Add a breakpoint in the configuration XML. See <>. +. Add a breakpoint in the code editor. See <>. . Right-click the breakpoint indicator in the gutter for that line. . Select *Edit Breakpoint*. . In the breakpoint editor, enter a DataWeave expression that uses the current Mule event. diff --git a/modules/ROOT/pages/int-test-munit.adoc b/modules/ROOT/pages/int-test-munit.adoc index 397e8b4f9..2bf685753 100644 --- a/modules/ROOT/pages/int-test-munit.adoc +++ b/modules/ROOT/pages/int-test-munit.adoc @@ -51,7 +51,7 @@ A workflow can include one or more steps: [[create-tests]] == Create MUnit Tests and Test Suites -Configure MUnit tests and test suites directly from a flow or by using the canvas or XML editor. +Configure MUnit tests and test suites directly from a flow or by using the canvas or code editor. * <> * <> @@ -102,7 +102,7 @@ Anypoint Code Builder requires MUnit 3.4.0 or later to create MUnit test suites [[create-test]] === Create an MUnit Test -Create an MUnit test in a new or existing test suite. Start an MUnit test by right-clicking the `flow` component, or by using the canvas or XML editor. For guidance with your test configuration, refer to the <> described in the prerequisites. +Create an MUnit test in a new or existing test suite. Start an MUnit test by right-clicking the `flow` component, or by using the canvas or code editor. For guidance with your test configuration, refer to the <> described in the prerequisites. [[create-test-from-flow]] ==== Create a Test from a Flow @@ -120,14 +120,14 @@ Generate the basic structure for an MUnit test designed to test a specific flow See <>. [[create-test-from-xml]] -==== Create a Test from the XML Editor +==== Create a Test from the Code Editor -. Open the test suite XML in the editor. +. Open the test suite XML in the code editor. + For guidance, see <>. -. In the XML, press Ctrl+Space to display available options, and type `munit`. For example: +. In the code editor, press Ctrl+Space to display available options, and type `munit`. For example: + -image:anypoint-code-builder::munit-tests-test-xml-autocomplete.png["Using autocomplete in the XML to select the MUnit test element"] +image:anypoint-code-builder::munit-tests-test-xml-autocomplete.png["Using autocomplete in the code editor to select the MUnit test element"] . Select `munit:test` and insert the test element in your suite. For example: + [source,xml] @@ -606,7 +606,7 @@ image:acb-munit-processor.png["Component window to add a processor"] image:acb-munit-select-component-attribute.png["Component and attribute highlighted in the processor window"] . Click *Add* to add the processor to your test suite. + -The processor shows in the XML editor and the canvas. +The processor shows in the code editor and the canvas. When selecting the processor and its attributes, consider these aspects: diff --git a/modules/ROOT/pages/start-discover-ui.adoc b/modules/ROOT/pages/start-discover-ui.adoc index 577844d44..778930777 100644 --- a/modules/ROOT/pages/start-discover-ui.adoc +++ b/modules/ROOT/pages/start-discover-ui.adoc @@ -97,7 +97,7 @@ image::acb-ui-dark-theme.png["IDE using the dark theme"] == Explore the Canvas View -By default, when you open a project in Anypoint Code Builder, the canvas view opens first. This allows you to begin building and editing your flows visually, without switching to the XML editor. +By default, when you open a project in Anypoint Code Builder, the canvas view opens first. This allows you to begin building and editing your flows visually, without switching to the code editor. === Switch Views diff --git a/modules/ROOT/pages/troubleshoot-missing-features.adoc b/modules/ROOT/pages/troubleshoot-missing-features.adoc index 4f9c32e48..2918cc9d8 100644 --- a/modules/ROOT/pages/troubleshoot-missing-features.adoc +++ b/modules/ROOT/pages/troubleshoot-missing-features.adoc @@ -65,7 +65,7 @@ Workspace: Configure Workspace Trust Settings == Incomplete Flow or Corrupted XML -If a flow lacks a component or contains only a trigger, such as an HTTP Listener operation or the Scheduler, an error similar to the following appears in the *Problems* panel and from the configuration XML: +If a flow lacks a component or contains only a trigger, such as an HTTP Listener operation or the Scheduler, an error similar to the following appears in the *Problems* panel and from the code editor: ---- The content of element 'flow' is not complete. One of diff --git a/modules/ROOT/pages/troubleshooting.adoc b/modules/ROOT/pages/troubleshooting.adoc index f135d7e1d..6baea70d7 100644 --- a/modules/ROOT/pages/troubleshooting.adoc +++ b/modules/ROOT/pages/troubleshooting.adoc @@ -126,7 +126,7 @@ To disable a component: . Select *Disable Component*. -Disabled components are unavailable in the canvas and are ignored at runtime. In the XML editor, the block is wrapped in an XML comment. +Disabled components are unavailable in the canvas and are ignored at runtime. In the code editor, the block is wrapped in an XML comment. Once the issue is resolved, you can re-enable the component or use Delete to remove disabled items. diff --git a/modules/ROOT/pages/vibes-create-integrations.adoc b/modules/ROOT/pages/vibes-create-integrations.adoc index 3079e086b..f8fd3c594 100644 --- a/modules/ROOT/pages/vibes-create-integrations.adoc +++ b/modules/ROOT/pages/vibes-create-integrations.adoc @@ -78,7 +78,7 @@ After Mulesoft Vibes generates the initial integration, the code is written dire After Mulesoft Vibes builds the integration, complete the configuration as needed. Components that require further configuration display the error icon. -Select the component in the canvas to determine where the error is. Anypoint Code Builder highlights the location of the error within the configuration XML. +Select the component in the canvas to determine where the error is. Anypoint Code Builder highlights the location of the error in the code editor. == See Also From 7207fb1f31a47b7311700358bf7ef04cc161e10b Mon Sep 17 00:00:00 2001 From: Cristian-Venticinque Date: Tue, 28 Apr 2026 14:35:14 -0300 Subject: [PATCH 19/36] Additional replacements. --- modules/ROOT/pages/_partials/acb-component-info.adoc | 4 ++-- modules/ROOT/pages/int-configure-dw-expressions.adoc | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/modules/ROOT/pages/_partials/acb-component-info.adoc b/modules/ROOT/pages/_partials/acb-component-info.adoc index 61ea83648..4a873ed5c 100644 --- a/modules/ROOT/pages/_partials/acb-component-info.adoc +++ b/modules/ROOT/pages/_partials/acb-component-info.adoc @@ -117,7 +117,7 @@ You can select a previously saved connection in the *Connection* field and the f + NOTE: Changes impact all components using this connection. -* Update connection details without manually editing the XML code. +* Update connection details without manually editing the XML in the code editor. * Test the connection directly within the panel to verify it's correctly configured. + @@ -238,7 +238,7 @@ The configuration XML file now includes the XML for the HTTP Listener within the + In the code editor, place your cursor before the opening `` tag. Ensure that the cursor is not inside the `` element. Add the following code: + -// image::anypoint-code-builder::add-http-config-snippet.png["http:listener-config highlighted in the configuration XML menu"] +// image::anypoint-code-builder::add-http-config-snippet.png["http:listener-config highlighted in the code editor"] + [source,xml] ---- diff --git a/modules/ROOT/pages/int-configure-dw-expressions.adoc b/modules/ROOT/pages/int-configure-dw-expressions.adoc index 8432bca61..ed3cafd8a 100644 --- a/modules/ROOT/pages/int-configure-dw-expressions.adoc +++ b/modules/ROOT/pages/int-configure-dw-expressions.adoc @@ -65,7 +65,7 @@ For more resources, see xref:dataweave::index.adoc[]. [[open-fx-field]] == Open the Expression Field -Most connector operations and components provide at least one field that accepts DataWeave expressions and scripts. In the configuration panel for a component, the *fx* button indicates that the field accepts an expression. In the XML, these fields have the `#[]` markup. Expression fields accept DataWeave expressions, including DataWeave functions and Mule event data, such as `payload`, `attributes`, and `vars`. +Most connector operations and components provide at least one field that accepts DataWeave expressions and scripts. In the configuration panel for a component, the *fx* button indicates that the field accepts an expression. In the code editor, these fields have the `#[]` markup. Expression fields accept DataWeave expressions, including DataWeave functions and Mule event data, such as `payload`, `attributes`, and `vars`. To open a component expression field (*fx*): @@ -75,7 +75,7 @@ To open a component expression field (*fx*): + image::int-dw-fx-field-set-variable.png["Set Variable component configuration panel with the *fx* button highlighted next to the *Value* field"] + -The markup `#[]` in the *fx* field also appears in the XML to indicate that the field is for an expression. +The markup `#[]` in the *fx* field also appears in the code editor to indicate that the field is for an expression. + ---- >. From b89f15d46b429dfd190b1d71bf03aba101294bae Mon Sep 17 00:00:00 2001 From: Cristian-Venticinque Date: Wed, 29 Apr 2026 11:57:43 -0300 Subject: [PATCH 20/36] removed tutorial files --- .../ROOT/pages/tut-af-debug-am-flights.adoc | 350 ----------- .../tut-af-implement-am-flights-api.adoc | 217 ------- .../pages/tut-af-integrate-use-dataweave.adoc | 583 ------------------ 3 files changed, 1150 deletions(-) delete mode 100644 modules/ROOT/pages/tut-af-debug-am-flights.adoc delete mode 100644 modules/ROOT/pages/tut-af-implement-am-flights-api.adoc delete mode 100644 modules/ROOT/pages/tut-af-integrate-use-dataweave.adoc diff --git a/modules/ROOT/pages/tut-af-debug-am-flights.adoc b/modules/ROOT/pages/tut-af-debug-am-flights.adoc deleted file mode 100644 index 2a4bc1724..000000000 --- a/modules/ROOT/pages/tut-af-debug-am-flights.adoc +++ /dev/null @@ -1,350 +0,0 @@ -= Debugging the American Flights App -:page-deployment-options: cloud-ide, desktop-ide -:page-aliases: debug-add-logger-set-variables.adoc -:page-pagination: - -include::reuse::partial$beta-banner.adoc[tag="anypoint-code-builder"] - - -Debug your American Flights interface and implementation. - -== Before You Begin - -Complete these procedures: - -. xref:tut-af-design-am-flights-api.adoc[] -. xref:tut-af-integrate-am-flights.adoc[] -. xref:tut-af-implement-am-flights-api.adoc[] - -== Add Components - -To facilitate debugging, add Set Variable and Logger components to your American Flights implementation: - -. Open the implementation file (`implementation.xml`). -. After the Database Select operation (``) named *Query Flights*, add a Set Variable component: -+ -In the configuration XML, provide this `` configuration: -+ -[source,xml] ----- - ----- -. After the Transform component (``), add a Logger component with this configuration: -+ -[source,xml] ----- - ----- -+ -.Click for the complete implementation XML example. -[%collapsible] -==== -[source,xml] --- - - - - - - - - - //<1> - - - - - { - ID: payload01.ID, - code: (payload01.code1 as String default "") ++ (payload01.code2 as String default ""), - price: payload01.price default 0, - departureDate: payload01.takeOffDate as String default "", - origin: payload01.fromAirport default "", - destination: payload01.toAirport default "", - emptySeats: payload01.seatsAvailable default 0, - plane: { - "type": payload01.planeType default "", - totalSeats: payload01.totalSeats default 0 - } - } - ]]> - - - - - //<2> - - --- -[calloutlist] -.. Set Variable component -.. Logger component -==== -+ -NOTE: The `++` operator concatenates `String` values. The database connector can infer `code1` and `code2` as a non-`String` type (or as nullable). Use `as String` with `default ""` for each part so the transform matches the `departureDate` line in the same object, nulls are handled, and the `++` expression type-checks in the editor. -+ -. Proceed to <>. -+ -Learn to set up breakpoints to pause execution of your app. - -[[add-breakpoint]] -== Add Breakpoints - -Add breakpoints to your American Flights project: - -. Open the _interface_ (`interface.xml`) for your American Flights project. -. Select the *Run and Debug* icon in the activity bar: -+ -image::run-and-debug.png["An interface XML file open in the code editor, with the Run and Debug icon highlighted"] -. In the interface file (`interface.xml`), add a breakpoint to the line that contains the `` component: -+ -image::add-breakpoint.png["An interface XML file open in the code editor, with a breakpoint enabled"] -+ -Alternatively, use F9 to add a breakpoint to the line. -. Open the implementation file (`implementation.xml`) for your American Flights project, and add breakpoints to the `` and `` components. -+ -. Notice that all the breakpoints are now listed in the *Breakpoints* panel: -+ -image::breakpoints-panel.png["A menu panel displaying three enabled breakpoints"] -. Proceed to <>. -+ -Run a debugging session, and inspect the message and variables at different points during your app's execution. - -[[debug]] -== Start a Debugging Session - -. From the *Run and Debug* menu, click *Debug Mule Application*: -+ -image::start-debugging.png["The Run and Debug and the Debug Mule Applications icons both highlighted"] -+ -The IDE packages the app and opens a new terminal that deploys the app to the embedded Mule runtime engine: -+ -image::packaged-and-running-terminals.png["A terminal window displaying application status as deployed"] -. Proceed to <>. - -[[test]] -== Test Your American Flights App - -After starting your debugging session: - -//open terminal -include::anypoint-code-builder::partial$acb-reusable-steps.adoc[tag="open-terminal"] -. In the terminal, use a `curl` command to make a GET request to the listener in the _interface_ (`interface.xml`) instead of the implementation: -+ -[source,URI] ----- -curl http://localhost:8081/api/flights ----- -+ -Notice the `_/api/flights_` in the URI for the listener in the interface. For more information about this step, see xref:int-trigger-flows.adoc#trigger-flow[Trigger a flow]. -. In your American Flights project, notice that the execution of the app stops at your first breakpoint: -+ -image::debug-stop-at-flow-ref.png["Stopping the flow at a breakpoint"] -+ -The breakpoint is located in your interface file (`interface.xml`). -. In your debug toolbar, click the *Step Over* button to continue execution to the next breakpoint, at the `` element in `implementation.xml`. -. In the *Run and Debug* sidebar, notice that the *Variables* panel provides information about the Mule event at the breakpoint: -+ -image::debugger-stop-db-select.png["Breakpoint in the configuration XML file where execution stops"] -. Click the *Step Over* button on your debug toolbar to continue execution to your next breakpoint, at the `` element. -. In the *Variables* panel, navigate to *Mule Message* > *Payload*, and notice that the database response is an array of flight data: -+ -image::debugger-stop-set-variable.png["Array of flight data in the payload"] -. Proceed to <>. - -[[watch]] -== Add a Watch Expression - -. From the *Run and Debug* sidebar, open the *Watch* panel. -. Click the *+* icon in the panel, and add the expression `payload.^mediaType`: -+ -image::debug-add-expression.png["A debug window displaying application variables, with the Add Expression button highlighted"] -. Click the *Step Over* button until your execution moves to the Transform Message component (``). -. Notice that the payload is `application/java`: -+ -image:tut-debug-mediatype-java.png["The Watch panel displaying a payload type of 'application/java'"] -. Continue clicking the *Step Over* button until you reach the Logger component (``). -. Notice that your payload transforms to `application/json`: -+ -image::tut-debug-mediatype-json.png["The Watch panel displaying a payload type of 'application/json'"] -. Click the *Continue* button in the debug toolbar, and notice that the app returns the response from the database to your REST client or browser. -+ -.Click for the complete implementation XML example. -[%collapsible] -==== -[source,JSON] --- -[ - { - "ID": 1, - "code": "rree0001", - "price": 541, - "departureDate": "2016-01-20T00:00:00", - "origin": "MUA", - "destination": "LAX", - "emptySeats": 0, - "plane": { - "type": "Boeing 787", - "totalSeats": 200 - } - }, - { - "ID": 2, - "code": "eefd0123", - "price": 300, - "departureDate": "2016-01-25T00:00:00", - "origin": "MUA", - "destination": "CLE", - "emptySeats": 7, - "plane": { - "type": "Boeing 747", - "totalSeats": 345 - } - }, - { - "ID": 3, - "code": "ffee0192", - "price": 300, - "departureDate": "2016-01-20T00:00:00", - "origin": "MUA", - "destination": "LAX", - "emptySeats": 0, - "plane": { - "type": "Boeing 777", - "totalSeats": 300 - } - }, - { - "ID": 4, - "code": "rree1000", - "price": 200, - "departureDate": "2016-01-20T00:00:00", - "origin": "MUA", - "destination": "CLE", - "emptySeats": 5, - "plane": { - "type": "Boeing 737", - "totalSeats": 150 - } - }, - { - "ID": 5, - "code": "rree1093", - "price": 142, - "departureDate": "2016-02-11T00:00:00", - "origin": "MUA", - "destination": "SFO", - "emptySeats": 1, - "plane": { - "type": "Boeing 737", - "totalSeats": 150 - } - }, - { - "ID": 6, - "code": "ffee1112", - "price": 954, - "departureDate": "2016-01-20T00:00:00", - "origin": "MUA", - "destination": "CLE", - "emptySeats": 100, - "plane": { - "type": "Boeing 787", - "totalSeats": 200 - } - }, - { - "ID": 7, - "code": "eefd1994", - "price": 676, - "departureDate": "2016-01-01T00:00:00", - "origin": "MUA", - "destination": "SFO", - "emptySeats": 0, - "plane": { - "type": "Boeing 777", - "totalSeats": 300 - } - }, - { - "ID": 8, - "code": "ffee2000", - "price": 300, - "departureDate": "2016-02-20T00:00:00", - "origin": "MUA", - "destination": "SFO", - "emptySeats": 30, - "plane": { - "type": "Boeing 737", - "totalSeats": 150 - } - }, - { - "ID": 9, - "code": "eefd3000", - "price": 900, - "departureDate": "2016-02-01T00:00:00", - "origin": "MUA", - "destination": "SFO", - "emptySeats": 0, - "plane": { - "type": "Boeing 737", - "totalSeats": 150 - } - }, - { - "ID": 10, - "code": "eefd4511", - "price": 900, - "departureDate": "2016-01-15T00:00:00", - "origin": "MUA", - "destination": "LAX", - "emptySeats": 100, - "plane": { - "type": "Boeing 777", - "totalSeats": 300 - } - }, - { - "ID": 11, - "code": "rree4567", - "price": 456, - "departureDate": "2016-01-20T00:00:00", - "origin": "MUA", - "destination": "SFO", - "emptySeats": 100, - "plane": { - "type": "Boeing 737", - "totalSeats": 150 - } - } -] --- -==== -. Proceed to <>. - -[[stop]] -== Stop the Debugging Session - -To stop your debugging session: - -. Click the *Stop* button on your debug toolbar: -+ -image::debugger-stop.png["Stopping a debugging session from the debug toolbar"] -. Proceed to xref:tut-af-deploy-am-flights.adoc[]. - diff --git a/modules/ROOT/pages/tut-af-implement-am-flights-api.adoc b/modules/ROOT/pages/tut-af-implement-am-flights-api.adoc deleted file mode 100644 index 01b782f48..000000000 --- a/modules/ROOT/pages/tut-af-implement-am-flights-api.adoc +++ /dev/null @@ -1,217 +0,0 @@ -= Implementing the American Flights API Spec -//The IDE UI links to ui-tut-implement.adoc (DO NOT REMOVE WITHOUT UX/DEV ALIGNMENT) -:page-deployment-options: cloud-ide, desktop-ide -:page-aliases: ui-tut-implement.adoc, implement-api-specification.adoc, implement-an-api-specification.adoc -:page-pagination: - -include::reuse::partial$beta-banner.adoc[tag="anypoint-code-builder"] - - -Import your American Flights API specification from Anypoint Exchange. Scaffold the specification into the American Flights project that you are developing, and add the logic to implement an endpoint in the API. - -== Before You Begin - -Complete these procedures: - -. xref:tut-af-design-am-flights-api.adoc[] -. xref:tut-af-integrate-am-flights.adoc[] - -== Import and Scaffold Your American Flights API Specification - -Import your American Flights API specification from Anypoint Exchange, and scaffold the specification into an interface for your American Flights integration project. - -. In Anypoint Code Builder, open your integration, `american-ws-anypoint-code-builder`. -+ -For information about this application, see xref:tut-af-integrate-am-flights.adoc[]. -// Pointer to Command Palette -include::partial$acb-reusable-steps.adoc[tags="open-command-palette"] - -. Provide this command: -+ -[source,command] ----- -MuleSoft: Import Asset from Exchange ----- -. Select *Rest API*: -+ -image::rest-api-asset-type.png["Rest API option highlighted after selecting MuleSoft: Import Asset from Exchange"] -. If prompted, log in to Anypoint Platform, allowing the extension to sign in and open an external web site and to open Visual Studio Code. -. Type the name of your American Flights API specification, for example: -+ -[source,spec name] ----- -American Flights API ----- -+ -For information about this specification, see xref:tut-af-design-am-flights-api.adoc[]. -. Wait for the IDE to load a list of matches to the name: -+ -image::select-api-asset-from-exchange.png["American Flights API asset is highlighted"] -. When prompted for a version, select the version of the API to import, such as `_1.0.0_`. -. Select *Yes* when prompted to scaffold the API dependency. -+ -This step adds the API specification as a dependency in your project's `pom.xml` file and creates a new configuration XML file, such as `american-flights-api.xml`: -+ -image::scafolded-mule-config-file.png["American-flights.xml file highlighted in the package explorer section"] -. Proceed to <>. - -[[tour-canvas]] -== Tour the Interface File - -Examine the scaffolded flows and error handlers for your interface in the canvas and configuration XML. - -image::scafolded-flow-canvas.png["The main flow is highlighted"] - -. From the *EXPLORER* menu, open the configuration file for your interface, `american-flight-api.xml`. -. Use the *Flow List* panel to navigate through flows: -+ -image::outline-list-select-flow.png["American-flights-api-main flow highlighted"] - -.. Expand the *Flow List* panel. -.. Select a flow from the list. -.. Click the flow in the canvas to highlight the flow in the configuration XML. -. In the configuration XML, locate the flows created for the endpoints in your API specification: - -* `get:\flights` -+ -[source,xml] ----- - - ----- -* `post:\flights` -+ -[source,xml] ----- - - ----- -* `get:\flights{ID}` -+ -[source,xml,linenums] ----- - - ----- -. Notice the automatically generated Error Handler components, for example: -+ -//TODO: WE SHOULD SHOW HOW TO DO SOME BASIC ERROR HANDLING... -+ -[source,xml] ----- - - - - - - - - - - - - - - - - - - - - - ----- - -. Proceed to <>. - -[[rename]] -== Name Your Interface and Implementation Files - -Provide descriptive names for the interface and implementation files in your American Flights project. The interface receives all incoming requests to your application. The scaffolded flows in the interface validate and route requests. The implementation provides the backend logic for calls to the interface. - -image::api-interface-rename.png["Rename option highlighted the context menu of american-flight-api-acb.xml file"] - -. Rename `american-flight-api-acb.xml` to `interface.xml` by right-clicking the file name, selecting *Rename*, and providing the new name. -. Rename `american-ws-anypoint-code-builder.xml` to `implementation.xml`. -. Proceed to <>. - -[[endpoint]] -== Configure an Endpoint through the Interface - -To receive HTTP requests through the interface, remove the HTTP listener from `implementation.xml`, and in your interface file (`interface.xml`), add a Flow Ref component (``) to the `getFlights` flow in your implementation. - -. Open `implementation.xml`. -+ -image::get-flights-select-listener.png["HTTP listener highlighted in the implementation.xml file"] -. Delete the *HTTP /flights* listener XML from the configuration XML: -+ -[source,xml] --- - --- -+ -.Click for the resulting flow. -[%collapsible] -==== -[source,xml] --- - - - - - - - - - - - { - ID: payload01.ID, - code: (payload01.code1 as String default "") ++ (payload01.code2 as String default ""), - price: payload01.price default 0, - departureDate: payload01.takeOffDate as String default "", - origin: payload01.fromAirport default "", - destination: payload01.toAirport default "", - emptySeats: payload01.seatsAvailable default 0, - plane: { - "type": payload01.planeType default "", - totalSeats: payload01.totalSeats default 0 - } - } - ]]> - - - - - --- -==== -+ -NOTE: The `++` operator concatenates `String` values. The database connector can infer `code1` and `code2` as a non-`String` type (or as nullable). Use `as String` with `default ""` for each part so the transform matches the `departureDate` line in the same object, nulls are handled, and the `++` expression type-checks in the editor. -+ -. In Anypoint Code Builder, open your `interface.xml` file. -. Locate the `get:\flights:american-flights-api-config` flow: -+ -[source,xml] --- - - - --- -. Before the `` element in the flow, add a Flow Reference component (``) that references the flow `getFlights` in the implementation: -+ -[source,xml] --- - - - - --- -. Optional: Trigger a flow through your interface, and process the request with your implementation. -+ -For guidance, see xref:int-trigger-flows.adoc[]. -. Proceed to xref:tut-af-debug-am-flights.adoc[]. diff --git a/modules/ROOT/pages/tut-af-integrate-use-dataweave.adoc b/modules/ROOT/pages/tut-af-integrate-use-dataweave.adoc deleted file mode 100644 index f99993d18..000000000 --- a/modules/ROOT/pages/tut-af-integrate-use-dataweave.adoc +++ /dev/null @@ -1,583 +0,0 @@ -= Transforming Flight Data with DataWeave -:page-deployment-options: cloud-ide, desktop-ide -:page-aliases: use-dataweave.adoc -:page-pagination: - -include::reuse::partial$beta-banner.adoc[tag="anypoint-code-builder"] - -Use DataWeave to transform and match flight data to your API spec. - -== Before You Begin - -Complete these procedures: - -. xref:tut-af-integrate-am-flights.adoc[] -. xref:tut-af-integrate-connect-to-a-db.adoc[] - -[[add-transform-component]] -== Add the Transform Message Component - -Add a Transform Message component to the flow so you can configure it to return the database payload as JSON in the next section. - -. In Anypoint Code Builder, open `american-ws-anypoint-code-builder.xml`. -. Add the Transform Message component below the *Database Select* operation. Use one of these methods: -+ -* *From the canvas:* Click the image:icon-plus.png["",15,15] (*Add component*) icon after the *Database Select* operation. In the menu, open *Core Processors* (or search for *transform*), then select *Transform Message*. -* *From the configuration XML:* Place your cursor inside the flow, after the closing tag of the *Database Select* element. Use auto-complete (Ctrl+Space or Cmd+Space), type `ee:transform` or `transform`, and select *Transform Message* from the list. -+ -The IDE inserts the component. If the inserted XML does not include `` and `` with an empty `` block, add that structure inside `` so you can add the DataWeave script in the next section. -+ -image::transform-with-output-json.png["Transform component highlighted"] -+ -.Example Transform Message component XML: -[source,xml] ----- - - - - - - - ----- - -[[return-payload]] -== Return the Payload as JSON - -. Open `american-ws-anypoint-code-builder.xml` if it is not already open (you added the Transform Message component in <>). -. Ensure the Transform Message component is present below *Database Select* (you added it in the previous section). In the configuration XML, add the `doc:name` value *Transform Message* or similar to the `` component: -+ ----- - -... ----- -. Within `` add a DataWeave script that outputs the message payload to a JSON format: -+ -[source,dataweave] --- - - - - - - - --- -. Deploy your app within the IDE by selecting *Run* > *Start Debugging (F5)*. -+ -For guidance, see xref:tut-af-integrate-am-flights.adoc#run[Run Your App in Debug Mode]. -. After the app deploys successfully, use a REST Client or browser to trigger a response. -+ -For guidance, see xref:tut-af-integrate-am-flights.adoc#test[Test Your App]. -. View the response data from the MySQL database, for example: -+ -[source,JSON] ----- -[ - { - "planeType": "Boeing 787", - "code2": "0001", - "takeOffDate": "2016-01-20T00:00:00", - "code1": "rree", - "fromAirport": "MUA", - "price": 541, - "seatsAvailable": 0, - "toAirport": "LAX", - "ID": 1, - "airlineName": "American Airlines", - "totalSeats": 200 - }, - ... -] ----- -+ -.Click for the complete response. -[%collapsible] -==== -[source,json] ----- -[ - { - "planeType": "Boeing 787", - "code2": "0001", - "takeOffDate": "2016-01-20T00:00:00", - "code1": "rree", - "fromAirport": "MUA", - "price": 541, - "seatsAvailable": 0, - "toAirport": "LAX", - "ID": 1, - "airlineName": "American Airlines", - "totalSeats": 200 - }, - { - "planeType": "Boeing 747", - "code2": "0123", - "takeOffDate": "2016-01-25T00:00:00", - "code1": "eefd", - "fromAirport": "MUA", - "price": 300, - "seatsAvailable": 7, - "toAirport": "CLE", - "ID": 2, - "airlineName": "American Airlines", - "totalSeats": 345 - }, - { - "planeType": "Boeing 777", - "code2": "0192", - "takeOffDate": "2016-01-20T00:00:00", - "code1": "ffee", - "fromAirport": "MUA", - "price": 300, - "seatsAvailable": 0, - "toAirport": "LAX", - "ID": 3, - "airlineName": "American Airlines", - "totalSeats": 300 - }, - { - "planeType": "Boeing 737", - "code2": "1000", - "takeOffDate": "2016-01-20T00:00:00", - "code1": "rree", - "fromAirport": "MUA", - "price": 200, - "seatsAvailable": 5, - "toAirport": "CLE", - "ID": 4, - "airlineName": "American Airlines", - "totalSeats": 150 - }, - { - "planeType": "Boeing 737", - "code2": "1093", - "takeOffDate": "2016-02-11T00:00:00", - "code1": "rree", - "fromAirport": "MUA", - "price": 142, - "seatsAvailable": 1, - "toAirport": "SFO", - "ID": 5, - "airlineName": "American Airlines", - "totalSeats": 150 - }, - { - "planeType": "Boeing 787", - "code2": "1112", - "takeOffDate": "2016-01-20T00:00:00", - "code1": "ffee", - "fromAirport": "MUA", - "price": 954, - "seatsAvailable": 100, - "toAirport": "CLE", - "ID": 6, - "airlineName": "American Airlines", - "totalSeats": 200 - }, - { - "planeType": "Boeing 777", - "code2": "1994", - "takeOffDate": "2016-01-01T00:00:00", - "code1": "eefd", - "fromAirport": "MUA", - "price": 676, - "seatsAvailable": 0, - "toAirport": "SFO", - "ID": 7, - "airlineName": "American Airlines", - "totalSeats": 300 - }, - { - "planeType": "Boeing 737", - "code2": "2000", - "takeOffDate": "2016-02-20T00:00:00", - "code1": "ffee", - "fromAirport": "MUA", - "price": 300, - "seatsAvailable": 30, - "toAirport": "SFO", - "ID": 8, - "airlineName": "American Airlines", - "totalSeats": 150 - }, - { - "planeType": "Boeing 737", - "code2": "3000", - "takeOffDate": "2016-02-01T00:00:00", - "code1": "eefd", - "fromAirport": "MUA", - "price": 900, - "seatsAvailable": 0, - "toAirport": "SFO", - "ID": 9, - "airlineName": "American Airlines", - "totalSeats": 150 - }, - { - "planeType": "Boeing 777", - "code2": "4511", - "takeOffDate": "2016-01-15T00:00:00", - "code1": "eefd", - "fromAirport": "MUA", - "price": 900, - "seatsAvailable": 100, - "toAirport": "LAX", - "ID": 10, - "airlineName": "American Airlines", - "totalSeats": 300 - }, - { - "planeType": "Boeing 737", - "code2": "4567", - "takeOffDate": "2016-01-20T00:00:00", - "code1": "rree", - "fromAirport": "MUA", - "price": 456, - "seatsAvailable": 100, - "toAirport": "SFO", - "ID": 11, - "airlineName": "American Airlines", - "totalSeats": 150 - } -] ----- -==== -+ -If the MySQL test server is not available, this error occurs: -+ -[[source,error]] ----- -Cannot get connection for URL jdbc:mysql://mudb.learn.mulesoft.com:3306/ : -Communications link failure. ----- -+ -To address the issue, try again until you get a successful response. -. Proceed to <>. - -[[restructure]] -== Transform the Response Data - -Transform the JSON output to the structure required by your API specification. - -Your *American Flights API* in Anypoint Exchange uses a different structure for its flight data than your request to the database returns. - -To find the required JSON structure, search for the JSON example under the GET method for your `/flights` endpoint. For guidance, see xref:publish-api-spec-to-exchange.adoc#locate-your-api-in-exchange[Locate Your API in Exchange] or open the https://anypoint.mulesoft.com/exchange/68ef9520-24e9-4cf2-b2f5-620025690913/training-american-flights-api/minor/2.0/console/method/%2373/[public version of the API on Exchange^]. - -[%header,%autowidth.spread,cols="1a,1a"] -|=== -| API Specification Response Structure | Actual Response Structure -| -[source,json] --- -[ - { - "code": "ER38sd", - "price": 400, - "departureDate": "2017/07/26", - "origin": "CLE", - "destination": "SFO", - "emptySeats": 0, - "plane": { - "type": "Boeing 737", - "totalSeats": 150 - } - } -] --- -| -[source,json] --- -[ - { - "planeType": "Boeing 787", - "code2": "0001", - "takeOffDate": "2016-01-20T00:00:00", - "code1": "rree", - "fromAirport": "MUA", - "price": 541, - "seatsAvailable": 0, - "toAirport": "LAX", - "ID": 1, - "airlineName": "American Airlines", - "totalSeats": 200 - } -] --- -|=== - -Use DataWeave to transform the response: - -. In the configuration XML, replace the script in the CDATA block (``) with a DataWeave mapping: -+ -[source,xml] --- - - - - { - ID: payload01.ID, - code: (payload01.code1 as String default "") ++ (payload01.code2 as String default ""), - price: payload01.price default 0, - departureDate: payload01.takeOffDate as String default "", - origin: payload01.fromAirport default "", - destination: payload01.toAirport default "", - emptySeats: payload01.seatsAvailable default 0, - plane: { - "type": payload01.planeType default "", - totalSeats: payload01.totalSeats default 0 - } - } - ]]> - - - --- -+ -NOTE: The `++` operator concatenates `String` values. The database connector can infer `code1` and `code2` as a non-`String` type (or as nullable). Use `as String` with `default ""` for each part so the transform matches the `departureDate` line in the same object, nulls are handled, and the `++` expression type-checks in the editor. -+ -. Review your configuration XML: -+ -[source,xml] ----- - - - - - - - - - - - - - - - - - - - - { - ID: payload01.ID, - code: (payload01.code1 as String default "") ++ (payload01.code2 as String default ""), - price: payload01.price default 0, - departureDate: payload01.takeOffDate as String default "", - origin: payload01.fromAirport default "", - destination: payload01.toAirport default "", - emptySeats: payload01.seatsAvailable default 0, - plane: { - "type": payload01.planeType default "", - totalSeats: payload01.totalSeats default 0 - } - } - ]]> - - - - ----- -. Proceed to <>. - -[[run-test]] -== Run and Test Your App - -. Deploy your app within the IDE by executing to *Run* > *Start Debugging (F5)*. -+ -For guidance, see xref:tut-af-integrate-am-flights.adoc#run[Run Your App in Debug Mode]. -. After the app deploys successfully, use a REST Client or browser to trigger flow. -+ -For guidance, see xref:tut-af-integrate-am-flights.adoc#test[Test Your App]. -+ -Notice that the transformed data structure conforms to the API requirements, for example: -+ -[source,JSON] ----- -[ - { - "ID": 1, - "code": "rree0001", - "price": 541, - "departureDate": "2016-01-20T00:00:00", - "origin": "MUA", - "destination": "LAX", - "emptySeats": 0, - "plane": { - "type": "Boeing 787", - "totalSeats": 200 - } - }, - ... ----- -+ -[%collapsible] -.Click for the complete response. -==== -[source,JSON] ----- -[ - { - "ID": 1, - "code": "rree0001", - "price": 541, - "departureDate": "2016-01-20T00:00:00", - "origin": "MUA", - "destination": "LAX", - "emptySeats": 0, - "plane": { - "type": "Boeing 787", - "totalSeats": 200 - } - }, - { - "ID": 2, - "code": "eefd0123", - "price": 300, - "departureDate": "2016-01-25T00:00:00", - "origin": "MUA", - "destination": "CLE", - "emptySeats": 7, - "plane": { - "type": "Boeing 747", - "totalSeats": 345 - } - }, - { - "ID": 3, - "code": "ffee0192", - "price": 300, - "departureDate": "2016-01-20T00:00:00", - "origin": "MUA", - "destination": "LAX", - "emptySeats": 0, - "plane": { - "type": "Boeing 777", - "totalSeats": 300 - } - }, - { - "ID": 4, - "code": "rree1000", - "price": 200, - "departureDate": "2016-01-20T00:00:00", - "origin": "MUA", - "destination": "CLE", - "emptySeats": 5, - "plane": { - "type": "Boeing 737", - "totalSeats": 150 - } - }, - { - "ID": 5, - "code": "rree1093", - "price": 142, - "departureDate": "2016-02-11T00:00:00", - "origin": "MUA", - "destination": "SFO", - "emptySeats": 1, - "plane": { - "type": "Boeing 737", - "totalSeats": 150 - } - }, - { - "ID": 6, - "code": "ffee1112", - "price": 954, - "departureDate": "2016-01-20T00:00:00", - "origin": "MUA", - "destination": "CLE", - "emptySeats": 100, - "plane": { - "type": "Boeing 787", - "totalSeats": 200 - } - }, - { - "ID": 7, - "code": "eefd1994", - "price": 676, - "departureDate": "2016-01-01T00:00:00", - "origin": "MUA", - "destination": "SFO", - "emptySeats": 0, - "plane": { - "type": "Boeing 777", - "totalSeats": 300 - } - }, - { - "ID": 8, - "code": "ffee2000", - "price": 300, - "departureDate": "2016-02-20T00:00:00", - "origin": "MUA", - "destination": "SFO", - "emptySeats": 30, - "plane": { - "type": "Boeing 737", - "totalSeats": 150 - } - }, - { - "ID": 9, - "code": "eefd3000", - "price": 900, - "departureDate": "2016-02-01T00:00:00", - "origin": "MUA", - "destination": "SFO", - "emptySeats": 0, - "plane": { - "type": "Boeing 737", - "totalSeats": 150 - } - }, - { - "ID": 10, - "code": "eefd4511", - "price": 900, - "departureDate": "2016-01-15T00:00:00", - "origin": "MUA", - "destination": "LAX", - "emptySeats": 100, - "plane": { - "type": "Boeing 777", - "totalSeats": 300 - } - }, - { - "ID": 11, - "code": "rree4567", - "price": 456, - "departureDate": "2016-01-20T00:00:00", - "origin": "MUA", - "destination": "SFO", - "emptySeats": 100, - "plane": { - "type": "Boeing 737", - "totalSeats": 150 - } - } -] ----- -==== -. Stop your app. -+ -For guidance, see xref:tut-af-integrate-am-flights.adoc#stop[Stop Your App]. -. Proceed to xref:tut-af-implement-am-flights-api.adoc[]. From f49a1470d7e973c7b34568b33e0cedf81609b7ef Mon Sep 17 00:00:00 2001 From: Cristian-Venticinque Date: Wed, 29 Apr 2026 12:43:33 -0300 Subject: [PATCH 21/36] update --- modules/ROOT/pages/_partials/acb-component-info.adoc | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/modules/ROOT/pages/_partials/acb-component-info.adoc b/modules/ROOT/pages/_partials/acb-component-info.adoc index 2afc9be30..1f3c768a3 100644 --- a/modules/ROOT/pages/_partials/acb-component-info.adoc +++ b/modules/ROOT/pages/_partials/acb-component-info.adoc @@ -344,24 +344,20 @@ For more information about *Transform Message*, see xref:anypoint-code-builder:: -- * *Connection config*: The global Salesforce configuration name (for example, `Salesforce_Config`). * *Type*: `Account`. ++ +If *Type* stays empty until you establish a working Salesforce connection, set `type="Account"` on `` in the code editor. * *Records*: A DataWeave expression that resolves to the records to create. + If the incoming payload uses different property names than Salesforce expects, map those properties in *Records*, as shown in the configuration XML example that follows. If the payload is already an array of Java objects with Salesforce field names (`output application/java`), you can use `#[payload]`. -- + -[TIP] -==== -If *Type* stays empty until you establish a working Salesforce connection, set `type="Account"` on `` in the configuration XML. For more information about connector fields for this operation, see xref:salesforce-connector::index.adoc[]. -==== + [NOTE] -==== Picklist fields such as *Industry* must use values that exist in your Salesforce organization. -==== + -This configuration XML listens on `/accounts`, builds a JSON payload, maps it to Account fields inside ``, and calls *Create*. +This configuration listens on `/accounts`, builds a JSON payload, maps it to Account fields inside ``, and calls *Create*. Align `config-ref` on `` with the `name` of your `` (for example, `config-ref` from the earlier steps in this topic). + [source,xml] From 55690b9dddea8934baf9b6e65ac42247124430b9 Mon Sep 17 00:00:00 2001 From: Cristian-Venticinque <46459586+Cristian-Venticinque@users.noreply.github.com> Date: Wed, 29 Apr 2026 17:01:01 -0300 Subject: [PATCH 22/36] Apply suggestion from @Cristian-Venticinque --- modules/ROOT/pages/_partials/acb-component-info.adoc | 1 - 1 file changed, 1 deletion(-) diff --git a/modules/ROOT/pages/_partials/acb-component-info.adoc b/modules/ROOT/pages/_partials/acb-component-info.adoc index 28b71e922..f7009726d 100644 --- a/modules/ROOT/pages/_partials/acb-component-info.adoc +++ b/modules/ROOT/pages/_partials/acb-component-info.adoc @@ -183,7 +183,6 @@ Includes On-Error Continue (``) and On-Error Propagate (` Date: Wed, 29 Apr 2026 17:01:20 -0300 Subject: [PATCH 23/36] Apply suggestion from @Cristian-Venticinque --- modules/ROOT/pages/_partials/acb-component-info.adoc | 3 --- 1 file changed, 3 deletions(-) diff --git a/modules/ROOT/pages/_partials/acb-component-info.adoc b/modules/ROOT/pages/_partials/acb-component-info.adoc index f7009726d..ce41dc828 100644 --- a/modules/ROOT/pages/_partials/acb-component-info.adoc +++ b/modules/ROOT/pages/_partials/acb-component-info.adoc @@ -182,11 +182,8 @@ Includes On-Error Continue (``) and On-Error Propagate (` Date: Wed, 29 Apr 2026 18:09:10 -0300 Subject: [PATCH 24/36] W-22226570-Update-debugger-docs-CP --- modules/ROOT/pages/int-debug-mule-apps.adoc | 122 +++++++++----------- 1 file changed, 56 insertions(+), 66 deletions(-) diff --git a/modules/ROOT/pages/int-debug-mule-apps.adoc b/modules/ROOT/pages/int-debug-mule-apps.adoc index 0ca30ffb0..4f2f85457 100644 --- a/modules/ROOT/pages/int-debug-mule-apps.adoc +++ b/modules/ROOT/pages/int-debug-mule-apps.adoc @@ -34,27 +34,44 @@ For example, trigger an HTTP Listener or configure a Scheduler component. [[debugger-view-overview]] == Debugger View Overview -image::debugger-view.png["Elements of the debugger view"] +Use *Run and Debug* to open the view. Start a Mule debug session (*Start Debugging*, F5), inspect runtime state, and manage breakpoints. Keyboard shortcut to open the view: Cmd+Shift+D (Mac) or Ctrl+Shift+D (Windows). -[calloutlist] -. *Start Debugging*: Starts an instance of a Mule application in debugging mode. -. *Debug Toolbar*: Controls debugging of Mule applications. -+ -See <>. -. *Variables* panel: Provides Mule event and parameter data. -+ -The Mule event includes message payload and attribute details, as well as Mule variable data. The parameters include component data, such as the component name. -. *Run and Debug* (MuleSoft) icon: Opens the *Run and Debug* panel, where you can click *Start Debugging (F5)* and find debugging information. -+ -Keyboard shortcut: Cmd+Shift+d (Mac) or Ctrl+Shift+d (Windows) -. *Watch* panel: Pin <> that re-evaluate whenever execution pauses. -. *Call Stack* panel: Identifies the functions or procedures that are currently in the stack. -. *Breakpoints* panel: Lists breakpoints by file and line, and includes <> to stop when any exception is thrown. -. *Terminal* console: Displays the output of the Maven build process and the results of the deployment to the embedded Mule Runtime engine. -. *Breakpoint* icon: Identifies a line in the configuration XML to pause execution of the flow so that you can check for and fix any issues. -. *Breakpoint* icon: Identifies a component that contains one or more breakpoints. +The *Debug Console* tab in the lower panel area lets you <> while execution is paused. See <>. + +[[debugger-layout-panels]] +=== Panels and Tools + +* *Debug toolbar* — Appears when a session is active. See <> for *Continue*, *Step Over*, *Step Into*, *Step Out*, *Restart*, and *Stop*. +* *Variables* — Tree of the current Mule event: payload, attributes, variables, and component parameters (such as the current processor name). See <> for how errors, MIME types, copying, and editing appear in this release. +* *Watch* — Pin <> that reevaluate whenever execution pauses. +* *Call Stack* — Frames for the current execution context (including multiple threads when applicable). +* *Breakpoints* — Breakpoints listed by file and line, including <> when you want to stop on any thrown exception. +* *Terminal* — Maven build output and deployment messages for the embedded Mule runtime. + +Breakpoints appear in the XML editor and on canvas processors. For more information about adding breakpoints from the editor or the canvas, see <>. + +[[canvas-execution-indicators]] +=== Canvas behavior while debugging + +When execution pauses at a breakpoint or after a step, the flow canvas shows which processor is active. The paused processor is outlined so you can see where the runtime stopped. The canvas view scrolls as needed to keep that processor in view when a pause occurs so you can follow execution without searching the diagram manually. + +[[source-editor-focus]] +=== Source Editor and Multiple Configuration Files + +Projects can split flows across several Mule configuration XML files. When a breakpoint is hit or you step, the editor opens or switches focus to the XML file that contains the flow and processor that is actually executing, and the canvas shows that configuration. Stepping through a `` into a referenced flow opens the file that declares that referenced flow and updates the canvas accordingly. + +[[inspect-mule-event-variables]] +== Inspect Variables and the Mule Event + +While execution is paused, use the *Variables* tree to inspect payload, attributes, `vars`, and related values. + +When the Mule event has an error in scope, the *Variables* view includes error information so you can diagnose failures without hunting through unrelated nodes. When no error is present, that error-specific presentation is omitted. + +Payloads and values that use common text-based MIME types (such as `application/json`, `text/xml`, and `text/plain`) appear as readable text in the tree. Values that are truly binary are shown with a compact placeholder instead of a long byte dump. -Open the *Debug Console* tab in the panel area to <> while execution is paused. See <>. +To reuse a value elsewhere, copy it from the tree using the context menu action that copies the value as JSON. Copied JSON is valid for typical parsers. The string escaping matches what you paste into external tools. + +Change some variable values during a pause. Use the variable context menu to edit the value inline where the debugger allows it. After resuming, the running application uses the updated value. [[add-breakpoint]] == Add a Breakpoint @@ -68,16 +85,12 @@ To add a breakpoint in a configuration XML file: . In Anypoint Code Builder, on the Explorer view, open your configuration XML file, for example, `my-project-name.xml`. // Pointer to Run and Debug include::partial$acb-reusable-steps.adoc[tags="open-run-debug"] -. Click the line number in your `` component to add a breakpoint on that component: -+ -image::deb-add-breakpoint.png["Add breakpoint on a line number"] +. In the XML editor, click the gutter beside the line number for the component where you want the execution to pause. + -You can also use F9 to add a breakpoint to the current line. -. In your configuration XML file, add two more breakpoints for the `` and the `` components. +The gutter shows a breakpoint indicator for that line. You can also move the caret to the line and press F9 to toggle a breakpoint. +. Add more breakpoints on other lines as needed. + -All breakpoints appear in the *Breakpoints* panel: -+ -image::int-breakpoints-panel.png["Breakpoints panel"] +Registered breakpoints appear in the *Run and Debug* view under *Breakpoints*, grouped by file and line, with checkboxes to enable or disable each one. === Add a Breakpoint to a Component in the Canvas UI @@ -87,13 +100,9 @@ To add a breakpoint to a component in the canvas UI: // Pointer to Run and Debug include::partial$acb-reusable-steps.adoc[tags="open-run-debug"] -. In the canvas UI, right-click on the component you want to add a breakpoint to: +. In the canvas, right-click the processor where you want to pause and choose *Add Breakpoint*. + -image::debug-add-breakpoint-canvas.png["Add breakpoint to a component in the canvas UI"] - -. Select *Add Breakpoint*. -+ -A breakpoint icon appears on the component and in the configuration XML for that component. +A breakpoint indicator appears on that processor in the canvas and at the corresponding line in the configuration XML. === Add a Breakpoint to a Batch Component @@ -144,7 +153,7 @@ You can configure the debugger to pause whenever any exception is thrown, which . Open *Run and Debug*. . In the *BREAKPOINTS* section, enable *All Exceptions*. + -If you enable *All Exceptions*, the debugger pauses as soon as an exception is thrown during a debug session. +When *All Exceptions* is enabled, the debugger pauses as soon as an exception is thrown during a debug session. The error type and a readable message are surfaced in the *Variables* area so you can see what failed without expanding deep trees first. Use <> together with <> to relate the exception to the processor on the canvas. [[run-debug-mode]] == Run Your Application in Debug Mode @@ -158,28 +167,19 @@ include::anypoint-code-builder::partial$acb-reusable-steps.adoc[tags="deploy-loc NOTE: Selecting *Run* > *Start without Debugging* produces an error. Anypoint Code Builder packages your application and deploys the application to the embedded Mule runtime engine. -A terminal opens so you can view the status: - -image::deb-terminal-running.png["Debugging status in a terminal window"] +The integrated terminal shows Maven and deployment progress, and the status bar indicates that the application is running. -The terminal displays a message and the status bar turns red to indicate that the application is running. - -Use buttons on the <> to control debugging of Mule applications. +Use the controls on the <> to drive the session after you trigger your flow. [[debug-toolbar]] == Debug Toolbar -image::debugger-toolbar.png["Debug toolbar"] +When a Mule debug session is active, the debug toolbar provides: -[calloutlist] -. *Continue* F5 +. *Continue* (F5) — Runs until the next breakpoint or the end of the application. +. *Step Over* (F10) — Runs to the next processor in the current flow and pauses there. + -Proceeds to the next breakpoint, if present, and pauses execution of the application. -Otherwise, continues to the end of the application. -. *Step Over* F10 -+ -Proceeds to the next component in the flow, where execution pauses. -At a Flow Ref component (``), clicking *Step Over* proceeds to the next component in the flow but _does not_ follow the Flow Ref logic to a referenced flow or proceed to another flow. +At a *Flow Ref* component (``), *Step Over* doesn't enter the referenced flow. It moves to the next processor after the reference in the same flow instead. + .Step Over Details [%collapsible] @@ -202,10 +202,9 @@ At a Flow Ref component (``), clicking *Step Over* proceeds to the ne . Skips `` logic . Reaches `` named `Logger1` ==== -. *Step Into* F11 +. *Step Into* (F11) — Enters the next processor, including following a `` into the referenced flow. + -Proceeds to the next component in the flow, where execution pauses. -At a Flow Ref component (``), clicking *Step Into* follows the logic of the component and proceeds to the first component in the referenced flow. If a component in a flow follows a Flow Ref component, *Step Into* returns to that component after the last component in the referenced flow (or flows). +When you step into a flow reference, the IDE opens the Mule configuration file that declares that referenced flow, moves the canvas to that flow, and pauses on the first processor inside it. After you step through the referenced flow, stepping continues in the caller flow where appropriate. + .Step Into Details [%collapsible] @@ -229,15 +228,9 @@ At a Flow Ref component (``), clicking *Step Into* follows the logic . Reaches `Logger2` in next flow, `myNewFlow` . Returns to flow `flow1` to reach `Logger1` ==== -. *Step Out* Shift+F11 -+ -Exits the current flow and attempts to return to a previous flow. If a previous flow doesn't exist, the debugger behaves like *Continue*. -. *Restart* Shift+Cmd+F5 (Mac) or Shift+Ctrl+F5 (Windows) -+ -Stop and restart the application without packaging new dependencies, such as new connector dependencies in your `pom.xml` file. -. *Stop* Shift+F5 -+ -Stop execution of the application. The next debugging session that you start packages the application with any new dependencies. +. *Step Out* (Shift+F11) — Leaves the current flow and returns toward the caller when possible; if there is no caller frame, behaves like *Continue*. +. *Restart* (Shift+Cmd+F5 on Mac, Shift+Ctrl+F5 on Windows) — Stops and restarts without picking up new Maven dependencies from `pom.xml`. +. *Stop* (Shift+F5) — Ends the application. The next debug session repackages the app if you added connector or dependency changes. [[evaluate-dw-while-debugging]] == Evaluate DataWeave While Debugging @@ -277,15 +270,12 @@ To perform a hot deploy: . Ensure your Mule application is running in the IDE. . Make an update to your application. -. Click the *Save and Hot-deploy to Mule Runtime* (lightning) icon to deploy the application with the change: -+ -image::deb-hot-deploy.png["Hot-deploy (lightning) icon in a running Mule application"] - +. In the editor toolbar for the running Mule application, click *Save and Hot-deploy to Mule Runtime* (lightning bolt icon) to push the change to the running runtime without a full stop and dependency resolution cycle. [[stop-debug]] == Stop a Debug Session -To stop your debug session, in the *Run and Debug* panel, click the image:icon-stop.png["",15,15] (*Stop*) icon. +To stop your debug session, use *Stop* on the debug toolbar (Shift+F5), or open *Run and Debug* and choose the stop action for the active Mule session. The status bar no longer indicates that the application is running. From 64eddde442a071a2af58f9e2de519f96adfcf201 Mon Sep 17 00:00:00 2001 From: Cristian Date: Thu, 30 Apr 2026 19:41:56 -0300 Subject: [PATCH 25/36] W-22226570-Address-skills-CP --- modules/ROOT/pages/int-debug-mule-apps.adoc | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/modules/ROOT/pages/int-debug-mule-apps.adoc b/modules/ROOT/pages/int-debug-mule-apps.adoc index a2e7131bd..0a5c1f5fb 100644 --- a/modules/ROOT/pages/int-debug-mule-apps.adoc +++ b/modules/ROOT/pages/int-debug-mule-apps.adoc @@ -8,10 +8,11 @@ include::reuse::partial$beta-banner.adoc[tag="anypoint-code-builder"] //LOGO (web, desktop, or both) // include::partial$acb-ide-logos.adoc[tags="both-ides"] -Debug your Mule application using the embedded debugger in Anypoint Code Builder. +In Anypoint Code Builder, the embedded debugger pauses Mule flows so you can inspect payloads and variables, evaluate DataWeave expressions, and step through processors in the XML editor or on the canvas. +Set breakpoints in configuration files or on components, run in debug mode, step through execution with the debug toolbar, and hot deploy updates while the runtime stays up. +The result is faster diagnosis: you confirm event state and processor behavior before you ship your integration. - -The process for debugging a Mule app is: +Complete these steps: . <> to pause the execution of a flow at lines that you want to inspect or fix. + @@ -246,7 +247,7 @@ While execution is paused, you can run DataWeave against the current Mule event + The console shows each expression you run and its evaluated result for the current pause. -The *Debug Console* is suited to check if needed as you step through a flow. +Use the *Debug Console* for checking the steps as you debug through a flow. [[evaluate-dw-watch]] === Use the Watch Panel @@ -258,7 +259,7 @@ Whenever execution pauses, the debugger reevaluates each watch expression and sh + Watch expressions typically persist for later debug sessions in the same workspace, so you can keep inspecting the same values across runs. -The *Watch* panel is suited to values you want to track on every pause without retyping them. +Use the *Watch* panel for values you want to track on every pause without retyping them. [[hot-deploy]] == Perform a Hot Deploy When Debugging From ff9279d5c919202374ef5cc5a011948855143f5c Mon Sep 17 00:00:00 2001 From: Cristian Date: Sat, 2 May 2026 12:16:00 -0300 Subject: [PATCH 26/36] W-22226570-fix-name-CP --- modules/ROOT/pages/int-debug-mule-apps.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/ROOT/pages/int-debug-mule-apps.adoc b/modules/ROOT/pages/int-debug-mule-apps.adoc index 0a5c1f5fb..88b2eae61 100644 --- a/modules/ROOT/pages/int-debug-mule-apps.adoc +++ b/modules/ROOT/pages/int-debug-mule-apps.adoc @@ -194,7 +194,7 @@ At a *Flow Ref* component (``), *Step Over* doesn't enter the referen - + ---- From 364e49d89e57aef08248fad3c5326bd82bd9483b Mon Sep 17 00:00:00 2001 From: Cristian Date: Sat, 2 May 2026 17:21:19 -0300 Subject: [PATCH 27/36] W-22323446-Flex-to-Omni-rebranding-CP --- modules/ROOT/pages/_partials/af-shared.adoc | 4 ++-- modules/ROOT/pages/af-agent-networks.adoc | 12 ++++++------ .../ROOT/pages/af-deploy-agent-network-targets.adoc | 4 ++-- modules/ROOT/pages/af-get-started.adoc | 6 +++--- modules/ROOT/pages/af-project-files.adoc | 2 +- .../ROOT/pages/af-troubleshoot-agent-networks.adoc | 4 ++-- 6 files changed, 16 insertions(+), 16 deletions(-) diff --git a/modules/ROOT/pages/_partials/af-shared.adoc b/modules/ROOT/pages/_partials/af-shared.adoc index 105eab84f..cb4547a98 100644 --- a/modules/ROOT/pages/_partials/af-shared.adoc +++ b/modules/ROOT/pages/_partials/af-shared.adoc @@ -63,7 +63,7 @@ To complete these tasks, you also need: * xref:anypoint-code-builder::start-acb.adoc[Anypoint Code Builder desktop] + Allowlist Anypoint Code Builder URLs. For more information, see xref:anypoint-code-builder::urls-to-allow.adoc[Allow URLs for Anypoint Code Builder]. -* xref:gateway::flex-gateway-managed-ingress-egress.adoc[Flex Gateway Ingress and Egress gateways] +* xref:gateway::flex-gateway-managed-ingress-egress.adoc[Omni Gateway Ingress and Egress gateways] === MuleSoft Vibes Requirements (Optional) @@ -87,7 +87,7 @@ If you're using the Anypoint CLI to create agent network projects, ensure you me . Use Anypoint Runtime Manager to set up a private space in CloudHub 2.0 or deployment target in Runtime Fabric. + See xref:anypoint-code-builder::af-get-started.adoc#setup-space[Set Up the Private Space or Deployment Target for Your Environment]. -. Set up Ingress and egress Flex Gateways for the private space or deployment target. +. Set up Ingress and egress Omni Gateways for the private space or deployment target. + * If using Anypoint Code Builder, see xref:anypoint-code-builder::af-get-started.adoc#setup-gateways[Set Up Agent Network Gateways for the Private Space or Deployment Target]. * If using the Anypoint CLI, see the xref:anypoint-code-builder::af-build-agent-networks-in-a-ci-cd-environment.adoc#agent-network-setup-gateways[setup gateways command reference]. diff --git a/modules/ROOT/pages/af-agent-networks.adoc b/modules/ROOT/pages/af-agent-networks.adoc index d72d9f8a8..5b7777240 100644 --- a/modules/ROOT/pages/af-agent-networks.adoc +++ b/modules/ROOT/pages/af-agent-networks.adoc @@ -44,7 +44,7 @@ Publish existing agents and tools (HRIS, Identity, ITSM, Payroll, Facilities, LM An agent broker decomposes the task of onboarding the new hire (create HR record, provision identity, assign hardware, grant app access, enroll in benefits and training), calling MCP and A2A agents as needed, with human‑in‑the‑loop approvals where required. * Govern + -Flex Gateway enforces authentication, least‑privilege access, and guardrails. API Manager policies ensure consistent controls across all calls and data exchanges. +Omni Gateway enforces authentication, least‑privilege access, and guardrails. API Manager policies ensure consistent controls across all calls and data exchanges. * Observe + Monitoring and traces (beta) give end‑to‑end visibility into progress, failures, and latency. Visualization shows which agents interacted and where bottlenecks occurred. @@ -114,16 +114,16 @@ The asset might also be published to Exchange. [[agent-network-architecture]] == Agent Network Architecture -This diagram shows an agent network with agents and MCP servers, traffic through Flex Gateway, governed by API Manager, and observed in Anypoint Monitoring and Agent Visualizer. +This diagram shows an agent network with agents and MCP servers, traffic through Omni Gateway, governed by API Manager, and observed in Anypoint Monitoring and Agent Visualizer. -image::agent-fabric-architecture.png[Agent Fabric showing agents and MCP servers defined in YAML and published to Exchange, with traffic through Flex Gateway, governed by API Manager, and observed in Anypoint Monitoring and Agent Visualizer] +image::agent-fabric-architecture.png[Agent Fabric showing agents and MCP servers defined in YAML and published to Exchange, with traffic through Omni Gateway, governed by API Manager, and observed in Anypoint Monitoring and Agent Visualizer] [calloutlist] . Publish the agentic assets to Anypoint Exchange for discovery and reuse after you define the agent network (brokers, agents, MCP servers) in the agent network YAML in Anypoint Code Builder. . Deploy the agentic assets to CloudHub 2.0 (managed in Runtime Manager). -. Enforce policies on incoming traffic to the network with an ingress Flex Gateway, which sits in front of brokers and API endpoints. -. Enforce policies, manage connections, and emit telemetry data with an egress Flex Gateway, which sits on outbound paths from brokers and agents to external agents and services. -. Collect logs, metrics, and traces from Flex Gateway and runtimes in Anypoint Monitoring. +. Enforce policies on incoming traffic to the network with an ingress Omni Gateway, which sits in front of brokers and API endpoints. +. Enforce policies, manage connections, and emit telemetry data with an egress Omni Gateway, which sits on outbound paths from brokers and agents to external agents and services. +. Collect logs, metrics, and traces from Omni Gateway and runtimes in Anypoint Monitoring. [[llm-support]] == Large Language Models diff --git a/modules/ROOT/pages/af-deploy-agent-network-targets.adoc b/modules/ROOT/pages/af-deploy-agent-network-targets.adoc index cac03fb6a..fd83e5065 100644 --- a/modules/ROOT/pages/af-deploy-agent-network-targets.adoc +++ b/modules/ROOT/pages/af-deploy-agent-network-targets.adoc @@ -1,9 +1,9 @@ [[deploy-instances]] = Deploy Agent Network Instances -Deploy your agent network instance to a deployment target. You can deploy to a CloudHub 2.0 private space or to a Runtime Fabric. When you deploy, Flex Gateway secures your agent network in the ingress gateway. Also, it secures your brokers, agents, and MCP servers in the egress gateway. +Deploy your agent network instance to a deployment target. You can deploy to a CloudHub 2.0 private space or to a Runtime Fabric. When you deploy, Omni Gateway secures your agent network in the ingress gateway. Also, it secures your brokers, agents, and MCP servers in the egress gateway. -These Flex Gateway policies are applied automatically at deployment. +These Omni Gateway policies are applied automatically at deployment. [%header,cols="20,40a"] diff --git a/modules/ROOT/pages/af-get-started.adoc b/modules/ROOT/pages/af-get-started.adoc index bc41a4a77..93f1fde29 100644 --- a/modules/ROOT/pages/af-get-started.adoc +++ b/modules/ROOT/pages/af-get-started.adoc @@ -25,17 +25,17 @@ You must complete this step so that the private space appears as a valid deploym + Create a target space for Runtime Fabric. + -For information about Runtime Fabric deployments, see xref:gateway::flex-gateway-managed-set-up.adoc#rtf[Managed Flex Gateway on Runtime Fabric]. +For information about Runtime Fabric deployments, see xref:gateway::flex-gateway-managed-set-up.adoc#rtf[Managed Omni Gateway on Runtime Fabric]. [[setup-gateways]] == Set Up Agent Network Gateways for the Private Space or Deployment Target After you have a target space, use the `MuleSoft: Set Up Agent Network Gateways` command to create the ingress and egress gateways required for deployment in either CloudHub 2.0 or Runtime Fabric. -For agent networks, you must have at least one small Managed Flex Gateway and one large Managed Flex Gateway in your environment. +For agent networks, you must have at least one small Managed Omni Gateway and one large Managed Omni Gateway in your environment. For more information about gateways, see xref:gateway::flex-architecture-basic-deployments.adoc[]. -For more information about Runtime Fabric deployments, see xref:gateway::flex-gateway-managed-set-up.adoc#rtf[Managed Flex Gateway on Runtime Fabric]. +For more information about Runtime Fabric deployments, see xref:gateway::flex-gateway-managed-set-up.adoc#rtf[Managed Omni Gateway on Runtime Fabric]. . In Anypoint Code Builder, from the Command Palette, run the command *MuleSoft: Set Up Agent Network Gateways*. + diff --git a/modules/ROOT/pages/af-project-files.adoc b/modules/ROOT/pages/af-project-files.adoc index 04265ddb3..8adfea2ee 100644 --- a/modules/ROOT/pages/af-project-files.adoc +++ b/modules/ROOT/pages/af-project-files.adoc @@ -444,7 +444,7 @@ policies: Apply policies at the broker or at the connection. Reference the policy definition and apply the configuration. -For more information about applying policies via Flex Gateway in Local Mode, see: +For more information about applying policies via Omni Gateway in Local Mode, see: * xref:gateway::flex-agent-secure.adoc[] * xref:gateway::flex-gateway-secure-local.adoc[] diff --git a/modules/ROOT/pages/af-troubleshoot-agent-networks.adoc b/modules/ROOT/pages/af-troubleshoot-agent-networks.adoc index a96b38a63..92fc014a3 100644 --- a/modules/ROOT/pages/af-troubleshoot-agent-networks.adoc +++ b/modules/ROOT/pages/af-troubleshoot-agent-networks.adoc @@ -28,7 +28,7 @@ Enable logging and log levels from CloudHub 2.0 or Runtime Fabric: Edit `agent-network.yaml` to set message logging for MCP servers and agents. -Message logging uses the xref:gateway::policies-included-message-logging.adoc[Flex Gateway Message Logging policy]. In the `connection` section of the agent or MCP server instance you want to log, add the following logging policy inside `policies`: +Message logging uses the xref:gateway::policies-included-message-logging.adoc[Omni Gateway Message Logging policy]. In the `connection` section of the agent or MCP server instance you want to log, add the following logging policy inside `policies`: [source,yaml] ---- @@ -65,7 +65,7 @@ Use the steps in this section to diagnose and fix common problems in agent netwo If Anypoint Monitoring isn't showing traces for agents and MCP servers, check these settings: * In API Manager, verify you've enabled the tracing policy for all brokers and agents. -* In the managed Flex Gateways, verify that you've enabled Distributed Tracing for ingress and egress. +* In the managed Omni Gateways, verify that you've enabled Distributed Tracing for ingress and egress. === Issue: No Agent Network Commands in Anypoint Code Builder From 77fa2f3a9867637495f66ddc9212879a1204b1c3 Mon Sep 17 00:00:00 2001 From: Cristian Date: Tue, 5 May 2026 15:12:31 -0300 Subject: [PATCH 28/36] W-22204761-Add-MuleSoft-Vibes-March-features-CP --- .../ROOT/pages/vibes-create-integrations.adoc | 21 +++++++++++++++++++ modules/ROOT/pages/vibes-get-started.adoc | 14 +++++++++++++ 2 files changed, 35 insertions(+) diff --git a/modules/ROOT/pages/vibes-create-integrations.adoc b/modules/ROOT/pages/vibes-create-integrations.adoc index 86d2bcac0..25f717c9e 100644 --- a/modules/ROOT/pages/vibes-create-integrations.adoc +++ b/modules/ROOT/pages/vibes-create-integrations.adoc @@ -72,6 +72,27 @@ Best practices for messages: After Mulesoft Vibes generates the initial integration, the code is written directly into your project. You can further customize it to fit your requirements. +[[vibes-generate-apps-from-templates]] +=== Generate Applications from Exchange Templates + +MuleSoft Vibes can generate applications by using local templates from Anypoint Exchange as a starting point. This helps teams align generated integrations with established implementation patterns and internal standards. + +Template-based generation supports consistent project structure and reduces the effort required to apply organizational conventions after generation. + +[[vibes-custom-connectors-generated-apps]] +=== Include Custom Connectors in Generated Applications + +MuleSoft Vibes can include custom connectors published to your private Anypoint Exchange when generating applications. Generated integrations can target internal or specialized systems your organization supports. + +By reusing private Exchange assets during generation, teams can apply approved connector implementations from the beginning of the project lifecycle. + +[[vibes-exchange-apis-rest-connectors]] +=== Invoke Exchange APIs Using REST Connectors + +MuleSoft Vibes can generate applications that invoke APIs published to Anypoint Exchange by using REST connectors. This capability helps you reuse existing API assets directly in generated integration implementations. + +Using Exchange APIs as generation targets improves consistency across your API and integration landscape while accelerating delivery. + [[complete-gen-flow]] == Complete Your Integration diff --git a/modules/ROOT/pages/vibes-get-started.adoc b/modules/ROOT/pages/vibes-get-started.adoc index 2be4eb7e5..49b5e6313 100644 --- a/modules/ROOT/pages/vibes-get-started.adoc +++ b/modules/ROOT/pages/vibes-get-started.adoc @@ -66,6 +66,13 @@ You can also add context directly from the message input box by typing `@`, whic These inputs are used as contextual references during generation. +[[vibes-multimodal-file-prompts]] +=== Add Files to Messages with Multi-Modal Support + +MuleSoft Vibes supports multi-modal context in the message area. Drag images directly into a conversation to provide visual context alongside text inputs. + +Attach up to 10 files per conversation to help MuleSoft Vibes interpret requirements that are easier to explain through screenshots or supporting files. + == Configure MuleSoft Vibes Settings You can customize how MuleSoft Vibes interacts with your project through the *Settings* panel. @@ -84,6 +91,13 @@ The available options include: * *Execute all commands*: Allow MuleSoft Vibes to execute any terminal command. * *Use the browser*: Allow MuleSoft Vibes to launch and interact with websites in a browser. +[[vibes-token-consumption-monitoring]] +=== Monitor Token Consumption in MuleSoft Vibes + +MuleSoft Vibes shows token consumption directly in the Vibes window. You can view token usage for individual requests and tasks while you work. + +This visibility helps you understand the resource cost of generation activities and manage usage across sessions. + == Skills in MuleSoft Vibes xref:vibes-skills.adoc[Skills] are reusable instruction sets that load when your message matches a skill's description. For information about skills and MCP tools, see xref:vibes-skills.adoc[]. From e9712cc6951a93ff5c4137cfd925a455d50571c1 Mon Sep 17 00:00:00 2001 From: Cristian Date: Tue, 5 May 2026 16:47:17 -0300 Subject: [PATCH 29/36] W-22217896-Add-Java-Home-to-troubleshooting-page-CP --- .../pages/troubleshoot-generative-ai.adoc | 48 +++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/modules/ROOT/pages/troubleshoot-generative-ai.adoc b/modules/ROOT/pages/troubleshoot-generative-ai.adoc index 3582ae16d..46f428cb8 100644 --- a/modules/ROOT/pages/troubleshoot-generative-ai.adoc +++ b/modules/ROOT/pages/troubleshoot-generative-ai.adoc @@ -70,6 +70,54 @@ If you receive an authorization error, contact your Anypoint Platform organizati * The user has the required Anypoint Code Builder permissions. * Your Anypoint Platform organization is current and active. +== Vibes Features are Unresponsive or Fail to Load + +If MuleSoft Vibes features aren't working as expected, verify that your system points to the JDK used by Anypoint Code Builder. + +=== Configure JAVA_HOME on macOS + +. Identify the path where Anypoint Code Builder has installed the JDK. It typically follows this pattern: ++ ++/Users//AnypointCodeBuilder/java//Contents/Home+ +. Open your shell profile (usually `~/.zshrc` for Zsh or `~/.bash_profile` for Bash) in a text editor: ++ +[source,bash] +---- +nano ~/.zshrc +---- +. Add these lines, replacing `` with the path identified in the previous step: ++ +[source,bash] +---- +export JAVA_HOME="" +export PATH="$JAVA_HOME/bin:$PATH" +---- +. Save the file and reload the profile: ++ +[source,bash] +---- +source ~/.zshrc +---- +. Verify the configuration by running `echo $JAVA_HOME` and `java -version`. + +=== Configure JAVA_HOME on Windows + +. Identify the path where Anypoint Code Builder has installed the JDK. It typically follows this pattern: ++ ++C:\Users\\AnypointCodeBuilder\java\+ +. Open Windows Search, enter `Edit the system environment variables`, and then select *Environment Variables*. +. In *User variables* or *System variables*, create or update `JAVA_HOME` with your JDK path. +. Update the `Path` variable and add this line: ++ ++%JAVA_HOME%\bin+ +. Open a new Command Prompt and verify the configuration: ++ +[source,bash] +---- +echo %JAVA_HOME% +java -version +---- + == See Also * xref:start-acb.adoc#log-in-to-anypoint-platform-from-the-ide[Log in to Anypoint Platform from the IDE] From 17e411924818b49030e00f42a230a83e36778ed4 Mon Sep 17 00:00:00 2001 From: Cristian Pose <101070178+Crispy-Salesforce@users.noreply.github.com> Date: Tue, 5 May 2026 17:44:20 -0300 Subject: [PATCH 30/36] Apply suggestion from @IsaacEldridge Co-authored-by: Isaac Eldridge --- modules/ROOT/pages/vibes-create-integrations.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/ROOT/pages/vibes-create-integrations.adoc b/modules/ROOT/pages/vibes-create-integrations.adoc index 25f717c9e..d20e6f1ae 100644 --- a/modules/ROOT/pages/vibes-create-integrations.adoc +++ b/modules/ROOT/pages/vibes-create-integrations.adoc @@ -75,7 +75,7 @@ After Mulesoft Vibes generates the initial integration, the code is written dire [[vibes-generate-apps-from-templates]] === Generate Applications from Exchange Templates -MuleSoft Vibes can generate applications by using local templates from Anypoint Exchange as a starting point. This helps teams align generated integrations with established implementation patterns and internal standards. +You can generate applications in MuleSoft Vibes by using local templates from Anypoint Exchange as a starting point. This helps you align generated integrations with established implementation patterns and internal standards. Template-based generation supports consistent project structure and reduces the effort required to apply organizational conventions after generation. From 6ea91fea0ce3c36d6cfd54d2b93bc6a0d8883c7b Mon Sep 17 00:00:00 2001 From: Cristian Pose <101070178+Crispy-Salesforce@users.noreply.github.com> Date: Tue, 5 May 2026 17:44:38 -0300 Subject: [PATCH 31/36] Apply suggestion from @IsaacEldridge Co-authored-by: Isaac Eldridge --- modules/ROOT/pages/vibes-create-integrations.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/ROOT/pages/vibes-create-integrations.adoc b/modules/ROOT/pages/vibes-create-integrations.adoc index d20e6f1ae..2e644275c 100644 --- a/modules/ROOT/pages/vibes-create-integrations.adoc +++ b/modules/ROOT/pages/vibes-create-integrations.adoc @@ -82,7 +82,7 @@ Template-based generation supports consistent project structure and reduces the [[vibes-custom-connectors-generated-apps]] === Include Custom Connectors in Generated Applications -MuleSoft Vibes can include custom connectors published to your private Anypoint Exchange when generating applications. Generated integrations can target internal or specialized systems your organization supports. +You can include custom connectors published to your private Anypoint Exchange when generating applications with MuleSoft Vibes. Use integrations to target internal or specialized systems your organization supports. By reusing private Exchange assets during generation, teams can apply approved connector implementations from the beginning of the project lifecycle. From fbb409b772e58f5435ab94bc8405d0b6d94c2afb Mon Sep 17 00:00:00 2001 From: Cristian Pose <101070178+Crispy-Salesforce@users.noreply.github.com> Date: Tue, 5 May 2026 17:44:59 -0300 Subject: [PATCH 32/36] Apply suggestion from @IsaacEldridge Co-authored-by: Isaac Eldridge --- modules/ROOT/pages/vibes-create-integrations.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/ROOT/pages/vibes-create-integrations.adoc b/modules/ROOT/pages/vibes-create-integrations.adoc index 2e644275c..021a8509d 100644 --- a/modules/ROOT/pages/vibes-create-integrations.adoc +++ b/modules/ROOT/pages/vibes-create-integrations.adoc @@ -84,7 +84,7 @@ Template-based generation supports consistent project structure and reduces the You can include custom connectors published to your private Anypoint Exchange when generating applications with MuleSoft Vibes. Use integrations to target internal or specialized systems your organization supports. -By reusing private Exchange assets during generation, teams can apply approved connector implementations from the beginning of the project lifecycle. +By reusing private Exchange assets during generation, you can apply approved connector implementations from the beginning of the project lifecycle. [[vibes-exchange-apis-rest-connectors]] === Invoke Exchange APIs Using REST Connectors From 7a0bc01261d095f6cc871091560e756281582a80 Mon Sep 17 00:00:00 2001 From: Cristian Pose <101070178+Crispy-Salesforce@users.noreply.github.com> Date: Tue, 5 May 2026 17:45:20 -0300 Subject: [PATCH 33/36] Apply suggestion from @IsaacEldridge Co-authored-by: Isaac Eldridge --- modules/ROOT/pages/vibes-create-integrations.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/ROOT/pages/vibes-create-integrations.adoc b/modules/ROOT/pages/vibes-create-integrations.adoc index 021a8509d..9c630bc7f 100644 --- a/modules/ROOT/pages/vibes-create-integrations.adoc +++ b/modules/ROOT/pages/vibes-create-integrations.adoc @@ -89,7 +89,7 @@ By reusing private Exchange assets during generation, you can apply approved con [[vibes-exchange-apis-rest-connectors]] === Invoke Exchange APIs Using REST Connectors -MuleSoft Vibes can generate applications that invoke APIs published to Anypoint Exchange by using REST connectors. This capability helps you reuse existing API assets directly in generated integration implementations. +Use MuleSoft Vibes to generate applications that invoke APIs published to Anypoint Exchange by using REST connectors. This capability helps you reuse existing API assets directly in generated integration implementations. Using Exchange APIs as generation targets improves consistency across your API and integration landscape while accelerating delivery. From e6af66f025c6bcecf7e023ca04d1ef43b5a98aab Mon Sep 17 00:00:00 2001 From: Cristian Pose <101070178+Crispy-Salesforce@users.noreply.github.com> Date: Tue, 5 May 2026 17:45:40 -0300 Subject: [PATCH 34/36] Apply suggestion from @IsaacEldridge Co-authored-by: Isaac Eldridge --- modules/ROOT/pages/vibes-get-started.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/ROOT/pages/vibes-get-started.adoc b/modules/ROOT/pages/vibes-get-started.adoc index 49b5e6313..28336c6bc 100644 --- a/modules/ROOT/pages/vibes-get-started.adoc +++ b/modules/ROOT/pages/vibes-get-started.adoc @@ -94,7 +94,7 @@ The available options include: [[vibes-token-consumption-monitoring]] === Monitor Token Consumption in MuleSoft Vibes -MuleSoft Vibes shows token consumption directly in the Vibes window. You can view token usage for individual requests and tasks while you work. +View token consumption for individual requests and tasks directly in MuleSoft Vibes. This visibility helps you understand the resource cost of generation activities and manage usage across sessions. From e08e60220ff707d6ef8d21da810f30037f1975c2 Mon Sep 17 00:00:00 2001 From: Cristian Date: Wed, 6 May 2026 14:42:30 -0300 Subject: [PATCH 35/36] W-16540932-Troubleshoot-Cloud-IDE-issues-CP --- .../pages/troubleshoot-cloud-ide-disk.adoc | 44 +++++++++++++++++++ modules/ROOT/pages/troubleshooting.adoc | 1 + 2 files changed, 45 insertions(+) create mode 100644 modules/ROOT/pages/troubleshoot-cloud-ide-disk.adoc diff --git a/modules/ROOT/pages/troubleshoot-cloud-ide-disk.adoc b/modules/ROOT/pages/troubleshoot-cloud-ide-disk.adoc new file mode 100644 index 000000000..5a8e6a400 --- /dev/null +++ b/modules/ROOT/pages/troubleshoot-cloud-ide-disk.adoc @@ -0,0 +1,44 @@ += Disk Space Issues in Cloud IDE +:page-deployment-options: cloud-ide + +include::reuse::partial$beta-banner.adoc[tag="anypoint-code-builder"] + +When the Cloud IDE runs out of disk space, the devcontainer can present issues. Use this recovery sequence to restore access and prevent repeated startup failures. + +Cloud IDE disk space issues can manifest as: + +* The IDE remains in an indefinite *Connecting* state. +* Project creation fails, or new projects don't load. +* Terminal or log output shows `ENOENT: no such file or directory`, indicating a file or directory is missing. + +In such cases, follow the recovery sequence to restore access and prevent repeated startup failures. + +== Rebuild the Dev Container + +Rebuild the devcontainer first to recover from transient startup issues. + +. Open the workspace console. +. On your workspace card, click the three-dot menu. +. Select *Rebuild Dev Container*. +. Wait 5 to 6 minutes for the rebuild process to complete. + +== Free Up Space + +If rebuilding doesn't resolve the issue, remove content you no longer need from the workspace. + +* Delete unused Mule project folders from the Cloud IDE workspace. +* Remove files and folders that are no longer required for active development. + +== Delete and Recreate the Cloud IDE + +If the issue persists, as a last resort, recreate the Cloud IDE instance from the Anypoint Code Builder launch page. + +[IMPORTANT] +-- +Deleting the Cloud IDE instance permanently removes local project files. Back up or download important project folders before you continue. +-- + +. Go to the Anypoint Code Builder launch page. +. Delete the Cloud IDE instance. +. Wait 1 minute. +. Click *Launch* to create a new Cloud IDE instance. diff --git a/modules/ROOT/pages/troubleshooting.adoc b/modules/ROOT/pages/troubleshooting.adoc index 6baea70d7..4a7e4077b 100644 --- a/modules/ROOT/pages/troubleshooting.adoc +++ b/modules/ROOT/pages/troubleshooting.adoc @@ -15,6 +15,7 @@ Troubleshoot errors and warnings you encounter when using Anypoint Code Builder. * xref:troubleshoot-implementation-errors.adoc[] * xref:troubleshoot-mule-runtime-errors.adoc[] * xref:troubleshoot-loading-errors.adoc[] +* xref:troubleshoot-cloud-ide-disk.adoc[] * xref:troubleshoot-mcp-server.adoc[] + For other issues and workarounds, see xref:acb-release-notes.adoc#known-issues[Known Issues] in the Anypoint Code Builder Release Notes. From 36f461dd80e8c89d802d13a959f335015e05b9d4 Mon Sep 17 00:00:00 2001 From: Cristian Date: Thu, 7 May 2026 15:38:34 -0300 Subject: [PATCH 36/36] W-16540932-Address-Santiago-feedback-CP --- .../ROOT/pages/troubleshoot-cloud-ide-disk.adoc | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/modules/ROOT/pages/troubleshoot-cloud-ide-disk.adoc b/modules/ROOT/pages/troubleshoot-cloud-ide-disk.adoc index 5a8e6a400..8f32a83f9 100644 --- a/modules/ROOT/pages/troubleshoot-cloud-ide-disk.adoc +++ b/modules/ROOT/pages/troubleshoot-cloud-ide-disk.adoc @@ -13,23 +13,24 @@ Cloud IDE disk space issues can manifest as: In such cases, follow the recovery sequence to restore access and prevent repeated startup failures. -== Rebuild the Dev Container +== Reboot the Cloud IDE -Rebuild the devcontainer first to recover from transient startup issues. +Reboot the Cloud IDE first to recover from transient startup issues. -. Open the workspace console. -. On your workspace card, click the three-dot menu. -. Select *Rebuild Dev Container*. -. Wait 5 to 6 minutes for the rebuild process to complete. +. Open Anypoint Code Builder Cloud IDE. +. Select *Manage your IDE*. +. Select *Reboot*. +. Wait 5 to 6 minutes for the reboot to complete. +. Select *Launch*, and verify that you can access the Cloud IDE. == Free Up Space -If rebuilding doesn't resolve the issue, remove content you no longer need from the workspace. +If the reboot doesn't resolve the issue, remove content you no longer need from the workspace. * Delete unused Mule project folders from the Cloud IDE workspace. * Remove files and folders that are no longer required for active development. -== Delete and Recreate the Cloud IDE +== Delete and Recreate the Cloud IDE If the issue persists, as a last resort, recreate the Cloud IDE instance from the Anypoint Code Builder launch page.