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.
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.
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.