-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Update ContentUpdateTask, add SetCorrelationId function #10928
Conversation
Hi @Skrypt ,Can you help review this PR? |
Hi @Skrypt Is there anything wrong with this change? |
src/OrchardCore.Modules/OrchardCore.Contents/Workflows/Activities/CreateContentTask.cs
Show resolved
Hide resolved
@hishamco Done. |
Why the build failed? |
I re-run the jobs, the build is pass |
Not sure I agree with this one, it fixes some scenarios but breaks other ones, e.g. after the execution of a For your scenario we have the oob |
Hi @jtkech ,
I think this operation is a little too subtle, and no one knows it without documentation and without looking at the code In addition, the approval I refer to is not just approval through OC interface, if I want users to approve by email. Some dynamic scripts cannot be executed |
Yes I understand your use case ;) But still not sure that the correlationId should always stay the same for the whole WF execution, particularly after the retrieve content task, maybe an activity option to not override an existing correlationId. Maybe here your signal_url would need to be correlated with the global Anyway I don't want to block your PR, so I will let others triage it. |
I remember that in the signal task if the corrlationID is empty, it creates a new ID instead of using the workflow ID directly. This approval process is just an example. |
@jtkech I will label this as |
There is no signal task, only a signal event, and we can generate a signal url through a
I don't think so, on each Just tried to add just before step 2 a |
Is this something you'd like to revisit any time soon @hyzx86 or should we close? |
You can always still update the correlationId by using different methods as mentioned by @hyzx86 and J-T. Maybe it can potentially break someone's workflow but that's how it is when you do a change in these ... document the change in the release notes. |
@Skrypt , Maybe I can add a script function to this PR |
Yeah, maybe instead of setting it from server side we could have a script that would affect it. That would be non-breaking. |
Now, the CorrelationId value will only be updated if the current workflow's CorrelationId is empty. | ||
|
||
Also added a workflow-scoped script function `setCorrelationId(id:string): void`, that you can use to update the workflow's CorrelationId. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe a friend who is good at English can help me adjust this text.
@Skrypt can you please elaborate on why do you think this needs triage? What should we be mindful of during the triage? |
Waiting on @hyzx86 to know if he implemented what I suggested. If it is done then we need to review/test that code again to make sure it is fine. It can be triaged on next thursday meeting and decided if it will be merged for current release or not. |
Since this is a non-breaking change (right?) why wouldn't we merge if it otherwise looks good? |
Yeah, he seems to have added the method. I'd say, let's merge it. |
OK, please approve, and you @hishamco (since you reviewed previously). |
The
correlationId
with the workflow will be assigned after the content is created (step1)but ,when a content item is created in a workflow using a
Create Content Activity
, thecontentItemId
of the new content overrides thecorrelationId
of the workflow . ( step2)Causes step3 and step4 never to trigger
in step 2