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

When using pipeline simulation, entities created from plugin step doesnt get an Id #162

Open
reager opened this issue Sep 22, 2024 · 1 comment

Comments

@reager
Copy link

reager commented Sep 22, 2024

I'm trying out your library and really likes it. One thing that I got stuck on right now is when using Pipeline simulation and a record is created from a plugin step, there are no Id assigned to the created record.

I did a quick and dirty fix in ProcessPipelineRequest before ProcessPostOperation, which made my plugins trigger and run as I wanted. Not familiar enough with your code to know if this is the correct/best way to solve this, but I'm happy for now :)

if (pipelineParameters.Request.IsCreateRequest())
{
var target = pipelineParameters.Request.Parameters["Target"] as Entity;

if (target.Id == Guid.Empty)
{
    target.Id = Guid.NewGuid();

    context.AddEntity(target);
}

}

@jordimontana82
Copy link
Contributor

jordimontana82 commented Nov 11, 2024

Thanks Daniel, the Id should be really generated by the response of the Create message and then passed into the pipeline as an output parameter. Let me revisit this and get back to you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants