How remove user assigned business roles

I want to know is it possible, when user's attribute changed, remove all assigned business roles (direct and indirect assigned)

if it is possible ,how could I archive this?  If it need process orchestration, how I do this? Use SQL component or other component.

Any recommendation and detail steps is appreciated, very thanks~~

David