The outline of my workchain first establishes a list of steps from a List
input, then while the workchain has_steps
, i.e. the list is non-zero, it extracts a step by steps.pop(0)
and executes. All of a sudden, my jobs started behaving funky in the sense that the first two steps run no issue, then when the workchain checks for additional steps (there’s one more), it says the steps
variable is not an attribute of the workchain. Fascinating! Where did it go? The only thing that is special about this third and final step is that it is monitored. But again, how can that delete a workchain attribute? Investigating… but assistance is welcomed
To be able to help out here, I will have to see some code and actual exceptions. Otherwise we are just going to be playing a guessing game So if possible, it would be great if you could link to the source, or try and provide an MRE.
Is steps an attribute of the class, or you get (and put it back after popping) to the context? attributes in a class are not persisted between steps (they might in some cases, but you’re not supposed to expect they do).
You should put the list (probably as a simple list
, not necessarily a List
) in the context, and fetch it at the beginning of the step, pop and put it back in the context so it’s persisted.
Okay. I checked the workchain. The list of protocol steps for the workchain to take was defined as self.workstep_keynames
instead of self.ctx.workstep_keynames
in the initial setup stage of the outline. I’m surprised we hadn’t seen more crashes. Anyhow, fixed! Thanks y’all
This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.