- The mule 3 expression component code is :
if (flowVars.activityInstanceName == "Provision Device"){
flowVars.rng = randomNumber(10, 5);
Thread.sleep(flowVars['rng']);
}
Need to achieve this in mule 4.
2 I have migrated mule 3 code to mule using MMA.
The migrated code is:
mel:json:Notification
Instead of this can i use this payload.Notification?
I have a mule 3 code flow as below:
Here we are getting a data from get activity instance details and then we are converting the code hashmap.
Now the get activity instance code we have converted from mule 3 to mule 4. So, for the mule 3 it was working fine and for mule 4 it was failing.
what i observerd is change in response for mule 3 and mule 4 check below:
Get activity instance details mule 3 response:
{"CreatedBy":{"Wifi_ProfileName__c":"PT1","Username":"ys1","Id":null,"type":"User"},"Activity__c":"a2360000"}
Get activity instance details mule 4 response:
[
{
"CreatedBy": {
"Wifi_ProfileName__c": "PT1",
"Username": "ys11",
"Id": null,
"type": "User"
},
"Activity__c": "a23600" }
]
Mule 3 and mule 4 code images:
Here at the mule 4 end of flow i added transform message as application json and i think because of that it is not working