To purge a work item, the example code uses the class PurgeWorkItemExample, which is an extension of LoginExample. PurgeWorkItemExample uses the method purgeWorkItemList() in the WorkItemFacade class to remove historic work item data from the database according to a dynamic set of criteria.