Widget: mx.processor.get filter not working when adding attribute that has Microflow as value source.

9
I have a widget, where I take a list of attributes and an entity and retrieve the mxObjects as follows: console.log(myFilter); //Log A mx.processor.get({ xpath : xpath, filter : myFilter, callback : dojo.hitch(this, function(mxObjects) { console.log(mxObjects[0]); //Log B }), error : function() {} }); Now I have two states: {I}: Log A {attributes : ['attrA', 'attrB']} Log B logs a mxObject that has only attrA and attrB as attributes. This is the behaviour that I expect. {II}: Log A {attributes : ['attrA', 'attrB', 'attrC']}, where 'attrC' is an attribute that gets its value from a Microflow (value source). Log B logs a mxObject that has all the desired attributes, as well as all the ones that I did not specify in the filter. So I am concluding that the filter is being ignored. Is there some other array/object I have to add to my filter to specify attributes that have their value source set to a Microflow. Something like {attributes : [], references : {}, microflowAttributes : []} This is only a subset of the problem I am sitting with, my real question/bug is that I specify a filter with all my references and attributes, but as soon as I add an attribute which has a value source of Microflow I only get my resolved references and none of my attributes. So the states of the 'real' question is: {RI}: Log A { attributes : ['attrA', 'attrB'], references {MyModule.Association : {attributes : ['attrC']}} } Log B logs a mxObject that has all the desired attributes with the association resolved. This is the behaviour that I expect. {RII}: Log A { attributes : ['attrA', 'attrB', 'attrQ'], references : {MyModule.Association : {attributes : ['attrC']}} }. Where 'attrQ' is an attribute that gets its value from a Microflow (value source). Log B logs a mxObject that has no attributes and only the references resolved. Any help or insight around the optional 'filter' property appreciated.
asked
1 answers
4

II:

The filter is indeed ignored as soon as you have a microflow attribute; if a microflow attribute is used databaseschema's are ignored as other attributes might be required by the microflow attribute.

But, that is only important server side, so you could file a bug report that for the server -> client traffic the filter should not be ignored, which would save some bandwidth.

RII: This one is definitely a bug; it should contain all attributes instead of none.

On a side node: I really recommend to avoid microflow attributes as they will be evaluated on each retrieve which is quite a performance penalty. There are hardly any cases (if any) where you can't avoid them. And, as you indicated, they aren't handly by the client API transparantly.

answered