API/WorkflowInstance/PerformStep
API equivalent of submitting a Workflow Popup via the UI.
Updates Attribute data for a Workflow Instance and triggers a specific Workflow Action.
Overview
Workflows are one of the core elements in LearningBuilder. They represent multi-step process that create and populate various entities (LearningPlanInstances
, ActivityInstances
, etc) with data.
Each Workflow-enabled entity has a WorkflowInstance
that tracks its progress through its configured process.
This API is the equivalent of submitting a Workflow Popup via the UI. It allows you to:
Update the values for the Attributes that are editable on the current Workflow Step
Trigger one of the Workflow Actions configured on the current Workflow Step
This API is concerned with the data structure itself but not the presentation layer, so it does not care about Workflow Sections
Calling the API
Authentication
Requires an API Key with the PERFORM_WORKFLOW_STEP
permission, and the user owning the key must have access to the Workflow on its current Step.
Request
POST /API/WorkflowInstance/PerformStep
{
"WorkflowInstanceId": <int>,
"ActionId": <int>,
"ActionName": <string>,
"Attributes": [
{ "Name": <string>, "Value": <string> },
{ "Id": <int>, "Value": <string> },
...
],
"IgnoreWarningActionId": <int>
}
JSON Parameter | Description |
---|---|
| Required: The ID of the |
| Required: Identifier for the Workflow Action to trigger. Must exist on the Current Step of the You must provide one of these values, but not both. |
| Optional: An array of Attribute values to save. Each item in the array has these properties:
|
| Optional: The ID of the Workflow Action to trigger while ignoring warnings |
Response
If successful:
{
"success": true,
"AdditionalInformation": { ... }
}
If unsuccessful:
{
"success": false,
"errors": [array of strings],
"showIgnore": <bool>,
"actionName": <string>,
"actionId": <int>
}
Error Messages
Error Message | Cause Of Error Message | How To Resolve Error Message |
---|---|---|
ActionId or ActionName are required | The parameter string of the API call did not contain an ActionId or an ActionName parameter and value | Resubmit the API call, and submit either an ActionId or ActionName parameter and value. |
Only one of ActionId or ActionName should be specified, not both. | The parameter string of the API call contained both a an ActionId or ActionName parameter and value | Resubmit the API call, and submit either an ActionId or ActionName parameter and value. |
Attribute ID or Attribute Name should be specified, not both. | The collection of Attributes contained a combination of Attribute IDs and Attribute names | Resubmit the API call and ensure the all attributes in the attribute collection contain either AttributeID or AttributeName parameters |
Attribute ID or Attribute Name are required for every attribute. | The collection of Attributes contained one or more attribute values without an Attribute IDs or Attribute names; Alternately, the Values provided for the attributes were not correctly escaped. | Resubmit the API call and ensure all attributes in the attribute collection have Attribute IDs or Attribute Names; Ensure that all Attribute values are correctly escaped. |
Workflow Step Action# <ActionID> was not found | The Workflow Instance specified is not on a step where the ActionId/ActionName specified exists. | Ensure the Workflow Instance is on the intended Workflow Step, ensure that the ActionId/ActionName on the intended workflow step matches the API call. <If an action button is deleted and recreated it will have a different Action ID> |