Sharepoint Operations
This activity allows you to automate the actions that can be performed on the Sharepoint site like upload, download, rename or delete the required file.
To access the Sharepoint site for performing automation, credential of the current logged in user of the system is used. Single Sign On (SSO) is not supported currently.
The Sharepoint 2010 version can be automated using the out-of-box activity. While you can use the Web Mode of the Application activity of Automation Studio to automate operations of the browser based Sharepoint site of any version.
Using Sharepoint Operations Activity
- In the Canvas Tools pane, click Sharepoint to expand the tool and view the associated activities.
- Drag the Sharepoint Operations activity and drop on to the Flowchart designer on the Canvas. The validation error symbol disappears when required inputs are provided.
- In the Sharepoint Operations Type list, select the operation that you want to perform. Click any of the links below to know the details related to the supported Sharepoint operations:
- Upload
- Download
- Copy
- Move
- Delete
Upload
- In the Sharepoint Base Url list, select the parameter holding the URL of the Sharepoint site with the complete path of the folder in which you want to upload the file is located. For example, if the folder is located under Mysite you must provide the URL as, http://Server/sites/Mysite. You must define the parameter in the Parameter bar with the Sharepoint URL to make it available for the selection. This is a mandatory field.
NOTE: |
Do not add the pagename.aspx in the URL, else, the activity tries to search for the correct URL and logs it into its log file. However, the accuracy is of finding the correct URL is not guaranteed and the process fails with an incorrect URL. |
- In the SharePoint Upload Folder Location list, select the parameter holding the path of the Sharepoint folder where you want to upload the file. For example, /project/test/testing. If the folder does not exist, it gets created at the mentioned path. The path mentioned must be accessible with the required permissions to create the folder. The permitted limit of the depth of sub folder that can be created inside a folder is defined in the SharepointAutomationProps.xml file and can be edited if required. You must define the parameter in the Parameter bar with the Sharepoint URL to make it available for the selection. This is a mandatory field.
- In the Source Folder Location list, select the parameter holding the path of the folder along with the folder name from where the file must be uploaded. For example, D\Demo\SharePoint Folder. You must define the parameter in the Parameter bar with the folder path to make it available for the selection. This is a mandatory field.
- In the Source File Names list, select the parameter holding the file name along with the file extension or a pattern to select the required files. You can upload multiple files by providing the semi-colon (;) separated values. For example, sample_doc.docx;*.pdf. You must define the parameter in the Parameter bar with the file name or the pattern to make it available for the selection.
- In the Comments list, select the parameter holding the checkin comments related to the uploaded files. You must define the parameter in the Parameter bar with the chekin comments to make it available for the selection.
- In the Force to Overwrite? list, select True if you want to checkout and overwrite an existing file creating a new version of the file. If Flase is selected, the files are not overwritten.
- Click the Result Mapping link. The Output Mapping list appears. Select the available parameter to map the status of the operation performed. Both Boolean and String type is supported. You must pre-define the parameter to make it available for the selection. If the operation is successful, it returns true and if the operation fails it returns false. It can be used as an input for the next action that you want to perform in the automation process workflow, depending upon the success or failure of the file operation performed.
Download
- In the Sharepoint Base Url list, select the parameter holding the URL of the Sharepoint site with the complete path of the folder from which you want to download the file. For example, if the folder is located under Mysite you must provide the URL as, http://Server/sites/Mysite. You must define the parameter in the Parameter bar with the Sharepoint URL to make it available for the selection. This is a mandatory field.
NOTE: |
Do not add the pagename.aspx in the URL, else, the activity tries to search for the correct URL and logs it into its log file. However, the accuracy is of finding the correct URL is not guaranteed and the process fails with an incorrect URL. |
- In the SharePoint Source Folder Location list, select the parameter holding the path of the Sharepoint folder from where you want to download the file. For example, /project/test/testing. If the folder does not exist, it gets created at the mentioned path. The path mentioned must be accessible with the required permissions to create the folder. The permitted limit of the depth of sub folder that can be created inside a folder is defined in the SharepointAutomationProps.xml file and can be edited if required. You must define the parameter in the Parameter bar with the Sharepoint URL to make it available for the selection. This is a mandatory field.
- In the Source File Names list, select the parameter holding the file name along with the file extension or a pattern to select the required files. You can download multiple files by providing the semi-colon (;) separated values. For example, sample_doc.docx;*.pdf. You must define the parameter in the Parameter bar with the file name or the pattern to make it available for the selection.
- In the Downlaod Location list, select the parameter holding the path of the folder along with the folder name where the file must be downloaded. For example, D\Demo\SharePoint Folder. You must define the parameter in the Parameter bar with the folder path to make it available for the selection. This is a mandatory field.
- In the Force to Overwrite? list, select True if you want to overwrite an existing file. If Flase is selected, the files are not overwritten.
- Click the Result Mapping link. The Output Mapping list appears. Select the available parameter to map the status of the operation performed. Both Boolean and String type is supported. You must pre-define the parameter to make it available for the selection. If the operation is successful, it returns true and if the operation fails it returns false. It can be used as an input for the next action that you want to perform in the automation process workflow, depending upon the success or failure of the file operation performed.
Copy/Move
- In the Sharepoint Base Url list, select the parameter holding the URL of the Sharepoint site with the complete path of the folder from where you want to copy or move the file. For example, if the folder is located under Mysite you must provide the URL as, http://Server/sites/Mysite. You must define the parameter in the Parameter bar with the Sharepoint URL to make it available for the selection. This is a mandatory field.
NOTE: |
Do not add the pagename.aspx in the URL, else, the activity tries to search for the correct URL and logs it into its log file. However, the accuracy is of finding the correct URL is not guaranteed and the process fails with an incorrect URL. |
- In the SharePoint Folder Location list, select the parameter holding the path of the Sharepoint folder from where you want to copy or move the file. For example, /project/test/testing. You must define the parameter in the Parameter bar with the Sharepoint URL to make it available for the selection. This is a mandatory field.
- In the Source File Names list, select the parameter holding the file name along with the file extension or a pattern to select the required files. You can copy or move multiple files by providing the semi-colon (;) separated values. For example, sample_doc.docx;*.pdf. You must define the parameter in the Parameter bar with the file name or the pattern to make it available for the selection. If you leave this field empty all the files present in the specified folders are copied or moved as per the selected operation.
- In the Sharepoint Destination Folder list, select the parameter holding the path of the Sharepoint folder where you want to copy or move the file. For example, http://Sharepoint/sites/Mysite. You must define the parameter in the Parameter bar with the folder path to make it available for the selection. This is a mandatory field.
- Click the Result Mapping link. The Output Mapping list appears. Select the available parameter to map the status of the operation performed. Both Boolean and String type is supported. You must pre-define the parameter to make it available for the selection. If the operation is successful, it returns true and if the operation fails it returns false. It can be used as an input for the next action that you want to perform in the automation process workflow, depending upon the success or failure of the file operation performed.
Delete
- In the Sharepoint Base Url list, select the parameter holding the URL of the Sharepoint site with the complete path of the folder from where you want to delete the file. For example, if the folder is located under Mysite you must provide the URL as, http://Server/sites/Mysite. You must define the parameter in the Parameter bar with the Sharepoint URL to make it available for the selection. This is a mandatory field.
NOTE: |
Do not add the pagename.aspx in the URL, else, the activity tries to search for the correct URL and logs it into its log file. However, the accuracy is of finding the correct URL is not guaranteed and the process fails with an incorrect URL. |
- In the SharePoint Folder Location list, select the parameter holding the path of the Sharepoint folder from where you want to delete the file. For example, /project/test/testing. This is a mandatory field.
- In the Source File Names list, select the parameter holding the file name along with the file extension or a pattern to select the required files. You can delete multiple files by providing the semi-colon (;) separated values. For example, sample_doc.docx;*.pdf. You must define the parameter in the Parameter bar with the file name or the pattern to make it available for the selection. If you leave this field empty all the files present in the specified folders are deleted.
- Click the Result Mapping link. The Output Mapping list appears. Select the available parameter to map the status of the operation performed. Both Boolean and String type is supported. You must pre-define the parameter to make it available for the selection. If the operation is successful, it returns true and if the operation fails it returns false. It can be used as an input for the next action that you want to perform in the automation process workflow, depending upon the success or failure of the file operation performed.
The respective Sharepoint operations are configured.
SharePoint Operations Properties
The properties of Sharepoint Operations activity are listed in the following table and can be edited in the Properties grid on the right pane.
Property Name |
Usage |
Control Execution |
|
Ignore Error |
When this option is set to Yes, the application ignores any error while executing the activity. If set to NA, it bypasses the exception (if any) to let the automation flow continue; however, it marks the automation status as failure, in case of an exception. By default, this option is set to No. |
Delay |
|
Wait After |
Specify the time delay that must occur after the activity is executed. The value must be in milliseconds. |
Wait Before |
Specify the time delay that must occur before the activity is executed. The value must be in milliseconds. |
Misc |
|
Breakpoint |
Select this option to mark this activity as a pause point while debugging the process. At this point, the process freezes during execution allowing you to examine if the process is functioning as expected. In large or complex processes, breakpoints help in identifying the error, if any. |
Commented |
Select this option to mark this activity as inactive in the entire process. When an activity is commented, it is ignored during the process execution. |
DisplayName |
The display name of the activity in the flowchart designer area. By default, the name is set as Sharepoint Operations. You can change the name as required. |