Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make parent InstanceId on suborchestrators #246

Closed
andreujuanc opened this issue Apr 12, 2018 · 5 comments
Closed

Make parent InstanceId on suborchestrators #246

andreujuanc opened this issue Apr 12, 2018 · 5 comments
Labels

Comments

@andreujuanc
Copy link

As per discussed here #153 , looks like it'd help to move forward on some issues if we could get the parent instanceId on suborchestrators.

Right now it can be passed by manually (parameters), but it does not makes sense, and it's not so intuitive. Specially when having the name "SUB"orchestrator, which means that the Parent orchestrator should send relevant info to its children, otherwise it would not be "sub".

Wish I could give ideas on how it'd be implemented, but I'm not yet familiarized with the source.

Cheers

@cgillum
Copy link
Member

cgillum commented Apr 15, 2018

I think it should relatively straight-forward to flow this information.

Specifically, in DurableTaskExtension.OrchestrationMiddleware we can get access to the orchestration runtime state, which contains the parent's instance ID. We can then attach that to the DurableOrchestrationContext so that sub-orchestrations can reference it.

@cgillum cgillum added Enhancement Feature requests. help wanted labels Apr 15, 2018
@cgillum cgillum added this to the General Availability (GA) milestone Apr 15, 2018
@gled4er
Copy link
Collaborator

gled4er commented Apr 16, 2018

Hello @cgillum ,

I can work on this issue. Let me know if this is ok.

Thank you!

@cgillum
Copy link
Member

cgillum commented Apr 16, 2018

Sure! I think you should be able to get the OrchestrationRuntimeState from the middleware context. I was looking through the DurableTask.Core code and I believe that it should have parent orchestration information, including the ID.

@gled4er
Copy link
Collaborator

gled4er commented Apr 16, 2018

Hello @cgillum,

Thank you for the additional information!

@cgillum
Copy link
Member

cgillum commented Apr 16, 2018

This has been merged and I'll include it in today's release. Thanks @gled4er for jumping on this so quickly!

@cgillum cgillum closed this as completed Apr 16, 2018
@cgillum cgillum removed this from the General Availability (GA) milestone Apr 16, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants