SharePoint - Create Session

Declaration

<AMSHAREPOINT ACTIVITY="create_session" SITE="text" AUTHTYPE="text (options)" USERNAME="text" PASSWORD="text (encrypted)" DOMAIN="text" IGNOREINVALIDCERTIFICATE="yes/no" CERTIFICATE="text" TIMEOUT="number" SESSION="text" />

See Also

SharePoint - Add List Item, SharePoint - Add to Role (Permission Level), SharePoint - Add User to Group, SharePoint - Create List, SharePoint - Delete List, SharePoint - Get List Items, SharePoint - Get Lists, SharePoint - Update List, SharePoint - Update List Item, SharePoint - End Session

Description

Creates a new session in which to link subsequent SharePoint steps to. The session name is used to identify which operations should be linked to subsequent SharePoint steps. Numerous sessions can exist within a single task allowing several SharePoint operations to be automated simultaneously.

IMPORTANT: The SharePoint activities are performed using SharePoint Client Object Model/Web Services. Therefore, you must have SharePoint Server 2003/2007/2010 installed in order for these activities to work.

Practical Usage

SharePoint operations must be linked to a specific session. This activity is often used in the beginning of a task allowing multiple SharePoint activities to be linked to the created session. To end a session, use the End Session activity.

Parameters

Server Properties

Property

Type

Required

Default

Markup

Description

Version

Text (options)

Yes

SharePoint 2010

VERSION="SharePoint2010"

The SharePoint version to associate with this session. The available options are:

  • SharePoint 2010 (default)

  • SharePoint 2007 and older

NOTE: Some SharePoint activities are only supported in SharePoint 2010.

Site

Text

Yes

(Empty)

SITE="http://myServer/tech"

An existing SharePoint site to associate with this session. SharePoint sites are, functionally, ASP.NET 2.0 web applications that are served using IIS and a SQL Server database as a data storage back end. This parameter is active only if the Provide Settings parameter is set to Custom.

Authentication Type

Text (options)

No

Basic

AUTHTYPE="Form"

The method of authentication to use. Certain parameters become active depending on which authentication method is selected. The available options vary depending on the SharePoint version.

 SharePoint 2010 available authentication types:

  • Default (default)

  • Basic

  • Form

  • Anonymous

SharePoint 2007 and older available authentication types:

  • Basic

  • Digest

  • Proprietary

  • None

  • NTLM (default)

Username

Text

Yes

(Empty)

USERNAME="theUserName"

A valid SharePoint username. This parameter may or may not be active depending on which option is selected under the Authentication Type parameter.

Password

Text

Yes

(Empty)

PASSWORD="encryptedText"

A valid  SharePoint password. This parameter may or may not be active depending on which option is selected under the Authentication Type parameter.

Domain

Text

Yes

(Empty)

DOMAIN="myServer"

The domain that the username (specified in the Username parameter) belongs to. This parameter may or may not be active depending on which option is selected under the Authentication Type parameter.

Certificate

Text

No

(Empty)

CERTIFICATE="C:\Temp\file.cer"

The (DER encoded) certificate to use for SharePoint authentication. This parameter may or may not be active depending on which option is selected under the Authentication Type parameter.

Ignore invalid certificate

Yes/No

No

No

IGNOREINVALIDCERTIFICATE="yes"

If set to YES, specifies that invalid server certificates that are detected will be automatically ignored. Set to NO by default. This parameter is active only if the Certificate parameter is set to YES.

Session

Text

No

SharePointSession1

SESSION="mySession1"

The session name to be created. This allows several SharePoint activities to be linked to this session, eliminating redundancy. Multiple sessions can exist within a single task allowing several SharePoint operations to be automated simultaneously. The default value is SharePointSession1.

NOTE: Use the End Session activity to end an active SharePoint session.

Timeout (seconds)

Number

No

600

TIMEOUT="500"

The total number of seconds allowed to connect to the SharePoint server, otherwise a time out error is generated. The default value is 600 seconds.

 

Proxy Properties

Property

Type

Required

Default

Markup

Description

Proxy Type

Text (options)

No

Default

PROXYTYPE="http"

The proxy type to use. The available options are:

  • Default (default parameter)

  • None

  • HTTP

Use Authentication

If enabled, specifies that proxy  authentication is required, enabling authentication-based parameters. This parameter is disabled by default and only available if the Proxy Type parameter is set to HTTP.

NOTE: This is a design time parameter and therefore does not contain any markup.

Proxy Server

Text

No

(Empty)

PROXYSERVER="proxy.host.com"

The host name (server.domain.com) or IP address (xxx.xxx.xxx.xxx) of the proxy server. This parameter is available only if the Proxy Type parameter is set to HTTP.

Proxy Username

Text

No

(Empty)

PROXYUSERNAME=username

The proxy username to authenticate with. This parameter is available only if the Use Authentication parameter is enabled.

Proxy Password

Text

No

(Empty)

PROXYPASSWORD="encrypted"

The proxy password to authenticate with. This parameter is available only if the Use Authentication parameter is enabled.

Proxy Port

Number

No

808

PROXYPORT="8080"

The port that should be used to connect to the proxy server. The default port is 808. This parameter is available only if the Proxy Type parameter is set to HTTP.

 

Description Properties

The Description tab allows you to customize the text description of any step as it appears in the Task Builder's Steps Pane.

More on setting custom step description

Error Causes Properties

The Error Causes tab properties allows you to instruct a task step to react only to specific errors or ignore certain errors that should cause it to fail.

More on Error Causes properties

On Error Properties

The On Error tab properties lets you determine what the task should do if a particular step encounters an error as defined in the Error Causes properties.

More about On Error properties

Additional Notes

Expressions, Variables and Functions

All text fields allow the use of expressions such as variables, functions or AutoMate extended functions, which can be entered by surrounding the expression in percentage signs (example: %FileDateTime(myVar)% or %myVar%, %Left('Text',2)%). To help construct these expressions, you can open Expression Builder from these fields by clicking the Insert Expression (%) button or by pressing F2.

More on expressions

More on variables

More on function

More on extended functions
More on the expression builder

Example

NOTE: The code below can be copied and pasted directly into the Steps pane of the Task Builder.

 

Description: Create sharepoint session "mySession". Site url is "http://winserv08r2/my/personal/qa".

 

<AMSHAREPOINT ACTIVITY="create_session" SITE="http://winserv08r2/my/personal/qa" SESSION="mySession" />

 

↑ Top of Page