1 person found this helpful
The selected action will be populated on a process field named AWS_ACTION.
You can perform a validation on preSubmit event of the form which ensures the comments field was filled in case Deny action is selected.
Cancel the submit operation if the valdiation fails.
Here is the code:
if( AWS_ACTION.rawValue == "Deny" && (yourCommentsField.rawValue == null || yourCommentsField.rawValue == "" ) )
app.alert("Please mention the reason for rejection in the comments field");
yourCommentsField.mandatory = "error"; // make the comments field mandatory
xfa.event.cancelAction = true; // This line will prevent submitting the form
Hope that helps
Thanks for the helpful tip. It works just fine. I now run into a different issue when it tries to complete. I keep getting this stalled error in the log file at the completion of the process even though it works just fine. I try to use other service but still get the same issue like this one: Foundation>DecisionPoint>Execute.
[6/13/11 8:37:24:906 CDT] 00000043 AWS E com.adobe.workflow.engine.ProcessEngineBMTBean stallAction stalling action-instance: 42761 with message: javax.ejb.TransactionRolledbackLocalException: ; nested exception is: java.lang.NullPointerException
Can you please advise,
Not sure what causing the NullPointerException.
Just make sure the conditions specified in the decisionpoint activity are valid. If you are using assignments, double check the xpath expressions where SOMs are valid.
Couldn't assist you much on this error due to insufficient exception details.