Work Item Action Interceptor Framework

 This extension for Polarion makes it possible to easily run your own Java code (hook) before the system is saving or deleting any Work Items, so you have a powerful possibility to interact with or interrupt these actions for your needs. For example, you may implement a hook for checking any possible conditions when the user may delete or modify WIs. Hooks may use all Polarion Java API facilities.


share this page via facebook share this page via LinkedIn share this page via Twitter share this page via Google+ share this page via email More sharing services

This extension intercepts all Polarion requests for saving or deleting Work Item actions and injects required functionality by invoking available hooks. A “Hook” is just a Java class which is implemented as special interface and stored as jar file in extension subfolder "hooks". Hooks can be added or changed without restarting Polarion, so you may manage hooks (e.g. apply fix) without interrupting users.



For Installing the Interceptor just copy the extension jar to Polarion extensions folder like it works for all other extensions. Hooks can be added at any time just by copying jars to the extension subfolder “hooks”. If a hook is added to the working server, then the extension should be enforced to reload hooks from the managing page. As well it is possible to disable or reload any hook.

Folders structure:


  |- hook_ext




          |- hook.properties

          |- hooks

             |- only_assignee_can_delete.jar

             |- title_length_check.jar


Managing extension

You may interact with the extension functionality via wiki page (invoking workItemActionInterceptorManager by Velocity script). Following functionality is available from the wiki:

·        Reloading hooks.
This makes it possible to change hook’s jars (e.g. add, delete, replace) and enforces reloading the code. After reloading, the extension will use the updated hook’s functionality.

·        Reloading properties.
Enables to update and reload extension properties file (hook.properties).

·        Enable extension functionality.

Supports to enable \ disable interceptions for actions. If the extension is disabled then no hooks will be invoked

·        Requesting loaded properties showing on wiki
A sample of the Interceptor-managing wiki page is available in the extension archive as file manager_page.wiki.




Hook is a Java class implemented special interface (IActionHook) and stored as separate jar file in folder "hooks". The Jar manifest file must contain attribute "Main-Class". The extension archive already contains 2 hooks (with sources and Eclipse project file) so you can easily build your own hooks based on these samples:


1)    ControlTitleLengthHook
Hook checking length for the title field. If it over then defined number of symbols then Polarion shows warning message without saving changes.

2)    OnlyAssigneeCanDeleteHook
Control that only assignee user can delete WI

The Hook archives (folder samples) contains as well a file for creating delivering jar (and release)

Note: if a hook may modify WIs then special user "polarion" should have write permission in the project (access managing)

There is a Polarion extension with similar functionality for JS hooks: FMC Workitem Save. The difference of this extension is that it is offering Java code instead of JS hooks



Vendor Alexey Andrianov (ADVA Optical Networking SE)
Published Version 1.0 - August 2012
Price Free
Unsupported Extension This extension is not supported by Siemens PLM.