Skip to content

Latest commit

 

History

History
562 lines (504 loc) · 19 KB

File metadata and controls

562 lines (504 loc) · 19 KB
  1. Open the Command Palette.

    Show me how
    • Use the keyboard shortcuts:

      • Mac: Cmd+Shift+p

      • Windows: Ctrl+Shift+p

    • In the desktop IDE, select View > Command Palette.

    • In the cloud IDE, click the (menu) icon, and select View > Command Palette.

  2. Before starting your Mule app, confirm that the connection to the listener is successful:

    From the code editor, above the HTTP Listener configuration (<http:listener-config/>), 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.

  3. Open the Run and Debug panel.

    Show me how
    • Click the (Run and Debug) icon in the activity bar.

    • Use the keyboard shortcuts:

      • Mac: Cmd+Shift+d

      • Windows: Ctrl+Shift+d

    • In the desktop IDE, select View > Run.

    • In the cloud IDE, click the (menu) icon, and select View > Run.

  1. Open the Output panel.

    Show me how
    • Use the keyboard shortcuts:

      • Mac: Cmd+Shift+u

      • Windows: Ctrl+Shift+u

    • In the desktop IDE, select View > Output.

    • In the cloud IDE, click the (menu) icon, and select View > Output.

    • Mac: Ctrl+Shift+g

    • Windows: Cmd+Shift+g

  1. Open the Source Control panel.

    Show me how

    Click the (Source Control) icon in the activity bar or use the keyboard shortcuts:

    anypoint-code-builder::partial$acb-reusable-steps.adoc

  2. Open the Source Control panel.

    Show me how

    Click the (Source Control) icon in the activity bar or use the keyboard shortcuts:

    anypoint-code-builder::partial$acb-reusable-steps.adoc

  1. Open the Auto Complete menu.

    Show me how
    • Mac: Ctrl+Space

    • Windows: Cmd+Space

  2. Navigate to Configure Snippets.

    Show me how
    • In the desktop IDE, select Code > Settings > Configure Snippets.

    • In the cloud IDE, click the (menu) icon, and select Preferences > Configure Snippets.

    • In either IDE:

      1. Use keyboard shortcuts to open the Command Palette:

        • Mac: Cmd+Shift+p

        • Windows: Ctrl+Shift+p

      2. Select this command:

        Snippets: Configure Snippets
  3. In the activity bar of the IDE, click the (Anypoint Code Builder) icon. .Show me how

  • In the desktop IDE, select File > Close Folder.

  • In the cloud IDE, click the (menu) icon, and select File > Close Folder.

Show me how
Show me how

To reuse an existing project name, you must delete the project that is already using the name first. See des-delete-api-projects.adoc. . To reference an element within a component defined in the fragment file:

+

  1. Select the fragment file name.

  2. Enter #/.

  3. Press Ctrl+Space.

  4. Select the element from the options, for example:

    Reference an element in the fragment

After adding the fragment to your spec, you can:

  • Navigate to the dependency:

    Place the cursor on the fragment reference and press Command+Click. For example:

    Navigate to the fragment dependency

  • View the dependency in the API Console:

    Place the cursor on the fragment reference and click the (API Console) icon to open the fragment in the console.

    For more information, see Review Your Spec in the API Console. This topic is in progress. Don’t create the project within another project directory.

  1. Click the (Start Debugging (F5)) icon for Debug Mule Application.

    Alternatively, if the Start Debugging (F5) icon is not present:

    1. Click Run and Debug.

    2. If a Select debugger dropdown menu appears, select Mule Xml Debugger to initiate the debugging session:

      Run and Debug button and Mule XML Debugger menu item

      When the application deploys successfully, you see a DEPLOYED log message in the output panel:

      **********************************************************************
      *              - - + DOMAIN + - -               * - - + STATUS + - - *
      **********************************************************************
      * default                                       * DEPLOYED           *
      **********************************************************************
  1. From your IDE, open the Terminal window in the console:

    • In the desktop IDE, select View > Terminal.

    • In the cloud IDE, click the (menu) icon, and select Terminal > New Terminal.

    • For either IDE: Press Ctrl and then press the backtick key (`).

Anypoint Code Builder supports scaffolding these schema fragment files if they’re referenced from API specs:

Avro JSON RAML

AsyncAPI

Yes

Yes

No

GraphQL

No

No

Yes

OData

No

No

Yes

REST

No

No

Yes

SOAP

No

No

Yes

If you add a fragment that isn’t supported, the scaffolder doesn’t add these fragments as project dependencies when you import the spec from Exchange. However, you can scaffold schemas that are specified inline within the spec.

For OAS and JSON schema, you can also specify fragment files that you create manually within the implementation or integration project directory.

AsyncAPI Open Beta: Starting in June 2024, scaffolding and implementing version 2.6 and 2.0 AsyncAPI specifications are supported. Your Anypoint Platform organization administrator must accept Beta terms and conditions before you can discover an AsyncAPI spec in Exchange and scaffold it into your project. Enablement status is available in Anypoint Platform from Anypoint Code Builder.

  • An administrator with an Anypoint Platform organization account must provide you with the necessary permissions. See start-configure-permissions.adoc.

  • The cloud IDE requires a non-trial Enterprise license of Mule runtime engine. See Upgrade Your Account and mule-runtime::installing-an-enterprise-license.adoc.

  • Anypoint Platform requires a user account. You can use an existing account or create one from Anypoint Platform (see supported Cloud Hosts).

  1. If an API specification is open in the Explorer panel of the IDE, close the project to avoid a synchronization error when you switch clouds.

    • In the desktop IDE, click File > Close Folder.

  2. Open the Settings tab in the desktop IDE:

    Selecting the EU cloud from the desktop IDE

  1. Open the Settings tab for the IDE:

+ .Show me how

Details
  • From the Anypoint Code Builder panel, click the (gear) icon.

  • From the activity bar, click the (gear) icon, select Settings, and search for mule in the Settings tab.

  • Provide the command MuleSoft: Open ACB Settings in the Command Palette.

Use source control management (SCM) to store and share your design, integration, and implementation projects. For source control options, see anypoint-code-builder::start-scm.adoc.

  • Have some familiarity with business groups.

    When you publish your API spec to Exchange from Anypoint Code Builder, the IDE requests the name of the business group.

To sync changes to project files with your repo, see [sync-changes].

  1. Stage your files to your local repository by hovering over the Changes area (located after the Commit button) and clicking the (plus) icon.

    Adding commit message for staged changes

    Alternatively, you can stage a single file by clicking the plus icon for that file.

    Staged files move from the Changes area in the Source Control panel to the Staged Changes area. The UI uses the git add command to add changes from your working directory to the staging area in your local Git repo.

  2. Provide your a commit message for the files, and then click Commit, for example:

    Commit message for staged changes

  1. Provide the following command:

    MuleSoft: Import Asset from Exchange
  2. Depending on the language of your API spec, select one of these options:

    • Rest API for OAS or RAML

    • GraphQL API

  3. If prompted, click Allow to allow sign in using Anypoint Platform and select the business group.

  4. Type the name of the API spec, and press Enter.

  5. Wait for the IDE to load a list of matches to the name.

+ .Show me how

Details
  1. In the field that opens, provide a name for your implementation project.

  2. Navigate to a directory for your project, and click Select target folder.

  3. Select a Mule runtime (Mule) version for your project.

  4. Select a supported Java version for Mule.

  5. After the scaffolding process completes, view the scaffolded interface for your project from the src/main/mule directory in the Explorer.

    If the scaffold fails, see troubleshoot-implementation-errors.adoc.

    You can also open your new project’s mule-artifact.json file from the Explorer to check the Mule and Java versions, for example:

    anypoint-code-builder::partial$acb-reusable-steps.adoc

    The mule-artifact.json file is located at the root level of the project directory.

{
    "minMuleVersion": "4.6.2",
    "javaSpecificationVersions": [
        "11"
    ]
}
<dependency>
    <groupId>e91cab06-650b-4634-9c6f-5bc4f4fc4d17</groupId>
    <artifactId>OAS-Example</artifactId>
    <version>1.0.1</version>
    <classifier>oas</classifier>
    <type>zip</type>
</dependency>

Although it is also possible to set the versions as values to muleRuntimeVersion and jdkVersion items directly in the Settings tab, you must know the major, minor, and patch numbers, and in some cases, the timestamp. It is easier to set them after clicking Edit defaults through command palette.

  1. If prompted, click Set Version to set a supported Mule runtime or Java version in the Project Properties tab.

  1. Click the (Testing) icon to open the Testing panel.

Make sure that you have access to AsyncAPI implementation features from the IDE:

  1. Log in to Anypoint Platform.

  2. From Anypoint Platform, open the Anypoint Code Builder landing page.

  3. If the message AsyncAPI Beta is now available in Anypoint Code Builder and Anypoint Studio appears on the page, ask your organization administrator to join the Beta program by:

    1. Clicking Join Beta from the Anypoint Code Builder landing page

      Administrator view of the Anypoint Code Builder landing page

      The Join Beta button is available only to your organization administrator.

    2. Reviewing the terms and conditions of the beta program

    3. Clicking Get Access

      When the AsyncAPI feature is available for your organization, the Anypoint Code Builder landing page provides the following notification:

      AsyncAPI Implementation Beta for Anypoint Code Builder and Studio is enabled for your organization.

  1. From Create, click Implement an API:

    <strong>Implement an API</strong> link highlighted in the <strong>Getting Started</strong> section

  2. Complete the Implement an API Specification form:

    Form for starting an implementation project

    Field Name Field Value

    Project Name

    Unique name for your project.

    This name is used as the title and name of the project file. For example, if the project name is My Project, the project file name is my-project.

    Project Location

    Your home directory or another directory you create.

    Search an API Specification from Exchange

    Name of the specification in Exchange. Search results can include OAS, RAML, AsyncAPI, and GraphQL specifications. Activate Show filters to narrow your search results. See imp-filter-search-results.adoc for more information. To implement a gRPC API spec, see imp-implement-grpc-api-spec.adoc.

    Mule runtime

    Mule runtime version to use for your project.

    Java Version

    Java version to use for Mule.

  3. Search for an API spec on Exchange:

    1. Start typing the name of an API spec.

    2. Press Enter to display a list of search results.

    3. Click Add Asset to add the selected API spec:

  1. Provide business logic to implement this interface within the Mule app:

    Define your business logic by configuring connector operations and processing components, as needed for your use cases. Provide configuration property values to the dev-properties.properties file. Optionally, create and configure additional flows or subflows for your processing requirements.

    To find guidance on configuring components, debugging, performing unit testing on your application, and other tasks, see int-developing-integrations.adoc. For information about connectors and processors for configuring your business logic, see acb-reference.adoc.

    For an example of an AsyncAPI specification, the scaffolded interface, and business logic for processing some orders within a Mule application, see [examples].