I have a process using OCR in order to read data from an image that is attached as File variable to the process instance.
Now, since OCR is not completely reliable, the process consists of a validation task. If validation fails a human has to check the image and extract the data manually:
Now, I would love to show the image directly in the User Task korrigieren so users could view the image immediately when claiming the task.
I am scared that this might require some javascript magic, which gives me flashbacks. Before I travel down that road, I’d like to know: is it feasible? Is there probably already a built-in trick in Camunda Tasks that creates a view of an image?
You can take a look at the solution discussed here.
If that doesn’t work for you then, I’m sorry to have to report, but you’re probably gonna need to back your bags and head down the magic javascript road. That said, i’m sure there are lot of examples around. If you find a solution be sure to let us know
Thank you! That is interesting! In addition, the underlying form seems to be exactly what I am looking for. Do you know if there is an example form like this somewhere public?
Its quite simple really, a combination of Angular and Bootstrap. The ‘secret sauce’ was to use hidden form fileds to force loading of the process variables. Note this technique worked with Camunda version 7.4 or so, but there is a chance tasklist has changed a little sinc then…
I just came to continue on embedding an image in a user task now.
I extracted the following snippet from your example which enchants my embedded form with a image stored in varialbe document of the current process instance:
<img src="{{ camForm.variableManager.variable('document').contentUrl }}" alt="You should have seen an image here.">