Interrupt process and prompt user for input

indeinde Member Posts: 3 Contributor I
edited November 2018 in Help

I'm evaluating Rapidminer regarding interactive ETL abilty and if all requirements are fulfilled plan on developing an extension.

Just two brief questions:

1. Is it possible to interrupt the running process from within an extension and prompt the user for input?
2. How broad are the capabilites of designing such a prompt? Am I free to use any GUI element and hence build some kind of Wizard that pops up during the process, enabling me to modify data and even parameters for the use in subsequent operators during process runtime? Or is this a contradiction to the XML based process definition paradigma?

Thanks a lot for any responses in advance!

Best regards


  • Marco_BoeckMarco_Boeck Administrator, Moderator, Employee, Member, University Professor Posts: 1,985 RM Engineering

    generally speaking, it is possible - with the "Execute Script" operator. However it is not advised because the process might be run somewhere where no GUI exists (RapidAnalytics Server or RapidMiner in headless mode).
    See the following example which modifies the "Decision Tree" operator "minimal leaf size" parameter according to user input at runtime:

    <?xml version="1.0" encoding="UTF-8" standalone="no"?>
    <process version="5.3.013">
     <operator activated="true" class="process" compatibility="5.3.013" expanded="true" name="Process">
       <process expanded="true">
         <operator activated="true" class="retrieve" compatibility="5.3.013" expanded="true" height="60" name="Retrieve Iris" width="90" x="45" y="30">
           <parameter key="repository_entry" value="//Samples/data/Iris"/>
         <operator activated="true" class="execute_script" compatibility="5.3.013" expanded="true" height="76" name="Execute Script" width="90" x="179" y="30">
           <parameter key="script" value="import javax.swing.JOptionPane;&#10;&#10;import com.rapidminer.example.ExampleSet;&#10;import com.rapidminer.Process;&#10;import com.rapidminer.gui.RapidMinerGUI;&#10;import com.rapidminer.operator.learner.tree.DecisionTreeLearner;&#10;&#10;ExampleSet exampleSet = input[0];&#10;String input = JOptionPane.showInputDialog(&quot;Input new minimal leaf size parameter for Decision Tree:&quot;);&#10;Process process = RapidMinerGUI.getMainFrame().getProcess();&#10;process.getOperator(&quot;Decision Tree&quot;).setParameter(DecisionTreeLearner.PARAMETER_MINIMAL_LEAF_SIZE, input);&#10;return exampleSet;"/>
         <operator activated="true" class="decision_tree" compatibility="5.3.013" expanded="true" height="76" name="Decision Tree" width="90" x="313" y="30">
           <parameter key="minimal_leaf_size" value="300"/>
         <connect from_op="Retrieve Iris" from_port="output" to_op="Execute Script" to_port="input 1"/>
         <connect from_op="Execute Script" from_port="output 1" to_op="Decision Tree" to_port="training set"/>
         <connect from_op="Decision Tree" from_port="model" to_port="result 1"/>
         <portSpacing port="source_input 1" spacing="0"/>
         <portSpacing port="sink_result 1" spacing="0"/>
         <portSpacing port="sink_result 2" spacing="0"/>
  • indeinde Member Posts: 3 Contributor I

    thanks a lot for your advise! So it may then be smarter to program a standalone GUI that uses the Rapidminer API to execute predefined and fixed processes, load data, fetch the process output, do some problem tailored conflict resolution stuff if required and initiate another Rapidminer process with the manipulated data / parameters. Am I right?

  • Marco_BoeckMarco_Boeck Administrator, Moderator, Employee, Member, University Professor Posts: 1,985 RM Engineering

    indeed, that would be advisable. However in that case I am obliged to point out that RapidMiner is licensed under the AGPL 3. This means that your application must be licensed under the AGPL 3 as well. If that is not possible/desirable, you need to purchase an OEM license. You can contact us here for details.

Sign In or Register to comment.