update diagram rule