mule4

How to send a file using http request connector in mule4

倖福魔咒の 提交于 2021-02-08 06:35:34
问题 I am trying to add attachments to JIRA issue using JIRA rest api. I am using mulesoft to develop this flow. But I am not able to figure out how to send a file using request connector in mule 4. JIRA only accepts file in the form of multipart content type. I went through some of the documentation and it seems that till mule 3 using set attachment we can do this. In mule 4 dataweave is used to achieve this functionality but i am not able to find working code that can be used to implement this.

Unable to reference to DWL script files in Mule 4 dataweave from Project Libraries(jar)

假装没事ソ 提交于 2021-01-29 06:43:11
问题 I have recently hosted a mule application in Maven Central Repo. The app contains two java files and a dwl file. The dwl file uses those java files to do some operation. This is the primary app (app1) which I want to reference in another app (app2 )as a pom dependency. The name of the primary is encryption-1.0.5-mule-application.jar . The name of dwl script which it contains is encryption.dwl . The Java files are available in the jar file /company package. Case 1 : If I package this primary

How to use groupBy with orderBy on Array to XMl in Mule4

…衆ロ難τιáo~ 提交于 2020-12-16 03:38:09
问题 I having input as Array (json) which needs to groupBy and orderBy with clientId so that its internal Lines are grouped and ordered in to one root in xml (repetitive lines of clientId). I'm stuck how to use dataweave for the XMl response. Please find the request and expected response. Request: [ { "ClientId": 2, "Code": "string", "ReceivedDate": "2018-10-23", "ReceivedTime": "2217", "Warehouse": "30", "Quantity": "20" }, { "ClientId": 1, "Code": "string", "ReceivedDate": "2018-10-23",

Matching Array values in mule 4 using dataweave

a 夏天 提交于 2020-12-14 23:45:12
问题 I am trying to match the specific value from input payload using dataweave. Input: { "drives": [{ "id": "0AEzOyzyCb7Uk9PVA", "name": "SFJob-2020-10" }, { "id": "0AMEHi1wsq-8FUk9PVA", "name": "SFJobs-2020-11" } ], "nextPageToken": "~!!~AI9FV7RV4uSXy20zpCBTP2LFWCXS0c" }, { "drives": [{ "id": "0AEz3mOyzyCb7Uk9PVA", "name": "Dev2020-10" }, { "id": "0AMEHi1wsq-8FUk9PVA", "name": "Dev2020-11" }], "nextPageToken": "~!!~AI9P2LFWCXS0c" } how can i check whether value "Dev2020-10" is present or not. i

Matching Array values in mule 4 using dataweave

孤人 提交于 2020-12-14 23:39:22
问题 I am trying to match the specific value from input payload using dataweave. Input: { "drives": [{ "id": "0AEzOyzyCb7Uk9PVA", "name": "SFJob-2020-10" }, { "id": "0AMEHi1wsq-8FUk9PVA", "name": "SFJobs-2020-11" } ], "nextPageToken": "~!!~AI9FV7RV4uSXy20zpCBTP2LFWCXS0c" }, { "drives": [{ "id": "0AEz3mOyzyCb7Uk9PVA", "name": "Dev2020-10" }, { "id": "0AMEHi1wsq-8FUk9PVA", "name": "Dev2020-11" }], "nextPageToken": "~!!~AI9P2LFWCXS0c" } how can i check whether value "Dev2020-10" is present or not. i

How to loop and combine as one in Mule Dataweave

浪子不回头ぞ 提交于 2020-06-16 18:02:04
问题 I have request of json and expected response one as mentioned below. It need to groupBy clientItemCode and i'm halfway somewhere stuck to loop around in same. Used both MapObject and reduce combination of function. Any help will be appreciated. [ { "ClientCode": "1", "ClientItemCode": "245", "LocationId": "CLOSED" }, { "ClientCode": "1", "ClientItemCode": "245", "LocationId": "OPEN" }, { "ClientCode": "2", "ClientItemCode": "245", "LocationId": "CHECKOUT" }, { "ClientCode": "2",

How to loop and combine as one in Mule Dataweave

梦想与她 提交于 2020-06-16 18:01:07
问题 I have request of json and expected response one as mentioned below. It need to groupBy clientItemCode and i'm halfway somewhere stuck to loop around in same. Used both MapObject and reduce combination of function. Any help will be appreciated. [ { "ClientCode": "1", "ClientItemCode": "245", "LocationId": "CLOSED" }, { "ClientCode": "1", "ClientItemCode": "245", "LocationId": "OPEN" }, { "ClientCode": "2", "ClientItemCode": "245", "LocationId": "CHECKOUT" }, { "ClientCode": "2",

How to loop and combine as one in Mule Dataweave

|▌冷眼眸甩不掉的悲伤 提交于 2020-06-16 17:57:08
问题 I have request of json and expected response one as mentioned below. It need to groupBy clientItemCode and i'm halfway somewhere stuck to loop around in same. Used both MapObject and reduce combination of function. Any help will be appreciated. [ { "ClientCode": "1", "ClientItemCode": "245", "LocationId": "CLOSED" }, { "ClientCode": "1", "ClientItemCode": "245", "LocationId": "OPEN" }, { "ClientCode": "2", "ClientItemCode": "245", "LocationId": "CHECKOUT" }, { "ClientCode": "2",

How to convert ManagedCursorStreamProvider to JSOn object in mule 4

╄→尐↘猪︶ㄣ 提交于 2020-05-09 05:18:29
问题 How to convert ManagedCursorStreamProvider to Json object in mule. I have written a java method which takes the Json Object as input Request Payload: { a: "one", b : "two"} Invoke static arg0 : payload Java Function called using invoke static public static func(JsonObject json){ } I am getting the following error: Expected arguments are [com.google.gson.JsonObject jsonObject] and invocation was attempted with arguments [org.mule.runtime.core.internal.streaming.bytes

Mapping from XML to CSV loop over values separated by underscore

[亡魂溺海] 提交于 2020-01-16 09:59:50
问题 <tXML> <Header> <Source>J1_RETAIL</Source> <Action_Type>Update</Action_Type> <Sequence_Number>0</Sequence_Number> <Batch_ID>4383352</Batch_ID> <Reference_ID>04381645</Reference_ID> <User_ID>SAP</User_ID> <Password>password</Password> <Message_Type>SAP_DO</Message_Type> <Company_ID>J1</Company_ID> <Msg_Locale>English (United States)</Msg_Locale> <Msg_Time_Zone>Eastern Standard Time</Msg_Time_Zone> <Version></Version> <Internal_Reference_ID></Internal_Reference_ID> <Internal_Date_Time_Stamp><