I need to repair a business process so i have the OrderProcess but i don't know how to repair it using groovy. Any idea?
import de.hybris.platform.core.model.order.OrderModel
import de.hybris.platform.orderprocessing.model.OrderProcessModel
OrderModel orderModel = flexibleSearchService.search(String.format("SELECT {PK} FROM {AbstractOrder} WHERE {code} = '%s'", "P000015003")).result.get(0)
OrderProcessModel orderProcess = new OrderProcessModel();
orderModel.getOrderProcess().forEach {process ->
if(process.getProcessDefinitionName().contains("global-order-process")){
orderProcess = process
}
}
This can be useful. order process repaired from "cancelOrderAction" node