Details
Description
The CaseType.get and CaseType.create APIs should be able to return/save the case definition. From the API perspective, this is a nested array. (In the DB, the nested array should be saved as XML. In REST, the nested array can be JSON.) The structure we mocked up for the array is included below.
{
id: 123,
label: 'Adult Day Care Referral',
description: '',
definition: { // This is the serialized field
name: 'Adult Day Care Referral',
activityTypes: [
,
,
...
],
activitySets: [
{
name: 'standard_timeline',
label: 'Standard Timeline',
timeline: 1,
activityTypes: [
,
{name: 'Medical evaluation', reference_activity: 'Open Case', reference_offset: 3, reference_select: 'newest ... ] } ],
caseRoles: [
,
,
{ name: 'Benefits Specialist' } ]
}
}
Some key points:
- The "XML" content is embedded as part of the "definition" field
- The XML uses tags like <ActivitySets>/<ActivitySet> or <ActivityTypes>/<ActivityType>. This uses a property "activitySets" with an array.