Refactor rich pattern anywhere within CaseDef