Hello everyone,
I have an object in Insight. It is an object type that has two parents. The object type is called Desktop. There is an object type called Laptop that is in the same level and has the same parents as the object type Desktop.
So, I've set up Insight automation that is trigered on move event, there are no conditions, and the acton is groovy script. It has lines as follows:
def objectTypeCurr=objectTypeFacade.loadObjectTypeBean(object.getObjectTypeId());
log.info("objectTypeCurr?"+objectTypeCurr)
When I move the object from Desktop to Laptop the log says:
2021-11-09 14:37:28,496 [insight-event-3] | Execute Rule action (AutomationRuleGroovyScriptAction): Done, id:80, event [id: 78, iql: No iql, condition: None
2021-11-09 14:37:28,496 [insight-event-3] | Execute Rule action (AutomationRuleGroovyScriptAction), Result: Groovy script (Update Tier categories.groovy) executed.
2021-11-09 14:37:28,168 [insight-event-3] | objectTypeCurr?ObjectTypeBean [id=1210, name=Desktop]
2021-11-09 14:37:28,168 [insight-event-3] | Execute groovy script: \scriptrunner\scripts\insight\Update Tier categories.groovy
2021-11-09 14:37:27,980 [insight-event-3] | GroovyScriptAction, got absFilePath: \scriptrunner\scripts\insight\Update Tier categories.groovy
2021-11-09 14:37:27,980 [insight-event-3] | Execute Rule action (AutomationRuleGroovyScriptAction): Start, id: 80, event [id: 78, iql: No iql], condition: None
2021-11-09 14:37:27,980 [insight-event-3] | Object name: 2, id: 1508224
2021-11-09 14:37:27,980 [insight-event-3] | doAction(), called for event class: InsightObjectMovedEvent
2021-11-09 14:37:27,980 [insight-event-3] | Role Actor configured, and will be run as user with key: robot
2021-11-09 14:37:27,980 [insight-event-3] | Got rule and event for insightObjectAsyncEvent: null, id: 78 - InsightObjectEvent eventType: OBJECT_MOVED, rule id: 40, name: Tier category update with script, isActive true, objectRuleEvent id: 78 and object: 2 (TIAPBIS-1508224)
Sooo... After the move, the object type is still Desktop. Is this a bug? If it is a feature, how do I access the current object type after the move has been completed?
I need the correct object type because I set some other things in motion.
Cheers,
Marina