# Reference Id is returning null in PlanItem query

**URL:** <https://forum.flowable.org/t/reference-id-is-returning-null-in-planitem-query/5343>\
**Category:** Uncategorized\
**Created:** [January 30, 2020, 3:12pm UTC](https://forum.flowable.org/t/reference-id-is-returning-null-in-planitem-query/5343 "2020-01-30T15:12:34Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![majid.raoofshahir](https://avatars.discourse-cdn.com/v4/letter/m/e9a140/32.png) [@majid.raoofshahir](https://forum.flowable.org/u/majid.raoofshahir)\
**Post date:** [January 30, 2020, 3:12pm UTC](https://forum.flowable.org/t/reference-id-is-returning-null-in-planitem-query/5343/1 "2020-01-30T15:12:34Z")

</div>

Hi, I have a small cmmn model including a process task which referred to process model.I created them using Flowable modeler and exported them in my spring project. I created an instance of case model using cmmnRuntimeService. When I query planitems instances, using cmmnRuntimeService, I expect to get  
referenceId —\> the process definition Id of the process task  
referenceTyoe --\> something like cmmn-1.1-to-bpmn-2.0-child-process  
but I getting null. The response has correct value for planItemDefinitionId and type.  
“planItemDefinitionId”: “submitApplicationProcess”,  
“planItemDefinitionType”: “processtask”  
Am I missing something?[https://www.dropbox.com/s/1yup1o1p28bo1ar/Case\_Progression\_test\_formkey.cmmn.xml?dl=0](https://www.dropbox.com/s/1yup1o1p28bo1ar/Case_Progression_test_formkey.cmmn.xml?dl=0)[https://www.dropbox.com/s/1mkppvw80vodyu4/test\_formkey\_Submit\_application.bpmn20.xml?dl=0](https://www.dropbox.com/s/1mkppvw80vodyu4/test_formkey_Submit_application.bpmn20.xml?dl=0)

---

<div class="post-metadata">

**Author:** ![joram](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.flowable.org/joram/32/26_2.png) [@joram](https://forum.flowable.org/u/joram)\
**Post date:** [February 4, 2020, 8:01pm UTC](https://forum.flowable.org/t/reference-id-is-returning-null-in-planitem-query/5343/2 "2020-02-04T20:01:24Z")

</div>

Your processTask is manually activated (the triangle icon), which means it isn’t started automatically. This means your process instance will only start after the plan item instance is started. You can do this through

` cmmnRuntimeService.startPlanItemInstance(planItemInstance.getId());`

---

<div class="post-metadata">

**Author:** ![majid.raoofshahir](https://avatars.discourse-cdn.com/v4/letter/m/e9a140/32.png) [@majid.raoofshahir](https://forum.flowable.org/u/majid.raoofshahir)\
**Post date:** [February 4, 2020, 9:00pm UTC](https://forum.flowable.org/t/reference-id-is-returning-null-in-planitem-query/5343/3 "2020-02-04T21:00:49Z")

</div>

Hi Joram,

Thanks for your response.

Majid
