I have a workflow where every time a button is clicked, it'll compute a new result and append it to a list 'points' stored as a Class attribute under solution/.
The problem is that I can't set the 'points' list as a 'download' AND an 'upload' in a transaction where I could just append the 'points' like shown below, because I will have a cyclic dependency.
`class FirstStep(StepModel):
"""Step definition of the first step."""
visc: float = 0.04
dens: float = 998
speed: float = 32.5
bt_mrf: float = 0
bt_fusion: float = 0
points: list = []
@transaction(self=StepSpec(upload=["bt_mrf", "bt_fusion","points"], download=["visc", "dens","speed","points"]))
def calculate(self) -> None:
"""Method to compute the sum of two numbers."""
self.bt_mrf, self.bt_fusion = calculate(self.visc,self.dens,self.speed)
#round blend times to 3 decimal places
self.bt_mrf=round(self.bt_mrf,3)
self.bt_fusion=round(self.bt_fusion,3)
temp_points=self.points
temp_points.append((self.visc,self.dens,self.speed,self.bt_mrf,self.bt_fusion))
self.points=temp_points
`