public virtual IHistoricProcessInstanceQuery EndOr()
        {
            if (!inOrStatement)
            {
                throw new ActivitiException("endOr() can only be called after calling or()");
            }

            inOrStatement        = false;
            currentOrQueryObject = null;
            return(this);
        }
        public virtual IHistoricProcessInstanceQuery Or()
        {
            if (inOrStatement)
            {
                throw new ActivitiException("the query is already in an or statement");
            }

            inOrStatement        = true;
            currentOrQueryObject = new HistoricProcessInstanceQueryImpl();
            orQueryObjects.Add(currentOrQueryObject);
            return(this);
        }