You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am very new to Stackstorm and I am wondering if the following is possible.
I have a class derived from the Action class, which I would like to use as my base for all actions in my pack. This class foo processes various config options, and also requires an argument called some_var, which I would like to be set at runtime.
I have another class derived from foo called bar.
classfoo(Action):
def__init__(self, some_var):
self.some_var=some_var# do something with some varclassbar(foo):
def__init__(self, some_var):
super().__init__(some_var=some_var)
defrun():
...
When an action tries to instantiate bar(), the some_var argument appears to be consumed by the run() method and not by the superclass constructor.
Is it possible to provide arguments to a superclass constructor in a Stackstorm action?
Alternatively, is it possible to provide a config option at runtime that is only used in that instance of an action/workflow?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi there,
I am very new to Stackstorm and I am wondering if the following is possible.
I have a class derived from the
Action
class, which I would like to use as my base for all actions in my pack. This classfoo
processes various config options, and also requires an argument calledsome_var
, which I would like to be set at runtime.I have another class derived from
foo
calledbar
.When an action tries to instantiate
bar()
, thesome_var
argument appears to be consumed by therun()
method and not by the superclass constructor.Is it possible to provide arguments to a superclass constructor in a Stackstorm action?
Alternatively, is it possible to provide a config option at runtime that is only used in that instance of an action/workflow?
Thanks in advance! :)
Beta Was this translation helpful? Give feedback.
All reactions