I confirmed that in calling POST /external-task/{id}/complete
it is possible to pass files as localVariables
. They will be scoped for the specific external task, what would make it possible to use generic variable names when passing e.g. log.html
when completing an external task.
Of course, the open source version of Camunda does not include user interface for browsing local variables for completed tasks. The information is available by REST API though, so it is possible make a cockpit extension for that.
Saving log files for failing tasks requires a bit different approach. POST /external-task/{id}/failure
does not support updating variables and therefore local variables must be updated by calling POST /execution/{id}/localVariables
with the execution id from external task instance data. Now, when calling failure to raise incident, the log.html
saved as a task local variable, would be readable at Camunda Cockpit and possibly help fixing the issue causing failure before retrying the task. The default behavior of Camunda Cockpit is to show download link for file variables.
That all said, I am not sure how this would fit with the current robotframework-camunda -approach, where we are calling Camunda from Robot Framework and don’t have the log files yet
Well, food for though anyway.
Meanwhile, I managed to build initial open source history view for completed processes into my cockpit plugins: https://datakurre.pandala.org/2021/01/camunda-cockpit-history-plugin/