Backwards compatibility / versioning

Hi,

Is it backwards compatible and safe to add new params to a @SignalMethod/@WorkflowMethod?

For instance let’s assume I have workflows running with the following interface:


@WorkflowInterface
class MyWorkflow {

  @SignalMethod 
  void cancelledByUser(int param1);

}

and I would like to add a new param and have:

void cancelledByUser(int param1, String name)

Is it possible to change the method signature without breaking running workflows using the prev signature?

As a general rule of thumb which are the do, don’t when it comes to evolving the workflow interface?

Thank you!

I believe adding parameters is safe, but please test.

hmm… i too had the same question,as i was planning to change couple of things in singanl… and thought it should be safe to add param…
but will work with "@maxims axiom " “test it!” :smiley:

Yes Its safe to add parameters to the signal method (to the end).
If your changes also include changes to your workflow code you might want to look at versioning.

1 Like