Create Subsite step
Use the Create Subsite step to create a new SharePoint subsite. You can use this step in a workflow to create the new subsite and then add lists and libraries to it in subsequent workflow steps.
Subsite creation works in the following way:
- During the Create Subsite step, the subsite is created and automatically integrated with K2 for SharePoint
- After the Create Subsite step, you can use the Create List and the Create Library steps in the workflow to add lists and libraries to the new site (even though it technically doesn't exist yet), as well as items and documents to those lists and libraries
- However, if you need to design new K2 applications on the subsite, you must manually activate K2 for SharePoint
You can use the Create Subsite step, for instance, to automatically create a new subsite for each instance of a client details workflow, with new lists and libraries to track sensitive information.
Drag the Create Subsite step from the SharePoint category, Favorites bar, or the Recent category onto the canvas.
Example of a Create Subsite step in a workflow- From the Toolbox, click the SharePoint category and then Sites. Drag the Create Subsite step onto the canvas.
- Select the added step and click the expand / collapse toggle to expand the Configuration Panel. You can also double click the step to expand the panel.
- Select the Create Site tab. Use this tab to configure the properties.
- From the menu select Browse and navigate to a location to add the subsite.
- Select the Site and click OK.
- Specify the subsite URL. Type values or create dynamic values by dragging Functions,
Fields,
SmartObjects and
Workflow-related items from the Context Browser into the fields.
- Select a template from the Site Template menu.
- Specify a title (name) for the subsite. You can drag fields from the Context Browser or type a value in manually.
- To add additional properties, click Add.
- To delete properties, select them and click the Trash bin.
- To create a reference click Create. Reuse this reference in the current step or from another step in your workflow.
- To edit the auto-generated reference title, click Edit.
- To locate the added reference, expand the Context Browser, select Fields and then expand the Reference section.
- With the step selected, select the Properties tab.
- Click the Errors tab.
- If this option is selected - The existing subsite is used and a new one is not created.
- If this option is not selected - A runtime exception error occurs.
Your changes are automatically saved.
The following table explains the options available on this tab:
Option | Explanation | How to Use |
---|---|---|
Pick Site | Use this to specify the SharePoint Site Collection in which to create the subsite. Select a site. | Click the menu and select Browse to browse to a specific one. |
URL Name | Use this to specify the relative URL of the new subsite. This is the URL minus the server address. For example, /mysubsite | Type a value in the URL Name field or drag a pre-configured field from the Context Browser such as a Variable, Item Reference or SmartObject Load method property. |
Properties | ||
Site Template | Use this to select a template for the subsite. Templates determine the default views and organization of the site. | Click the Site Template menu to select a template. K2 supports various site templates and can be activated to publishing sites. K2 does not check site template types, only Lists and Libraries. If your site template has Lists or Libraries that are not supported, then your site template will not be supported. For example, the Publishing site template contains unsupported types such as the Reusable Content library, and this library cannot be integrated with K2. Check the supported types to ensure that your site template, and the types that it contains, are supported. For more information on supported artifacts see Supported Artifacts. |
New Subsite | Specify the name for the site, and optionally add a description for the subsite. Enter a value or drag Functions, Fields, SmartObjects and Workflow related items from the Context Browser into this field. | Click the Name field to add a name by typing or dragging a value. Click Add to add a property. To delete a property, select it and click the Trash bin. |
Use Subsite Later | Allows you to create a reference to the subsite to use from other steps within the workflow. | Click the Create link to create a reference. Click the Edit link to edit the reference name. If you edited the reference name and want to reset it, click the Reset Name link. |
For more information about the different browse states and errors, see the Browse States topic.
For more information on how to use the breadcrumb bar, see the How to use the Breadcrumb topic.
For more information on how to use SmartFields, see the Smartfield Composer topic.
The following table explains the options available on this tab:
Option | Explanation | How to Use |
---|---|---|
Title / Name | By default, each step on the canvas has a step title. You can change this title to suit your workflow logic and show it on the canvas by checking the Show Label box. | Enter a value into the Title/Name field. |
Reset link | Use the link to reset any changes to the title. | Click the Reset link to reset the Title/Name field to default value. |
Show Label | Allows you to see the step label on the canvas. The label shows the value of the title. | Check the check box to display step label on the canvas. |
Description | Allows you to add a detailed description for the step. | Enter a value into the Create New field. |
Notes | Allows you to add additional notes for the step. | Enter a value into the Notes field. |
Different types of exceptions can occur on a step, such as:
Type | Description |
---|---|
Known exceptions | Any SmartWizard or standard wizard that has Boolean options for handling known exceptions have these options displayed as check boxes in the Known exceptions section of the Exceptions tab. |
Unhandled exceptions | Any unknown runtime exceptions. |
The tab contains the following known exceptions:
Exception | Explanation | How to Use |
---|---|---|
Continue on error | On step execution and an error occurs, continue to the next step in the workflow. | Check the check box to continue the workflow if a problem occurs. |
Use existing subsite on site if match found | If a subsite already exists, the following options are available: | Check the check box to use the existing subsite. Uncheck to raise an exception error if a matching subsite is found. |
The tab contains the following unhandled exception:
Exception | Explanation | How to Use |
---|---|---|
Log Exception | Logs the exception to the error log. | Check the box to log the exception. |
- See the Supported Artifacts topic for additional information on support for various SharePoint types and templates.