Click on submit on your main form, wait for the comments dialog to appear, change focus back to your main form again and click on submit again.
Now click the ok/submit button on your two comments dialogs and unless you have added some extra checking down the line, your record will be submitted into workflow twice, be assigned twice, approved twice (if the approver doesn’t catch on) -:)......seems to be horrible for me , even faced the same issue in standard Ax Purcahse requisition workflow. ...see below screen
Found two ways to handle this as below---
1. Put an additional check after your your .dialogOk() call and before your activateFromWorkflowTemplate() to see if the record has been submitted.
2. Go to form 'WorkflowSubmitDialog' Form and add below code to 'wait' method.
public void wait(boolean _modal=false)
{
// super(_modal); //Comment this standard overriden line and call super
super(true);
}
But still i think issue need to be fixed in standard Ax as it doesn't make sense to submit the workflow multiple times...

.gif)
