Custom activate/deactivate worklfow against a field

Hello, I’m a newbie here.
I want to activate and deactivate the is_active field of particular workflow which depends on the vaule of permission field on booking doctype.

so on booking.py

def validate(self):
if self.room_permission:
#How to set is_active of that particular workflow?

use set_value. https://frappe.github.io/erpnext/current/api/frappe.client#frappe.client.set_value

Thanks !