sartography / spiff-example-cli

GNU Lesser General Public License v3.0
38 stars 10 forks source link

Deserialize does not retrieve the custom script engine? #13

Closed sharky98 closed 2 years ago

sharky98 commented 2 years ago

Hello,

I am not sure about this, but it seems that once you deserialize a workflow, the initial custom script engine is lost. I need to re-attach it in some ways. In my case I needed to add

wf.script_engine = CustomScriptEngine

to this bit of code. https://github.com/sartography/spiff-example-cli/blob/21eecc8aac9c0efbb87438043f086c53610b04e9/run.py#L161-L163

danfunk commented 2 years ago

That is correct. We couldn't identify a clean way to serialize the type of script engine you are currently using and assure it would be available when deserializing the workflow at some later date. It seemed safest to reset the script engine after deserialization. If you have any recommendations on how this might be handled consistently and safely I would like know.