It would be nice if there was a way to set default set of ReceiveOption for all ReceiveAction objects in a workflow trace. Right now, you have to set it on every receive action individually, and if you're using something like WorkflowConfigurationFactory, the only way to set these options is to modify the trace afterwards:
trace.getSshActions()
.filter(action -> action instanceof ReceiveAction)
.map(action -> (ReceiveAction) action)
.map(action -> action.setReceiveOptions(options));
Also, this will overwrite receive options that were explicitly set on an action.
There should be a nicer way, e.g. like this:
trace.setDefaultReceiveOptions(options);