Custom workflow - hardcoded or UI

Hello

I want to know how to manage status changes in frappe

I have the following Doctypes:
Package
Warehouse Receipt
Shipment

Package Doctype has status field;
But this Document change his status based on the actions of the other two doctypes

For example:
If a Warehouse Receipt has a new link from a child table to the Package, the status need to change

And if a Shipment has a new link from a child table to the package status must change

I have tested Workflow, and works amazing
But only works inside the document

The status change in Package is not triggering if I add a link from the other two Doctypes

How can I make this work?