Hi to all
My process scenario: a task in the process needs to write data for 300 cities to the database. I started five springboot instances to handle this, which is 60 cities per instance. The task completes when all 5 instances are written.
All five instances have the same annotation (@ZeebeWorker(type = "INSERT_WORKER")) and only one instance was notified when the process started.
It is a single service task instance, meaning only one job will be generated.
To generate multiple jobs, you can designate your service task as a multi-instance task, supplying it with an array of items to be inserted. This way, each job will handle a single record. Alternatively, you could take a different approach, such as assigning each job to manage a batch of records (for example: 5 records per job).
I simulated a job that took a long time to execute and found that about 5 minutes later, the engine retried the job, so the middle instance in the picture was assigned the job again.
I don’t know how long this job will take because it depends on the size of the input data. Do I need to set a large timeout value? Or is there another way ? Can input collection be used as a startup variable ?
In another scenario, if I set this timeout to 1 hour, and I restart it during the instance execution, will the instance not receive a notification from the engine until 1 hour later?