To add some more info to what @joram said. The category
of the ProcessDefinition
is set based on the targetNamespace
in the BPMN XML. Which means that you can automatically set it when the process is deployed, no need to use the Java API for it.
Cheers,
Filip