I have following business case: The client has configurator module with some configuration models. While importing sales order some of the customers give attribute values and not exact configuration id. If the configuration connected with given attributes doesn't exists it has to be created during import. The creation of new configid is done using f. PCRuntimeConfigurator. The form is populated by attributes in form of /configuration/ (in xml), it does some logic inside the form and the result is /solution/ (in xml). I have done steps to create /configuration/ based on attributes, run the form, then the user has to click /OK/ button and I can take solution. The question is - how can I simulate by x++ the closing the form with cliking ok.
The case 1 works, but with user cliking OK button, the case 2 doesn't work, form is opened and closed but solution is empty
1. Works with necessary user interaction
  .....
runtimeConfiguratorForm.init();
   runtimeConfiguratorForm.run();
   runtimeConfiguratorForm.wait();
   PCConfigurationState = formRunObject.getConfigurationState();
   solution = PCConfigurationstate.parmboundvalues();
   ....
2. Doesn't work - /solution/ is empty
.....
runtimeConfiguratorForm.init();
   runtimeConfiguratorForm.run();
   runtimeConfiguratorForm.detach(); // I try with it and without it,
   runtimeConfiguratorForm.closeok();  
   PCConfigurationState = formRunObject.getConfigurationState();
   solution = PCConfigurationstate.parmboundvalues();
  ....
Thank you.