Standalone Task set FormKey with API


I create a standalone task in my application with the Java API. I also want so set the form key to connect it with an external form. My research in the Camunda code just led me deep inside Camunda to the parsing process of BPMN files where the formkey is set.

Is there any official API functionality which lets me set a form key to a standalone task?
If not, how can I define a form for a standalone task?


If there is would be great to add this to the Rest API as well.

@TheFriedC just as a side note: If you are stuck and need this functionality you could probably do a bpmn process with a single user task and have the FormKey value be a expression of a variable that you Start the process with.

Thank you one more time @StephenOTT!

I already thought about using a simple process definition containing one usertask. But then I encountered the standalone task functionality (as you already know :wink: ) and now I am digging into it.

Unfortunately it seems to be another dead end in the story of standalone tasks. Nomen est omen …:thinking:

Standalone task use has a few other catch 22s related to variable storage and then returning those variables for use in search/filters, etc. We use them extensively for a few tasks, and while they work well, there is significant Quality of Life improvements you get from using a bpmn process (we have found in our experience).

@TheFriedC just a few examples:

  1. You decide you want to add reminders to your user tasks (bpmn already provides the boundary events)
  2. Conditional Tasks
  3. Migrations
  4. Expressions around user assignment and other Task fields
  5. DMN prior to task creation
  6. Task Listeners
  7. Execution Listeners
  8. Input/Outputs
  9. Better History Reporting
  10. Cockpit Views
  11. Process Pausing/Suspend
  12. Conditional Events
  13. Event Subprocesses
  14. etc

OK - you convinced me :+1:

Aready heading for the process definition solution …