TN Service Flow/ Sequence flow

Hello,

I am learning trading networks and needs some help on identifying the flow of events in Trading networks.
I have read SAG documents but i am struggling to get the exact picture.

I have read about Processing rule, document type, pre-processing and processing rules etc
I need to understand what is the sequence, when these things get executed?

So far i understood that client invokes wm.tn:receive service which pass the document to Trading network.
Now i wanted to know when processing rule gets triggered? When document types identification is done? When document attributes extracted? When we use the TPA?

Does anyone have flow diagram or sequence diagram which can get me understand the flow?