I start my workflows like this :
WorkflowExecution execution = WorkflowClient.start(workflow::workflowmetod, data);
and inside workflow i save the data (original input) as a member variable.
subsequently i send many signals to workflow using
Myworkflow mywf = workflowClient.newWorkflowStub(Myworkflow .class, workflowId);
mywf.signal1();
This works perfect under normal scenario.
However under load, or when worker is not available immediately to process the newly submtited workflow and if the workflow is signalled as well in the mean while, i see that worker attempts to process the signal first prior to to the workflow method.
In my usecases, i need the inital input necessarily for processing the signals and i end up reading this as null.
Is there any way to ensure that the workflow method get invoked prior to the signal?
This seems some kind of race conditon at the start of workflow and worker gives priority to signals over the workflow method.