Problem
The Milestone Java API class (api/model/Milestone.java) supports three fields that have no corresponding entries in the YAML JSON Schema (schema/src/main/resources/schema/CaseDefinition.yaml) and are not wired in CaseDefinitionYamlMapper:
| Field |
Java API |
YAML Schema |
Mapper |
slaDuration |
Duration via builder |
missing |
not wired |
slaStartFrom |
SlaStartFrom enum (MILESTONE_ACTIVATED, CASE_CREATED) |
missing |
not wired |
entryCriteria |
ExpressionEvaluator via builder |
missing |
not wired — defaults to always-true |
Currently milestone SLA tracking and entry criteria are only configurable via the Java DSL (Milestone.builder().slaDuration(...).slaStartFrom(...).entryCriteria(...)). YAML-defined cases cannot use these features.
Expected YAML
milestones:
- name: approval
condition: '.approved == true'
entryCriteria: '.submitted == true'
slaDuration: PT2H
slaStartFrom: MILESTONE_ACTIVATED
Scope
- Add
slaDuration (ISO-8601 duration string), slaStartFrom (enum: MILESTONE_ACTIVATED | CASE_CREATED), and entryCriteria (JQ string) to the Milestone definition in CaseDefinition.yaml
- Wire the three fields in
CaseDefinitionYamlMapper.convertToApiModel() milestone conversion block
- Add validation:
slaDuration must be positive if present; slaStartFrom defaults to MILESTONE_ACTIVATED
- Add unit tests in
CaseDefinitionYamlMapperTest for the new fields
- Add a YAML example exercising milestone SLA
Problem
The
MilestoneJava API class (api/model/Milestone.java) supports three fields that have no corresponding entries in the YAML JSON Schema (schema/src/main/resources/schema/CaseDefinition.yaml) and are not wired inCaseDefinitionYamlMapper:slaDurationDurationvia builderslaStartFromSlaStartFromenum (MILESTONE_ACTIVATED,CASE_CREATED)entryCriteriaExpressionEvaluatorvia builderCurrently milestone SLA tracking and entry criteria are only configurable via the Java DSL (
Milestone.builder().slaDuration(...).slaStartFrom(...).entryCriteria(...)). YAML-defined cases cannot use these features.Expected YAML
Scope
slaDuration(ISO-8601 duration string),slaStartFrom(enum:MILESTONE_ACTIVATED|CASE_CREATED), andentryCriteria(JQ string) to theMilestonedefinition inCaseDefinition.yamlCaseDefinitionYamlMapper.convertToApiModel()milestone conversion blockslaDurationmust be positive if present;slaStartFromdefaults toMILESTONE_ACTIVATEDCaseDefinitionYamlMapperTestfor the new fields