What is the java form of FetchAndLock API? I am using embedded engine in a java app.
Whats the difference between ExecutionID and TaskID for a User task?
When does a new TaskID get created? e.g. if a user task is retried internally does it retain the same TaskID?
If a user task gets completed and the flow goes to next tasks and then loops back to the originally completed user task, will a new TaskID for this second time in the same process instance?
Also I have same above query for ExecutionID.
When does Camunda commit the task statuses? Does it do it immediately after every task or does wait and makes multiple task updates in a future commits?
TaskID refers to data regarding the task (assigness, task name etc.) and is specific to a user task. ExecutionID refers to a current state of the instance - i.e. a Token.
TaskID is kept until the task is completed
No - a new ID is created each time a task is activated
When Camunda commits depends on your model. But basically after a task is completed - if all tokens have moved to an end event or wait state it commits.
Niall, Thanks for the reply. I could not find a way to retrieve the Injected fields (via bpmn) of a External Task.
Please suggest.
Had it been a service task with java delegation, I could have retreived injected fields. But when the service task is external then I am not sure how to find the injected fields and their values from the worker java call.
For an External task I am hoping to define injected field:value pairs such as:
start-function : “f1”
validate-function : “f2”
compl-function : “f3”
My intention was that when worker gets invoked, it fetches an external task by fetchAndLock. Then it reads the field “start-function” and calls f1. If injecting fields on External task is not possible directly, I can try to inject fields on its ‘start’ Execution Listener and push those values as task variable. So that way I can use the variables in the worker after choosing the task. Let me know if that is ok.
It would be a lot easier if you where to just add them as process variables and ask for them directly when calling fetch and lock. There doesn’t seem to be a need for you to use field injection.
Ok adding them as variable is what i need. But in the BPMN file where do i add the variables. I am planning to use a common delegate/listener for any task and these variables would take different values for different task.
Will using Extension tab help to add variables?
Hi @Niall
We want to implement idempotency at external task processing service( while processing external task ) and considering taskId as a candidate for unique id which will be remembered across multiple retries( from external task processing through pull mechanism )
Is it the correct choice to handle scenarios like ?-
External task service fetches a task and processes , and fails to invoke complete on that task, and later fetches the same task and reprocesses it ( but should detect that it has earlier processed it based on remembered taskID )