In part 1 you saw what Sitecore items were created to for the data exchange process. In part 2 you saw how the backend was connected and the classes defined in the Converters section. In part 3 you saw how the item models are used. In part 4 you saw how the pipeline step processor is the method that brings everything together. In this part I want to talk about how the Pipeline Batch process is called that runs each step. This is the one of the coolest parts as you will be able to see the final result. You can find the source code here for reference. Still waiting for my module to get approved, but hopefully that will be soon.
Below you will find a Pipeline Batch that was created to run all the necessary steps to process and import the data into Sitecore.
When you first click on the Pipeline Batch you will notice a group of buttons on the ribbon. If something is not correctly setup these buttons will be disabled. To run the Pipeline Batch just click on the Run Pipeline Batch button.
While it is running the button will grey out and you will see the Stop Pipeline Batch button enabled. After it is finished running the Run Pipeline Batch will be enabled again.
Below are the steps that get run under Pipelines. You can also see above that the Reddit Pipeline is selected.
As you saw before the Reddit Pipeline Step hooks into the Converter and Processor. That will then call the next step below it (Iterate feed from Reddit Feeds and Run Pipeline).
The Iterate feed from Reddit Feeds and Run Pipeline as you see below will call a Pipeline (Reddit Feed to Sitecore Item Sync Pipeline) and store the data that the processor outputted into the Pipeline Context Source.
On the Resolve Sitecore Item Pipeline Step I defaulted all the fields except for the following. You will see the Template for New Item is the Reddit Feed Data item. The Item Name Value Accessor uses one of the fields from the Value Accessor Set to name the item. Endpoint From I just selected the Sitecore one. For the Identifier section you will see that the Identifier Value Accessor is a unique value that you can select from the Value Accessor Set. Then the Identifier Object Location is simply the Pipeline Context Source.
For the Apply Mapping from Reddit feed to Sitecore Item the fields are defaulted except for the Mapping Set. This is set to the Reddit Feed to Sitecore Item. You can see what it looks like below. This will map the data to the Sitecore fields.
For the Update Sitecore Item Pipeline Step I just chose the Sitecore Database Endpoint. This is the final step that updates the new item.
After everything runs you get the final result below:
So that is the Sitecore’s Data Exchange Framework in a nutshell. I have some more stuff I will be showing in different blogs, but this concludes the Reddit feed import example. I hope you have found this useful and I will be updating these blogs and cleaning them up as time permits. Please let me know if you have any questions.