Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
tutorial:adm:notification_-_identity_s_last_contract_is_ending [2019/10/30 13:44]
cirkval [Run the LRT]
tutorial:adm:notification_-_identity_s_last_contract_is_ending [2020/06/19 11:34]
klementm [Set up the Long running task (LRT) with technical identities]
Line 31: Line 31:
   * the date of the end of the user's contract (String only)   * the date of the end of the user's contract (String only)
   * user's manager (full IdmIdentityDto)   * user's manager (full IdmIdentityDto)
 +  * user (full IdmIdentityDto), since Extras 1.7.0
  
 ===== Configure topics ===== ===== Configure topics =====
Line 59: Line 60:
 And finally, you can check the box and select whether the user's manager is to be notified as well. Only one manager will receive the notification!   And finally, you can check the box and select whether the user's manager is to be notified as well. Only one manager will receive the notification!  
  
 +===== Set up the Long running task (LRT) with technical identities =====
 +
 +<note important>Technical identities are supported in this task since version 1.9.0 of the extras module.</note>
 +
 +Finally, we can set up the LRT. In the left menu, go to Settings>Task scheduler>Scheduled tasks and click the green button Add. Select the task type LastContractEndNotificationTask and specify the configuration of the LRT.
 +
 +{{ :tutorial:adm:lastcpont1.png?600 |}}
 +
 +You can specify how many days before the contract's end the notification should be sent.
 +
 +<note tip>The notification is sent x days before the end of the contract or sooner. This is useful if for some reason the LRT did not run one day, it will simply be sent the next day.</note>
 +
 +* You can select the role that the recipients of the notification will have assigned. You can only select one so if you need multiple ones, you have defined multiple LRTs.
 +* You can also check the box and select whether the user's manager is to be notified as well. Only one manager will receive the notification!
 +
 +**There is also support for technical identities. There are two options:**
 +
 +* If you provide prefix, then the task will look for username with this prefix (for identity whose contract is going to end). If some are found, then it sends the notification. 
 +* If you select a role in "Code of the role used for technical identities" then it will look if identity with ending contract has some subordinates with this role.
 +
 +<note important>Do not use a combination of these two. Create a new task if both needed!</note>
 +
 +The last option (Send invalid contracts) is if you want to send only valid users or all. The reason for putting this option to this setting is this case: Task did not run a couple of days and some users are already not valid. So it admin can decide if those identities will be sent too.
 ===== Run the long running task (LRT) ===== ===== Run the long running task (LRT) =====
  
 The last thing remaining is to run the LRT using the green arrow button. You can user CRON to plan when the LRT should be run. The last thing remaining is to run the LRT using the green arrow button. You can user CRON to plan when the LRT should be run.
  
-<note important>I highly recommend you turn off sending emails before the first run which will send notification about the end of all contracts in x days.</note>+<note important>I highly recommend you turn off sending emails before the first run which will send notification about the end of all contracts in x days. Alternatively, for the first time you run the LRT, send the notification without recipients.</note>
  
-<note important>Each entity will only be processed once by the LRT. If the notification about the end of a contract was sent before, the same LRT will not send it again.</note>+<note important>Each entity will only be processed once by the LRT. If the notification about the end of a contract was sent before, the same LRT will not send it again.  
 +This is true even if the contract's validity changes (e. g., if the contract is extended after the notification is sent, it will not be sent again.)</note>
  • by kucerar