Skip to content

Commit

Permalink
improve logic
Browse files Browse the repository at this point in the history
  • Loading branch information
Yannan Gao authored and Yannan Gao committed Jun 10, 2024
1 parent 41ccfc0 commit a194ffe
Showing 1 changed file with 27 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -340,4 +340,31 @@ export const validateMilestoningPropertyExpressionChain = (
);
}
}
// we still need to do a loose milestoningState initialization for other cases e.g. the getAllVersion is used
else {
if (
propertyExpression.parametersValues.length === 3 &&
targetStereotype === MILESTONING_STEREOTYPE.BITEMPORAL
) {
queryBuilderState.milestoningState.setProcessingDate(
propertyExpression.parametersValues[1],
);
queryBuilderState.milestoningState.setBusinessDate(
propertyExpression.parametersValues[2],
);
}
if (propertyExpression.parametersValues.length === 2) {
if (targetStereotype === MILESTONING_STEREOTYPE.BUSINESS_TEMPORAL) {
queryBuilderState.milestoningState.setBusinessDate(
propertyExpression.parametersValues[1],
);
} else if (
targetStereotype === MILESTONING_STEREOTYPE.PROCESSING_TEMPORAL
) {
queryBuilderState.milestoningState.setProcessingDate(
propertyExpression.parametersValues[1],
);
}
}
}
};

0 comments on commit a194ffe

Please sign in to comment.