Solving ufl variable by equation solve

Hello,

I am solving ufl varible based on applied conditions. I am stuck at applying conditions to solve the ufl_variable. MWE:

from dolfinx.fem import Function, FunctionSpace, mesh
from dolfinx.io import gmshio
from mpi4py import MPI
from ufl import Jacobian, as_vector, dot, cross, conditional, eq

mesh = mesh.create_unit_cube(MPI.COMM_WORLD, 10,10,10 mesh.CellType.quadilateral)
import ufl
Ve1 = VectorElement("DG", mesh.ufl_cell(), 0,dim=3)
V1 = FunctionSpace(mesh, Ve1)
e1=ufl.variable(Function(V1)) # Define unknow variable to be solved using condition (might be incorrect to define variable using this approach). 

t = Jacobian(mesh)
t1 = as_vector([t[0, 0], t[1, 0], t[2, 0]])
t2 = as_vector([t[0, 1], t[1, 1], t[2, 1]])
e3 = cross(t1, t2)

# Solving e1 varible using below condition:
# dot(d(e1)/d(e2),e3)==0 

# Eval: e1_2 or d(e1)/d(e2)
x1_12=dot(e2,as_vector([e1[0].dx(i) for i in range(3)]))
x2_12=dot(e2,as_vector([e1[1].dx(i) for i in range(3)]))
x3_12=dot(e2,as_vector([e1[2].dx(i) for i in range(3)]))
e1_2=as_vector([x1_12,x2_12,x3_12])

# How to apply condition for solving e1
ufl.conditional(eq(dot(e1_2,e3),0),e1)
#Error 

Can you help me to apply condition for solving e1
I might be missing ufl syntax. Is there possibility in dolfinx to solve this equation. Any help is appreciated.