I am using a large collection of Visual Processes (Lightning process builder) to execute APEX code, I am trying to avoid a race condition. So I am trying to figure out exactly at point does the process get triggered.

```
...
//Inserts Invoice__c
insert invoice;
...
insert invoiceLineItems;
//Code end

```

So if I have a process listening for the creation of Invoice\_\_c, does it get triggered after the above transaction or does it get triggered at the insert process?