Hi guys, I need to call an api from an embedded taskform. In particular i need to call an api to evalute a dmn rules when a loose a focus on a specific field. I will need the answer to show the result of the rule on the screen.
Has anyone already had a similar need? Are there any examples i could follow?
if I understand you correctly, you want to show your User, after executing a human task the solution of the executed task.
I can think of different approaches in this case:
if it is acceptable to have a time difference for the user to get the solution, use a DMN-Task and send the solution via an E-Mail or similar.
you can build your own Camunda-Cockpit-Plugin, and with the successful klick on “OK” call a DMN-table with the given parameters and show the result as a popup (see the tutorial)
Hi Clemens, first of all thanks for the quick reply. In reality, the result of the evaluation should not be given after the execution of the human task but while the user is entering the data. After he has entered some information on the form, when he loses focus on a certain field I should call the rest service to evaluate the rule and show the result on another field always on the same form.
second I used the ng-blur directive to catch the focus loss event
third, after setting the context variable with the value returned by the rest call to the DMN service, I forced the alignment of the model with $scope. $apply() to immediately see the value on the screen.
With these interventions everything works fine.
Thank you so much, Marco.