Additional behaviour in ArtifactDownload state

Good Day Friends!

I was wondering if its is possible to implement some custom logic in other states. In my update module with something like:

case "$STATE" in
    ArtifactDownload_Enter)
	touch /root/downloading_enter
	;;
    ArtifactDownload)
	touch /root/downloading
	;;
    ArtifactDownload_Leave)
	touch /root/downloading_leave
	;;

The goal is to report back to our custom app so it can react accordingly

PS: In the age of AI chatbots is there a PDF version of the documentation? Can you release one?

Thanks in advance!