You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When the rules engine evaluates the rule to check if the incoming event is a lifecycle response event and the lifecycle shared state contains install event key, it failed to find the right version of the lifecycle shared state. Let's see what happened inside the Eventhub:
Event Flow
E1 E2 E3 E4 ... En
Event Handling
E1: lifecycle start event => create lifecycle shared state version 1 (with install event data)
..
E4: registering lifecycle extension => create lifecycle shared state version 4 (without install event data)
..
En: response event for E1
..
Then, the rules engine gets lifecycle shared state V4 which doesn't have install event data and will not trigger expected consequence events.
Shared state is created for com.adobe.module.lifecycle with data Optional(["lifecyclecontextdata": ["devicename": x86_64, "resolution": 1242x2688, "launchevent": LaunchEvent, "appid": AEPSampleApp 1.0 (1), "hourofday": 15, "dayofweek": 5, "locale": en-US, "runmode": Application, "osversion": iOS]]) and version 4
...
Shared state is created for com.adobe.module.lifecycle with data Optional(["lifecyclecontextdata": ["osversion": iOS, "monthlyenguserevent": MonthlyEngUserEvent, "dailyenguserevent": DailyEngUserEvent, "resolution": 1242x2688, "locale": en-US, "dayofweek": 5, "hourofday": 15, "installevent": InstallEvent, "installdate": 9/10/2020, "launchevent": LaunchEvent, "launches": 1, "runmode": Application, "devicename": x86_64, "appid": AEPSampleApp 1.0 (1)]]) and version 1
The text was updated successfully, but these errors were encountered:
Lifecycle set the initial shared state in the OnRegister method using code createSharedState(data: sharedStateData as [String: Any], event: nil). When event is nil, eventhub uses the latest event number. So if eventhub have already received events before the lifecycle createSharedState call, this createSharedState will use a event number larger than 0.
To solve this we are going to modify the behavior when event is nil when setting shared state. Currently, when nil is used it is versioned at the latest, instead, we will version at 0 when event is nil.
When the rules engine evaluates the rule to check if the incoming event is a lifecycle response event and the lifecycle shared state contains
install event
key, it failed to find the right version of the lifecycle shared state. Let's see what happened inside the Eventhub:Event Flow
E1 E2 E3 E4 ... En
Event Handling
E1: lifecycle start event => create lifecycle shared state version 1 (with install event data)
..
E4: registering lifecycle extension => create lifecycle shared state version 4 (without install event data)
..
En: response event for E1
..
Then, the rules engine gets lifecycle shared state V4 which doesn't have
install event
data and will not trigger expected consequence events.Json Rule
Console Log
Shared state is created for com.adobe.module.lifecycle with data Optional(["lifecyclecontextdata": ["devicename": x86_64, "resolution": 1242x2688, "launchevent": LaunchEvent, "appid": AEPSampleApp 1.0 (1), "hourofday": 15, "dayofweek": 5, "locale": en-US, "runmode": Application, "osversion": iOS]]) and version 4
...
Shared state is created for com.adobe.module.lifecycle with data Optional(["lifecyclecontextdata": ["osversion": iOS, "monthlyenguserevent": MonthlyEngUserEvent, "dailyenguserevent": DailyEngUserEvent, "resolution": 1242x2688, "locale": en-US, "dayofweek": 5, "hourofday": 15, "installevent": InstallEvent, "installdate": 9/10/2020, "launchevent": LaunchEvent, "launches": 1, "runmode": Application, "devicename": x86_64, "appid": AEPSampleApp 1.0 (1)]]) and version 1
The text was updated successfully, but these errors were encountered: