Skip to main content

#MuleSoft Anypoint Code Builder2 人正在讨论

Questions and answers about MuleSoft Anypoint Code Builder, best practices, and use cases.

Using Anypoint Code Builder with agent-fabric-transformation 1.6.0 (agent-network.yaml, agentNetwork: 2.0.0).

Every Deploy logs this warning for my AgentScript broker:

Warning: Broker 'customer_support_broker' does not declare an 'authorization' configuration, so it will fall back to the 'user-context-propagation' policy defaults: userIdExpression '#authentication.clientId' and allowAnonymousAccess true (requests whose principal cannot be determined are forwarded anonymously). To change this, set authorization under the broker's interfaces.a2a section, e.g.:

brokers: 

    customer_support_broker: 

       interfaces: 

          a2a: 

             authorization: 

                 principal: '

#attributes.clientId

' 

                 allowAnonymousAccess: false 

 

At runtime this also throws a recurring "User ID expression resolved to invalid non-string value" warning, since I have no Client ID Enforcement policy configured (I don't need real caller identity — this broker isn't meant to authenticate clients).

Problem: following the warning's own suggested fix fails Build validation:

Message: brokers/customer_support_broker/interfaces/a2a must NOT have additional properties

So authorization isn't actually a field the current agent-network.yaml schema (v2, as validated by agent-fabric-transformation 1.6.0) accepts under interfaces.a2a — it only allows card and policies.

I then tried explicitly declaring the policy under policies.inbound instead:

brokers: 

     customer_support_broker: 

         interfaces: 

             a2a: 

                 policies: 

                     inbound: 

                         - policy: 

                             ref: 

                                 name: user-context-propagation 

                                 namespace: 68ef9520-24e9-4cf2-b2f5-620025690913 

                             configuration: 

                                 userIdExpression: '

#"anonymous"

' 

                                 allowAnonymousAccess: true

(namespace taken from the groupId on the built connection.json's policyRef for this same policy). This passes schema validation but fails with:

Cannot resolve reference user-context-propagation of kind policy (http://a.ml/vocabularies/data#invalid-reference-like)

Questions:

  1. What's the actual supported syntax to override this auto-injected default policy's configuration from agent-network.yaml?
  2. Is the authorization block from the warning message a planned/upcoming field not yet implemented in 1.6.0, or am I missing something?
  3. Alternatively, is there a supported way to just suppress the userIdExpression warning without adding real Client ID Enforcement?

Happy to share the full agent-network.yaml if useful. 

 

#MuleSoft For Agentforce  #MuleSoft  #MuleSoft Anypoint Code Builder

1 个回答
  1. 10月8日 20:43

    @Miguel Ribeiro the warning and the schema are describing two different shapes, and 1.6.0 is checking the schema.

    Agent Network 2.0 documents interfaces.a2a as card plus policies. There is no authorization property on that object. That's why the example in the warning dies with must NOT have additional properties. I wouldn't treat that example as a field this build forgot to mention. The reference I can stand on only lists card and policies.

    A policy gets onto the broker after you declare it, then point at it with a binding reference, ref.name. Or you put an inline binding under policies.inbound with policy.ref and policy.configuration. Your second try is that inline shape, and it got past the schema. Cannot resolve reference user-context-propagation of kind policy means that name isn't a policy declared in this yaml. Copying the namespace off the generated connection.json doesn't turn the auto-injected policy into a reference you can override. The injector still owns the default.

    The runtime warning is the default expression reading authentication.clientId, which is empty when you don't have Client ID enforcement. That value isn't a string, so you get invalid non-string value. If no ingress auth policy is configured, the broker still orchestrates. What you lose is task management on tasks created with no userId. I don't have a 1.6.0 switch that silences that expression and keeps the broker anonymous. A constant user id would have to live on a policy reference this file can actually resolve.

0/9000

Please Read: Posting Questions to Receive Support

 

Hi all, I can see that you've been posting your questions here on the Developer Forums Migration Support Hub when you're stuck and need help with your development.

 

However, this group is for the migration only and there are not many people here; you want your post to have the widest coverage possible to get answers from experts in the community.

 

Posting a Question

  1. Locate the correct group where the members are experts in the field for which you have a question. For example, you can always post your question on the @* Salesforce Developers * group; you can also use @Lightning Web Components @Flow Orchestration @Agentforce Vibes IDE and lots more!
  2. Once you find your group, post your question in that group's feed. 
  3. Add topic tags to help people understand what you're asking about, e.g., #MuleSoft Anypoint Code Builder, #Apex, or #LWC.

There is a quick walkthrough video which goes over this process by @Juspreet Kaur; have a look! 

4 条评论
0/9000

Hai Developers help me out....Project deploys sucessfully but i get these errors in the console upon build. wondering if anyone knows how to resolve...

 

ERROR:::[WrapperListener_start_runner] com.mulesoft.agent.configuration.postconfigure.DefaultPostConfigureRunner: There

 was an error initializing the mule.agent.ingest.target.metrics.internal.handler Internal Handler. It'll be disabled until reconfiguration. 

Could not initialize ingest monitor publisher. Its configuration is invalid.

 

postman response:

 

Hai Developers help me out....Project deploys sucessfully but i get these errors in the console upon build. wondering if anyone knows how to resolve... ERROR:::[WrapperListener_start_runner] com.

#MuleSoft  #MuleSoft Composer    #MuleSoft Anypoint Code Builder #MuleSoftCommunity

2 条评论
  1. Manish Kumar Yadav (Hitachi Energy) Forum Ambassador
    2023年12月13日 16:32

    Hello,

     

    The error response shared by you in the post would not create any problem, as it is internal to Mule where metric is not sent by Agent,

     

    But the error in Postman is different which is something not implemented in RAML if you using, 

     

    Please export the demo project and share it here,

0/9000

I'm relatively new to MuleSoft, and leveraging the UI building blocks along with the properties window in Anypoint Studio has proven to be incredibly beneficial for my flow development. It was unexpected for me to find that the Code Builder appears to push users towards XML development, deviating from the extensively promoted drag-and-drop low-code approach. Given that training courses emphasize Anypoint Studio and the Mule properties window, it seems peculiar not to include a properties view in the new flagship IDE, especially if it's intended for widespread adoption in the years to come. Are there plans to add this vital feature to Code Builder?

 

Thanks,

Shane

 

@* MuleSoft RPA & IDP *

5 个回答
  1. 2023年12月1日 15:52

    Correct, the February 2024 release will release a configuration panel as part of the ACB canvas

0/9000

Anypoint Code Builder: Initial Observations Post GA

 

Today, there is a significant buzz surrounding Anypoint Code Builder (ACB), representing the latest advancement in API and Integration development.

Why is this generating so much excitement? 🚀

 

Explore the insights in my recent article. Let's embark on this journey together! 🙌 https://medium.com/another-integration-blog/anypoint-code-builder-acb-initial-observations-post-ga-498680e69070

 

#MuleSoft Anypoint Code Builder #MuleSoft #Integration

1 条评论
0/9000
1 条评论
0/9000

Resources from the Salesforce Developers Ask Me Anything on Intro to MuleSoft for Salesforce Developers

 

I hope you joined us for the fantastic SFDevsAMA on 30 August 2023 featuring @Akshata Sawant, @Alex Martinez, @Sabrina Barnes, @Dakota Garcia and @James Gordon. They loved answering your questions about MuleSoft. If you missed it, don't worry - we recorded the series and our experts have provided some great resources that our experts for you to continue your learning! 

 

Still have questions? Post them in this thread for our experts!

 

#SFDevsAMA #MuleSoft #MuleSoft Composer #MuleSoft RPA #Anypoint Platform #MuleSoft Anypoint Code Builder #API #Integration @* MuleSoft *

3 条评论
  1. Manish Kumar Yadav (Hitachi Energy) Forum Ambassador
    2023年9月5日 22:58

    Hello Jan,

     

    It totally depends on what KAFKA is doing in your existing integration, if it is PUBLISH/SUBSCRIBE with routing rule or without routing rule, You can replace KAFKA with MuleSoft Because MuleSoft has a product called Anypoint MQ Exchange  where you can publish the Message and ask the different subscriber to subscribe if they are already bound,

     

    Hello Jan, It totally depends on what KAFKA is doing in your existing integration, if it is PUBLISH/SUBSCRIBE with routing rule or without routing rule, You can replace KAFKA with MuleSoft Because Mul

    Anypoint MQ: It does provide REST API so you can have outbound Message flow or Callout calls from Salesforce to push the message to the above Message Exchange and the rest is self-explanatory,

     

    The decision of replace or not, it depends on different factors for example:

     

    • If your organization's strategic decision to keep only a single product or a combination of product
    • Cost factor
    • Integration Pattern
    • Eastings product or brand new license 
    • Number API call
    • Message Size for example MuleSOft MQ supports only 10 MB by default,
    • Data Format,

    cc: @Sabrina Barnes

0/9000

It's time for another #MuleSoft weekly roundup!

 

🔥 We announced Flex Gateway 1.4.0! Check out the exciting updates here

 

⭐️ @Alex Martinez hosted 2 Twitch streams. 

🍎 We're headed to World Tour NYC! And we have tons of great sessions. Check out 3 more must see sessions.

Hope you all have a great weekend!

0/9000

HI, When i try to launch my Anypoint Code Builder instance, i get this error

 

Instance not Launching

7 个回答
  1. 2023年4月11日 17:34

    It works with my personal computer but not the company laptop. At work no VPN but I am behind a firewall..

0/9000
4 个回答
  1. 2023年2月9日 19:46

    For open beta, we are supporting the web IDE only, but for GA we are planning to have an extension pack for the VS Code Marketplace, so you can use Anypoint Code Builder within your VS Code instance

0/9000