xrg, currently (there was a big and nasty bug before 5.0.7), the sequence number generation is done on the same transaction as the workflow activities, so if the transaction is rolled back, so it is the sequence number.
Also, the sequence number generation uses a SELECT FOR UPDATE that will lock any attempt to get another sequence number, for the same type of object, until this transaction gets commited or rolled back. That means that you won't get gaps in the sequence if you rollback a transaction (you still can get gaps if you delete objects).
xrg, currently (there was a big and nasty bug before 5.0.7), the sequence number generation is done on the same transaction as the workflow activities, so if the transaction is rolled back, so it is the sequence number.
Also, the sequence number generation uses a SELECT FOR UPDATE that will lock any attempt to get another sequence number, for the same type of object, until this transaction gets commited or rolled back. That means that you won't get gaps in the sequence if you rollback a transaction (you still can get gaps if you delete objects).