Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagejson
[
  {
    "entityTypeentity": "LearningPlanInstanceAI",
    "workflowInstanceIdwfiId": 42,
    "reasonvalues": "updating status from Nursys",
    "attrValues": [
      { "attrDefId": 123, "valueval": "some new value" },
      { "attrDefId": 456, "valueval": "another value" },
    ]
  },
  {
    "entityType": "MemberRoleMR",
    "workflowInstanceId": 48,
    "reason": "updating status from Nursys",
    "attrValuesvalues": [
      { "attrDefId": 555, "valueval": "some new value" },
      { "attrDefId": 543, "valueval": "another value" },
    ]
  }
]

Field

Description

entityType

ActivityInstance, LearningPlanInstance, or MemberRole

workflowInstanceIdOne of these values:

  • “AI” for ActivityInstance

  • “LPI” for LearningPlanInstance

  • “MR” for MemberRole

wfiId

The ID of the Workflow instance.

  • ActivityInstance - must point to an Incomplete Complete Activity WFI

  • LearningPlanInstance - must point to an Incomplete Complete LP WFI

  • MemberRole - can point to any Grant Role or Edit Role WFI, regardless of status

reason

(optional) text string describing the update

attrValues

values

An array of attribute values to set.

attrValuesvalues[i].attrDefId

Attribute Definition Id of the attribute to set. Must be a valid Attribute defined for the specified entity type.

attrValuesvalues[i].valueval

Value to set.

Note

No validation or processing is performed on this value.

Take care when using this with data types that handle structured data, as you are responsible for correctly formatting the value in the API call.

...

Code Block
languagejson
{
  "modifiedRecordssuccessCount": 4,
  "validationErrors"errorCount": 5,
  "errors": [
    { "entity": "AI", "wfiId": 123, "attrDefId": 42, "error": "some message"  }
  ]
}

Error messages

Error

Reason / How to fix

Attribute Definition #{id} does not exist for entity “{entityType}”

The Attribute Definition Id is not defined for the specified entity type. Check for typos in the payload.

Workflow Instance #{id} was not found for entity “{entityType}”

The Workflow Instance with ID matching #wfiId was either not found, or was for a different entity type than specified. Check for typos in the payload.

Workflow Instance #{id} is in a terminal state and cannot be updated

Activity, ActivityInstance, LearningPlanInstance, and ActivityOffering Attributes can only be updated if wfiId points to a Workflow Instance with “Incomplete” status. Recall the Workflow to an editable step and try again.

An unexpected error occurred while updating the record.

An unspecified error occurred. Try again to check for a temporary or transient issue, but if it continues to fail reach out to support for assistance.