Azure / Azure/azure-functions-durable-js
Orchestrator Instance ID not accessible from Activity function
- Dominant language
- TypeScript
- Stars
- 142
- Forks
- 66
- Avg merge
- 3d 19h
- Merged PRs (30d)
- 4
Description
**Describe the bug**
I have a process that runs on Durable Functions that consists of a couple of Orchestrators, with some Sub-Orchestrators and a series of Activity functions. Within the Activity functions I am writing to Table storage with any data exceptions that can be used as a report. I'd like to group these reports by specifying the parent Orchestrator's InstanceId as the PartitionKey on the table.
**Investigative information**
- Durable Functions extension version:
- durable-functions npm module version:
- Language (JavaScript/TypeScript) and version: Javascript
- Node.js version: 12
**To Reproduce**
Steps to reproduce the behavior:
1. Set a debugger break point inside a function with an activityTrigger
2. Inspect the context parameter
> While not required, providing your orchestrator's source code in anonymized form is often very helpful when investigating unexpected orchestrator behavior.
**Expected behavior**
Data regarding the calling orderstrator's instanceId and parentInstanceId to be included in the context object, much as it is part of the bindingData for a sub-orchestrator.
**Actual behavior**
Context includes the activity function's invocation ID but nothing related to the parent orchestrator,
**Screenshots**


Contributor guide
Research direction
Start by reproducing the activityTrigger scenario and inspecting the context parameter, then compare it with the sub-orchestrator bindingData shown in the screenshots. Done means the activity context includes the calling orchestrator's instanceId and parentInstanceId, with coverage for the reported behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100