Notify when package is Installed

Hi All,

Is there any builtIn service or a way to check if a package was installed on IS and the UserID who has installed it?

I am trying to develop a service which will notify the users when some one
installs a package on the integration server.

Thanks & Regards,

If a package is installed/re-loaded you can see it on server log but not sure about the user details who installed it/loaded it… :slight_smile:

Hi Shiva,

You can check whether a package is installed or not by calling wm.server.packages:getPackageStatus with the package name as input.

If you want to monitor the environment and check for users installing the packages, then you have to increase the audit level.

Can put a script which records the package name, some keywords and user info and mail.

Let me know if this is useful.

Namit Verma

Thanks Guys :slight_smile:

My requirement was some thing like, every time a package installed on IS that should trigger a service or as Namit said a Script which should record the package name and User info who has done the installation and send a mail.
I guess a Unix script is the best option rather than a flow service??

I am not that good with Unix scripts, can you provide any code samples(Script) which is helpfull in this case.

Thanks & Regards,

Create a Dsp page which allows users to install package , map it to a service which captures those details in a db and triggers a mail to notify

1 Like

Hi Shiva,

May not be a straight-forward solution to your question, but some thoughts on it…

User information can be displayed in the server logs by setting ‘watt.server.auditlog.session’ property in Extended settings to true.

System displays timestamp, session id, server id, user id, ip address and many other details whenever user does something on Integration Server.

Hope this helps you a bit :slight_smile:

Kind regards,

You can use below class in your java service to extract session details at any moment.

Not sure how to trigger a service when a package is installed.


Hi Shiva Kumar,

I think the simplest way is using Journal Event which subscribe log message like “Loading * package” and trigger a specified service(you need use service specification pub.event:journal).

I tried it, but got an error “Found inactive subscription … …”, may caused by fix missing, but you could try.

Hope it helps

Sorry, this way won’t get user information, there is another way:

  1. Create a java service which extract user information from InvokeState
  2. Create a flow service, in this service invoke the java service in step 1 and do whatever you need (for example logging or email), then invoke wm.server.packages:packageInstall
  3. Modify package-inbound.dsp under \packages\WmRoot\pub, change wm.server.packages:packageInstall to the flow service in step 2

Then anyone try to install package from DSP page will notify you first, don’t forget backup DSP before you modify it.

P.S. in step 2, you could also first invoke wm.server.packages:packageInstall, then decide what to do based on the installation result. Even you can’t see the output signature, an integer output named “installcode” and a string output named “message” exist.
For installcode, there are 7 different values:
0 = install success
1 = package no exist
2 = package version mismatch
3 = jvm version lower
4 = target version higher
5 = install fail
6 = install success but target exist
If install fail you could find reason in message output.