I’m testing functionality for a hybrid setup where there are both JobWorker based user tasks and Camunda user tasks in Camunda 8.8.8, running in c8run. It’s not clear to me how to use the V1 API for Tasklist, which is needed to retrieve user tasks that are JobWorker based.
I changed the default configuration by setting the environment var CAMUNDA_TASKLIST_V2_MODE_ENABLED to false (in the .env file) and updating the configuration file at configuration/appliation.yaml by adding the following. For some reason, just changing one didn’t seem to reach the full effect.
camunda:
tasklist:
V2ModeEnabled: false
This enabled V1 mode for tasklist and should have enabled the V1 API also, according to the documentation. The V2 API works as documented with curl, by first retrieving a cookie, then passing it with subsequent requests. The V1 API is a bit more tricky and the documentation is not conclusive.
I figured out I could get a cookie for the V1 API using a request like this:
curl -X POST '``http://localhost:8888/login``' \
-H 'Content-Type: application/x-www-form-urlencoded' \
-d 'username=demo&password=demo' \
-c cookie.txt
I derived this from the way Tasklist portal submits the data, because the documented endpoint /api/login (which used to be used for this with < 8.8), returns a 404, as does /login, as does /tasklist/api/login, some of which are mentioned by the docs.
With the cookie retrieved, I attempted other requests to the V1 API, only to bump against the csrf prevention. I attempted disabling those for this testing setup in a similar way as before, by setting CAMUNDA_TASKLIST_CSRF_PREVENTION_ENABLED to false in the .env file and doing the same in the application.yaml, but this continues to be an issue with any request beuse the csrf prevention keeps rejecting requests.
Which combination of configuration and request flow should I follow to enable the V1 Tasklist mode and retrieve both JobWorker based user tasks and Camunda user tasks (via different APIs) in c8run?