Workflow expression code - Dialog box for user input
Hello,
I'm looking for a workflow expression code that will launch a dialog box for the reviewer to select an item from a drop-down list when rejecting. The goal is to append the selected value to the Comments and write it into the database to later extract and report on workflow rejections.
I tried using the Java Swing Dialog, but am stuck with an error...
Here's the sample code (2nd line throwing error):
String[] codes = {"DES", "DFT", "BOM"};
String code = (String) javax.swing.JOptionPane.showInputDialog(null, "Select Rejection Code:", "You have chosen to reject this workflow:", javax.swing.JOptionPane.QUESTION_MESSAGE, null, codes, codes[1]);
if (code.trim().length() == 0) {
throw new wt.workflow.engine.FailedTransitionException(e2);
}
The error is:
wt.util.WTException: java.awt.HeadlessException
Does anyone know a way around the above error, or have an alternative method of launching a dialog box from a workflow expression?
Thank you!

