Process-definitions you get from the process-definition queries don't have the activities initialized. You should get a ReadOnlyProcessDefinition by calling the public ReadOnlyProcessDefinition getDeployedProcessDefinition(String processDefinitionId) on RespositoryServiceImpl (you would need to cast your RepositoryService).