Integral constraints involving Green's function

Hi

I need to implement the so-called FEM-BI (boundary integral) problem which requires the following integral constraint at the external boundary

\phi_{\mathrm{sc}}\left(\boldsymbol{\rho}\right)=\intop_{\partial\Omega}\mathrm{ds}^{\prime}\left[\frac{\partial G_{0}\left(\boldsymbol{\rho},\boldsymbol{\rho}^{\prime}\right)}{\partial n}\phi_{\mathrm{sc}}\left(\boldsymbol{\rho}^{\prime}\right)-G_{0}\left(\boldsymbol{\rho},\boldsymbol{\rho}^{\prime}\right)\psi\left(\boldsymbol{\rho}^{\prime}\right)\right]

where \phi_\mathrm{sc} is the unknown field in \Omega, \psi is another unknown in \partial\Omega and G_0 is the Green’s function of the original PDE in \Omega. I don’t know how to define the integrals involving Green’s function in the weak form. I would appreciate if someone could advise whether something like this is possible with UFL or any add-on framework in fenicsx.

Thanks a lot