LPS-49971 add locking for task transitions
LPS-49971 SF
LPS-48253 SF
LPS-49971 SF