Skip to content

Commit ea4f12e

Browse files
author
Jelte Lagendijk
committed
Fix execMf
1 parent 2e3a14e commit ea4f12e

File tree

4 files changed

+14
-7
lines changed

4 files changed

+14
-7
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "MicroflowTimer",
3-
"version": "3.0.0",
3+
"version": "3.0.1",
44
"description": "",
55
"license": "",
66
"author": "",

src/MicroflowTimer/widget/MicroflowTimer.js

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -165,15 +165,13 @@ define([
165165
logger.debug(this.id + "._execMf");
166166

167167
if (this._contextObj && this.microflow !== "") {
168-
mx.data.action({
168+
169+
var microflowAction = {
169170
params: {
170171
applyto: "selection",
171172
actionname: this.microflow,
172173
guids: [this._contextObj.getGuid()]
173174
},
174-
store: {
175-
caller: this.mxform
176-
},
177175
callback: lang.hitch(this, function(result) {
178176
if (!result) {
179177
logger.debug(this.id + "._execMf callback, stopping timer");
@@ -183,7 +181,16 @@ define([
183181
error: function(error) {
184182
console.warn("Error executing mf: ", error);
185183
}
186-
});
184+
};
185+
if (!mx.version || parseInt(mx.version.split(".")[0], 10) < 6) {
186+
microflowAction.store = {
187+
caller: this.mxform
188+
};
189+
} else {
190+
microflowAction.origin = this.mxform;
191+
}
192+
193+
mx.data.action(microflowAction);
187194
}
188195
},
189196

src/package.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<package xmlns="http://www.mendix.com/package/1.0/">
3-
<clientModule name="MicroflowTimer" version="3.0.0" xmlns="http://www.mendix.com/clientModule/1.0/">
3+
<clientModule name="MicroflowTimer" version="3.0.1" xmlns="http://www.mendix.com/clientModule/1.0/">
44
<widgetFiles>
55
<widgetFile path="MicroflowTimer/MicroflowTimer.xml"/>
66
</widgetFiles>

test/widgets/MicroflowTimer.mpk

81 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)