common-domain-model
common-domain-model copied to clipboard
BusinessEvent choice condition update
Issue Summary
In the current CDM model, the representation of a WorkflowStep (cdm.workflow.event.WorkflowStep) includes a condition that is not fully aligned with the approach used for other objects. Specifically, the condition in question is CounterPartyPositionBusinessEventOrBusinessEventChoice.
This condition appears to be designed to ensure that counterpartyPositionBusinessEvent and businessEvent are not both present simultaneously. However, its current structure - as a required choice - needs selecting one of these elements each time WorkflowStep is used.
It has been observed that proposedEvent, which specifies the required inputs for a transition before a business event is fully formed, does not include either counterpartyPositionBusinessEvent or businessEvent. While these fields are not necessary at this stage, their mandatory status results in a validation issue when neither is provided.
Steps to Reproduce
Validation of a workflowStep containing a proposedEvent.
Actual Behaviour
The existance of a proposedEvent without a businessEvent or a counterpartyPositionBusinessEvent is a validation error.
Expected Behaviour
The proposal is to change the choice from required choice between businessEvent and counterpartyPositionBusinessEvent to a required choice between proposedEvent, businessEvent and counterpartyPositionBusinessEvent.
This would require a change in the definition of the elements contained in the workflowStep, as it is assumed that a proposedEvent can be present at the same time as a businessEvent.
Compatibility
This change is not fully backward compatible. While it doesn't invalidate previously correct data instances, it introduces a new required state that consuming systems must be updated to accommodate.
Impact on Valid States:
- Instances containing only
businessEventremain valid - Instances containing only
counterpartyPositionBusinessEventremain valid - A new valid state is introduced: instances containing only
proposedEvent - Instances containing none of these three elements remain invalid (as it's still a required choice)
- New invalid state is introduced: Instances containing more than one of these three elements are invalid
Backward Compatibility:
- Previously valid
WorkflowStepinstances (containing eitherbusinessEventorcounterpartyPositionBusinessEvent) remain structurally valid under the new definition - Systems generating
WorkflowStepdata are not immediately broken, as they can continue creating instances with onlybusinessEventorcounterpartyPositionBusinessEvent. However, they now have the option to generate instances withproposedEvent - Systems that read or process
WorkflowStepdata will be impacted. They must be updated to recognize and correctly handle the new possibility ofproposedEventbeing present instead ofbusinessEventorcounterpartyPositionBusinessEvent. Existing systems expecting only the original two options will likely fail or misinterpret data if they encounter aWorkflowStepcontaining onlyproposedEvent
👍 @lagarciath
Briefly introduced at #3677 . All to review. will present in detail at the next meeting.
@CDM-ReleaseManagement-AP - is this not a CRWG item as WorkflowStep pertains to all events, not just those for derivatives?
No objections raised against in #3752 - @lagarciath to bring up the proposed PR and to be followed up for approval.
Requested to present at CRWG as it is not derivatives specific.
Presented at the CDM Contribution Review Working Group - July 1st, 2025 Moving to “Approved”