# SubmitJobsOnLifecycleTransition This event script is intended to be used in combination with the [powerJobs Settings Dialog]() to configure automatic queueing of jobs based on certain lifecycle transitions and filter conditions. :::{admonition} Requires powerJobs Processor :class: warning The **SubmitJobsOnLifecycleTransition** event script relies on the configuration from the Job Triggers section of the [powerJobs Settings Dialog]() to work properly. This requires minimum version of powerJobs Processor [23.0.1]() ::: The user performing the action must have the _Vault Get Options_ permission to retrieve the trigger settings configured with the powerJobs Settings Dialog. This script makes use of the following events: * [UpdateFileStates]() event which is triggered when the lifecycle state of a **File** changes * [UpdateItemStates]() event which is triggered when the lifecycle state of an **Item** changes * [UpdateChangeOrderState]() event which is triggered when the lifecycle state of a **Change Order** changes * [UpdateCustomEntityStates]() event which is triggered when the lifecycle state of a **Custom Object** changes The script registers **Post Event** handlers for every above mentioned event and **queues the configured job** if an entity matches all of the following conditions: * The 'update status' operation was successful * One or more of the affected entities transitioned to a configured lifecycle state * All of the configured filters match for an entity * If the powerJobs Processor *Sample.CreateDXF&STEPfromSheetmetal* job is configured to be queued, additional checks are performed. The Vault environment must be [configured]() correctly for the event script be able to determine the document type. ## Testing The script can be tested by performing the following steps: 1. Open the Vault Client, open the powerJobs Settings Dialog and navigate to the [Job Triggers]() section of the dialog. Configure a job to be queued on a lifecycle transition. 2. Navigate to an entity of the selected type (e.g. file) 3. Change the Lifecycle State to the configured state 4. Open the Job Queue 5. The Job Queue contains a configured job for the changed file with the set description and priority Out of the box the event script is **enabled**.\ When the script is not used it can by disabled by moving it to the *%PROGRAMDATA%\\coolOrange\\powerEvents\\Events\\Disabled* folder.