BEH_CREATE_ACTIVITY_INSTANCES_FROM_MEMBER_ROLES

This behavior is usable only on a Complete Learning Plan workflow.

Concept

This is the inverse of https://heuristicsolutions.atlassian.net/wiki/spaces/DOCS/pages/2256896291/BEH+CREATE+MEMBER+ROLES+FROM+ACTIVITY+INSTANCES. It’s purpose is to pre-fill a learning plan instance with an activity instance that represents each member role of a particular type on the learning plan instance owner’s profile.

Parameters:

Do not fill out the source attribute. This behavior is entirely manipulated using the “Tag” field, which is the second field on the behavior screen.

It requires JSON as it’s input with the following form:

{"ActivityNumber": "<name>", "RoleName": "<name>", "LabelAttributeName": "<name>"}

The Activity Number (sometimes called Activity Id) represents a particular activity definition. The Role Name field is expecting the DISPLAY_NAME of the Role, and the Label Attribute Name field is expecting the NAME of the attribute you wish to use.

Given these pieces of information, the procedure will:

  • Find all member roles that the owner of the lpi has that are of type RoleName

  • For each of those member Roles, create an activity instance on the LPI in a task group that is configured to have no search experience and to simply add an activity instance with the definition you defined in the JSON. The new activity instance will be of that definition as well.

  • If there are any extrinsic attributes on both the Member Role and Activity Instance entity that match exactly the name and type, the value from the Activity Instance will be copied to the member role.

  • The following INTRINSIC fields on the role will also be copied to matching EXTRINSIC fields on the Activity Instance.

Special Attributes

If the Activity Instance entity contains one or more attributes with the following parameters:

  • Label (defined in the JSON): The Role Label will be mapped to the attribute you provided in the “LabelAttributeName” parameter of the JSON.

  • Attribute Name (not display label): “Mapped Member Role - Begin Date” is of type DATE

  • Attribute Name (not display label): “Mapped Member Role - End Date” is of type DATE

  • Attribute Name (not display label): “Mapped Member Role - Status” is of type PICKLIST with the source being the same custom list that is used for the role’s status list.

Then that value will be copied into the following INTRINSIC fields on the Member Role during create or update:

  • LABEL => the attribute you indicated in the JSON with the field “LabelAttributeName”

  • BEGIN_DATE => Mapped Member Role - Begin Date

  • END_DATE => Mapped Member Role - End Date

  • STATUS_ID => Mapped Member Role - Status