The Altair Community is migrating to a new platform to provide a better experience for you. In preparation for the migration, the Altair Community is on read-only mode from October 28 - November 6, 2024. Technical support via cases will continue to work as is. For any urgent requests from Students/Faculty members, please submit the form linked here
How to pass user input from RM Server Web App to a Process?
Christos_Karapapas
Member Posts: 25 Contributor II
I am following the Titanic example from the documentation and so far I made the following steps but I have a couple of questions.
1. Created a realm.
2. Created a few domains.
3. Assigned the realm to my web app.
4. Checked the "Allow processes to set app variables via context macros" option in my web app.
5. Created a User Input component in the layout of my web app.
6. Created some variables based on my domains.
7. Assigned the variables to the User Input component and marked them as selected variables.
8. Submitted the component, saved the web app and restart the RM Server.
9. Checked the view Context panel on RM Studio.
10. Created some macros with names identical to the names of my variables and default value 0.
11. Inserted the "Recall from App" operator to my process.
--- So far so good.
Now I suppose I have to select something in the Recall operator.
However, all I see as options is a name "meta_something" that I am using as name in another process' "Publish to App" operator.
What exactly I am supposed to see as options, is it the macros that I just created in the context?
Also after I complete some task with the user input, I need to send the results back to the web app, so I will also use the Publish operator to my process, is it this name that I am supposed to find under the Recall operator?
What am I missing here? Thank you in advance.
1. Created a realm.
2. Created a few domains.
3. Assigned the realm to my web app.
4. Checked the "Allow processes to set app variables via context macros" option in my web app.
5. Created a User Input component in the layout of my web app.
6. Created some variables based on my domains.
7. Assigned the variables to the User Input component and marked them as selected variables.
8. Submitted the component, saved the web app and restart the RM Server.
9. Checked the view Context panel on RM Studio.
10. Created some macros with names identical to the names of my variables and default value 0.
11. Inserted the "Recall from App" operator to my process.
--- So far so good.
Now I suppose I have to select something in the Recall operator.
However, all I see as options is a name "meta_something" that I am using as name in another process' "Publish to App" operator.
What exactly I am supposed to see as options, is it the macros that I just created in the context?
Also after I complete some task with the user input, I need to send the results back to the web app, so I will also use the Publish operator to my process, is it this name that I am supposed to find under the Recall operator?
What am I missing here? Thank you in advance.
0
Best Answer
-
Edin_Klapic Employee-RapidMiner, RMResearcher, Member Posts: 299 RM Data ScientistThanks for clarifying!The interaction is a bit different.
- In RapidMiner Studio you connect the Operator "Publish to App" and give it a name of your choice (e.g. myData).
- In RapidMiner Server you edit the Component which should display this Object (can be an ExampleSet, a document or other stuff).
Then you select/enter the App object (in this example myData) to "Subscribe to App object".
In order to be selectable, the RapidMiner process creating this App object needs to have been executed in the Server environment (e.g. by putting it in the initialization process of your Web App or manually executing it by adding a Button component to your Web App).
With the other settings there you can choose different output parameters (e.g.Visualization types). - To use the input variable you also need to attach the execution of the Process where the Macro/Variable is used to the User Input Component.
The raw Workflow is as follows:=> Process creates an App object (e.g. myData)
=> The Web App checks if the object has been created/changed and displays it
=> Every change of a Variable (e.g. via User Input component) is propagated to the defined Processes (i.e. not automatically everywhere where the variable is used)=> The Process is executed and, if necessary, changes the App object
=> Web App gets updatedRecall from App is only needed when you modify an existing object. Most often (e.g. when using a Macro/Variable for filtering) this is not the way to go since you need to filter from the full dataset!The benefit of this approach is that you only need to create an object once but can visualize it in various ways in the Web App.Hope this helps!
Happy Mining,Edin6
Answers
I believe my question is very specific, if not please let me try to narrow it down even more.
Btw, please correct me if I am wrong.
When I insert to my process a Recall operator, there are no options to set in the name parameter.
Now if I understand this correctly, on this parameter I should choose the name of the User Input Component that contain the Web App Variables I want to receive. After of course I set up the equivalent Macros on RM Studio, making sure that the Variables and Macros share the same name, and also making sure of all the other prerequisites I mention in this question.
The problem now is that on the Recall operator I do NOT see any of View names of my Web App.
Could you please elaborate to explain just a bit further the step3? What exactly does the following mean "attach the execution of the Process where the Macro/Variable is used to the User Input Component" in terms of configuration?
What I understand is to go in the RM Server at the Web App, at the Input component and select as "Process to run" the process which has the macros and also the publish to App Object selected at the "Subscribe" option at the result component. Is this right?
Happy Mining,