Add to_obj to behavior and processtree