Skip to content

Commit 6198bb0

Browse files
author
Diego Antonelli
committed
Removing deprecated API for microflow execution
1 parent f8339b8 commit 6198bb0

File tree

1 file changed

+13
-14
lines changed

1 file changed

+13
-14
lines changed

src/HTMLSnippet/widget/HTMLSnippet.js

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -136,25 +136,24 @@ define([
136136
_executeMicroflow: function () {
137137
mx.logger.debug(this.id + "._executeMicroflow");
138138
if (this.onclickmf) {
139-
var params = {};
139+
var params = {
140+
actionname: this.onclickmf
141+
};
140142
if (this.contextObj !== null) {
141143
params.applyto = "selection";
142144
params.guids = [this.contextObj.getGuid()];
143145
}
144-
mx.ui.action(
145-
this.onclickmf, {
146-
params: params,
147-
callback: function (obj) {
148-
mx.logger.debug(
149-
this.id + " (executed microflow successfully)."
150-
);
151-
},
152-
error: function (error) {
153-
mx.logger.error(this.id + error);
154-
}
146+
mx.data.action({
147+
params: params,
148+
callback: function (obj) {
149+
mx.logger.debug(
150+
this.id + " (executed microflow successfully)."
151+
);
155152
},
156-
this
157-
);
153+
error: function (error) {
154+
mx.logger.error(this.id + error);
155+
}
156+
});
158157
}
159158
},
160159

0 commit comments

Comments
 (0)