I have created a number field in the contact object and created 
a trigger which is adding one number to the number field,
a workflow doing the same, and
a process builder doing the same
now I have added 1 in the number field and hit save and the number field value updated to 6 
because before trigger made it to 2 then workflow made it 3 then trigger again made it 4 and then process builder made it to 5 and again trigger updated it to 6
but now when I deactivated workflow I got 4 and also 4 when I deactivated process builder but when I deactivated trigger then I got 2 as the final output but it should be 3 because workflow will make it to 2 then process builder should make it to 3 but it didn't happen like this it updated the number field to just 2 could someone please make me understand how I got only 2 not 3

and one more question related to recursive save:

```
public class ContactTriggerHelper {

    public static boolean beingupdated = true;

    public static void validationTesting(List<Contact> Contacts) {
        if(beingupdated) {

// some logic and here

            beingupdated = false;
            update contactRecord;
            // if I write beingupdated = false; here then it will be stuck in recursion
        } 
    }   
}

```

now if I write beingupdated = false; just before the update DML then it wont fall into the recursion but when I write it just below the DML then it will be recursion. can someone please be kind to help me with these 2 scenarios?