Dear ONE DATA users,
does anyone know if the ONE DATA API has a problem with simultaneous triggering of workflow executions? I am trying to trigger workflow executions via the SDK using multiple threads (so I can trigger multiple workflows at once while at the same time automatically waiting for their results). But this results in an error
500: {"errors":["could not execute batch; SQL [insert into dbms.WORKFLOW_JOB (END_TIME, EXECUTION_CONTEXT, EXECUTION_NUMBER, EXECUTION_STATE, START_TIME, WORKFLOW_ID, WORKFLOW_VERSION, ID) values (?, ?, ?, ?, ?, ?, ?, ?)]; constraint [workflow_job_workflow_id_execution_number_key]; nested exception is org.hibernate.exception.ConstraintViolationException: could not execute batch"]}
if I don’t make sure that the calls will not be made simultaneously.
Shouldn’t the ONE DATA API be robust against that?
With a bit more effort I could use the “async” call for workflows as well - I will have to implement the regular status check myself then but this would e.g. for functions not work because there is no async call for functions.