Passing a new Entity to a Microflow from a Custom Widget

  I have a custom widget that needs to call a microflow with some data and process the result.  In the widget, I create a new, non-persistable entity and then pass it by GUID to the microflow which is expecting a parameter of that type.  However, the entity doesn't exist in the microflow and the parameter evaluates to empty.  The widget is set to "needsEntityContext=false" and isn't in a data context. I have declared the entity as a property in my XML, and have set that entity as the entityContext on my microflow property.  If I "get" the entity by GUID after creating it, it returns correctly, so it seems the issue is in the reference passing and not the creation. Entity creation/Microflow code{ entity: this.messageEntity, callback: function (obj) { obj.set(this.messageAttribute, 'asdf'); mx.ui.action(this.messageMicroflow, { params: { applyTo: 'selection', guids: [obj.getGuid()] }, callback: function () {{ guid: obj.getGuid(), callback: function (got) { console.debug(got); } }, this); } }, this); } }, this);  Widget XML <properties> <property key="messageEntity" type="entity" allowNonPersistableEntities="true"> <caption>Message Entity</caption> <category>Data source</category> <description>Message entity to use.</description> </property> <property key="messageAttribute" type="attribute" entityProperty="messageEntity"> <caption>Message Attribute</caption> <category>Data source</category> <description>The entity to represent the message.</description> <attributeTypes> <attributeType name="String" /> </attributeTypes> </property> <property key="messageMicroflow" type="microflow" entityProperty="messageEntity"> <caption>Message Microflow</caption> <category>Data source</category> <description>Microflow for handling messaging.</description> <returnType type="String" /> </property> </properties> What I wish I could do was simply pass a string to a microflow, but that doesn't seem to be an option for a custom widget.  I could require the widget to run in a data context and simply manipulate that data context but I'd rather not constrain the widget that way.  I just want throwaway entities to pass a message into a microflow.  Is this situation a bug or am I doing something not intended?
0 answers