You are in the middle of a Mbo class and you have to perform some logic only if your piece of code is invoked by a user sitting in front of of Maximo UI.
How would you understand if the Mbo method has been invoked by an interactive user session or by a background process like an escalation, crontask or MIF?
Here is a Java snippet to retrieve this information.
boolean isInteractive = getUserInfo().isInteractive();
Just put it in your Java method and use the isIntercative flag as you want.
Detect if an MBO method has been invoked by an user session or by a background process
Hi Bruno,
I'm trying to use it in automation script. First question, can it be used using jython ?
Second question, if yes, I have written script where I want to send automatic notification if the data is being modified by Integration and not by any user.
But it is not sending mail. I put condition like
if(isInteractive=='N'):
send the mail.
But it is not going inside the if means it is taking it as Y.
Can you please help me with this.
Thank You.
I got it. I did like
if not(isInteractive):
send mail.
isInteractive gives True or False.
Thanks for informative blogs.