BEH_CREATE_MEMBER_ROLES_FROM_ACTIVITY_INSTANCES
This behavior is usable only on a Complete Learning Plan workflow.
Concept
The idea is that when the behavior is executed from the Complete Learning Plan Workflow, it will search the learning plan instance for activity instances that represent an applicant’s desire to add new (or update existing) member roles to their profile. The activity instances may collect data that will then be transferred to the newly created (or updated) member roles. If the role is a multi-instance role, you may have more than one activity instance on the learning plan instance and it will create (or update) a member role for each of the activity instances that match the behavior’s parameters.
Parameters:
Do not fill out the source attribute ('with' field in the above screen shot). This behavior is entirely manipulated using the “Tag” field, which is the second field ('and with' field) on the behavior screen.
It (the ‘and with’ field) requires JSON as its input in the following form:
{"ActivityType": "<name>", "RoleName": "<name>", "LabelAttributeName": "<name>"}
The ActivityType is the TITLE of the Activity Type. The RoleName field is expecting the DISPLAY_NAME of the Role, and the LabelAttributeName field is expecting the NAME of the attribute you wish to use.
Given these pieces of information, the procedure will:
Find all activity instances on the Learning Plan Instance that match the Activity Type defined in the JSON
For each of those activity instances, create a (or update an existing) Member Role on the member that owns the Learning Plan Instance’s profile, of the Role defined in Role Name.
If there are more than one matching activity instances, the Role must support multiple instances, and the Label Attribute Name must refer to an attribute that is filled out on the Activity Instance matched. This is because a multiple instance member role requires a label to disambiguate it.
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 attribute will be copied to the member role attribute.
Special Attributes
If the Activity Instance entity contains one or more attributes with the following parameters:
Attribute Name (not display label): “Mapped Member Role - Begin Date” that has a value of something that can be parsed to a datetime
Attribute Name (not display label): “Mapped Member Role - End Date” that has a value of something that can be parsed to a datetime
Attribute Name (not display label): “Mapped Member Role - Status” that has a value of something that is a valid value on a CUSTOM_LIST_ITEM on the CUSTOM_LIST defined as the Role’s status list.
Then that value will be copied into the following INTRINSIC fields on the Member Role during create or update:
Mapped Member Role - Begin Date => BEGIN_DATE
Mapped Member Role - End Date => END_DATE
Mapped Member Role - Status => STATUS_ID