Versions Compared

Key

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

Directly sets Attribute values, bypassing the Workflow Engine. Introduced in 11.0.30.

To perform Actions and Behaviors as well, API/WorkflowInstance/PerformStep

Note

This page is protected from public access. This API API is considered experimental and 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.

This API bypasses the Workflow Engine, which allows it to perform highly performant updates, but at the cost of increased risk of shooting yourself in the foot.

As an experimental API, the schema and feature set may change from release to release. Do not build mission-critical integrations around this API without talking to a senior technical consultant first.

Note

This API only supports non-encrypted Extrinsic Attributes that are flagged as [Importable]. Support for Intrinsic Attributes or encrypted values might be added at a later time Extrinsic Attribute data types that store a single, simple value in the ITEM_ATTRIBUTE_VALUE table. See below for the exact list.

Intrinsic Attributes are not currently supported.

Table of Contents

Overview

...

Pros

Cons

(plus) Highly performant

(minus) Does not perform Actions or Behaviors

(plus) Supports bulk updates in a single API call

(minus) Does not enforce Validation Rules; caller is responsible for ensuring data is valid

(plus) Updates a Workflow Instance regardless of which Step it is on

(minus) Can create issues if Attributes are updated in a way that the Workflow would not allow, and therefore does not account for

(minus) Only supports data types that store a simple value in the ITEM_ATTRIBUTE_VALUE table

(minus) Currently supports Extrinsic Attributes only

Logging

A WORKFLOW_LOG entry is created for each Workflow Instance that is updated by this API, with a WORKFLOW_VALUE_LOG entry for each individual Attribute that is included in the payload.

Since this is not considered a “Workflow operation”, some of the columns in WORKFLOW_LOG contain specific values:

.FROM_STEP_ID = 0
.FROM_STEP_NUMBER = 0
.FROM_STEP_TITLE = “** /SetAttributeValues **”
.TO_STEP_ID = 0
.TO_STEP_NUMBER = 0
.TO_STEP_TITLE = “** /SetAttributeValues **”
.ACTION_ID = 0
.ACTION_TITLE = “** /SetAttributeValues **”
.PERSON_ID = 1 (System user)
.LOGGED_IN_PERSON_ID = 1 (System user)

Supported Entities / Workflow types

The API currently supports Activity, Activity Instance, Learning Plan Instance, Member Role, and Activity Offering Instance Attributes.

Workflow Type

Rules

Create Activity

The Workflow Instance must be Incomplete.

Complete Activity

Complete Learning Plan

Complete Create Offering

Grant Role / Edit Role

The status of the Workflow Instance does not matter. Member Role Attributes can always be updated by this API.

Supported Attribute data types

Info

See also Workflow Attributes for the list of “Importable” data types

  • Activity Lookup

  • Address

  • Boolean

  • Competency Classification (warning) Technically importable, but not actually supported

  • Date

  • Date Time

  • Entity Image

  • Long Text

  • Member

  • Member Role

  • Multi-Select List

  • Numeric

  • PD In Focus Source

  • Pick List

  • Rating

  • Rich Text

  • Short Text

  • Tag List

  • Vimeo Source

Using the API

Calling this API requires an API Key with the SetAttributeValues permission.

...

Code Block
languagejson
[
  {
    "entityTypeAbbr": "AI",
    "wfiId": 42,
    "values": [
      { "attrDefId": 123, "val": "some new value" },
      { "attrDefId": 456, "val": "another value" },
    ]
  },
  {
    "entityTypeAbbr": "MR",
    "wfiId": 48,
    "values": [
      { "attrDefId": 555, "val": "some new value" },
      { "attrDefId": 543, "val": "another value" },
    ]
  }
]
Info

The maximum number of records that can be updated at one time is controlled by /wiki/spaces/DOCS/pages/3699179521

Field

Description

entityTypeAbbr

One of these values:

  • “AD” for Activity

  • “AI” for ActivityInstance

  • “AO” for ActivityOffering

  • “LPI” for LearningPlanInstance

  • “MR” for MemberRole

wfiId

The ID of the Workflow instance.

  • Activity - must point to an Incomplete Create Activity WFI

  • ActivityInstance - must point to an Incomplete Complete Activity WFI

  • ActivityOffering - must point to an Incomplete Create Offering WFI

  • LearningPlanInstance - must point to an Incomplete Complete LP WFI

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

values

An array of attribute values to set.

values[i].attrDefId

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

values[i].val

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.

...