Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "MicroflowTimer",
"version": "3.1.0",
"version": "3.1.1",
"description": "",
"license": "",
"author": "",
Expand Down
25 changes: 18 additions & 7 deletions src/MicroflowTimer/widget/MicroflowTimer.js
Original file line number Diff line number Diff line change
Expand Up @@ -163,11 +163,14 @@ define([

_execMf: function() {
logger.debug(this.id + "._execMf");
if (!this._contextObj) {
return;
}

if (this._contextObj && this.microflow !== "") {

var microflowAction = {
if (this.microflow) {
var mfObject = {
params: {
actionname: this.microflow,
applyto: "selection",
guids: [this._contextObj.getGuid()]
},
Expand All @@ -177,12 +180,20 @@ define([
this._stopTimer();
}
}),
error: function(error) {
console.warn("Error executing mf: ", error);
}
error: lang.hitch(this, function(error) {
logger.error(this.id + ": An error ocurred while executing microflow: ", error);
})
};
if (!mx.version || mx.version && parseInt(mx.version.split(".")[0]) < 7) {
// < Mendix 7
mfObject.store = {
caller: this.mxform
};
} else {
mfObject.origin = this.mxform;
}

mx.ui.action(this.microflow, microflowAction);
mx.data.action(mfObject, this);
}
},

Expand Down
2 changes: 1 addition & 1 deletion src/package.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<package xmlns="http://www.mendix.com/package/1.0/">
<clientModule name="MicroflowTimer" version="3.1.0" xmlns="http://www.mendix.com/clientModule/1.0/">
<clientModule name="MicroflowTimer" version="3.1.1" xmlns="http://www.mendix.com/clientModule/1.0/">
<widgetFiles>
<widgetFile path="MicroflowTimer/MicroflowTimer.xml"/>
</widgetFiles>
Expand Down
Binary file modified test/widgets/MicroflowTimer.mpk
Binary file not shown.