
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Hello,
I have EPI groovy script what is enriching and modify incoming events.
Code is located under Administration -> Event Processing Customizations -> AFTER CI/ETI RESOLUTION
All is working well except that I do not know how to write code to assign match event to existing user.
In documentation for Event interface there is method called: setAssignedUserId
void setAssignedUserId(UUID assignedUserId)
Sets the user id to which this event is assigned to
How to write code what will assign event to user ‘John’?
Pseudocode may look like:
def process(List<Event> events)
{
events.each {
event ->
event.addAnnotation("Event assigned to user John", "John")
// assign event to user 'John'
// event.setAssignedUserId(XXXX)
}
}
Thanks,
Dusan
Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
You can query users and their IDs via CLI or REST API. You can keep this in cache map which you should initialize in your "init" method.
Check this code snippet for example how to init cache map and refresh it every X seconds: https://docs.microfocus.com/itom/Operations_Bridge_Manager:2020.10/EPIScriptEnrichment

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
You can query users and their IDs via CLI or REST API. You can keep this in cache map which you should initialize in your "init" method.
Check this code snippet for example how to init cache map and refresh it every X seconds: https://docs.microfocus.com/itom/Operations_Bridge_Manager:2020.10/EPIScriptEnrichment

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Hi Asaf,
Thank you. I will look on that code example and implement something similar for user assignment.
Dusan