@@ -65,7 +65,7 @@ Before diving into recovery strategies, it's essential to understand Flamingock'
6565
6666``` java
6767@TargetSystem (" user-database" ) // This is the TARGET - where business changes go
68- @ChangeUnit (id = " user-migration" , order = " 001 " , author = " team-data" )
68+ @Change (id = " user-migration" , order = " 20250207_01 " , author = " team-data" )
6969public class UserMigration {
7070
7171 @Execution
@@ -115,7 +115,7 @@ Flamingock works with two types of target systems based on their native transact
115115** Underlying Technology** : Systems that natively support ACID transactions
116116- ** Examples** : PostgreSQL, MySQL, MongoDB (4.0+), Oracle
117117- ** Native Capabilities** : Built-in rollback, atomicity, consistency guarantees
118- - ** In Flamingock** : Changes can leverage native transactions via ` @ChangeUnit (transactional = true) `
118+ - ** In Flamingock** : Changes can leverage native transactions via ` @Change (transactional = true) `
119119- ** Rollback Strategy** : Automatic (database handles it) or manual via ` @RollbackExecution ` when the change itself it's not transactional, despite being a transactional target system(like DDL operations in MySQL,a s we mentioned)
120120
121121#### Non-Transactional Target Systems
@@ -140,7 +140,7 @@ Even when targeting a transactional system, a change can be non-transactional.
140140
141141``` java
142142// Transactional change - relies on database rollback
143- @ChangeUnit (id = " user-migration" , order = " 001 " , transactional = true , author = " team" )
143+ @Change (id = " user-migration" , order = " 20250207_01 " , transactional = true , author = " team" )
144144@TargetSystem (" user-db" )
145145public class UserMigration {
146146
@@ -160,7 +160,7 @@ public class UserMigration {
160160
161161// Non-transactional change - requires explicit rollback
162162@TargetSystem (" user-db" )
163- @ChangeUnit (id = " schema-changes" , order = " 002 " , transactional = false , author = " dba-team" )
163+ @Change (id = " schema-changes" , order = " 20250207_02 " , transactional = false , author = " dba-team" )
164164public class SchemaChanges {
165165
166166 @Execution
@@ -218,7 +218,7 @@ Flamingock provides two recovery strategies that users can choose:
218218** Example Configuration** :
219219``` java
220220@TargetSystem (" user-database" )
221- @ChangeUnit (id = " critical-user-migration" , order = " 001 " , author = " team-data" )
221+ @Change (id = " critical-user-migration" , order = " 20250207_01 " , author = " team-data" )
222222// No @Recovery annotation needed - MANUAL_INTERVENTION is default
223223public class CriticalUserMigration {
224224
@@ -274,7 +274,7 @@ public class CriticalUserMigration {
274274** Example Configuration** :
275275``` java
276276@TargetSystem (" redis-cache" )
277- @ChangeUnit (id = " cache-warming" , order = " 002 " , author = " team-platform" )
277+ @Change (id = " cache-warming" , order = " 20250207_02 " , author = " team-platform" )
278278@Recovery (strategy = RecoveryStrategy . ALWAYS_RETRY )
279279public class CacheWarmingChange {
280280
@@ -312,7 +312,7 @@ public class CacheWarmingChange {
312312``` java
313313// Event publishing - idempotent with same event key
314314@TargetSystem (" kafka-events" )
315- @ChangeUnit (id = " publish-user-events" , order = " 003 " , author = " team-events" )
315+ @Change (id = " publish-user-events" , order = " 20250207_03 " , author = " team-events" )
316316@Recovery (strategy = RecoveryStrategy . ALWAYS_RETRY )
317317public class PublishUserEvents {
318318
@@ -335,7 +335,7 @@ public class PublishUserEvents {
335335}
336336
337337// CREATE IF NOT EXISTS - naturally idempotent
338- @ChangeUnit (id = " create-indexes" , order = " 004 " , author = " team-dba" , transactional = false )
338+ @Change (id = " create-indexes" , order = " 20250207_04 " , author = " team-dba" , transactional = false )
339339@TargetSystem (" user-database" )
340340@Recovery (strategy = RecoveryStrategy . ALWAYS_RETRY )
341341public class CreateIndexes {
@@ -439,7 +439,7 @@ An "issue" is detected when:
439439** Best Practice** : Use ALWAYS_RETRY
440440``` java
441441@Recovery (strategy = RecoveryStrategy . ALWAYS_RETRY )
442- @ChangeUnit (id = " publish-user-events" , order = " 003 " )
442+ @Change (id = " publish-user-events" , order = " 20250207_03 " )
443443public class PublishUserEvents {
444444 @Execution
445445 public void publish (KafkaProducer producer ) {
@@ -455,7 +455,7 @@ public class PublishUserEvents {
455455
456456** Best Practice** : MANUAL_INTERVENTION for safety
457457``` java
458- @ChangeUnit (id = " multi-system-update" , order = " 004 " )
458+ @Change (id = " multi-system-update" , order = " 20250207_04 " )
459459// Default MANUAL_INTERVENTION ensures consistency
460460public class MultiSystemUpdate {
461461 @Execution
@@ -651,7 +651,7 @@ public class CriticalDataMigration {
651651Start with MANUAL_INTERVENTION, move to ALWAYS_RETRY after validation:
652652``` java
653653// Phase 1: Manual intervention during initial rollout
654- @ChangeUnit (id = " feature-v1" , order = " 001 " , author = " team-feature" )
654+ @Change (id = " feature-v1" , order = " 20250207_01 " , author = " team-feature" )
655655public class FeatureRollout {
656656 @Execution
657657 public void rolloutFeature (FeatureService service ) {
@@ -662,7 +662,7 @@ public class FeatureRollout {
662662}
663663
664664// Phase 2: After validation, same change with retry
665- @ChangeUnit (id = " feature-v1-stable" , order = " 002 " , author = " team-feature" )
665+ @Change (id = " feature-v1-stable" , order = " 20250207_02 " , author = " team-feature" )
666666@Recovery (strategy = RecoveryStrategy . ALWAYS_RETRY )
667667public class FeatureRolloutStable {
668668 @Execution
@@ -677,7 +677,7 @@ public class FeatureRolloutStable {
677677### Pattern 4: Transactional vs Non-Transactional Strategy
678678``` java
679679// Large bulk operation - non-transactional for performance
680- @ChangeUnit (id = " bulk-user-update" , order = " 005 " ,
680+ @Change (id = " bulk-user-update" , order = " 20250207_05 " ,
681681 author = " team-data" , transactional = false )
682682@TargetSystem (" user-database" )
683683@Recovery (strategy = RecoveryStrategy . MANUAL_INTERVENTION )
@@ -714,7 +714,7 @@ public class BulkUserUpdate {
714714}
715715
716716// Small critical operation - transactional for safety
717- @ChangeUnit (id = " admin-permissions" , order = " 006 " ,
717+ @Change (id = " admin-permissions" , order = " 20250207_06 " ,
718718 author = " team-security" , transactional = true )
719719@TargetSystem (" user-database" )
720720@Recovery (strategy = RecoveryStrategy . MANUAL_INTERVENTION )
0 commit comments