Skip to main content

Case types

jcm/case-types/case.appeal.yml, the start of the sample's (a JSON Schema for the file ships with jcm-core at com/jcm/core/jcm-schema.json; point the IDE at it for validation):

code: case.appeal # stable identifier, required; the file name
entity: Appeal # Jmix entity name, required
label: Appeal # optional, defaults to the entity name
label-plural: Appeals # optional, defaults to the label with an "s"; the menu item and the case list
number-format: "APL-{year}-{seq}" # optional, default "{seq}"; {seq} is zero-padded to six digits

Its entities' model files (Data model, below), its role files (Data roles) and this file are all a case type needs: with jcm-screen installed it gets its case screen, list, menu item and child forms (see Case screen). entity: names a Jmix entity whichever way it was made, so a case type over an entity written in Java (one the model cannot express yet, or an app not yet moved to model files, as sample-appeals is) binds the same way. Besides the general refusals above, startup stops with a message naming the file, the code and the entity when an entity does not exist or is bound twice.