Calling a microflow from a widget

2
Hello, I want to call a microflow from my javascript widget. I followed the HowTo on this subject, I have a similar scenario. That is, the microflow takes an object as it's parameter en the return value is a single value, in my case a Boolean. Here's a code snippet: mx.processor.xasAction({ error: function() { logger.error(this.id + "error: XAS error executing microflow"); }, actionname: this.startTimerDecorator, guids: [currentFlowStartObject.getGUID()], callback: dojo.hitch(this, 'fetchedFlowStartTimerDecorators', currentFlowStartObject) }); currentFlowStartObject is a local var containing a particular object that I need as a parameter in my microflow. The microflow gets called but there is no parameter passed. My understanding is that mx.processor.xasAction is used when I want a microflow to be executed. It could have any parameter and any return value. Another way to call a microflow is with mx.processor.get. I use this a lot when the purpose of the microflow is to get a list of objects as return value. BTW, with mx.processor.get, I am able the solve the problem but then I would have to create an entity in my model that has a boolean attribute en have the microflow return a list with one object of that entity in it. Regards, Jos Harink
asked
1 answers
3

I think that you need to pass

applyto : 'selection'

as well in your xasAction call (the selection refers to the guids here). Furthermore, make sure that the object you try to pass is of the same type as the argument in the microflow. The microflow should have only one argument.

answered