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

Meta Operator Creation

jpuetzjpuetz Member Posts: 4 Contributor I
edited November 2018 in Help
Hi guys, I'm right now in the process of creating a new Meta operator and I also read the "How to build Extensions" whitepaper and it helped a lot to get started, but now I'm not quite sure what the best solution how to do continue. I want the meta operator to contain several sub operators, which get created through the Meta operator..

1. If I create those operators through the constructor of my meta operator, I get a problem whenever I load such a process later on, because loading my Meta operator would create new sub operators and then it would load the old sub operators as well.

2. Or I could just create and use the sub operators within my meta operator without showing them in any subprocess. That would work, but is not really what I want right now.

3. Well then I thought about using parameters to choose which sub operators someone would want to use. I like that idea, but how could i add a function whenever any parameter gets changed. (Or do I have to make my own ParameterType to do that?)
3b. Well another thing parameter possibility is to create a configuration wizard which takes care of selecting and then creating the sub operators. That might work for me, but I'm not really sure if a Configuration Wizard could to that and which class I would need to extend.

I would appreciate any suggestions what would be best or if there's another solution I haven't thought of yet
Tagged:

Answers

  • Marco_BoeckMarco_Boeck Administrator, Moderator, Employee-RapidMiner, Member, University Professor Posts: 1,996 RM Engineering
    Hi,

    I'm not quite sure what your goal is, but my first impression is that you might want to look at the Execute Process (ProcessEmbeddingOperator class) operator. The probably simplest solution would be to create a subprocess with the operators you want, and then execute it with your meta operator.
    In regards to your 3), you may want to have a look at the #registerDependencyCondition() method of the ParameterType class, which allows to show/hide paramters depending on conditions.


    Regards,
    Marco
  • jpuetzjpuetz Member Posts: 4 Contributor I
    Thank you for your answer, but what i wanted to do was more like adding (or removing) an operator to my subprocess depending on a boolean parameter. My current solution to do that is to check for the parameter whenever the operator gets started and then checking if my subprocess already contains an operator with that name. That works for me, although it would be nicer if I could do that whenever the parameter get changed by the user.

    Right now I'm kind of stuck with another problem:
    I would like to use the Nominal2Numerical operator in my code to convert the incoming data in port 1 and deliver it to the sourceport of the subprocess.
    Converting the data itself works, but I don't know how I could transform the metadata as well. (modifyMetaData is protected, so i cant use that function)
Sign In or Register to comment.