Move expired work permits
- Last UpdatedSep 24, 2024
- 5 minute read
Automatically moving expired work permits to another state
You can configure so that work permits in a certain state that have expired (exceed their To and From validity dates) are automatically moved to another state.
This behavior is configured per site.
Examples
These are example scenarios; however you can configure the business rules to execute on the statuses you select.
|
Status |
Scenario |
Job |
|---|---|---|
|
New |
Work Permits in New status that have past their validity date. The Valid to date has expired, so the work permits are no longer valid and will not be used. They should be moved to Cancelled state. |
WPMOVETOCANCELLED |
|
Inactive |
Work Permits in Inactive status that have past their validity date. The Valid to date has expired, so the work permits have expired and will not be used. They should be moved to Completed state. |
WPMOVETOCOMPLETED |
|
Active |
Work Permits in Active status that have past their validity date. The Valid to date has expired, so the work permits have expired. They should be moved to Expired state. |
WPMOVETOEXPIRED |
|
Completed |
Work Permits in Completed status that have past their validity date. The Valid to date has expired. Since the work permits are completed, they should be moved to the end state of Closed. |
WPMOVETOCLOSED |
Configuration
The configuration has three required steps.
1. Configuration on the statuses
Enable specific business rules on each individual status. See Accessing business rules for an entity.

2. Configure Site settings
Open the Site configuration window and enable the site settings. See Configure site settings.

Set the amount of time to wait before the job executes (buffer time) on the Configure settings for site window.

3. Activate the jobs
Open the Job Schedule window and configure execution dates. Activate the jobs. See Scheduling a job.

Conditions regarding site settings for these jobs
-
If site setting is empty (not set) then no permits for the site will be moved.
-
Setting must have a value between 0 to 48 which indicates number of hours.
-
Work permit field "Valid to" (date) with added additional hours (from setting) will be compared against current time for the site (using UTC configuration of the site).
-
This value will be used when checking if permit is no longer valid and should be moved.
-
By default, setting will NOT have a value.
-
If value of setting is less than 0 or greater than 48, then recommended value will be used instead.
-
It is not necessary to add a value if corresponding job is not active.
Description of Jobs
Move work permits to Expired status
|
Job name |
WPMOVETOEXPIRED |
|
Purpose |
Move work permits to Expired status. |
|
Description |
The WPMOVETOEXPIRED job will move work permits in certain statuses (configured by customer) to status Expired. Only work permits that is no longer valid (Valid To has expired) will be moved. Cancelled or closed permits will never be moved. |
|
Default execution |
By default, the job will run every one hour. It is recommended that this job should not run more frequently than every 15 minutes. |
|
Business rule |
The business rule Job categorization - WPMOVETOEXPIRED determines what statuses the work permits must be in when job is to move permits to a new status. This is done by apply business rule to relevant statuses. |
|
Site setting |
The site setting named jobworkpermitmovetoexpired that controls whether permits for the site should be moved or not. An empty value means work permits do not move. A value between 0-48 determines the numbers of hours to wait before moving the work permits. Recommended value for this setting is 0 (hours). |
Move work permits to Cancelled status
|
Job name |
WPMOVETOCANCELLED |
|
Purpose |
Move work permits to Cancelled status. |
|
Description |
The WPMOVETOCANCELLED job will move work permits in certain statuses (configured by customer) to status Cancelled. Only work permits that is no longer valid (Valid To has expired) will be moved. Cancelled or closed permits will never be moved. |
|
Default execution |
By default, the job will run once a day. It is recommended that this job should not run more frequently than every 12 hours. |
|
Business rule |
The business rule Job categorization - WPMOVETOCANCELLED determines what statuses the work permits must be in when job is to move permits to a new status. This is done by apply business rule to relevant statuses. The status New will have this business rule added as default. |
|
Site setting |
The site setting named jobworkpermitmovetocancelled controls whether permits for the site should be moved or not. An empty value means work permits do not move. A value between 0-48 determines the numbers of hours to wait before moving the work permits. Recommended value for this setting is 24 (hours). |
Move work permits to Closed status
|
Job name |
WPMOVETOCLOSED |
|
Purpose |
Move work permits to Closed status. |
|
Description |
The WPMOVETOCLOSED job will move work permits in certain statuses (configured by customer) to status Closed. Only work permits that is no longer valid (Valid To has expired) will be moved. Cancelled or closed permits will never be moved. |
|
Default execution |
By default, the job will run once a day. It is recommended that this job should not run more frequently than every 12 hours. |
|
Business rule |
The business rule Job categorization - WPMOVETOCLOSED determines what statuses the work permits must be in when job is to move permits to a new status. This is done by apply business rule to relevant statuses. |
|
Site setting |
The site setting named jobworkpermitmovetoclosed controls whether permits for the site should be moved or not. An empty value means work permits do not move. A value between 0-48 determines the numbers of hours to wait before moving the work permits. Recommended value for this setting is 24 (hours). |
Move work permits to Completed status
|
Job name |
WPMOVETOCOMPLETED |
|
Purpose |
Move work permits to Completed status. |
|
Description |
The WPMOVETOCOMPLETED job will move work permits in certain statuses (configured by customer) to status Completed. Only work permits that are no longer valid (Valid To has expired) will be moved. |
|
Default execution |
By default, the job will run once a day. It is recommended that this job should not run more frequently than every 12 hours. |
|
Business rule |
The business rule Job categorization - WPMOVETOCOMPLETED determines what statuses the work permits must be in when job is to move permits to a new status. This is done by apply business rule to relevant statuses. |
|
Site setting |
The site setting named jobworkpermitmovetocompleted controls whether permits for the site should be moved or not. An empty value means work permits do not move. A value between 0-48 determines the numbers of hours to wait before moving the work permits. Recommended value for this setting is 24 (hours). |