In this article we will learn how to use one of the K2 blackpearl destination rule – Plan per slot (no destinations).
The K2 blackpearl Plan per slot (no destinations) Destination Rule can be used for activity with server events. K2 User Destinations cannot be configured when plan per slot is used and the server creates one instance per slot. Each instance will have its own activity data fields.
By using Plan per slot and SmartObject event we will update all inactive users as active and send a notification. In the below image we can see there are 3 inactive users in table.
Select Destination Rule for activity and run in advanced mode, select plan per slot (no destinations) and destination rule has two options:
1) Can select number of slots to be created (static)
2) Number of slots will be created based on the number of records returned by the Smartobject List Method (Dynamic)
In our case, we have selected the EmployeeInfo.List.ID list field on the Destination Rule Options page and mapped Active property value as false.
This will create a slot for each inactive users
In Smartobject Update method Map value for ID as ActivityInstanceDestInstanceData and Active as true.
This will update all the Inactive users as active and notify the users.
We can set a Succeeding Rule for activity to check whether all slots of the Activity Instance “Active Datafield” is set to True. Once all the instances complete, the succeeding rule executes and thus process moves to completed state.