Good Morning,
I am trying to develop an Event Receiver which when a document is added to a Document Library in SharePoint it will check a configuration list to see if the folder it was added to is there and then pass the parameters to the ESB so it can sync with BOX.
My issue is I am getting stuck at the first hurdle, the documentation I have looked at does not give clear in site into using these.
My beginning code looked like:
SPFile sourceFile = properties.ListItem.File;
String fileId = sourceFile.UniqueId;
SPFolder sourceFolder = sourceFile.ParentFolder;
String folderId = sourceFolder.UniqueId;
String folderPath = sourceFolder.Url;
if(sourceFolder == ProjectDocLibEventConfiguration.boxFolder || folderPath)
{
sourceFile.MoveTo("http://{servername}/mule-esb?event_type=sharepoint_event_listener&source_doc_lib_id={folderId}&source_document_id={fileId}&target_box_root_doc_lib_path={box_root_doc_lib_path}");
}
I know this will move one file from a folder to another location. Is this the right way to go about it? Does anyone know of any documentation around this/having an Event Receiver communicate with Mule ESB?