The document describes modifying a BPEL process to calculate factorials using a while loop. It instructs to create global variables, use an assign activity to initialize values, drag and drop a while activity with a condition, and add multiple assign activities inside the loop to multiply a temporary variable by the current number and decrement the number until it reaches zero.