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.
Sorry, this way won’t get user information, there is another way:
Create a java service which extract user information from InvokeState
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
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.