Yes Its possible, we have implemented it. Pls. find sample code. Only thing you keep in mind is owner need to get and pass below, we are used default ID for lock and unlock.
You need to implement this logic in BADI/Enhancement Spot - UJ_BPC_BPF_REVIEW or UJ_BPC_BPF_SUBMIT depending on your requirement
* Get the Work Status
cl_ujw_work_status_mgr=>factory(
EXPORTING
is_user = ls_user
i_appset = i_appset
if_bypass_sec_check = abap_true
RECEIVING r_manager = lr_work_status_mgr ).
TRY.
lr_work_status_mgr->get_work_status_table(
IMPORTING et_ujw_statcode_table = lt_workstates ).
CATCH cx_ujw_work_status_error.
ENDTRY.
* Build Dimention Members
TRY.
lr_work_status_mgr->update_work_status_locks(
EXPORTING
i_applid = i_appl_id "i_appset
it_dim_mem = lt_dim_mem
i_incl_children = lv_flag
i_status = ls_workstates-status ).
MESSAGE text-023 TYPE 'S'.
CATCH cx_uj_static_check INTO lr_exception.
* lcl_application=>set_message( lr_exception ).
ENDTRY.