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 connect Process and Operator?
prayerslayer
Member Posts: 3 Contributor I
Hello!
I'm very aware of the fact that it's not being welcomed to ask questions regarding the chaining of operators programatically. However, I need to do this for my thesis and hope that you'll kindly oversee it this time.
Everything works really well already, but I couldn't figure out how to connect the output of an operator to a result port of my process. Could anyone give me a hint? It's this part:
I tried to look for ports of the RootOperator, but there was no output:
The actual problem I have is that after the process finished, I can't access the result (because there is none, I guess).
I'm very aware of the fact that it's not being welcomed to ask questions regarding the chaining of operators programatically. However, I need to do this for my thesis and hope that you'll kindly oversee it this time.
Everything works really well already, but I couldn't figure out how to connect the output of an operator to a result port of my process. Could anyone give me a hint? It's this part:
I tried to look for ports of the RootOperator, but there was no output:
Am I able to add it anyway? Or somewhere else?
System.out.println("looking for process ports");
for (String port : process.getRootOperator().getInputPorts().getPortNames())
System.out.println(port);
The actual problem I have is that after the process finished, I can't access the result (because there is none, I guess).
INFO: Process finished successfully after 3 sAt this line:
java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
at java.util.ArrayList.rangeCheck(ArrayList.java:570)
at java.util.ArrayList.get(ArrayList.java:348)
at com.rapidminer.operator.IOContainer.getElementAt(IOContainer.java:112)
at BackendTest.main(BackendTest.java:128)
if (process_result.getElementAt(0) instanceof ExampleSet) { ... }Thanks in advance!
Tagged:
0
Answers
you may ask whatever you want to know - we just encourage others to use the GUI approach because it is much easier. However if there's a reason why you need to do it programatically, it is perfectly fine
I put together a quick example for you:
This is the example process with an operator not connected to an output port. This line connects the operator referenced by its name to the first output port of the process: And in case you need a procedure for input ports as well, you can find it here.
Regards,
Marco