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

Bataller García Eric Create_CancelledWorkflowStepFromInstruction added #3195

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

regnosys-prod-user
Copy link
Collaborator

No description provided.

Added the Create_CancelledWorkflowStepFromIntruction function to allow its migration from DRR to CDM
Copy link

netlify bot commented Oct 22, 2024

Deploy Preview for finos-cdm ready!

Name Link
🔨 Latest commit 86372a5
🔍 Latest deploy log https://app.netlify.com/sites/finos-cdm/deploys/6729e2d25679840008d5bd21
😎 Deploy Preview https://deploy-preview-3195--finos-cdm.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@ebataller
Copy link
Contributor

ebataller commented Oct 22, 2024

Business Events - Cancelled workflow step

Background

In CDM, there is the function Create_AcceptedWorkflowStepFromInstruction under cdm.event.workflow:func for creating default accepted workflow steps. This function is currently being used in DRR, along with an analog function for the cancelled workflow steps, Create_CancelledWorkflowStepFromInstruction, which is located in DRR. This contribution adds the Create_CancelledWorkflowStepFromInstruction function from DRR to CDM, since it fits the cdm.event.workflow:func namespace better and allows to have all these workflowStep functions located in a single place in CDM, while also making it available for CDM-only usage if necessary.

What is being released?

Functions

  • Added new Create_CancelledWorkflowStepFromInstruction function.

Review directions

In CDM, select the Textual Browser and inspect each of the changes identified above.

PR: #3195

condition ProposedEventExists: <"The previous step being cancelled must be a proposed step containing an instruction.">
proposedWorkflowStep -> proposedEvent exists

condition CancelledProposedStep: <"The previous step must be a cancel">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this really the previous step? If we're checking our input, "proposedWorkflowStep", then its the instruction and not the previous step, is that correct?
Would the comments thus be better if they said something like "Check the instruction has a proposed event..." and "... is set as a Cancel..."?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi Chris, sorry for the late response. Your description change looks fine to me, it makes this clearer. I will recontribute the changes.

set cancelledWorkflowStep -> previousWorkflowStep: proposedWorkflowStep -> previousWorkflowStep as-key

set cancelledWorkflowStep -> businessEvent: <"Assign the business event corresponding to the workflow step.">
Create_BusinessEvent(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we're cancelling a WorkflowStep, and the WorkflowStep has a proposedEvent in it, as confirmed in an earlier condition, why are we now creating a BusinessEvent? Isn't a BusinessEvent only created as a result of an accepted WorkflowStep?

Here you're checking for the existence of a proposedEvent which implies that the workflow has not completed successfully and there should be no BusinessEvent at this point?

If there is a businessEvent on the WorkflowStep already then I can see the logic in including it on the cancelledWorkflowStep, but I can't see why we would want to create a new BusinessEvent for a cancelled WorkflowStep.

Can you give a bit more detail please in case I am missing something.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, the proposal is fulfilling the requirement to represent that the previous step was accepted by mistake. We use it as previous state to propose a new instruction, in which the cancellation flag is set and it's executed through the proposed function.

Requirement in DRR was to be able to represent an ERROR on previously submitted states.

Updated description of steps for Create_CancelledWorkflowStepFromInstruction
@PayalKhanna
Copy link
Contributor

@chrisisla @ebataller can you please confirm if this PR is ready for release process or is it still under review

@chrisisla
Copy link
Contributor

Hi @PayalKhanna ,
I have an action point from the last CRWG to review the code again in relation to how to handle the cancellation of both accepted and proposed workflowsteps, as this could be a useful enhancement. I have some time set aside later this week to analyse further.
Thanks!
cc: @ebataller

@PayalKhanna
Copy link
Contributor

@chrisisla @ebataller can you please confirm if this PR is ready for release process or is it still under review

@PayalKhanna
Copy link
Contributor

@chrisisla did you get any chance to review this ?

@chrisisla
Copy link
Contributor

Hi @PayalKhanna , I went back to Manuel separately about the function, it is still under review.

@PayalKhanna
Copy link
Contributor

@chrisisla any update on the review of this?

@manel-martos
Copy link
Contributor

@PayalKhanna @chrisisla - still under review, we'll come back to it after holiday season. Contribution needs further refinement to be merged.

@manel-martos manel-martos self-requested a review December 23, 2024 14:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants