Sharepoint Client Adapter
The SharepointClientadapter is a component of the Sterling B2B Integrator, allowing seamless connection with Microsoft Sharepoint.
Introduction
In Sterling B2B Integrator v6.2.0.1 and above, you can perform operations such as list, get, put, and delete files, make directory and document library using Sharepoint Client Adapter and Services on Sharepoint Site.
- Commands can be scripted through Business Process Modeling Language (BPML).
- The adapter is accessible through the following services in a business process:
Sharepoint online uses throttling to maintain optimal performance and reliability of the Sharepoint online service. For more details on throttling, see Avoid getting throttled or blocked in SharePoint Online.
| Category | Description |
|---|---|
| System name | SharepointClientadapter |
| Graphical Process Modeler (GPM) category | None |
| Description | Sends Sharepoint requests to trading partners. |
| Business usage | Use this adapter to send Sharepoint requests to perform activities such as to get or put files into a directory on Sharepoint. |
| Usage Example | A business process is executed that sends or receives a file using Sharepoint site for a trading partner. The SharepointClientadapter is used to integrate with Sharepoint site. |
| Preconfigured? | Yes, with default properties. You need to provide your specific values. |
| Requires third-party files? | No |
| Platform availability | All Sterling B2B Integrator supported platforms |
| Related services | The following services are related.
Configured in a business process, they
initiate the SharepointClientadapter to
perform their services:
|
| Application requirements | The SharepointClientadapter should be configured with the Sharepoint account, credentials, and document library for trading partner. |
| Initiates business processes | This adapter does not initiate business processes. |
| Invocation | This adapter is not invoked from a business process. |
| Business process context considerations | Business processes using Sharepoint Client services should not be marked as Auto Resume. These services require an established session which will no longer exist after a restart. |
| Returned status values | None |
| Restrictions | All work bound within a Sharepoint Client Begin Session service and a Sharepoint Client End Session service must be within the same business process. |
| Persistence level | N/A |
| Environment | Supported Environments are:
Note:
|
| Testing considerations | To test this adapter, run the
SharepointClientDemoAllServices
business process and verify that
it completes successfully. For more
information about the
SharepointClientDemoAllServices
business process, see Business Process Example
of All Sharepoint Client
Services. Debug information for this
adapter is located at: Operations
> System > Logs >
Log.SharepointClient. |
Implementing the SharepointClientadapter
- Create a SharepointClientadapter configuration.
- Configure the SharepointClientadapter.
Prerequisites for Configuring the SharepointClientadapter
- A SharePoint site and a domain.
- A document library created in SharePoint.
- Ensure that Microsoft Entra is configured with the following:
- App registration,
- Site permissions for the SharePoint API,
- A public certificate to authenticate the registered app.
- Import this public certificate (3.c.) in the Sterling B2B Integrator Dashboard. To do this:
- Navigate to Trading Partner → Digital Certificates → System.
- Import the certificate as p12 file containing private key and certificate.
- Extract all the CA certificates (root, intermediate, and leaf) for your SharePoint site and import them in the Sterling B2B Integrator Dashboard. To do this:
- Navigate to Trading Partner → Digital Certificates → CA.
- Import the CA certificates to the Dashboard.
Importing CA Certificates for SharePoint Client Adapter
- View SSL CertificatesYou can view and download the SSL certificates using Firefox:
- Import Certificates into Sterling B2B Integrator
- Go to Trading Partner → Digital Certificates → CA.
- Upload each certificate from the downloaded PEM chain.
- Use Certificates in Adapter Configuration
Configuring the SharepointClientadapter
- Select Deployment > Services > Configuration.
- Search for Sharepoint Client Adapter or select it from the list.
- Click Edit.
- Specify the field settings:
Field Description Name Unique and meaningful name for the adapter configuration. Required. Description Description of adapter. Required. Environment Select one of the following options:- All Adapter Container Nodes
- All ASI Nodes
- All ASI nodes plus all Adapter Container Nodes
- Node1
Select a Group Select one of the following options:- None – You do not want to include this configuration in a group at this time.
- Create New Group – You can enter a name for a new group in this field, which will then be created along with this configuration.
- Select Group – If you have already created one or more groups for this adapter type, they are displayed in the list. Select group from the list.
Sharepoint URL Required. Sharepoint URL is the domain of the SharePoint site or resource. For Sterling B2B Integrator v6.2.0.5_1 and later, the Sharepoint Client Adapter supports specifying SharePoint sites hosted under managed paths for both/sitesor/teams. For example:
orhttps://yourdomain.sharepoint.com/sites/sitenamehttps://yourdomain.sharepoint.com/teams/teamnameTenant ID Unique identification of the Sharepoint instance, TenantID on Sharepoint. Required. Application ID Application ID of the application as registered in the application registration portal. Optional if it is present in Begin Session or Individual Services. System Certificate Specifies a valid system certificate ID from Digital certificates. This certificate is attached with application (in application registration) registered with Azure and will be used for client authentication. Site Name The name of the Sharepoint site. This parameter is required in Sterling B2B Integrator 6.2.0.5 and all prior versions. For Sterling B2B Integrator 6.2.0.5_1 and later, it is optional. If the Site Name is not provided as a parameter, it must be included in the SharePoint URL. For example:https://<sharepointURL>/<managedpath>/<sitename>Document Library Document Library. Optional. It can be set in individual services. Note: The precedence order ofdocumentlibraryis Individual Services > Begin Session > Adapter Configuration. Ifdocumentlibraryis not set in any of the mentioned fields, then the defaultdocumentlibraryfor site (Shared Documents) is used.Minimum Number of Threads A tuning parameter that indicates the range of threads available for handling events to improve performance. For more information, see Performance Tuning. Must be less than or equal to the maximum number of threads value. Required. The default value is 3. Maximum Number of Threads A tuning parameter that indicates the range of threads available for handling events to improve performance. For more information, see Performance Tuning. Must be greater than or equal to the minimum number of threads value. Required. The default value is 5. Timeout Amount of time in milliseconds after which the connection terminates in case of a connection error and the number of connection retries are attempted. Optional. The default value is 120000 milliseconds. Read Timeout Time out value in milliseconds. Optional. The default value is 120000 milliseconds. Proxy Server Whether to use a proxy server. Valid values are:
- Yes – Proxy server is used
- No – No proxy server is used
Note: Proxy can be used only on ASI and it is not supported on adapter containers due to the limitation from adapter container environment.Proxy hostname A valid proxy server hostname or IP address to use as a gateway. Required if proxy server is set to Yes. Proxy port Listen port number of the proxy server. Required if proxy server is set to Yes. CA Certificate Multi-picker for all the relevant CA Certificates on the Dashboard.
filepattern parameter:- The
filepatternmust contain a valid regular expression supported by Java 8. - The following are the example values of
filepattern:Assignment Result <assign to="filepattern">.+</assign>All documents <assign to="filepattern">.*log.*</assign>All documents which contain "log" <assign to="filepattern">fvt.+</assign>All documents whose name starts with "fvt" <assign to="filepattern">.*.xml</assign>All documents whose extension is ".xml"
Configuring the sharepointclient.properties
file
The sharepointclient.properties file in the
properties directory provides settings for the
SharepointClientadapter. These properties can also be set
through customer_override. The key for the file
is sharepointclient.
sharepointclient.properties
file, perform the following steps:- Locate the
sharepointclient.propertiesfile in the properties directory where you installed Sterling B2B Integrator. - Edit the
sharepointclient.propertiesfile. - Configure the properties.
DelayWaitingOnIO |
Specifies the number of seconds to wait
for the data transfer to complete before
going into the
WAITING_ON_IO state.
The default value is 10. |
copyBufferSize |
Buffer size in GET and PUT services. The default value is 32768. |
singleRequestFileSize |
The default value for file size to be used for single request. Use this to set a global default for PUT services (default 10MB). Sharepoint can read file upto (250 MB) in single request. This is the size of the file read in memory at a time. The default value is 10485760. |
disablePersistForDocTracking |
Property that disables all persist calls
in the Sharepoint client GET service. If
this is true, the doc tracking information
will not persist. Following are Valid values:
|
idleTimeout |
Idle timeout in seconds for connections in a connection pool. The default value is 20. |
useFixedPool |
Use fixed thread pool for authentication.
If set to false,
ForkJoinPool will be
used. The default value is true. |
authPoolSize |
Fixed thread pool size for authentication. The default value is 20. |
maxTotalConnections |
The maximum number of
http connections in a
pool for all REST requests. The default
value is 3. |
useLocalTokenCache |
Uses local cache for access tokens. If set to false, every time authentication request will be sent to Sharepoint. The default value is true. |
DelayWaitingOnIO property.