You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@unomi.apache.org by "Kevan Jahanshahi (Jira)" <ji...@apache.org> on 2022/06/21 07:44:00 UTC
[jira] [Resolved] (UNOMI-597) Clean up event target from non necessary objects
[ https://issues.apache.org/jira/browse/UNOMI-597?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Kevan Jahanshahi resolved UNOMI-597.
------------------------------------
Resolution: Fixed
> Clean up event target from non necessary objects
> ------------------------------------------------
>
> Key: UNOMI-597
> URL: https://issues.apache.org/jira/browse/UNOMI-597
> Project: Apache Unomi
> Issue Type: Bug
> Reporter: David Griffon
> Assignee: Serge Huber
> Priority: Major
> Fix For: 2.0.0
>
> Time Spent: 0.5h
> Remaining Estimate: 0h
>
> Story not needed for security, but would great to tackle as part of tech debt
> While looking at the ES mapping on Jahia.com (DMF-4926), it appears that the profile has been added to some target events (almost all properties from the profile are currently mapped under /target/profile)
> We need to investigate to find out what is adding that profile info then remove it if not useful.
> Start event and end event are part of the target and should be removed as well
> This is still happening on jahia.com as the profile mapping was part of the last monthly event index.
> h3. Mappings that shouldnt be created after cleanup:
> - target/systemProperties/goals
> - target/profile
> - target/startEvent
> - target/endEvent
> h3. Migration strategy
> *Existing data*
> No migration
> *Existing mapping*
> No migration
> h2. Technical Details
> Identified place in Unomi backend: ({*}this event are currently persited, they should not{*})
> *IncrementInterestAction.java:*
> {code:java}
> final Event updatePropertiesEvent = new Event("updateProperties", null, profile, null, null, profile, new Date());
> updatePropertiesEvent.setProperty("update", propertyToUpdate);
> return eventService.send(updatePropertiesEvent);
> {code}
> *GoalsServiceImpl.java:*
> {code:java}
> Action action3 = new Action();
> action3.setActionType(definitionsService.getActionType("sendEventAction"));
> action3.setParameter("eventType", "goal");
> action3.setParameter("eventTarget", goal);
> action3.setParameter("eventProperties", new HashMap<String, Object>());
> rule.setActions(Arrays.asList(action1,action2,action3));
> {code}
> -> in this one the sendEventAction should have a new property to specify it should not be persisted.
> *MergeProfilesOnPropertyAction.java:*
> {code:java}
> if (currentSession != null) {
> currentSession.setProfile(profile);
> eventService.send(new Event("sessionReassigned", currentSession, profile, event.getSourceId(), event, currentSession, event.getTimeStamp()));
> }
> {code}
> And probably others, this is not a full list, it's just the one I already identified,
--
This message was sent by Atlassian Jira
(v8.20.7#820007)