-->

Display a pop-up window with status message of a s

2019-03-04 06:34发布

问题:

I've a form which runs a real-time workflow. When the workflow succeeds, I need to display the status message of the workflow in a pop-up window or an alert message box.

Any ideas on how I can achieve this?

回答1:

You can only show messages to the user from within a synchronous workflow if you cancel the workflow:

When you set the status to canceled, you prevent the operation. An error message containing the text from the stop action status message will be displayed to the user with the heading Business Process Error.

There is no way of showing an informational message from a succeeded workflow.

As a workaround, you could have the workflow write your informational message to a field on the entity. You could then write JavaScript that checks if the message-field contains data, show a form notification (or an alert if you insist) to the user, and subsequently clear the message-field.