UX: Is there a way to return a value from a workflow action?

Is it possible to return a value from a workflow action? We tried calling a custom action with this:

this.$.checklistCategoryDS.performAction(id,TriPlatDs.RefreshType.NONE, "query-category-access-action-group", "query-category-access-action").then(function (o) {console.log("Promise exec", o);})

We can see that the workflow has been triggered in the workflow instance history, but there are no return values in our Promise. The returned response is:

Promise {[[PromiseStatus]]: "resolved", [[PromiseValue]]: undefined}

We currently do not return the workflow return value (as in workflow parameter mapping). It is in our queue for future functionality. But if your goal is to know if the performAction() was completed, then all you need is to listen to the “ds-perform-action-complete” event. See the UX Framework “triplat-ds” component documentation (in the product) for the list of events. For example:

listeners: {
'ds-perform-action-complete': '_handleAction',
'ds-perform-action-error': '_handleAction'

_handleAction: function(e) {
console.log(e.type + ": ", e.detail);

Continue reading


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.