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've been experimenting with 'pausing' a workflow so that it might be resumed at a later time (and possibly a different machine). The workflow moves between transitions normally when the WorkflowEnabled object is used in the python interpreter it was created within. If the WorkflowEnabled object is pickled and loaded back up in another interpreter to be 'resumed', it raises an InvalidTransitionError on the first attempt to transition to a different State. It looks like this is due to two different state instances being compared (that have the same name and title)
since nothing is returned from the call to available_from, the InvalidTransitionError is raised. I was going to send over a pull request to allow States to be considered equal if they had the same name and title, but it looks like there are test cases that explicitly check to ensure that different State instances with the same name and title are treated as not equal. I'm wondering how best to proceed. Is it possible to reconsider the equality of States with the same name and title? Maybe it's better to investigate how to pickle/unpickle to ensure States are linked back up using the same State instance where appropriate?
Thanks,
Brian
The text was updated successfully, but these errors were encountered:
Hi
I've been experimenting with 'pausing' a workflow so that it might be resumed at a later time (and possibly a different machine). The workflow moves between transitions normally when the WorkflowEnabled object is used in the python interpreter it was created within. If the WorkflowEnabled object is pickled and loaded back up in another interpreter to be 'resumed', it raises an InvalidTransitionError on the first attempt to transition to a different State. It looks like this is due to two different state instances being compared (that have the same name and title)
https://github.com/rbarrois/xworkflows/blob/master/xworkflows/base.py#L159
since nothing is returned from the call to available_from, the InvalidTransitionError is raised. I was going to send over a pull request to allow States to be considered equal if they had the same name and title, but it looks like there are test cases that explicitly check to ensure that different State instances with the same name and title are treated as not equal. I'm wondering how best to proceed. Is it possible to reconsider the equality of States with the same name and title? Maybe it's better to investigate how to pickle/unpickle to ensure States are linked back up using the same State instance where appropriate?
Thanks,
Brian
The text was updated successfully, but these errors were encountered: