```plantuml
@startuml
state "Failed/Pending" as failed {
state "Get Data From tb auto_deploy_product" as tb_deploy
state "Ext Service evm-inventory" as inv1
state "Restock" as restock
state "New Stock" as newstock
state "Data Auto Deploy Product" as dataFinal
[*] -> tb_deploy
tb_deploy : Get Data by status failed and pending
tb_deploy --> inv1
inv1: call endpoint /v1/product-variant-attribute/search
state fork_state2 <<fork>>
inv1 --> fork_state2
fork_state2 --> restock
state restock {
state "Ext Service evm-inventory" as inv2
state "model" as modelRestock
[*] --> modelRestock
modelRestock: set status = pending_restock
modelRestock --> inv2
inv2: call endpoint /v2/internal/stock?isContinueToLog=true
}
fork_state2 --> newstock
state newstock {
state "Ext Service evm-inventory" as inv3
state "model" as modelNewStock
state "Ext Service evm-inventory" as inv4
[*] --> modelNewStock
modelNewStock: set status = pending_new_stock
modelNewStock --> inv3
inv3: call endpoint /v1/product-variant-mapping/bulk
inv3 --> inv4
inv4: call endpoint /v2/internal/stock?isContinueToLog=true
}
state join_state2 <<join>>
restock --> join_state2
newstock --> join_state2
state "Model" as model1
state "Model" as model2
state "Model" as model3
join_state2 --> model1 : success
join_state2 --> model2 : unknown
join_state2 --> model3 : error
state join_state3 <<join>>
model1 --> join_state3
model1: set status = success
model2 --> join_state3
model2: set status not changed
model3 --> join_state3
model3: set status = failed
join_state3 --> dataFinal
dataFinal : update data
dataFinal --> [*]
}
@enduml
```