# Get processInstanceKey

**URL:** <https://forum.camunda.io/t/get-processinstancekey/51907>\
**Category:** Camunda 8 Topics\
**Tags:** process-engine, bpmn\
**Created:** [April 18, 2024, 9:20am UTC](https://forum.camunda.io/t/get-processinstancekey/51907 "2024-04-18T09:20:49Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Domingos\_Dias](https://forum.camunda.io/user_avatar/forum.camunda.io/domingos_dias/32/26761_2.png) [@Domingos\_Dias](https://forum.camunda.io/u/Domingos_Dias)\
**Post date:** [April 18, 2024, 9:20am UTC](https://forum.camunda.io/t/get-processinstancekey/51907/1 "2024-04-18T09:20:49Z")

</div>

Greetings everyone,  
Can anyone help me with this, I need to get the value of the processInstanceKey and assign it to a variable.  
Any help is welcome

 ![image](https://forum.camunda.io/uploads/default/original/3X/1/4/1418d32f910c3600cd275b25f69a62025f9a3731.png)

---

<div class="post-metadata">

**Author:** ![gevezex](https://forum.camunda.io/user_avatar/forum.camunda.io/gevezex/32/27804_2.png) [@gevezex](https://forum.camunda.io/u/gevezex)\
**Post date:** [April 18, 2024, 10:48am UTC](https://forum.camunda.io/t/get-processinstancekey/51907/2 "2024-04-18T10:48:32Z")

</div>

To my knowledge the processInstanceKey is not available. I solved this issue by creating a (python) service task and reading the processInstanceKey from within the task. Then you return the processInstanceKey as a new variable back to the processInstance.

And yes it is indeed a stupid workaround for such a basic need, what should be part of the product.

---

<div class="post-metadata">

**Author:** ![Matt\_McKeithen](https://forum.camunda.io/user_avatar/forum.camunda.io/matt_mckeithen/32/28578_2.png) [@Matt\_McKeithen](https://forum.camunda.io/u/Matt_McKeithen)\
**Post date:** [April 26, 2024, 7:30pm UTC](https://forum.camunda.io/t/get-processinstancekey/51907/3 "2024-04-26T19:30:12Z")

</div>

I’ve been trying to answer the same question and believe it is not available and you will have to do something like @gevezex said.

However, it looks like it is on their roadmap: [FEEL expressions for Camunda attributes / entities. · Issue #10987 · camunda/zeebe · GitHub](https://github.com/camunda/zeebe/issues/10987)

---

<div class="post-metadata">

**Author:** ![Matt\_McKeithen](https://forum.camunda.io/user_avatar/forum.camunda.io/matt_mckeithen/32/28578_2.png) [@Matt\_McKeithen](https://forum.camunda.io/u/Matt_McKeithen)\
**Post date:** [April 26, 2024, 7:30pm UTC](https://forum.camunda.io/t/get-processinstancekey/51907/4 "2024-04-26T19:30:17Z")

</div>

Related question: [Is the process instance id available as variable in the process instance?](https://forum.camunda.io/t/is-the-process-instance-id-available-as-variable-in-the-process-instance/45992)

---

<div class="post-metadata">

**Author:** ![system](https://forum.camunda.io/uploads/default/original/3X/5/8/58d50142eacca605d35cb1ef9e6b86ae85f49436.png) [@system](https://forum.camunda.io/u/system)\
**Post date:** [July 25, 2024, 7:31pm UTC](https://forum.camunda.io/t/get-processinstancekey/51907/5 "2024-07-25T19:31:17Z")

</div>

Closed on July 25, 2024, 7:31pm UTC

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
