This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

AppData.Instance.RaiseMessage Not Working

Hi, using v7.1.1. I have some scripts running in Process Automation and I'm trying to log some success events and also some failure events written to the job service log.

An example of one of the calls I'm making is:

AppData.Instance.RaiseMessage(MsgSecurity.Warning,"Warning AERole does not exist")

 

The documentation says the following:

You can use the script engine methods RaiseMessage and AppData.Instance.RaiseMessage from within process steps to write output messages to the One Identity Manager Service log file. Use the process component "ScriptComponent" to run the script.

So I think I'm using the correct method but not seeing anything in the job service log. The log level is set appropriately and I can see other entries with the level of "WARN" so I should be able to see my warnings. One thing to note is that I'm running the script from a SendEmail component in the generating condition. The final sentence might indicate that logging will only work if it's called from within a ScriptComponent.

Any ideas why I'm not seeing my messages in the job service log?

  • There is a misunderstanding where and when the generation conditions are calculated.

    They will be calculated at the time when the process will be generated into the queue by the system that triggered the generation.

    For example, let's assume a process is listening to the insert event of an application-role membership (PersonInAERole).

    Now you create a new entry in the table PersonInAERole using the ObjectBrowser or Manager on a client. Then the process generation takes place on the client itself (or on the Application Server if the client is using such a connection). Therefore nothing can be logged into the log of the job service.

    If the entry will be created by a script executed on a job service, you should be able to see the messages in the log. But remember, on the job service that executes the script creating the entry in PersonInAERole.

    Just to explain the difference between RaiseMessage (from ScriptBase) and AppData.Instance.RaiseMessage.

    • RaiseMessage adds the message to Result.Message of the currently running job. You will see the message in the log when the job has finished.
    • AppData.Instance.RaiseMessage adds the message directly to the log.

    HtH