mule4

How to pass Java object to a Java function in mule

醉酒当歌 提交于 2020-01-14 03:41:13
问题 I am trying to invoke a java function in mule.I converted the payload into the Object and passed it in the function. The name of the Java object created is req . The method validate accepts a Java Object Of type Example public HashMap<String, String> validate(Example req) {.......} Example class looks like this: Class Example{ String key1; String key2; String key3; } XML configuration looks like this : <java:new constructor="Example(java.lang.String,java.lang.String,java.lang.String)" doc

How can i increment variable value inside function mapobject datawave 2.0?

房东的猫 提交于 2020-01-06 02:42:43
问题 How can i increment variable value inside mapobject(I do not want to use index) in mule4 datawave2.0? My Code: "Employees":{(inputData.*Employees.*Employee map{ "Employee": ($) mapObject(v,k) -> { ---Increment variable value here (k):updateReferenceId(v,($$)+1,v) } })} 回答1: You can increment values in the accumulator of a reduce operation, and you can then add these to the structured data plan f the output. There are some examples in the MuleSoft DataWeave training course flightsInput reduce

mule 4 calling stored procedure with userdefined data type

狂风中的少年 提交于 2019-12-11 16:12:36
问题 I need to insert userdefined data type through stored procedure. create type addressTypes as object (Street VARCHAR2(50), City VARCHAR2(25), State VARCHAR2(25), Zip VARCHAR2(25)); / create table custom ( cid NUMBER, address addressTypes ); Create or replace PROCEDURE demooo ( Cid IN VARCHAR2, address IN addressTypes, RESULT_CODE OUT VARCHAR2, RESULT_DESC OUT VARCHAR2 ) AS BEGIN INSERT INTO custom VALUES (Cid,address.Street,address.City,address.State,address.Zip); RESULT_CODE:='0'; RESULT_DESC