Work Item Action Interceptor Framework

 Lets you easily run custom Java code (via Hooks), before Polarion saves/deletes a Work Item, Plan or Test Run.


This Polarion extension lets you easily run custom Java code (via Hooks), before Polarion saves/deletes a Work Item, Plan or Test Run.

It is a powerful way to interact with or interrupt these actions when you need to.

Example: A Hook can be implemented that checks all possible conditions when a user is about to delete or modify a Work Item. These Hooks can harness all the capabilities  found within Polarion's Java API.



  • A .jar file must contain a META-INF folder with the  hivemodule.xml and MANIFEST.MF files copied from the project.
  • Due to an issue with Eclipse,  you may need to add these files manually to replace the versions that are generated automatically.



  • To install the extension just copy its files to the Polarion extensions folder.  
  • Hooks can be added at any time by copying .jar files to the extension's hooks subfolder. 
  • If a Hook is added while Polarion is running, the management page can be used to reload the Hooks.
    (See below for details.)


Folder Structure
  |- actions_interceptor
     |- eclipse
       |- plugins
          |- com.adva.polarion.interceptor.jar
          |- META-INF
             |- MANIFEST.MF
          |- hooks
             |- only_assignee_can_delete.jar
             |- title_length_check.jar
             |- plan_save.jar
             |- single_assignee.jar
             |- testrun.jar

Interceptor Management Page
Users control what the extension does through a Wiki Page by invoking the following in a Velocity script:

On any Wiki Page you can:

  • Reload Hooks 
    • Edit the Hook .jars. (Add, delete, replace or edit while the Polarion server is running.)
    • When triggered, the extension will use the most recent version of a Hook's code.
  • Reload Properties 
    • You can update and reload the extension's properties file. (
  • Control Extension Functions 
    • You can enable\disable interceptions for actions.
    • If the extension is disabled, no Hooks will be invoked.
  • Request a List of Loaded Hooks  
  • Request the Currently Set Properties


A sample of the Interceptor Management Page is in the following extension archive file:


A Hook is a Java class that implements a special interface (IActionHook) that's stored as a separate .jar file in the hooks folder. The Jar Manifest file must contain the  Main-Class attribute.

The extension archive already contains several sample Hooks (with sources and the Eclipse project file) to help you easily build your own.

  • ControlTitleLengthHook
    • Makes sure the length for the Title field does not exceed a defined number of characters.
  • OnlyAssigneeCanDeleteHook
    • Makes sure that only the current Assignee can delete a Work Item.
    • Hook archives (folder samples) also contain an Ant file for creating a delivery jar. (Ant Release)
    • Note: Because this Hook modifies the Work Item, a special "polarion" user must have write permissions in the current project.
  • PlanSaveHook
    • Adds all Work Items added to child Plans to their parent Plan.
  • SingleAssigneeHook
    • It only allows a single Assignee to be assigned a Work Item.
  • TestRunHook
    • Makes sure that a Test Case result is not set to "Passed" if one of the Test Step results has "Failed".


WARNING: Do not forget to modify the file (in the extension's root folder) to activate the Hooks for your projects. (See details in the Hooks section of the README.TXT file.)


What's New in Version 3.0.4

Updated January 2023

Version 3.0.4 (by Kevin Schmiechen)
- Fixed compatibility with Polarion 22 R2 logger
- Fixed issue where the save hooks were used for delete actions

Version 3.0.3
- Propagation of properties from the file to Hooks.
- Support for processing Test Runs deletions.
- Support for Test Run modification intercepting.
- Support for Plans modification intercepting.
- Support for Java 11 (Polarion 2019 GA - 3.19.0 - and newer)
- No longer uses dataService during the initialization. (System may return an exception.)
- Fixed a "Cannot set property 'i' of undefined" error when updating derived Documents.  



Vendor Alexey Andrianov (ADVA Optical Networking SE)
Published Version 3.0.4 - January 2023
Price Free
Community Supported Extension This extension is not supported by Siemens PLM.
Requirements Polarion 20 R1 (3.20.1) and newer

Last tested with Polarion 22 R2 (3.22.2)

Related Extensions