Update of a property that has dependencies

The new case is displayed with the property values that are returned by the IBM® Business Automation Workflow REST protocol. The case worker then edits the values as needed. If the case worker changes the value of a property that has dependent properties, another call is made to the external data service to update the values of the dependent properties.

The following steps show the flow of data when a case worker updates properties for a new case of type DH2_MyCase:
  1. The user selects a value for the State property on which the City property depends.
  2. Case Client calls the POST method of the particular case type resource to submit the value to the IBM Business Automation Workflow REST protocol. The request payload includes the working property values, including the value that is selected for the State property:
    POST /CaseManager/CASEREST/v1/casetype/DH2_MyCase
    {
      "TargetObjectStore": "CMTOSDH", 
      "ExternalDataIdentifier": "-1,0", 
      "Properties": [
    
        // Properties not related to external data
    
        {
          "SymbolicName": "CmAcmCaseIdentifier", 
          "Value": null
        }, 
        {
          "SymbolicName": "CmAcmCaseState", 
          "Value": 0
        }, 
    
        // ...
    
        {
          "SymbolicName": "DH2_State", 
          "Value": "CA"
        }, 
        {
          "SymbolicName": "DH2_PropOne", 
          "Value": null
        }, 
        {
          "SymbolicName": "DH2_City", 
          "Value": null
        }, 
        {
          "SymbolicName": "DH2_MVInt", 
          "Value": [
            0, 
            100
          ]
        }, 
        {
          "SymbolicName": "DH2_MVString", 
          "Value": [ ]
        }
      ]
    }
  3. The IBM Business Automation Workflow REST protocol passes the values to the external data service by calling the POST method for the particular object type resource:
    POST /testservice/ICMEDREST/type/DH2_MyCase
    {
      "repositoryId": "CMTOSDH", 
      "requestMode": "inProgressChanges", 
      "externalDataIdentifier": "-1,0", 
      "properties": [
    
        // Non-external data related properties
    
        {
          "symbolicName": "CmAcmCaseIdentifier", 
          "value": null
        }, 
        {
          "symbolicName": "CmAcmCaseState", 
          "value": 0
        }, 
    
        // ...
    
        {
          "symbolicName": "DH2_State", 
          "value": "CA"
        }, 
        {
          "symbolicName": "DH2_PropOne", 
          "value": null
        }, 
        {
          "symbolicName": "DH2_MVInt", 
          "value": [
            0, 
            100
          ]
        }, 
        {
          "symbolicName": "DH2_MVString", 
          "value": [ ]
        }, 
        {
          "symbolicName": "DH2_City", 
          "value": null
        }
      ]
    }
  4. The external data service responds with the choice list options for the City property based on the selected state. The response also includes an updated value for the external data identifier:
    {
      "externalDataIdentifier": "1,0", 
      "properties": [
        {
          "symbolicName": "DH2_City", 
          "hidden": false, 
          "required": true, 
          "hasDependentProperties": false, 
          "choiceList": {
            "displayName": "CityChoiceList", 
            "choices": [
              {
                "displayName": "Los Angeles", 
                "value": "Los Angeles"
              }, 
              {
                "displayName": "San Diego", 
                "value": "San Diego"
              }, 
              {
                "displayName": "San Francisco", 
                "value": "San Francisco"
              }
            ]
          }
        }
      ]
    }
  5. The IBM Business Automation Workflow REST protocol merges the changes from the external data service into the working values for the case and returns the updated values to the Case Client:
    {
      "Properties": [
        {
          "SymbolicName": "DH2_City", 
          "DisplayName": "City", 
          "Value": null, 
          "DisplayMode": "readwrite", 
          "Description": "City where home office is located", 
          "PropertyType": "string", 
          "Cardinality": "single", 
          "Updatability": "readwrite", 
          "Required": true, 
          "Queryable": true, 
          "Orderable": true, 
          "Hidden": false, 
          "Inherited": false, 
          "DefaultValue": null, 
          "MaxLength": 64, 
          "ChoiceList": {
            "DisplayName": "CityChoiceList", 
            "Choices": [
              {
                "ChoiceName": "Los Angeles", 
                "Value": "Los Angeles"
              }, 
              {
                "ChoiceName": "San Diego", 
                "Value": "San Diego"
              }, 
              {
                "ChoiceName": "San Francisco", 
                "Value": "San Francisco"
              }
            ]
          }, 
          "HasDependentProperties": false
        }
      ], 
      "CaseType": "DH2_MyCase", 
      "ExternalDataIdentifier": "1,0"
    }