1
votes

I have datamapper, ( source: pojo and target:CSV), I need to call the other flow ( or groovy) inside datamapper. I stuck in passing the parameter to the flow. For example, I don't want entire payload has to go to flow for validation. I need to pass only two values. I used

        flowRef(String,Object)

        output.Item = flowRef("sampletestFlow",input.Model);

It works fine for single payload. But i have to pass one more parameter ( called input.Policy). I know we have to use

                 flowRef(String,Object,Map). 

But it don't know the format for two input parameter.

Could you please anyone help me on this.

1
You need is a solution to do your process than doing everything in data mapper.I would like to ask you to tell me your complete requirement. I understand that you need only few of the payload to be mapped to the csv. But could you expand your requirement . - Naveen Raj
@star did you find the answer for this - please post in that case. thanks! - Jaguar
@Jaguar I'm not sure how to call the flow via two parameter. But I have handled the code by the below way ( Provided answer below) - star
I have created one generic java code. Wherever I need to call by passing the input value in DM script. Will do it. It works fine. - star

1 Answers

1
votes

I have handled the scenario by the below way. Have create java class and called the java via damapper script. Below is the code inside datamapper script to call the java code.

   stringUtil = new com.test.util.StringUtil();
   output.style = stringUtil.formatValue(input.RuleStyle);

Hope this helps.