Quantcast
Channel: Mendix Forum Questions
Viewing all articles
Browse latest Browse all 81216

Creating Parameter on MicroflowCallParameterMapping usin SDK?

$
0
0

How do I add a parameter using the SDK to a microflow call action?

I've created in order a:

  • MicroflowCallAction
  • MicroflowCall on MicroflowCallAction
  • MicroflowCallParameterMapping on MicroflowCallAction

 

Now, how do I add a Parameter on the MicroflowCallParameterMapping?

I couldn't find any documentation or example Typescript code fore this. This is what I've got so far:

let microflowCallAction = microflows.MicroflowCallAction.createIn(actionActivity);
let microflowCall = microflows.MicroflowCall.createIn(microflowCallAction);
let destMF = <microflows.Microflow>workingCopy.model().findMicroflowByQualifiedName(microflowName);

microflowCallAction.microflowCall.microflow = destMF;

console.log(microflowCallAction.microflowCall.parameterMappings.length);
// Logs 2

let parameterMapping = MicroflowCallParameterMapping.createIn(microflowCall);

// How to add the parameter? This is what I can't seem to do
parameterMapping.parameter = ????

// This throws an error as parameterQualifiedName has only got a getter
parameterMapping.parameterQualifiedName = 'Module.Microflow.Parametername';

parameter.argument = 'Some value';

// SNIPPET for Simon

    } else if (action instanceof microflows.MicroflowCallAction) {
        return (action.outputVariableName ? "var " + action.outputVariableName + " = " : "") + action.microflowCall.microflowQualifiedName + "(" + action.microflowCall.parameterMappings.map(x => x.parameterQualifiedName.split(".").splice(2, 1) + "=" + x.argument).join(", ") + ")";
    } else if (action instanceof microflows.RetrieveAction) {

 


Viewing all articles
Browse latest Browse all 81216

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>