简体   繁体   中英

Polarion - Display message box to the user

I would like to display a warning message (with just an "OK" button) when transitioning from one status to another. I tried using a ScriptFunction in the workflow of the WI with the following code (display_message.js):

// Get work item var workItem = workflowContext.getTarget();

// Get the first parameter - the message itself var fieldMsg = arguments.getAsString("field.msg");

// Display message Message(fieldMsg, 1);

But I get the error message that "Message" is unknown. I also tried with "setMessage(fieldMsg)". And I got the same. I found those two functions in RtLinkBuilder and IBuildEvent. Any idea how to solve this? Thx for your help.

There is no support for UI-features in Workflow functions and conditions. In general Polarion Open API does not support UI features(except Formextensions, which should not write/modify content) The only possibility is to throw an exception, but you cannot branch on this and you cannot transport any user-readable message (except the Exceptionname).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM