LPS-51502 Move WF code from repository wrapper into capability