# callback based class BatchProcess(Item): def processIt(self): chain = RunChain(store=self.store, initialStep=self) chain.addStep(BatchStep1(store=self.store)) chain.addStep(BatchStep2(store=self.store)) # state based class BatchProcess(Item): step = integer(step=0) def drive(self): self.step += 1 getattr(self, "step_%d")() def step_1(self): ... def step_2(self): ...