model {
theta[1] ~ dnorm(0,1)I(0,)
theta[2] ~ dnorm(0,1)
z <- 1
z ~ dbern(constraint)
constraint <- step(theta[2])
}

   node   mean   sd   MC error   2.5%   median   97.5%   start   sample
   theta[1]   0.8009   0.6106   0.006119   0.03056   0.6696   2.253   4001   10000
   theta[2]   0.7897   0.5973   0.01643   0.02286   0.6743   2.206   4001   10000