RAFCON icon indicating copy to clipboard operation
RAFCON copied to clipboard

Data port types should support real class definitions

Open franzlst opened this issue 4 years ago • 4 comments

Right now data port types support all primitive python types (int, string, list, dict, object etc.). (User defined) classes are not supported right now.

Originally created by @sebastian-brunner ([email protected]) at 2017-08-21 05:44:30+00:00 (moved from RMC internal repository)

franzlst avatar Apr 17 '20 09:04 franzlst

Please see also what has been commented in #389. A general base class for arbitrary parameter classes/types would be a good step to do this enhancement here and the one requested in #389.

Originally created by @Rbelder at 2017-08-21 09:42:51+00:00 (moved from RMC internal repository)

franzlst avatar Apr 17 '20 09:04 franzlst

@Rbelder: I think you misunderstood @sebastian-brunner @sebastian-brunner: I think this is already possible. Just specify the full qualified name of your class (e.g. rafcon.core.states.execution_state.ExecutionState) and make sure the package (in this case rafcon is within your PYTHONPATH)

Originally created by @franzlst ([email protected]) at 2017-08-21 11:31:28+00:00 (moved from RMC internal repository)

franzlst avatar Apr 17 '20 09:04 franzlst

@franzlst that should work what your are describing because of the locate command should do this.

I never have used it this way but that would also fall into the config master thing of issue #390, I think.

Next question is also if this behavior is a feature or a bug. What means do we really wanna have such a implicit behavior in RAFCON as a feature? I would prefer to have something more explicit like a related check with the imported classes of the script or something like this.

Originally created by @Rbelder at 2017-08-21 12:24:29+00:00 (moved from RMC internal repository)

franzlst avatar Apr 17 '20 09:04 franzlst

@franzlst: yeah great, this already works :-)

But you are then only able to open a state machine when you started rafcon with the correct environment. Probably we should only throw a warning and let the user open the state machine nevertheless.

Originally created by @sebastian-brunner ([email protected]) at 2017-08-21 12:28:55+00:00 (moved from RMC internal repository)

franzlst avatar Apr 17 '20 09:04 franzlst