Thanks It works!
The last thing left is how to output only the first level subprocesses in an array through suborder? I tried what I could.
Now the second-level sub-processes Lead and Order to the supplier are included in the shipping list
Our process structure:
Shipment (assigned to parent)
Sales order (main process)
Lead (sub-process) Order to the supplier (sub-process)
Shipment process for verification: https://more-moto.crm-onebox.com/admin/customorder/dostavka/5600/edit/