Action – creating SharePoint site

Facebooktwitterpinterestlinkedinmail

applies to version 8.0.x; author: Karol Woźniak

Task of such action is to create SharePoint site for chosen parent site. Thanks to many built-in templates it is easy to adjust site to current needs of the company.

Three methods of template selection provide elasticity. Because of possibility to set basic site properties and to activate WEBCON features, created site is ready to use just after it is set up. Using one action, it is possible to create one site.

Action example:

After entering parent site using action configuration, choose: “Site settings” and then go to “Sites and Workspaces”. State before execution of action, i.e. before creating site called “Production site”, is displayed.

Capture1

 

Further configuration takes place in WEBCON BPS Designer Studio.

Example of workflow created to illustrate the action:

Capture2

Action intercalation on Realization step. Action will be available using menu button (after opening document in browser).

Capture3

Configuration of action on “General” tab

Capture4

Configuration of action on “Template” tab

Capture5

Start step of the process. After fulfilling test data move to the next step.

Capture6

 

On “Realization” step we obtain access to menu button with already configured action (“Create new site” as seen on toolbar). After clicking menu button we can check state of existing sites in “Sites and Workspaces” tab in “Site settings”.

Capture7

Site with given name “Production site” is set.

Capture8

Created website is compatible with configuration and with chosen site template. (Examplary data is provided to test if site functions properly.)

Capture9

Action configuration settings

“General” tab contains settings of newly created site:

  • WEBCON features activation
  • Hyperlink settings
  • URL of parent site and newly created one

Capture4

“Templates” tab contains visual settings of new site (i.e. selection of template).

Capture5

Basic settings:

“General” tab settings

Capture10

“Name” is equivalet to the one displayed in SharePoint, though it is not by default connected to site URL

Text from “Description” field is displayed on the site under its name/title

“Parent site” – by default it is set to the one that connection is set up to in WEBCON BPS Designer Studio. It is possible to enter new address manually or using “Change” button functionality.

After clicking on the button, a new window “Sites” appears. It allows to choose one from already existing sites.

Capture11

Entered “URL address” is relative address to parent site

Example:

To create site with http://server/BPS/testsite, it is necessary to enter http://server/BPS in Parent Site field and in URL address field “testsite” values.

Capture12

 

 

Execution beyond SQL transaction

There are two ways to execute action

  • In transaction
  • Outside transaction

If action is executed in transaction, execution may be significantly prolonged, but it will be performed only if whole transaction has positive results.

If action is executed outside transaction, it will be performed no matter what the result is (which may be unwanted operation e.g. if something will crash during document processing, action will be still executed).

Default setting is “Execution outside transaction”

Capture13

New site properties

Capture14

  • Activate WEBCON Config feature – newly created site may have WEBCON features turned on. It is equivalent to activation on site by going into “Site settings” and “Manage site features”
  • Link site with current element – links site with current workflow element
  • Use top link from parent site – copies top link bar from parent site to newly created one
  • Include a ew site in the top link bar of parent sitear – adds new site to parent site top link bar

Save new site address

It is possible to save address of newly created site to existing form field. Such field has to be of “Single line of text” type. Value will be copied from “URL Address”.

Capture15

Choose site template

There are three ways to choose template for new site.

Statically:

Static choice boils down to language and template selection. After clicking “Get” button, all templates are being downloaded from SharePoint server.

Capture16

Dynamically:

With dynamic selection it is necessary to enter Locale ID and template name.

Locale ID is Windows culture ID, e.g. 1045 (polish culture)

Template name has to be entered in given form: <code>#<configuration number> in case of predefined templates (BLOG#0), or in in case of templates added by user: {<template guid>}#<template name>, {30BBEEB8-42A0-4DCE-B1E9-FDA480A584F8}#site_template. ID of template created by user has to be downloaded from Solutions table and SolutionsID column.

Example:

Capture17

From form field:

New site may also be created by using form field of “Choice field” type. In its configuration, data source hast to be set as “Site templates” from System data sources.

Capture19

Example:

Template choice is done by a selector on SharePoint site

Capture20

Form field tree

Editor allows to use system fields, form fields, context variables and Objects’ identifier and also entering them to form fields (by double-click or drag&drop mechanism)

Capture18

 

 

Leave a Reply

Your email address will not be published. Required fields are marked *