Details

    • Type: Sub-task
    • Status: Done/Fixed
    • Priority: Major
    • Resolution: Fixed/Completed
    • Affects Version/s: 4.5
    • Fix Version/s: 4.5
    • Component/s: CiviCase
    • Labels:
      None
    • Sprint:
      Sprint CT1

      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: [

      {name: 'Open Case', max_instances: 1 }

      ,

      {name: 'Medical evaluation'}

      ,
      ...
      ],
      activitySets: [
      {
      name: 'standard_timeline',
      label: 'Standard Timeline',
      timeline: 1,
      activityTypes: [

      {name: 'Open Case', status: 'Completed' }

      ,

      {name: 'Medical evaluation', reference_activity: 'Open Case', reference_offset: 3, reference_select: 'newest ... ] }

      ],
      caseRoles: [

      { name: 'Senior Services Coordinator', creator: 1, manager: 1 }

      ,

      { name: 'Health Services Coordinator' }

      ,

      { 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.

        Attachments

          Activity

            People

            • Assignee:
              kurund Kurund Jalmi
              Reporter:
              timotten Tim Otten
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: