Directly sets Attribute values, bypassing the Workflow Engine.
To perform Actions and Behaviors as well, API/WorkflowInstance/PerformStep
This page is protected from public access. This API is intended for internal use only at this time. There are too many limitations and risk factors for this to be used by external callers without our guidance.
Overview
This is a utility API for updating Workflow Attribute values without going through the Workflow Engine. It was designed so that integrations can update data in LearningBuilder over an HTTP call.
This approach has some trade-offs:
Highly performant
Supports bulk updates in a single API call
Does not enforce Validation Rules
Can not perform Actions or Behaviors
Only supports data types that store a simple value in the
ITEM_ATTRIBUTE_VALUE
table
Only supports Extrinsic Attributes at this time
Can update a Workflow Instance regardless of which Step it is on. (This can be a double-edged sword)
Business rules
Which entities can be updated depends on the Workflow type:
Workflow Type | Rules |
---|---|
Create Activity | The Workflow Instance must be Incomplete. |
Complete Activity | |
Complete Learning Plan | |
Grant Role / Edit Role | The status of the Workflow Instance does not matter. |
Using the API
Calling this API requires an API Key with sufficient permissions.
HTTP Request
Payload is a JSON document submitted via HTTP Post.
This payload can contain multiple Attribute values to update.
[ { "entityType": "LearningPlanInstance", "workflowInstanceId": 42, "reason": "updating status from Nursys", "attrValues": [ { "attrDefId": 123, "value": "some new value" }, { "attrDefId": 456, "value": "another value" }, ] }, { "entityType": "MemberRole", "workflowInstanceId": 48, "reason": "updating status from Nursys", "attrValues": [ { "attrDefId": 555, "value": "some new value" }, { "attrDefId": 543, "value": "another value" }, ] } ]
Field | Description |
---|---|
|
|
| The ID of the Workflow instance.
|
| (optional) text string describing the update |
| An array of attribute values to set. |
| Attribute Definition Id of the attribute to set. Must be a valid Attribute defined for the specified entity type. |
| Value to set. 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. |
HTTP Response
The HTTP response is… (TODO)