Skip to main content

MuleSoft Feed

Conecte-se com colegas Trailblazers. Faça perguntas e responda a outras para desenvolver suas habilidades e a rede.

I was running Anypoint platform 7.22. It said I needed to update some stuff so I did. Now I have Anypoint Platform 7.24 and it does not work. I get this error "Could not create the view: org.mule.tooling.properties.views.MulePropertiesView".  I tried to go back to 7.22 but I can only download either 7.20 or 7.24 - and what a pain it is to even get to the downloads. Anyway. Hopefully I have not trashed my applications. Does anyone have an answer as to how to get past this properties view error? Also does not seem possible to actually get help directly from MuleSoft / Salesforce, so here I am :)  Stephen   

5 respostas
  1. 2 de jul., 15:10

    Balachandra,  

    These steps didnt yeild any results. Can you confirm whether the path you mentioned above are correct? I dont see any option to access Maven update from project explorer.  

     

    Not sure whats happening with Mule. Every studio upgrade will come with bunch of issues. Its better to install a studio from scratch instead of upgrading

0/9000

From what I have understood, the variables tied to the thread will be lost once the time based or size based aggregation is done and the flow that gets triggered by aggregator-listener runs on a  brand new thread with no connection to original request and variables reset to defaults. In our case, we have an exp api, that in turn is calling 2 other process api and this inturn is calling a system api that has time based aggregator with timeout period of 15 mins. In order to track this transaction end to end, we have introducted tracker fields like correlation Id, businessObjectKey etc., But these are getting lost once the aggregator listener triggers the flow, what is the best way to retain the tracker fields   

3 respostas
  1. 24 de abr., 11:31

     The best way to retain tracking fields like CorrelationId while using a time-based aggregator and aggregator listener in MuleSoft is to explicitly persist and propagate the value as part of the aggregated payload or metadata, rather than relying on flow variables alone (since they are not automatically preserved across aggregation boundaries). Typically, you should include the CorrelationId in the message payload, attributes, or as a custom object before aggregation, and configure the aggregator to group based on that CorrelationId. When the aggregator completes, ensure the aggregated result still contains this field so that the aggregator listener can access it. A common and reliable approach is to store the CorrelationId in an Object Store or external persistence if needed for long-running aggregations, and always map it back into the final message structure, ensuring end-to-end traceability across asynchronous processing. 

0/9000

My input is :

[ {

"Booking Loca" : [ "Seedict Sparango","Cando Wall Communities","Maul O'donor","Ahohn kappler" ]

} ]

 

in this input there is a chance to get Name coming like Maul O'donor but I need to replace one single quote to Maul O''donor

 

The final Output Required Like below :

[Booking Loca] in ('Seedict Sparango','Cando Wall Communities','Maul O''donor','Ahohn kappler')

 

for this I am using below Data weave logic but at beginning and ending not getting single quote instead

%dw 2.0

output application/java

import * from dw::core::Strings

---

"[Booking Loca] in ("++((flatten(payload."Booking Loca")) map (wrapWith($,"'")) joinBy ",") replace "'" with '"' replace '","' with "','"++ ")"

 

Here I have a struggle with a small transformation hence please help me

1 resposta
  1. 2 de jul., 06:19

    Hello, 

     

    Please try the below dataweave.  

     

    %dw 2.0

    output application/java

    ---

    "[Booking Loca] in (" ++

    ((payload[0]."Booking Loca" map ("'" ++ ($ replace "'" with "''") ++ "'")) joinBy ",")

    ++ ")" 

     

    Thanks!

0/9000

Hi Experts,

 

I am trying to call a BAPI using SAP connector execute BAPI sRFC.

But the BAPI name contains slash "/" (ex: /NAMESPACE/BAPINAME)

 

The slash is causing errors when the api has been executed.

 

Here is the error message:

**An exception occured while parsing XML.

The markup in the document preceding the root element must be well-formed.**

 

Please provide solution.

 

Thanks,

Veera

7 respostas
  1. 20 de jun., 05:15

    This issue existed in older SAP Connector versions due to how “/” characters were handled in BAPI names.

    It’s been fixed in newer releases, so the best solution is to upgrade to the latest MuleSoft SAP Connector and retest. If problems persist after upgrading, then it’s likely a config or parameter formatting issue rather than the connector itself.

0/9000

Dear Community Members, 

I would like to know, Can data loader application be used only with admin profile,can the user having data loader be restricted to a certain object and records? 

 

Please let me know if it is possible. 

 

Regards, 

Siddharth A 

 

 

#Dataloader.io

9 respostas
  1. 17 de jun., 03:14

    Data Loader does not require a System Administrator profile.

    Any user can use Data Loader as long as:

    •  They have the appropriate Salesforce permissions (such as API Enabled). 
    •  Their profile or permission sets grant the necessary object-level permissions (Read, Create, Edit, Delete, etc.). 

    Object restrictions: Yes, a user can be restricted to specific objects. Data Loader only allows operations on objects for which the user has the required permissions.

    Record restrictions: Yes, record-level security still applies. Data Loader respects:

    •  Organization-Wide Defaults (OWD) 
    •  Role Hierarchy 
    •  Sharing Rules 
    •  Manual Sharing 
    •  Teams/Territories (where applicable) 

    Therefore, a non-admin user can use Data Loader, but they will only be able to access and modify the objects and records that their Salesforce permissions and sharing settings allow.

    Note: Some Data Loader operations (for example, exporting all records using special permissions such as "View All Data" or modifying records they do not normally have access to) require additional permissions that are typically assigned to administrators.

0/9000
6 respostas
0/9000

Hi,

I'm currently encountering a few issues with schedules not appearing on Runtime Manager (Cloudhub 2.0). Up until today these schedules were available to view. I'm using Microsoft Azure Devops to deploy my API's and from previous experiences have learnt that anypoint-exchange-v3 is needed for the schedulers to appear. The schedules themselves look to be running but I cannot view them directly on Runtime Manager.

 

Anypoint Runtime Manager SchedulesI did notice when I opened up the web browser dev tools that there is a GET call for the schedulers which is returning the following error (500): Fallback Response for Ang Service activated. Previous Result: null || Previous Exception net.jodah.failsafe.CircuitBreakerOpenException with Message: null - Not sure if this helps to find the cause?

 

Everything had previously been working up till today and nothing has changed on the deployment. Has anyone else encountered similar issues and do you you know what might be causing this issue?

 

Many Thanks,

 

Dan

2 respostas
  1. 19 de jun., 07:42

    Hi @Elisabeth Guinard

     

    I'm just checking my notes. I think the schedulers reappeared for me by themselves after a little while. I also found that, although they weren't showing in the UI, the schedulers were still running.

    Are you seeing something similar?

    Just a couple of questions:

    • Are you deploying them using Anypoint Exchange V3?
    • Do you have a development environment for the API? If so, are the schedulers visible there?

    Kind regards,

    Dan

0/9000

%dw 2.0

 

import * from dw::core::Strings

 

var regExDateTime = /\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z)/

var regExDate = /^\d{4}\-(0[1-9]|1[012])\-(0[1-9]|[12][0-9]|3[01])$/

var regExBoolean = /^(true|false)$/

var id= payload.ChangeEventHeader.recordIds[0]

 

output text/plain

---

id

My DW is somewhat big having some calculation for sake of simplicity I just pasted 4 lines of code only.

In that 4 line itself I am getting below error

Scripting language error on expression '%dw 2.0

 

import * from dw::core::Strings

 

var regExDateTime = /\d{4}-[01]\d-[...'. Reason: Unable to resolve reference of payload..

I even tried by defining meta data for payload as like below

 

var id= payload.ChangeEventHeader.recordIds[0] as String 
var id= payload.ChangeEventHeader.recordIds[0] as String  default 'axd123'

But nothing helps

4 respostas
  1. 14 de jun., 04:19

    You can simplify it. In Mule 4 DataWeave, you usually don’t need input payload application/json. Just use:

    %dw 2.0

    output application/json

    ---

    {

    myRootElement: payload

    }

    The payload type comes from the message metadata/header (content-type: application/json).

0/9000

I would like to mass upload a file of photos. I have the record Ids. I am following the steps in this article but it doesn't mention anything like Content Version ID yet it is a required field on the Content Version object.   

3 respostas
  1. 11 de mar., 17:32

    Hi @Richard Muhumuza

     

    Please refer to the below link - 

    https://www.youtube.com/watch?v=-2OS6QylZQ0

     

     

    If you are targetting to upload files under any specific record - mention the same under FirstPublishLocationId. 

    If you want the files to be uploaded under the Salesforce Files - give your user Id under  FirstPublishLocationId.  

    You can try with workbench by omitting the ContentDocumentId field - works this way too

0/9000

I have requirement to call PATCH method of a resource where user can update of the details mentioned in the request . Account ID which is the key is passed as URI. User can update any or all of these parameters. Since request parameters are not fixed i need to dynamically build UPDATE query.

{

   "name": "Mule",

"phone": "888888888",

"balance": "2000",

"billingCity": "London"

}

Below is the dataweave that is written to build set query. I have tried all combinations to execute update query.

 

%dw 2.0

import * from dw::core::Strings

output application/json 

---

((({

name: payload.name default "",

phone: payload.phone default "",

balance: payload.balance default "",

billingcity: payload.billingCity default ""

}pluck (($$)++'='++"\""++($)++"\"") ) 

reduce(item, acc="")-> acc ++ (if(!isEmpty(substringAfter(item,"="))) item++"," else "")) substringBeforeLast(",")) as String 

 

DB query

 

UPDATE account

SET :query

WHERE idaccount = :accID

 

Input parameters

 

output application/java

---

{

query: vars.query,

accID: attributes.uriParams.accID as String

}

 

vars.query is expected as name="Max",phone="9999999999",balance="20000",billingcity="Bangalore" to work properly. However it is not working . Tried replacing escape character with "" but then it doesnt work.

 

"name=\"Max\",phone=\"9999999999\",balance=\"20000\",billingcity=\"Bangalore\""

 

Kindly let me know if any better ideas to make this work

13 respostas
  1. Shekh Muenuddeen (NTTData) Forum Ambassador
    22 de nov. de 2020, 09:01

    Hey,

     

    Another way to do it first create query variable and store below DataWeave logic

    %dw 2.0

    output application/json

    var data = {

    "name": "Mule",

    "phone": "888888888",

    "balance": "2000",

    "billingCity": "London"

    }

    ---

    "UPDATE account SET " ++

    ((data filterObject ((value, key, index) -> (value != null and value != "")) mapObject ((value, key, index) -> {

    myData : (key as String) ++ " = :" ++ (key as String)

    })).*myData joinBy " AND ") ++ "WHERE idaccount = :accID"

    Its gives you query like below I have stored it query variable

    "UPDATE account SET name = :name AND phone = :phone AND balance = :balance AND billingCity = :billingCityWHERE idaccount = :accID"

    Another DataWeave to stored the input parameters its stored like below DataWeave

    %dw 2.0

    output application/json

    var data = {

    "name": "Mule",

    "phone": "888888888",

    "balance": "2000",

    "billingCity": "London"

    }

    ---

    {

    idaccount : "12345678"

    } ++

    (data filterObject ((value, key, index) -> (value != null and value != ""))) default {}

    Output

    {

    "idaccount": "12345678",

    "name": "Mule",

    "phone": "888888888",

    "balance": "2000",

    "billingCity": "London"

    }

    And Finally in the DataBase Update Operation I have provided the both variable query and inputparametes as below

    Hey, Another way to do it first create query variable and store below DataWeave logic%dw 2. 

    SO its dynamic with Paramterized.

     

    Regards,

    Shekh

0/9000