Changing type of field in activity input

I want to replace the type of a field in the input to an activity to something else. For example:

public class ActivityInput {
  private final Enum1 status;
  ...
}

and I want to change it to be

public class ActivityInput {
  private final Enum2 status;
  ...
}

Would this be a breaking change and require workflow versioning? I think the answer is yes if a workflow calls the activity with the old activity input and before the activity is scheduled, the activity worker is redeployed to take in the new activity input.

However, can I get around this by first taking down all the workflow workers, then redeploying the activity workers once all the activities have completed, and then redeploying the workflow workers?

I would avoid such change as it might create all sorts of problems. I would recommend either adding a new field and deprecating the old one or creating a new activity that takes the new input and deprecating the old activity after no workflow invokes it anymore.

1 Like

Thanks for the quick response! Is there any reading I can do or areas of the code I can dive into to better understand how workflow replaying works?

We don’t have documentation about this yet and the code is not that simple to understand. Watch this video that contains the explanation starting from 13:55/