Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
devel:documentation:application_configuration:dev:scheduled_tasks:task-scheduler [2019/11/22 08:33] tomiskar |
devel:documentation:application_configuration:dev:scheduled_tasks:task-scheduler [2021/02/22 20:38] (current) apeterova generate initiliazation vector |
||
---|---|---|---|
Line 1: | Line 1: | ||
====== Tasks scheduler ====== | ====== Tasks scheduler ====== | ||
- | {{tag> scheduler}} | + | {{tag> scheduler |
The task can be scheduled in three different ways - types of '' | The task can be scheduled in three different ways - types of '' | ||
Line 31: | Line 31: | ||
=== Configuration QUARTZ (datasource, | === Configuration QUARTZ (datasource, | ||
- | Configuration of QUARTZ (scheduler) it is using application properties by individual profiles. In every profile application properties is necessary set path for queart's settings (his own application properties) - '' | + | Configuration of QUARTZ (scheduler) it is using application properties by individual profiles. In every profile application properties is necessary set path for quartz's settings (his own application properties) - '' |
==== Example ==== | ==== Example ==== | ||
- | Example of an implementing task - you will find everything that has been mentioned [[https:// | + | Example of an implementing task - you will find everything that has been mentioned [[https:// |
===== Stateful task executors ===== | ===== Stateful task executors ===== | ||
Line 59: | Line 59: | ||
* '' | * '' | ||
* '' | * '' | ||
+ | * '' | ||
+ | |||
+ | <note warning> | ||
+ | |||
+ | ===== Recoverable tasks ===== | ||
+ | |||
+ | @since 10.2.0 | ||
+ | |||
+ | Task can be executed repetitively without reschedule is needed. When task is canceled (e.g. by server is restarted), then task can be executed again (~recovered) directly from long running task agenda. New task will be created and executed with the same configuration as original task. **When task** is stateful and **supports queue**, then **already processed items will not be processed again**. | ||
+ | |||
+ | |||
+ | < | ||
+ | |||
+ | <note important> | ||
+ | |||
+ | {{ : | ||
+ | |||
- | <note warning> | ||
===== Implemented task types ===== | ===== Implemented task types ===== | ||
- | Implemented long running task are listed | + | Implemented long running task are listed |
==== PasswordExpirationWarningTaskExecutor ==== | ==== PasswordExpirationWarningTaskExecutor ==== | ||
Line 78: | Line 94: | ||
==== AccountProtectionExpirationTaskExecutor ==== | ==== AccountProtectionExpirationTaskExecutor ==== | ||
- | Removes accounts with expired protection interval. Account has to have '' | + | Removes accounts with expired protection interval. Account has to have '' |
==== RetryProvisioningTaskExecutor ==== | ==== RetryProvisioningTaskExecutor ==== | ||
Line 103: | Line 119: | ||
* ``Synchronization uuid`` - synchronization configuration to schedule. | * ``Synchronization uuid`` - synchronization configuration to schedule. | ||
- | ==== AddNewAutomaticRoleTaskExecutor ==== | + | ==== <del>AddNewAutomaticRoleTaskExecutor</ |
+ | |||
+ | @deprecated since 10.4.0 - '' | ||
Long running task for add newly added automatic role to users. Can be executed repetitively to assign role to unprocessed identities, after process was stopped or interrupted (e.g. by server restart). | Long running task for add newly added automatic role to users. Can be executed repetitively to assign role to unprocessed identities, after process was stopped or interrupted (e.g. by server restart). | ||
Line 116: | Line 134: | ||
=== Parameters === | === Parameters === | ||
* ``roleTreeNode`` - automatic role identifier. | * ``roleTreeNode`` - automatic role identifier. | ||
+ | |||
+ | ==== ProcessAutomaticRoleByTreeTaskExecutor ==== | ||
+ | |||
+ | @since 10.4.0 | ||
+ | |||
+ | Recalculate automatic role by tree structure for contracts and positions. Recalculate roles for identities with contract or other position match selected automatic role by tree structure. Can be executed repetitively to assign role to unprocessed identities, after process was stopped or interrupted (e.g. by server restart). | ||
+ | |||
+ | === Parameters === | ||
+ | * ``roletreenode`` - automatic roles by tree structure to recount. | ||
+ | |||
+ | ==== ProcessAllAutomaticRoleByTreeTaskExecutor ==== | ||
+ | |||
+ | @since 10.4.0 | ||
+ | |||
+ | Recalculate all automatic roles by tree structure for contracts and positions. Recalculate all roles for identities with contract or other position assigned by automatic role by tree structure. Can be executed repetitively to assign role to unprocessed identities, after process was stopped or interrupted (e.g. by server restart). | ||
+ | |||
+ | ==== ProcessSkippedAutomaticRoleByTreeTaskExecutor ==== | ||
+ | |||
+ | @since 10.4.0 | ||
+ | |||
+ | Recalculate skipped automatic role by tree structure. Recalculate automatic roles by tree structure, which were not processed (skipped) after tree structure was changed (e.g. from synchronization). | ||
+ | |||
+ | ==== ProcessSkippedAutomaticRoleByTreeForContractTaskExecutor ==== | ||
+ | |||
+ | @since 10.4.0 | ||
+ | |||
+ | Recalculate skipped automatic role by tree structure for contracts and other positions. Recalculate automatic roles by tree structure for contracts and other positions, which were not processed (skipped) after work position was changed (e.g. from synchronization). | ||
==== AddNewRoleCompositionTaskExecutor ==== | ==== AddNewRoleCompositionTaskExecutor ==== | ||
Line 177: | Line 222: | ||
@since 8.2.0 | @since 8.2.0 | ||
- | Change key for crypt confidential storage. | + | Change key for crypt confidential storage. |
+ | |||
+ | |||
+ | ==== GenerateConfidentialStorageInitializationVectorsTaskExecutor ==== | ||
+ | |||
+ | @since 10.8.0 | ||
+ | |||
+ | The task processes every value in the confidential storage, generates a new initialization vector and encrypts the value using this new initialization vector. | ||
+ | See the [[devel: | ||
==== RemoveOldLogsTaskExecutor ==== | ==== RemoveOldLogsTaskExecutor ==== | ||
Line 203: | Line 257: | ||
DELETE FROM sys_provisioning_archive WHERE created < now() - INTERVAL '90 day'; | DELETE FROM sys_provisioning_archive WHERE created < now() - INTERVAL '90 day'; | ||
-- Delete attributes | -- Delete attributes | ||
- | DELETE FROM sys_provisioning_attribute WHERE provisioning_id | + | DELETE FROM sys_provisioning_attribute |
</ | </ | ||
Line 210: | Line 264: | ||
@since 9.7.0 | @since 9.7.0 | ||
- | Delete | + | Delete |
=== Parameters === | === Parameters === | ||
* ``Number of days`` - Delete events older than given number of days. | * ``Number of days`` - Delete events older than given number of days. | ||
+ | |||
+ | <code sql> | ||
+ | -- PostgreSql | ||
+ | -- Delete events older then 3 days | ||
+ | delete from idm_entity_event where result_state=' | ||
+ | vacuum full idm_entity_event; | ||
+ | </ | ||
==== DeleteLongRunningTaskExecutor==== | ==== DeleteLongRunningTaskExecutor==== | ||
Line 291: | Line 352: | ||
* ``Workflow definition`` - Delete historic workflow processes with this definition only. | * ``Workflow definition`` - Delete historic workflow processes with this definition only. | ||
+ | ==== VsSystemGeneratorTaskExecutor ==== | ||
+ | |||
+ | @since 10.4.0 | ||
+ | |||
+ | Task generates given number of virtual systems, roles and identities. All generated entities are evenly distributed among themselves. I.e. Roles assigned to users and connected to generated systems. Task serves for generating required scenario and following performance test. | ||
+ | |||
+ | === Parameters === | ||
+ | * ``Item prefix`` - A name prefix of all generated entities. Serves for easier searching of entities in IdM. | ||
+ | * ``System count`` - Number of generated virtual systems. | ||
+ | * ``Role count`` - Number of generated roles. | ||
+ | * ``User count`` - Number of generated identities. | ||
===== Testing tips ===== | ===== Testing tips ===== | ||
Line 306: | Line 378: | ||
* Support for the check of the competition of the running tasks. Now it is on the task implementation to check if it should be run or not. This could be extracted to the general. | * Support for the check of the competition of the running tasks. Now it is on the task implementation to check if it should be run or not. This could be extracted to the general. | ||
- | | + | * Display of the scheduled triggers in the detail of the scheduled job. |
- | | + | * Recover canceled task by server is restarted automatically. |