private async Task <bool> EvaluateAsync(WorkflowInstance instance, CatalogItemPatch patch)
        {
            var repository = this.repositoryFactory.GetRepository();
            var item       = await repository.ReadItemAsync <CatalogItem>(patch.Id, new PartitionKey(patch.Id)).ConfigureAwait(false);

            var newItem = patch.ApplyTo(item);

            return(newItem.IsComplete() == this.ExpectedResult);
        }
        protected async Task ExecuteAsync(WorkflowInstance instance, CatalogItemPatch content)
        {
            var repository = this.repositoryFactory.GetRepository();

            var existingCatalogItem = await repository
                                      .ReadItemAsync <CatalogItem>(content.Id, new PartitionKey(content.Id))
                                      .ConfigureAwait(false);

            var newCatalogItem = content.ApplyTo(existingCatalogItem);

            await repository.UpsertItemAsync(newCatalogItem).ConfigureAwait(false);
        }