63
Datapolis.com, ul Wiktorska 63, 02-587 Warsaw, Poland tel. (+48 22) 398-37-53; fax. (+ 48 22) 398-37-93, [email protected] QUICK START Workbox v 2.3.20.1500 Last modification on: 19 August 2014 Thank You for Choosing Workbox ........................................................................................................... 3 1 Introduction .................................................................................................................................... 4 1.1 What is Workbox? ................................................................................................................... 4 1.2 Who is a Workbox user? ......................................................................................................... 4 1.3 See the Tutorials ...................................................................................................................... 4 2 Start Creating Workflows! .............................................................................................................. 4 2.1 Before You Start – Permission Considerations ........................................................................ 4 2.2 Create a Workflow................................................................................................................... 5 2.2.1 Create a List Workflow ........................................................................................................ 5 2.2.2 Create a Site Workflow........................................................................................................ 6 2.2.3 Create a Reusable or Globally Reusable Workflow ............................................................. 7 2.3 Designer................................................................................................................................... 8 2.3.1 Adding States....................................................................................................................... 9 2.3.2 Adding Actions................................................................................................................... 10 2.3.3 Adding Decisions ............................................................................................................... 12 2.3.4 Activities ............................................................................................................................ 15 2.3.5 Variables ............................................................................................................................ 19 2.3.6 Action Launch Forms ......................................................................................................... 21 2.3.7 Workflow Initiation Form .................................................................................................. 37 2.3.8 Lookups and Functions ...................................................................................................... 38 2.3.9 Permissions........................................................................................................................ 40 2.3.10 Action Execution Conditions ......................................................................................... 47 2.3.11 Self-Timers ..................................................................................................................... 48 2.3.12 Action Ordering and Icons ............................................................................................. 49 2.3.13 Saving Workflow............................................................................................................ 52 2.3.14 Deploying Workflow ...................................................................................................... 52 2.3.15 Workflow Properties ..................................................................................................... 52 2.3.16 Workflow Validation...................................................................................................... 53 2.3.17 Procedures..................................................................................................................... 53 2.3.18 Size and Performance .................................................................................................... 54 2.3.19 Advanced Workflow Editing .......................................................................................... 55 3 How to Use Workbox? .................................................................................................................. 56 3.1 List Workflows ....................................................................................................................... 56 3.1.1 Workflow Column.............................................................................................................. 56 3.1.2 Item Context Menu ........................................................................................................... 56 3.1.3 Action Launch Form........................................................................................................... 57 3.1.4 Bulk Action Launch ............................................................................................................ 57 3.1.5 Workflow History .............................................................................................................. 59 3.2 Site Workflows ...................................................................................................................... 60 3.3 Reusable Workflows .............................................................................................................. 61 3.4 Reporting Service .................................................................................................................. 62 3.4.1 GetUserActions.................................................................................................................. 62 3.4.2 GetStartedWorfklows ........................................................................................................ 62

Quick Start - Workflow and Process Management for SharePoint · at least basic knowledge of SharePoint Foundation 2010 and/or SharePoint Server 2010. 1.3 See the Tutorials Please

  • Upload
    others

  • View
    1

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Quick Start - Workflow and Process Management for SharePoint · at least basic knowledge of SharePoint Foundation 2010 and/or SharePoint Server 2010. 1.3 See the Tutorials Please

Datapolis.com, ul Wiktorska 63, 02-587 Warsaw, Poland tel. (+48 22) 398-37-53; fax. (+ 48 22) 398-37-93, [email protected]

QUICK START Workbox v 2.3.20.1500

Last modification on: 19 August 2014

Thank You for Choosing Workbox ........................................................................................................... 3 1 Introduction .................................................................................................................................... 4

1.1 What is Workbox? ................................................................................................................... 4 1.2 Who is a Workbox user? ......................................................................................................... 4 1.3 See the Tutorials ...................................................................................................................... 4

2 Start Creating Workflows! .............................................................................................................. 4 2.1 Before You Start – Permission Considerations ........................................................................ 4 2.2 Create a Workflow................................................................................................................... 5

2.2.1 Create a List Workflow ........................................................................................................ 5 2.2.2 Create a Site Workflow ........................................................................................................ 6 2.2.3 Create a Reusable or Globally Reusable Workflow ............................................................. 7

2.3 Designer ................................................................................................................................... 8 2.3.1 Adding States ....................................................................................................................... 9 2.3.2 Adding Actions ................................................................................................................... 10 2.3.3 Adding Decisions ............................................................................................................... 12 2.3.4 Activities ............................................................................................................................ 15 2.3.5 Variables ............................................................................................................................ 19 2.3.6 Action Launch Forms ......................................................................................................... 21 2.3.7 Workflow Initiation Form .................................................................................................. 37 2.3.8 Lookups and Functions ...................................................................................................... 38 2.3.9 Permissions ........................................................................................................................ 40 2.3.10 Action Execution Conditions ......................................................................................... 47 2.3.11 Self-Timers ..................................................................................................................... 48 2.3.12 Action Ordering and Icons ............................................................................................. 49 2.3.13 Saving Workflow ............................................................................................................ 52 2.3.14 Deploying Workflow ...................................................................................................... 52 2.3.15 Workflow Properties ..................................................................................................... 52 2.3.16 Workflow Validation ...................................................................................................... 53 2.3.17 Procedures ..................................................................................................................... 53 2.3.18 Size and Performance .................................................................................................... 54 2.3.19 Advanced Workflow Editing .......................................................................................... 55

3 How to Use Workbox? .................................................................................................................. 56 3.1 List Workflows ....................................................................................................................... 56

3.1.1 Workflow Column .............................................................................................................. 56 3.1.2 Item Context Menu ........................................................................................................... 56 3.1.3 Action Launch Form ........................................................................................................... 57 3.1.4 Bulk Action Launch ............................................................................................................ 57 3.1.5 Workflow History .............................................................................................................. 59

3.2 Site Workflows ...................................................................................................................... 60 3.3 Reusable Workflows .............................................................................................................. 61 3.4 Reporting Service .................................................................................................................. 62

3.4.1 GetUserActions .................................................................................................................. 62 3.4.2 GetStartedWorfklows ........................................................................................................ 62

Page 2: Quick Start - Workflow and Process Management for SharePoint · at least basic knowledge of SharePoint Foundation 2010 and/or SharePoint Server 2010. 1.3 See the Tutorials Please

page 2 of 63

3.4.3 GetLaunchedActions ......................................................................................................... 62 4 Troubleshooting............................................................................................................................ 62

4.1 Known Errors ......................................................................................................................... 62

Page 3: Quick Start - Workflow and Process Management for SharePoint · at least basic knowledge of SharePoint Foundation 2010 and/or SharePoint Server 2010. 1.3 See the Tutorials Please

page 3 of 63

Thank You for Choosing Workbox We hope that you will find our product useful. If you have any comments or questions regarding Workbox or this guide, please feel free to contact us. Contact details are included in Troubleshooting section of this document. We will gladly help you solve any issues. Please find some time to read this document, which will guide you through Workbox’s functionalities and show you how to use them fully. Setup configures a fully functional solution. By default, a 30-day Trial version is installed, this time constraint being the only limitation. In order to use Workbox after 30 days, you need to purchase and install a license. When you have installed the Trial version of Workbox and you want to continue using it after the trial period, you don’t have to reinstall or reconfigure anything. It is sufficient to purchase and activate either the Standard or Enterprise license. More about licensing can be found in the Setup Guide in the Licensing chapter. The Setup Guide can be found in the same folder as this document. If you encounter any problems while using our product, please refer to the instructions included in Troubleshooting section.

Workbox is still expanding. While its base functionality is fully tested and stable, we are constantly adding new functionalities with each release. We strongly recommend you to register on http://partner.datapolis.com.pl, where you will be able to easily track latest Workbox releases. Also, you will be able to get additional Workbox materials and to try our on-line demonstration environment with latest version of Workbox.

If you experience any problems with Workbox, either during installation or when using it, please contact us at http://www.datapolis.com/en/support.

If you are a developer, you can start creating your own activities and functions. Download Workbox SDK at http://www.datapolis.com/en/Offer/Products/WorkBox/Pages/SDK.aspx

If you are interested in purchasing a license, see our licensing and pricing information at http://www.datapolis.com/en/Offer/Products/WorkBox/Pages/SaleInfo.aspx

Page 4: Quick Start - Workflow and Process Management for SharePoint · at least basic knowledge of SharePoint Foundation 2010 and/or SharePoint Server 2010. 1.3 See the Tutorials Please

page 4 of 63

1 Introduction

1.1 What is Workbox? Workbox is an advanced platform designed for creating and managing business processes. It is a practical tool for defining simple document flows, such as flow of invoices, absences, sick leaves or business trips, as well as modeling complex business processes based on company’s IT systems.

1.2 Who is a Workbox user? Workbox has been designed for managers and business analysts who create business processes within a company. Using Workbox does not require programming skills, though the user should have at least basic knowledge of SharePoint Foundation 2010 and/or SharePoint Server 2010.

1.3 See the Tutorials Please view the tutorials available on our web site www.datapolis.com. These tutorials will show you how to use Workbox in order to create both simple and advanced workflows.

2 Start Creating Workflows!

2.1 Before You Start – Permission Considerations In order to be able to use Workbox workflows, user must have certain permission levels set in SharePoint. Below you will find minimal permissions required for specific workflow management and usage tasks:

In order to create a List Workflow, user must have Manage Lists and View Application Pages permissions for the list on which the workflow is to be created.

In order to create a Site Workflow, Reusable Workflow or Globally Reusable Workflow, user must have Manage Permissions, Manage Web Site and View Application Pages permissions assigned for the Site on which the workflow is to be created. In case of Globally Reusable Workflows, the Site will always be the Root Site of the Site Collection.

To properly use lookups to SharePoint entities and Workbox functions, user should have Use Remote Interfaces permissions, as well as sufficient permissions to access the entity. To use lookups to lists and list items, user should have Manage Lists and Edit Items permissions.

Below you will find a few sets of permission levels that you can assign to users to get a specific behavior:

Manage Lists, Manage Permissions, View Application Pages, Edit Items – will allow user to create and run workflows and workflow actions (although the Workbox’s Workflow Actions icon on Ribbon will be inactive).

Manage Lists, View Application Pages, Edit Items – user will be able to create and run workflows and workflow actions (although the Workbox’s Workflow Actions icon on Ribbon will be inactive).

Manage Lists, View Application Pages, View Items – user will be able to create workflows and launch workflow actions (although the Workbox’s Workflow Actions icon on Ribbon will be inactive), but will not be able to run workflows.

In general terms, to run a List or Site Workflow, user needs to have Edit Items permission. To execute a workflow action, user needs to have View Items permission.

Page 5: Quick Start - Workflow and Process Management for SharePoint · at least basic knowledge of SharePoint Foundation 2010 and/or SharePoint Server 2010. 1.3 See the Tutorials Please

page 5 of 63

2.2 Create a Workflow Creating workflows with Workbox is an easy task. Workflows can be created on SharePoint lists and document libraries – these are called List Workflows. Any user with permissions to manage the list can quickly build and run such a workflow. But workflows can also be created on Sites, instead of single lists. This type of workflows is called Site Workflows. Additionally, there are two more workflow types: Reusable Workflows and Globally Reusable Workflows. Both these types allow you to create workflows to run on specific Content Types, thus allowing you to easily attach a single workflow definition to more than one list. Reusable Workflow can be used within one Site only, while Globally Reusable Workflow can be used within all site of the current Site Collection.

2.2.1 Create a List Workflow

When Workbox is installed on the SharePoint Farm, a new position in the List Settings menu appears: Workbox Settings, allowing users to manage workflows on a given list.

Note: More than one workflow can be defined for a given list. All the workflows can be launched simultaneously. Note: Standard SharePoint workflows can still be run on a list where Workbox workflows are present. Please also note that, when referring to workflows or workflow management in this document, Workbox workflows and functionalities are meant, unless stated otherwise. Workbox Workflow Management site provides a list of workflows currently defined on a given SharePoint list. To create a new workflow, click the Create Workflow link. After providing a name, graphical workflow designer will open.

Page 6: Quick Start - Workflow and Process Management for SharePoint · at least basic knowledge of SharePoint Foundation 2010 and/or SharePoint Server 2010. 1.3 See the Tutorials Please

page 6 of 63

Note: Workflow names must be unique within a site.

2.2.2 Create a Site Workflow

After Workbox is installed, two new options appear in Site Actions menu: Use Site Workflows and Manage Workbox Workflows.

To create a new Site Workflow, click Manage Workbox Workflows and a workflow management page will open. This page allows you to manage three types of workflows: Site, Reusable and, if you are currently on the Root Site of your Site Collection, Globally Reusable. The whole page is similar to the one used for managing List Workflows (see 2.2 for more details). To create a new Site Workflow, click the Create site workflow link at the bottom of the Site workflows section:

Page 7: Quick Start - Workflow and Process Management for SharePoint · at least basic knowledge of SharePoint Foundation 2010 and/or SharePoint Server 2010. 1.3 See the Tutorials Please

page 7 of 63

Designing Site Workflows is generally the same as designing List Workflows, although not every lookup node available for List Workflows is available for Site Workflows. These nodes are: Current list/library and Current item.

2.2.3 Create a Reusable or Globally Reusable Workflow

Both Reusable and Globally Reusable Workflows are created and managed in the same way as Site Workflows. Please note that Globally Reusable Workflows can only be created on the Root Site of the Site Collection.

When creating a Reusable or Globally Reusable workflow, you have to specify the Content Type with which the workflow is to be associated. This means that you can narrow down the types of objects that the workflow can be running on. You can either set a single Content Type or let the workflow run on all Content Types available. Please note that the workflow definition can be associated either with the source Content Type or any Content Types that inherits from it. Designing Reusable Workflows is generally the same as designing List Workflows, although not every lookup node available for List Workflow is available for Site Workflow. When building workflow for a Content Type, in lookup nodes: Current item, Current list/library -> Item and Current list/library -> List columns you can only use the columns that are available for that Content Type and the ones that are present on every list (like Title).

Page 8: Quick Start - Workflow and Process Management for SharePoint · at least basic knowledge of SharePoint Foundation 2010 and/or SharePoint Server 2010. 1.3 See the Tutorials Please

page 8 of 63

If you choose to build a workflow for the “All” Content Type, in lookups to current list or current item you will only be able to use columns that are common for all Content Types.

2.3 Designer Workbox Designer is a tool for creating workflows, where you can set up the whole process, along with a number of various conditions, permissions, automated tasks and other elements. Then you can deploy it on your list, where it will be run. While workflow definitions are rather simple, they reflect real processes, however complex they may seem from the outside. The person who designs a process has to learn basic terminology: state, action, activity and permission. Each process hast to start and end somewhere – these are the entry points and exit points, respectively. They are represented as a green (start) and red (end) circles on the diagram. Other workflow elements are: states, actions (transition from state to state), activities (operations which are to be performed by the system when making a transition between states) and permissions. When entering Workbox Designer for the first time, you see a plane, empty but a starting and ending points of the process. On the left side of the screen is also a toolbar with a set of options used to build the process and manage its properties:

In the top-left corner of the screen is a role toolbar, where you can define new roles to be used in the process and manage existing ones.

Add new state

Add new action

Manage workflow variables

Save the workflow definition

Revert to last saved definition of the workflow

Check the workflow definition

Set the workflow properties

Go back to SharePoint list

Save and deploy the workflow

Page 9: Quick Start - Workflow and Process Management for SharePoint · at least basic knowledge of SharePoint Foundation 2010 and/or SharePoint Server 2010. 1.3 See the Tutorials Please

page 9 of 63

On the top-right side of the screen is a drop-down menu with support options:

Note: Click the “Support web site” to go to the Datapolis support page, where you can request online training, find all known errors or ask Workbox developers a question. Use “Report a bug” option if you encounter a problem with Workbox. It will help us improve our product. “Workbox help” opens the help window.

2.3.1 Adding States

States are a logical representation of each phase of a process. It is important to understand that a state defines a general situation in which an object (be it a document or a list item), on which workflow is running, could be placed. For example, a vacation request document could be either approved or rejected, so two phases – and, in effect, workflow states – of the vacation request workflow could be “Request approved” and “Request rejected”. To define a new state in the workflow, click the “Add new state” icon in the toolbar. When you point your mouse cursor on a free space of the design area, an outline of a rectangle will be displayed. Click again in a place where the state should be created. Example: Let us assume that a process of submitting an application will consist of three phases: Filling in an Application, Sent to the manager and Completing Application.

When the process is starting, a person who submits an application should fill in a proper form. State: “Filling in an application”. Next, the form needs to have a manager’s acceptance (State: “Sent to the manager”). Now comes the phase when an application can be accepted, denied or transmitted to complete it (State: “Completing Application”).

When we create a new state, it has a default name of a “New state”. In order to change it, we have to edit the state properties. Either double-click on the state or click a small pencil icon which will appear when you point mouse cursor over the state. The other icons are to remove the state and create a new action.

Page 10: Quick Start - Workflow and Process Management for SharePoint · at least basic knowledge of SharePoint Foundation 2010 and/or SharePoint Server 2010. 1.3 See the Tutorials Please

page 10 of 63

State properties window looks like the following:

Here we can do the following:

Name the state and add its description.

Change a color of the state. This will make the diagram more readable, especially when it’s

complex.

Assign permissions to item fields. This allows you to control who should be able to read and

edit each column on a list when a process is in a given state.

Set up self-timers, which allow automating parts of a process and can perform recurring

tasks.

Remove the state from the definition (works the same way as aforementioned “Delete state”

icon).

2.3.2 Adding Actions

Actions represent transitions between states. On the workspace actions are shown as lines connecting connect two states. Actions are launched by users, thus pushing the process forward, along defined path. Actions can be created in two ways:

By clicking the “Add new action” icon in the toolbar.

By clicking the “Add new action” icon displayed on a state.

Page 11: Quick Start - Workflow and Process Management for SharePoint · at least basic knowledge of SharePoint Foundation 2010 and/or SharePoint Server 2010. 1.3 See the Tutorials Please

page 11 of 63

A small icon will appear next to the mouse cursor. When you move the cursor over a state, a number of connection points will appear. Click one of these and, holding the mouse button, move the cursor to the next state, where you can release the mouse button over the target state’s connection point. Note: Because action represents transition between states, its direction is important. The direction is marked by a small arrow in a circle:

In other words, it is important that, when creating actions, you begin in a state from which the action should start, and end in a state to which the action should lead. Note: The action coming from the starting point (the “Start” state) is a special action which is always executed when workflow starts. Its standard name is “Initial action” and has disabled permission, execution conditions and launch form management (these functionalities are described later in this document). Action lines can be bent, giving you a degree of control over how the action should be shown in the diagram. To bend an action line, click it in a desired place, then, holding the left mouse button, drag the bending point to a new place. It is useful when you want to keep you workflow diagram readable. Example: For the state “Sent to the manager” we can define several actions: Accept, Deny, Send to complete, Withdraw an application. Launching Accept, Deny or Withdraw an application action ends the process, while launching the Send to complete action causes transition to “Completing application” state.

Page 12: Quick Start - Workflow and Process Management for SharePoint · at least basic knowledge of SharePoint Foundation 2010 and/or SharePoint Server 2010. 1.3 See the Tutorials Please

page 12 of 63

As was the case with states, you can edit action properties. You can open the properties window by double-clicking the action line or by clicking the “Edit action” icon, which appears when you point the mouse cursor over the action:

There is also one other icon (“Delete action”) which you can use to remove the action from the diagram. The action properties window looks like this:

Here you can do the following:

Change the action name and description.

Build Action Launch Forms.

Set permissions, specifying users who can launch the action.

Define a set of conditions which must be met in order to launch the action. For example, you might want to allow the action to be launched only on Sunday evening.

Build sequence of activities to be performed when the action executes.

2.3.3 Adding Decisions

Decision allows automatically choosing action, which should be launched when condition is met. Example: User1 uploads a file into documents library. The file should enter a proper state (for example “State2”) depending on which department User1 works in. Using decision from screenshot below, with properly defined condition, it is now possible to launch “Action1” and enter “State2”.

Page 13: Quick Start - Workflow and Process Management for SharePoint · at least basic knowledge of SharePoint Foundation 2010 and/or SharePoint Server 2010. 1.3 See the Tutorials Please

page 13 of 63

You can add decision by clicking its icon on the toolbar:

Just drag and drop it somewhere in work area and add incoming and at least one outgoing action. To edit decision you need to double click on it or click on pencil icon, appearing when hovering over decision.

Page 14: Quick Start - Workflow and Process Management for SharePoint · at least basic knowledge of SharePoint Foundation 2010 and/or SharePoint Server 2010. 1.3 See the Tutorials Please

page 14 of 63

Here you can do the following:

Change name and description of decision

Edit settings for specific actions (“Decision path” form, screenshot below)

With above form, you can:

1. Set the order of actions, 2. Open window to change action execution conditions, 3. Open window to change permissions

How it works: When incoming action is launched condition checking starts for every outgoing action in order provided in "Decision path” form.

1

2

3

Page 15: Quick Start - Workflow and Process Management for SharePoint · at least basic knowledge of SharePoint Foundation 2010 and/or SharePoint Server 2010. 1.3 See the Tutorials Please

page 15 of 63

If condition for current action is met then decision checks if user that launched incoming action has permissions to launch current action. If more than one condition is met, only the first action will be launched. If none of the conditions is met, then the last action defined in “Decision path” form will be launched.

2.3.4 Activities

During transition between states, you might want to perform some additional operations, for example send an e-mail to a user who will have a task to perform in the next state. You can achieve this by using activities – small programs performing a given operation or operations. Activities can be set in a desired order, you can also execute activities when certain conditions are met. For all intents and purposes, you can define a whole new workflow – a sequential one. Activities are placed on a special diagram – activity diagram – which can be accessed through the action properties window. Each action can have a unique set of activities.

Page 16: Quick Start - Workflow and Process Management for SharePoint · at least basic knowledge of SharePoint Foundation 2010 and/or SharePoint Server 2010. 1.3 See the Tutorials Please

page 16 of 63

Adding activities to the diagram is very simple: you just drag them from the list on the right and drop them on the diagram:

When you have added a new activity to the diagram, you might want to edit the activity’s parameters. Double-click on the activity or click the pencil icon in the top-left corner of the activity. A new window will open:

Page 17: Quick Start - Workflow and Process Management for SharePoint · at least basic knowledge of SharePoint Foundation 2010 and/or SharePoint Server 2010. 1.3 See the Tutorials Please

page 17 of 63

In this window you have a brief description of the activity, telling you what operation it performs. You can change activity’s displayed name and set the parameters the activity takes. Some of them might be required (marked with an asterisk) and you must provide them with a value; otherwise the activity will not run properly. You can see a description of each parameter in a tooltip: just point your mouse cursor over the small

icon next to the parameter you want to learn about. You can reuse activities that you have already defined, retaining its parameters, so that you won’t have to set them again. Just drag the chosen activity from the diagram and drop it on the list on the right. The “Clipboard” tab will be opened automatically and your activity will appear on the copied activities list. If you want to use this activity elsewhere, simply drag and drop it from the clipboard to the diagram.

Page 18: Quick Start - Workflow and Process Management for SharePoint · at least basic knowledge of SharePoint Foundation 2010 and/or SharePoint Server 2010. 1.3 See the Tutorials Please

page 18 of 63

The clipboard is shared for all actions, so you can copy activities from one action to another. Also, the clipboard is saved with workflow definition, so when you can exit the Designer without losing copied activities.

Loop Activities There might be a situation when you would like to repeat a set of activities several times, for instance when you are processing a number of list items. Building multiple sets of activities may be tiresome, plus it will increase the workflow’s size and decrease its performance. A good idea is to use loops. Loops are activities in which you can nest a set of other activities (including other loops), which will be executed a number of times. In Workbox there are two loop activities, each being a loop of a different type:

While loop,

Foreach loop. The While loop (or simply “Loop”, as the activity is named) iterates for as long as its conditions are met (unless the maximum number of iterations is constricted). The Foreach activity (or “For each item”) first retrieves a collection of list items that meet defined conditions, and then runs for each of the items. The number of iterations is the number of retrieved items. Note: The items are retrieved only once, at the start of the activity.

Page 19: Quick Start - Workflow and Process Management for SharePoint · at least basic knowledge of SharePoint Foundation 2010 and/or SharePoint Server 2010. 1.3 See the Tutorials Please

page 19 of 63

Important: To use the loop activities, you must first enable the WhileActivity type in your web.config file. To do this, navigate to your Web Application’s virtual directory (usually a C:\inetpub\wwwroot\wss\VirtualDirectories\port number on which your Web Application is running). Open the web.config file (you can use Notepad, for it is a text file). Navigate to line: <authorizedType Assembly="System.Workflow.Activities, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" Namespace="System.Workflow.*" TypeName="WhileActivity" Authorized="False" />

(It should be in configuration/System.Workflow.ComponentModel.WorkflowCompiler/authorizedTypes section.) Change the Authorized attribute from False to True, so that the line will look like: <authorizedType Assembly="System.Workflow.Activities, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" Namespace="System.Workflow.*" TypeName="WhileActivity" Authorized="True" />

Save the file. Now you should be able to successfully deploy and launch workflows with loop activities. If you do not perform this routine, workflows with loop activities will not deploy. Please note that there is a risk of a severe performance decrease of the whole SharePoint infrastructure if an infinite loop is executed. Make sure that you define loop conditions with care, also be sure to set a maximum allowed number of iterations, which will help to control any unexpected situations.

2.3.5 Variables

Workflow variables are used to store information within the workflow. Thanks to variables it is possible to ask user to provide some data (in our example it might be a reason for rejecting an application) in order to use it somewhere else in the workflow. Some activities return the result of their work, for instance the activity “Add item” returns the ID of the element it created. Variables can be created in the “Workflow variables” window, which can be accessed from the toolbar (“Manage workflow variables”) or through action properties, by clicking the “Manage variables” button on the “Assign variables to action” form.

When adding (or editing) a variable we can define its type (integer, real number, string, date and time, true/false).

Page 20: Quick Start - Workflow and Process Management for SharePoint · at least basic knowledge of SharePoint Foundation 2010 and/or SharePoint Server 2010. 1.3 See the Tutorials Please

page 20 of 63

We can also name it the way we chose and provide a small description.

If we want to request user to provide a value for this variable, we need to assign the variable to action. Go to action’s properties window and click the “Launch form” button.

In the following step you can assign variables to action, thus creating Action Launch Form.

Page 21: Quick Start - Workflow and Process Management for SharePoint · at least basic knowledge of SharePoint Foundation 2010 and/or SharePoint Server 2010. 1.3 See the Tutorials Please

page 21 of 63

2.3.6 Action Launch Forms

Action Launch Form (ALF) is a page that is shown after user clicks an action link on either item’s context menu or item’s view form. With this form, you can request or require user to provide information you can then use within the workflow. This data, as mentioned before, will be stored in workflow variables.

The following form types are available: Quick Form, InfoPath Form and Custom Form. We can also set the action to run without showing any form – user won’t be asked to confirm action execution. Also, there is the possibility to set the page to which user should be redirected after the action has been successfully launched.

2.3.6.1 Quick Form

Quick Form is the default form type. Even if no action form has been defined for the action, an empty form will be shown prior to action launch. The Quick Form is equivalent of the ALF as it was in Workbox versions prior to 2.2.

Page 22: Quick Start - Workflow and Process Management for SharePoint · at least basic knowledge of SharePoint Foundation 2010 and/or SharePoint Server 2010. 1.3 See the Tutorials Please

page 22 of 63

The first step in creating a Quick Form is to assign workflow variables to the action. The variables will hold the data provided by users. The assignment can be done in the “Assign variables to action” window:

In this form we have the following elements:

List of available workflow variables, i.e. all the variables defined in the workflow and not already assigned to the action. You can assign a variable by either double-clicking it or by clicking the green icon on the right. If you wish to define new variables, click the “Manage variables” button, which will open the “Workflow variables” window described before.

List of assigned workflow variables. For these variables a form will be generated when user launches the action, allowing data to be collected.

Form header and form footer, where you can provide additional elements like form title, instructions to user, etc. You can use HTML and JavaScript, so you can do some advanced formatting, insert images and links, and even embed web applications, for instance Flash or Silverlight.

“Save as template” and “Load from template” buttons, which allow you to save the current action launch form definition – along with all its settings – as a template, which can then be reused in a different action. This functionality is not supported in case of InfoPath forms.

It is important to understand the difference between workflow variables and form fields. Workflow variable is an abstract object where data is stored and from where it can be retrieved and used within the workflow. Form field is a part of user interface, a place where user can enter data that will be assigned to the workflow variable. Fields are generated automatically when user initiates action execution. For each workflow variable assigned to a given action, one field is generated. Each field has a certain type, associated with the kind of data it can gather. This is a simple way to require user to provide specific data. Also, the field will be rendered in such a way to help user in providing valid and well-formatted information. For instance, for the “Date time” field a date picker control will be generated. Note that workflow variables have their own types, so you can use only field types compatible with corresponding variable. For more information on this matter, please see Workbox help: Functionalities -> Action launch form -> Field properties.

Page 23: Quick Start - Workflow and Process Management for SharePoint · at least basic knowledge of SharePoint Foundation 2010 and/or SharePoint Server 2010. 1.3 See the Tutorials Please

page 23 of 63

A sample field can look like this:

Please note the label and description on the left, which are two of the field’s properties. Each field has a set of properties defining its appearance and data it accepts. These properties can be set in a “Form field properties” window, which can be accessed by double-clicking assigned variable or a pencil icon. The properties window may look like this:

The order in which the fields appear on the form can be explicitly defined. As was said earlier, the fields are generated according to variables assigned to the action. The variables are shown on the “Variables selected as form fields” list in the “Assign variables to action” window. Order in which these variables appear on the list defines the order of the fields on the form. To change the order, simply move the variable to a desired place, which can be done by clicking the arrow icons on the gray bar to the left of each of the assigned variables.

2.3.6.2 InfoPath Form

This form type lets you use an existing, published InfoPath form. Currently this functionality is supported only in Microsoft SharePoint Server 2010 Enterprise. You also have to have the InfoPath Services service running. At the end of this section you will find a tutorial on how to create an InfoPath form that is compatible with Workbox.

Page 24: Quick Start - Workflow and Process Management for SharePoint · at least basic knowledge of SharePoint Foundation 2010 and/or SharePoint Server 2010. 1.3 See the Tutorials Please

page 24 of 63

The form definition window has a drop-down list with all published InfoPath forms found on the current site collection. After selecting the form, a list of its fields will appear. Each field can then be assigned to a workflow variable. Additionally, a default value can be set for each field. Note: The default value for each field can be set both in InfoPath Designer and in Workbox Designer. We strongly suggest deciding on either option; otherwise it can cause unpredictable behavior. Each variable can only be associated with one field on the form. It’s also vital to pay close attention to both field and variable types in order to avoid assigning incompatible values to the latter. For instance, consider a situation when a workflow variable of Number type has been associated with a field of Date type. Workbox supports all standard InfoPath input controls, as well as most standard containers – excluding Choice Group along with Choice Section. Please note that specific controls require specific way of setting the default value.

Text Box and Rich Text Box accept data in any format;

Drop-Down List Box, Combo Box, Multiple-Selection List Box, List Box require that you provide the Value of the specific choice option you wish to set as default. Also, Multiple-Selection List Box can have multiple choices selected at once; to set them, provide their values separated by new line character;

Check Box requires you to provide one of the following values: “true” or “1” is you want the checkbox to be checked, “false” or “0” if not;

Option Button: provide the value of the button you wish to be selected. You can find this value in the “Value when selected” field on Option Button Properties in InfoPath Designer;

Date Picker and Date and Time Picker requires date or date and time values compatible with date and time format set for the control in InfoPath Designer;

Bulleted List, Numbered List and Plain List can have multiple values set; as with Multiple-Selection List Box, simply separate them with new line character;

Person or Group requires you to provide a valid user identifier the field can recognize when looking user up, for instance DOMAIN\account string.

Additionally, when using containers, please take into consideration that users can add and remove field groups dynamically when working with the form, depending on the container functionality. When adding several instances of the specific field group, values from all instances of each field will

Page 25: Quick Start - Workflow and Process Management for SharePoint · at least basic knowledge of SharePoint Foundation 2010 and/or SharePoint Server 2010. 1.3 See the Tutorials Please

page 25 of 63

be combined when saving the data on form submit. The values will be separated with new line character. Note: In the InfoPath form which is being used as ALF has been changed, launching actions using this form may cause problems. If such change is necessary, the workflow definition must be updated and redeployed, plus the workflow has to be restarted on all specific items. Below you will find information on how to build InfoPath form that will be compatible with Workbox. Create a new Blank Form in InfoPath Designer.

Next, add required fields to the form.

Add two buttons: Ok and Cancel.

It is necessary to define behavior for both buttons. For the Ok button, we will want to send form data to the server. To do this, first we must define the connection. Click the “Manage Data Connections” link.

Page 26: Quick Start - Workflow and Process Management for SharePoint · at least basic knowledge of SharePoint Foundation 2010 and/or SharePoint Server 2010. 1.3 See the Tutorials Please

page 26 of 63

Add new connection.

Set the connection type to “Submit data”.

Page 27: Quick Start - Workflow and Process Management for SharePoint · at least basic knowledge of SharePoint Foundation 2010 and/or SharePoint Server 2010. 1.3 See the Tutorials Please

page 27 of 63

Next, select “To the hosting environment, such as an ASP.NET page or a hosting application” as the destination location of the form.

Now we have to accept the settings.

Close the “Data Connections” window.

Page 28: Quick Start - Workflow and Process Management for SharePoint · at least basic knowledge of SharePoint Foundation 2010 and/or SharePoint Server 2010. 1.3 See the Tutorials Please

page 28 of 63

Now we have the connection to the server. Next, we have to declare that the form has to open the connection when the Ok button is clicked. To do this, double-click the button and select “Submit” from Action drop-down on the Ribbon.

Check if the data in the “Submit Options” window is correct and close it.

Page 29: Quick Start - Workflow and Process Management for SharePoint · at least basic knowledge of SharePoint Foundation 2010 and/or SharePoint Server 2010. 1.3 See the Tutorials Please

page 29 of 63

The Cancel button should close the form. This behavior can be achieved with rules. Double-click the button and click Rules on the Ribbon.

Set a new action.

Select “Close the form”.

Page 30: Quick Start - Workflow and Process Management for SharePoint · at least basic knowledge of SharePoint Foundation 2010 and/or SharePoint Server 2010. 1.3 See the Tutorials Please

page 30 of 63

The form can now be published to the server. Select File -> Publish -> SharePoint Server.

Enter the location of the SharePoint server.

Page 31: Quick Start - Workflow and Process Management for SharePoint · at least basic knowledge of SharePoint Foundation 2010 and/or SharePoint Server 2010. 1.3 See the Tutorials Please

page 31 of 63

Select the following options:

Select the location where to save the form. From there we will upload the form.

Page 32: Quick Start - Workflow and Process Management for SharePoint · at least basic knowledge of SharePoint Foundation 2010 and/or SharePoint Server 2010. 1.3 See the Tutorials Please

page 32 of 63

On the next screen leave the default options and click Next.

Publish the form by clicking Publish.

Page 33: Quick Start - Workflow and Process Management for SharePoint · at least basic knowledge of SharePoint Foundation 2010 and/or SharePoint Server 2010. 1.3 See the Tutorials Please

page 33 of 63

Click Close to complete the procedure.

The form we have created should have the following options selected. We advise you to check if it is so.

Page 34: Quick Start - Workflow and Process Management for SharePoint · at least basic knowledge of SharePoint Foundation 2010 and/or SharePoint Server 2010. 1.3 See the Tutorials Please

page 34 of 63

1. The form should have Security Level set to Domain.

2. The form’s compatibility settings should allow it to be displayed as a Web form. Check If in

the Compatibility category Form Type field is set to Web Browser Form.

Now we have to deploy the form on the server. Go to SharePoint Central Administration -> General Application Settings -> Upload form template.

Page 35: Quick Start - Workflow and Process Management for SharePoint · at least basic knowledge of SharePoint Foundation 2010 and/or SharePoint Server 2010. 1.3 See the Tutorials Please

page 35 of 63

Using the Browse button select the file to upload.

When the form has been uploaded, it must be activated for the specific Site Collection. In Central Administration, go to General Application Settings -> InfoPath Form Services -> Manage Form Templates. In the uploaded form’s context menu select “Activate to a Site Collection”.

Page 36: Quick Start - Workflow and Process Management for SharePoint · at least basic knowledge of SharePoint Foundation 2010 and/or SharePoint Server 2010. 1.3 See the Tutorials Please

page 36 of 63

The form is now ready to be used. It’s accessible in the chosen Site Collection in FormServerTemplates library: http://{server}/{site_collection}/FormServerTemplates/TheForm.xsn Note: Occasionally when accessing the InfoPath Launch Form you may experience an error message similar to the following:

This error is a known issue of the InfoPath form viewer control, but it does not hamper the form’s functionality. After closing the message, the form can be used normally.

2.3.6.3 Custom Form

Custom Form allows you to use your own page as an Action Launch Form, meaning that you can implement your custom layout and logic. When defining this type of ALF, we have to provide a URL address of the custom page.

Page 37: Quick Start - Workflow and Process Management for SharePoint · at least basic knowledge of SharePoint Foundation 2010 and/or SharePoint Server 2010. 1.3 See the Tutorials Please

page 37 of 63

The main parameters will be passed to the page in the URL; for instance, if we have a MyForm.aspx page in the C:\\(...)\Web Server Extensions\14\templates\layouts folder, a sample URL will look like: http://{server}/MyForm.aspx?List=value1&WorkflowID=value2&ItemID=value3&ActionName=value4&SourceURL=value5&RedirectURL=value6 Here is the list of the parameters:

List – the list’s GUID,

WorkflowID – the workflow instance’s ID,

ItemID – the list item’s ID,

ActionName – the action’s internal name,

SourceURL – URL address of the source page,

RedirectURL – URL address of the page to which users should be redirected.

To programmatically launch an action you can use the appropriate method of WBInterface. More information can be found in Workbox 2010 SDK.

2.3.7 Workflow Initiation Form

Workflow Initiation Forms (WIFs) are used to set workflow variables with data provided by users when initializing the workflow. WIFs work similarly to Action Launch Forms. There are three types of WIFs: Quick Form, InfoPath Form and Custom Form. To edit the WIF, perform either of the following activities:

Click the edit icon of the first (starting) state,

Click the “Workflow Properties” icon in the toolbox, then click the “Define workflow initiation form” button.

Page 38: Quick Start - Workflow and Process Management for SharePoint · at least basic knowledge of SharePoint Foundation 2010 and/or SharePoint Server 2010. 1.3 See the Tutorials Please

page 38 of 63

Aside from standard way of providing data on a WIF when starting the workflow from within SharePoint, the data can also be provided when:

The workflow is started by the “Start Workflow” activity,

The workflow is started using appropriate method of WBInterface (e.g. with the WBInterface sample application; more information can be found in Workbox SDK).

In a situation when not all fields of the form will be provided with data when the workflow is starting, they will be initialized with default values. For instance, this can occur during autostart when deploying workflow from a list template. Like actions, workflows can be started with custom forms. The main parameters are provided in URL, like with custom ALFs. The following parameters are submitted:

List – the list’s GUID,

TemplateID – the workflow definition’s GUID,

ItemID – the list item’s ID,

SourceURL – URL address of the source page,

RedirectURL – URL address of the page to which users should be redirected.

2.3.8 Lookups and Functions

Lookups allow you to use external data in your workflow. You can use lookups in many places within workflow, for instance in activity parameters, conditions, functions or action launch forms. Lookups are grouped in trees. The most common is the “SharePoint” tree, containing references to your SharePoint content. The “Current” branch allows you to get the data from the item on which the workflow is currently running, from the list this item is created on, from the site of the current list, and also the information about the current user. The “Workflow data” tree contains references to objects within workflow, e.g. roles, and the “Workflow variables” tree allows you to reference workflow variables. For all intents and purposes, lookups in Workbox work similarly to lookups in SharePoint.

Page 39: Quick Start - Workflow and Process Management for SharePoint · at least basic knowledge of SharePoint Foundation 2010 and/or SharePoint Server 2010. 1.3 See the Tutorials Please

page 39 of 63

There is one more tree on the lookup list, called “Functions”. Functions allow you to manipulate data in a way you need. You can, for example, replace a string in a given text, do advanced mathematical calculations or query external database.

Filtered lookups

Filtered lookups return column or user field for single items or collection of items – depending on defined filtering. Because it is possible to choose only one value, in case filtering returns multiple values there are options to select only one or join result into one value. Filtered lookups facilitates operating on objects provided by SharePoint (users, list items).

Page 40: Quick Start - Workflow and Process Management for SharePoint · at least basic knowledge of SharePoint Foundation 2010 and/or SharePoint Server 2010. 1.3 See the Tutorials Please

page 40 of 63

Assuming applied filter returns more than one item, you can select from returned collection (“Result” field):

“First” – returns value for first item

“Min” – returns the smallest value

“Max” – returns the largest value

“All” – returns all values joined into one, separated by “Separator” char If applied filtering returns more than one item (“First” and “All” options) then you can apply multilevel sorting for the result collection.

2.3.9 Permissions

Workbox bases on SharePoint permission model. You have control over which users can initiate which actions and who can edit or read which fields of an item in a given workflow state.

2.3.9.1 Roles

To simplify permission management, Workbox introduces workflow roles. Roles are designed to

reflect not the SharePoint’s security settings, but actors involved in the business process.

All workflow roles are available in the top left corner of the designer workspace.

Page 41: Quick Start - Workflow and Process Management for SharePoint · at least basic knowledge of SharePoint Foundation 2010 and/or SharePoint Server 2010. 1.3 See the Tutorials Please

page 41 of 63

2.3.9.2 Adding New Role

To add a new role, click on the “Add new role” icon.

In the role definition window you can set the role’s name, select a convenient icon and assign

SharePoint users and groups. To do the latter, click the “Edit” button or either the “Included” or

“Excluded” areas.

To define who is to be included in the role and who should be excluded from it, we use the “Change

the membership” window. By default, all users are included in the role (“Assign all users to role” is

selected). If we want to assign only specific users, we should use the search box, enter a part of user

name and click the “Find” icon. Found users will be shown on the list below. To include user in the

role, click the green icon. To specifically exclude user from the role, click the red icon.

The exclusion option is useful when we want to include in role a group, but without specific users.

Page 42: Quick Start - Workflow and Process Management for SharePoint · at least basic knowledge of SharePoint Foundation 2010 and/or SharePoint Server 2010. 1.3 See the Tutorials Please

page 42 of 63

Note: You can select the user named “Author of current item”. This user is dynamically assigned

when the workflow starts – it is the user that has created the item on which the current workflow

instance is running on.

Page 43: Quick Start - Workflow and Process Management for SharePoint · at least basic knowledge of SharePoint Foundation 2010 and/or SharePoint Server 2010. 1.3 See the Tutorials Please

page 43 of 63

2.3.9.3 Assigning Roles to Actions

To permit users in a role to launch action, simply drag this role from the role container (top left

corner of the designer workspace) and drop it on the action.

Note: By default, each new action has the “All Users” role assigned.

A different way to assign a role to the action is to open “Edit action permissions” window by clicking

the “Permissions” button in “Edit action properties” window.

Here you can permit or deny users in roles executing the action. Simply check or uncheck the

checkboxes next to roles.

Note: When you check the checkbox next to a role, the role is not moved automatically to the

“Permitted” section. It will be displayed in the “Permitted” section only when you confirm your

changes and reopen “Edit action permissions” window.

Note: Users who are not included in roles assigned to action will not be able to launch the action.

Page 44: Quick Start - Workflow and Process Management for SharePoint · at least basic knowledge of SharePoint Foundation 2010 and/or SharePoint Server 2010. 1.3 See the Tutorials Please

page 44 of 63

2.3.9.4 Assigning Roles to Item Fields

When workflow is in a given state, we can control which users should be able to either view or edit

specific fields of the current item.

As was the case with action permissions, you can assign roles to state by dragging them from the

roles toolbar and dropping them on state, or by clicking the “Field Permissions” button in “Edit state

properties” window.

Note: “Change form permissions” window works the same way as “Edit action permissions” window.

There is one difference, though: you can edit to which item fields the permission should be granted.

By default, when assigning a role to state, all of the role’s members are granted permissions to both

read and edit all item fields (excluding a workflow column named “[your workflow name] – state”,

which can only be viewed). To distribute permissions in a greater detail, click the pencil icon next to

the role.

Page 45: Quick Start - Workflow and Process Management for SharePoint · at least basic knowledge of SharePoint Foundation 2010 and/or SharePoint Server 2010. 1.3 See the Tutorials Please

page 45 of 63

This will open “Edit field permissions” window.

Checking appropriate checkboxes will give either display or display and edit permissions to all users

included in the role.

Note: Giving the “edit” permission implicates giving the “display” permission as well.

Page 46: Quick Start - Workflow and Process Management for SharePoint · at least basic knowledge of SharePoint Foundation 2010 and/or SharePoint Server 2010. 1.3 See the Tutorials Please

page 46 of 63

2.3.9.5 Checking Permission Settings

You can easily check which role has permissions to which actions and states. Just hold your mouse cursor over a role and the workflow diagram will change: states and actions to which the role was not assigned will be grayed-out, others will be highlighted.

You can also check which roles has been assigned to a given action or state: simply hold your mouse cursor over an action or a state and roles which has not been assigned to the object will be grayed-out.

Page 47: Quick Start - Workflow and Process Management for SharePoint · at least basic knowledge of SharePoint Foundation 2010 and/or SharePoint Server 2010. 1.3 See the Tutorials Please

page 47 of 63

2.3.10 Action Execution Conditions

You can define a set of conditions which must be met in order before the actions could be executed. To define execution conditions, open action properties window and click the “Conditions” button.

A new window will open, where you can define conditions for the action. Clicking the “Add” button will add a new condition. Now you have to define both sides of the condition and select operator. Note: While the left side of the condition cannot be empty, the right one – can.

You can, for example, check if the current date is smaller than the expiry date or if the current user is the author of the item. If you define more than one condition you will be able to choose if all or only one of the conditions must be met. Simply choose “AND” or “OR” logical operator from the dropdown list on left side of the first condition.

Page 48: Quick Start - Workflow and Process Management for SharePoint · at least basic knowledge of SharePoint Foundation 2010 and/or SharePoint Server 2010. 1.3 See the Tutorials Please

page 48 of 63

If these conditions are met, action will be displayed to the user. If not, action will be hidden. To remove conditions click the “X” button next to chosen condition. Note: Conditions are complementary to permissions. User must have permissions to the item AND the execution conditions must be met to allow user to execute the action.

2.3.11 Self-Timers

Self-timer is a mechanism which can automatically execute an action when given conditions are met. For instance, you might want to automatically reject an application if it is in a “Sent to a manager” state for over 5 days. Self-timers are defined in a state. For each state you may define more than one self-timer.

To add a new self-timer, simply click the “Add new self-timer” button. To edit an existing one, either double-click it or click the pencil icon. You will enter the “Self-timer definition” window.

Page 49: Quick Start - Workflow and Process Management for SharePoint · at least basic knowledge of SharePoint Foundation 2010 and/or SharePoint Server 2010. 1.3 See the Tutorials Please

page 49 of 63

Here you can set the self-timer’s name and action which it should execute. You can only choose from among actions going out of the state for which you are defining the timer. Next, you can define time when the timer should be executed. You can either set a fixed date and time or a time after the workflow enters the state. Note: Minimal time interval is one minute. If you set “0” in “After specified time” field, the timer will be executed immediately. If you find it necessary, you may also define a set of conditions which will have to be met in order for the self-timer to execute selected action. Note: If the action to be executed by a self-timer has its own execution conditions defined, those conditions must be met as well in order for the action to execute.

2.3.12 Action Ordering and Icons

2.3.12.1 Action ordering

Workflow Designer is able to define order in which actions are displayed on the action menu on ribbon and context menu as well. To determine the order, go to state properties and click on “State actions” button. This would open new window, which display list of actions outgoing from state where the button was clicked. Each action have its icon, name and tooltip.

Page 50: Quick Start - Workflow and Process Management for SharePoint · at least basic knowledge of SharePoint Foundation 2010 and/or SharePoint Server 2010. 1.3 See the Tutorials Please

page 50 of 63

Now you can change the order of actions by clicking arrows on the left. Actions will be arranged by the order in which they were assigned. If no order was assigned then actions will be arranged by the order in which they were created in the workflow. If a new or existing actions is attached to the state, it will be displayed at the end of existing actions. Window also allows you to open action display settings - to do this click on the pen button on the right.

2.3.12.2 Display settings

Workflow Designer provides ability to choose an icon for the action and action information to the end users as well. Display settings can be defined through “Action appearance” window. You can open it by two ways:

Clicking “Appearance” button on “Edit action properties” window

Clicking pen button on “State actions” window “Action appearance” window looks as follows:

Page 51: Quick Start - Workflow and Process Management for SharePoint · at least basic knowledge of SharePoint Foundation 2010 and/or SharePoint Server 2010. 1.3 See the Tutorials Please

page 51 of 63

Here you can set tooltip text and select desired action icon. Click OK to apply changes. Tooltip will be displayed when user points action icon with mouse cursor. The icon you set is displayed on:

Workflow action menu on ribbon (32 x 32 pixels)

Page 52: Quick Start - Workflow and Process Management for SharePoint · at least basic knowledge of SharePoint Foundation 2010 and/or SharePoint Server 2010. 1.3 See the Tutorials Please

page 52 of 63

Workflow action menu on context menu (16 x 16 pixels)

Note: If icon chosen for action was not defined, Workbox will use default action icon.

2.3.12.3 Adding custom icons

Dedicated folder for icons consists of 2 subfolders – one for icons with dimensions 32 x 32 and one for icons with dimensions 16 x 16. Workbox provides a set of predefined icons, but users with access to those folder are able to define their own icons. Locations where you should copy custom icons are:

“C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\LAYOUTS\Datapolis.WorkBox\ActionIcons\32” for 32x32px icons

“C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\LAYOUTS\Datapolis.WorkBox\ActionIcons\16” for 16x16px icons

Note: Files are required to be 32x32 and 16x16 pixels PNG files with transparent background. Both sizes of the same icon should have the same filename.

2.3.13 Saving Workflow

The option saves the workflow definition to the server. Saving a workflow does not cause its deployment on a list.

2.3.14 Deploying Workflow

Deployment (previously called “Association”) of a workflow binds it with the list, meaning that new instances of the workflow can be run. Note: Deploying a workflow automatically saves its definition to the server, so there is no need to

save the workflow before deployment.

2.3.15 Workflow Properties

Here we can set when new workflow instances should be launched, change workflow’s name and add a short description of what the workflow does.

Page 53: Quick Start - Workflow and Process Management for SharePoint · at least basic knowledge of SharePoint Foundation 2010 and/or SharePoint Server 2010. 1.3 See the Tutorials Please

page 53 of 63

Note: Clicking the “Save definition to file” button will save current workflow definition to disk. This

way you can back up the workflow definition. You can then import it (even on a different location) by

clicking the “Load definition from file” button.

2.3.16 Workflow Validation

Validation is run automatically when deploying workflow. The definition must be valid, otherwise the deployment operation will be terminated. You can use this function manually as well and see if the workflow is valid.

2.3.17 Procedures

Procedures are used to group activities, not unlike containers in activity diagrams. The main difference between activity containers and procedures is that procedures are defined for the whole workflow, meaning that you can use them in various places. While this can be done by first copying container (along with its activities) to activity clipboard and then copying it from the clipboard to activity diagram of a desired action, the solution has its limitations, namely when a need arises to make changes to a copied activity sequence. In this case, the changes must be done manually in every place the container was copied to. In complex workflows, this can be a daunting task. When you make changes to the sequence of activities defined in a procedure, those changes will have effect in every place the procedure is used, thus vastly simplifying workflow management.

2.3.17.1 Creating Procedures

Adding a new procedure is an easy task. Using the "Manage procedures" button located on the Designer toolbar, you open a window with a list of all procedures defined for the workflow. Simply click on a "New procedure" button, which will open another window, where you must enter procedure's name. You can also provide a brief description for your needs and define activity

Page 54: Quick Start - Workflow and Process Management for SharePoint · at least basic knowledge of SharePoint Foundation 2010 and/or SharePoint Server 2010. 1.3 See the Tutorials Please

page 54 of 63

sequence ("Edit diagram" button). The sequence is defined in exactly the same way you define activities for actions. Click "Ok" on both "Edit procedure" and "Procedures" windows - and that is all. You have a new procedure you can use in your workflow.

2.3.17.2 Using Procedures

When you open an activity diagram, you will notice a new category on the toolbox: "Procedures". Here are listed all procedures you can use in the current diagram. To use a procedure, simply drag it from the toolbox and drop it in a desired place on the diagram - the same way you add activities. Procedure behaves the same way any other activity. Note: You can place a procedure inside another procedure's activity sequence. Workbox Designer will automatically hide all procedures that cannot be put inside the current procedure. This is to prevent the possibility of creating circular references.

2.3.18 Size and Performance

Crucial for any workflow is its performance. In Workbox, performance is shaped as follows:

Time to start workflow depends on the number of activities in the initiating action.

Action's execution time depends on the number of activities in the action.

Activity's execution time depends on its complexity and the number of lookups used.

Workbox Designer's performance depends on workflow's size. We encourage you to apply the following guidelines, which we present here as best practices concerning creating workflows in Workbox:

Minimize the number of activities used in actions, especially in the initializing action.

Minimize the number of lookups (both to SharePoint objects, functions or the flow elements) used in workflow. If a lookup is used more than once, consider storing its value in variable and use the variable instead.

Frequent changes to variables' values (either using "Set variable" activity or output parameters of other activities) may severely impair workflow's performance. We advise that you modify values of the variables only when necessary. Additionally, we advise you do not use too many variables. If their number exceeds twenty, think about using them for multiple purposes (i.e. storing values from various sources).

Maintain smallest possible size of workflows. o Size up to 1 MB is recommended. o Size between 1 MB and 3 MB is acceptable, though it might cause slower work of

both Workbox Designer and deployed workflows. o Size above 3 MB is decidedly not recommended. o In Workbox Designer, when saving workflow definition, an alert will appear when the

above thresholds are exceeded. o If maintaining small size of workflow is impossible, consider dividing it into a number

of smaller workflows.

Remember that Workbox is built on Windows Workflow Foundation, and therefore inherits all limitations of the platform.

Page 55: Quick Start - Workflow and Process Management for SharePoint · at least basic knowledge of SharePoint Foundation 2010 and/or SharePoint Server 2010. 1.3 See the Tutorials Please

page 55 of 63

2.3.19 Advanced Workflow Editing

This functionality allows you to provide any value in normally constricted fields (e.g. in activity parameters). You can, for instance, manually enter SharePoint list's URL in "Edit items" activity's "List" field. The functionality is turned on and off on Workbox Settings page for a given list and can be toggled only by Farm Administrators. Note: The functionality is intended for advanced users who have experience with administrating and developing SharePoint-based solutions. We advise care when using this functionality. Note: When modifying Farm Administrator account, on some environments (especially on multi-server farms) the change might take a while to propagate. This means that the Advanced Workflow Editing checkbox might be still visible for the user who no longer is Farm Administrator, or not visible for user who has just been granted the role. You can try performing iisreset on your farm’s Web Front End servers, which might help the situation.

Page 56: Quick Start - Workflow and Process Management for SharePoint · at least basic knowledge of SharePoint Foundation 2010 and/or SharePoint Server 2010. 1.3 See the Tutorials Please

page 56 of 63

3 How to Use Workbox?

3.1 List Workflows When the workflow is created and successfully deployed, we can start working on the SharePoint list on which it was deployed. In our example we assumed that the workflow will begin automatically after creating a new element on the list. Note: If the workflow was set to be run manually, select the “Workflows” option from the context menu of the list item’s context menu and launch a new workflow instance on the item. The workflow will start and after a short while it will enter the first state (“Filling in an application” in our example). Here it will wait until an authorized user launches an action which will lead it to the next state.

3.1.1 Workflow Column

A list with a workflow running has two additional columns which are created automatically when a workflow starts for the first time. One column, named after a workflow (“Applications” and “Service” on the illustration below), is a standard SharePoint column, showing the general state of a workflow (i.e. “Starting”, “In progress”, “Completed” or “Error occurred”). The other is Workbox column (named “workflow_name – state”) and shows the exact state in which the item currently is within a workflow. These states are the states we have defined in Workbox Designer.

The columns are visible on a list view but they are not visible on the item view and edit forms. If on a list there is more than one workflow running, each of the workflows creates its own columns.

3.1.2 Item Context Menu

Workbox gives you the possibility to launch workflow actions from item’s context menu. It contains all workflow actions which user can launch in a given workflow state. If more than one workflow are running on the item, their actions will be in the context menu as well. Every action is preceded by the name of the workflow to which it belongs. Note: When you expand context menu for an item, Workbox communicates with the workflow to determine which actions are allowed for current user and for which actions their execution conditions are met. During this process, the following information is shown:

As soon as Workbox gets the information it needs, the standard context menu is displayed. This may take several seconds, depending on the system load.

Page 57: Quick Start - Workflow and Process Management for SharePoint · at least basic knowledge of SharePoint Foundation 2010 and/or SharePoint Server 2010. 1.3 See the Tutorials Please

page 57 of 63

Actions can also be launched from the item view form. They are displayed in the toolbar in the same way as they are shown in the context menu.

3.1.3 Action Launch Form

When launching an action, user is shown a launch page (see chapter 2.2.5). Here the user can provide required information which will be used in the workflow.

On the illustration above, the field “Budget” is required (marked with a red asterisk). Only when a valid value in this field is provided the action could be launched.

3.1.4 Bulk Action Launch

Workbox provides ability to start the same action of the same workflow for multiple chosen items.

3.1.4.1 Performing Bulk Action Launch

To perform bulk action launch, do the following

View the list that contains items with started workflow.

Choose items by selecting them using standard item selection checkbox.

Page 58: Quick Start - Workflow and Process Management for SharePoint · at least basic knowledge of SharePoint Foundation 2010 and/or SharePoint Server 2010. 1.3 See the Tutorials Please

page 58 of 63

Choose from the “Workflow actions” button menu on the “Elements” ribbon a common action to launch for all selected items.

If action has an assigned form, then one form is being displayed for all chosen items. Fill the form and confirm action launch.

System changes state for all selected items to “Changing state”. It means that these items are in the process of having their actions launched.

Actions launch for all selected items.

Note: Action menu displays only those actions that are common for all selected items and that have attribute “Allow bulk action launch” set to true or have the action form turned off. Note: After picking action to launch, Workbox will take into account form settings for the first of the selected items. Note: If you are using custom action forms then bulk action launch passes “WorkflowIDs” and “ItemIDs” parameters instead of “WorkflowID” and “ItemID”.

3.1.4.2 Enabling Bulk Action Launch

To enable or disable bulk action launch on actions with forms, check the “Allow bulk action launch” checkbox on the form design window.

Page 59: Quick Start - Workflow and Process Management for SharePoint · at least basic knowledge of SharePoint Foundation 2010 and/or SharePoint Server 2010. 1.3 See the Tutorials Please

page 59 of 63

3.1.4.3 Bulk action launch threshold

Actions can be launched both synchronously and asynchronously. “Web.config” file includes attribute “Datapolis.Workbox.SynchronousActionLaunchThreshold” that allows defining synchronous action launch threshold. It indicates how many actions can be launched synchronously. Performing bulk action on more elements that is set in attribute causes asynchronous start for all items. Note: Specify value greater than „2”, lower values will be ignored.

3.1.5 Workflow History

In any moment when workflow is running (and when it has ended) we can check its history. Here we will find various information about the process, how it worked, who launched which action, in which state the workflow waited most time, etc.

Page 60: Quick Start - Workflow and Process Management for SharePoint · at least basic knowledge of SharePoint Foundation 2010 and/or SharePoint Server 2010. 1.3 See the Tutorials Please

page 60 of 63

If you have sufficient permissions, you can also see the details of any action: what activities were launched and with what parameters, check if there were errors or warnings, what values they returned. You can also view what values were provided in action launch forms. This information allows you to monitor the process, determine bottlenecks and, when developing the workflow, helps you to detect errors.

Future versions of Workbox will be backward compatible, so a new installation won`t destroy all the work that`s been done.

3.2 Site Workflows In general terms, Site Workflows perform in a similar way to List Workflows. The difference is in the scope in which they operate – while List Workflows run on items of the list on which they are deployed, Site Workflows don’t run on any specific entity; they just exist within the Site where they are deployed and perform their tasks. After deploying a Site Workflow, it must be launched manually. Site Workflows cannot start automatically. To launch a workflow, you have to navigate to Use Site Workflows page, which is accessible through Site Actions menu:

Page 61: Quick Start - Workflow and Process Management for SharePoint · at least basic knowledge of SharePoint Foundation 2010 and/or SharePoint Server 2010. 1.3 See the Tutorials Please

page 61 of 63

The page will list any Site Workflow currently running within the Site. You can easily check the workflow’s state and history in the same way you access the information for List Workflows (see 3.1 for more information). Actions can be launched by opening the workflow’s context menu. To either start a new workflow or view completed workflows, click Start new site workflow or check historical workflows:

3.3 Reusable Workflows Deploying Reusable Workflow means that it becomes available as a SharePoint workflow (List settings -> Workflow settings) for the selected content type. (To have access to all workflows associated with content types, you have to enable management of content types in the list’s Advanced Settings.) When the new Reusable Workflow’s definition is deployed, it can then be used as a regular SharePoint reusable workflow (like applying it to lists and content types with available SharePoint tools).

Page 62: Quick Start - Workflow and Process Management for SharePoint · at least basic knowledge of SharePoint Foundation 2010 and/or SharePoint Server 2010. 1.3 See the Tutorials Please

page 62 of 63

3.4 Reporting Service Workbox offers a reporting service, which allows gathering extensive information about workflows currently running, as well as those started in the past. The module consists of Web Service and provides data in XML format. It can then be used in third-party reporting solutions, such as SQL Reporting Service, or utilized in custom solutions. The Web Service is located at the following address: http://web_application_address/site_collection/site/_layouts/Datapolis.WorkBox/WBReport.asmx. It contains the following web methods:

GetUserActions,

GetStartedWorkflows,

GetLaunchedAction. Below is a brief description of the above methods. More information about the reporting service can be found in Workbox SDK documentation, which can be found on Datapolis web site.

3.4.1 GetUserActions

The method returns information on actions (in all workflows) available for a given user. Depending on provided scope, workflows present in the whole SharePoint farm, Web Application, site collection, site or a list are included in search. If no user was provided to the method, actions of the user launching the method will be returned.

3.4.2 GetStartedWorfklows

The method returns information on workflows started within a defined period of time. Like in GetUserActions method’s case, a scope can be defined, narrowing the search conditions down to workflows present in the whole SharePoint farm, Web Application, site collection, site or a list.

3.4.3 GetLaunchedActions

The method returns information on actions launched by all users in all workflows in a given scope (the whole SharePoint farm, Web Application, site collection, site or a list) and in a defined period of time.

4 Troubleshooting If any errors or other issues occur, please visit the Workbox Team blog at http://wbblog.datapolis.com. This site contains a list of known bugs and solutions to common issues. There you can also find additional information about Workbox’s new features and development trends. For troubleshooting, help and tips please contact our support team by mailing us at [email protected].

4.1 Known Errors List of all known errors and typical solutions to them can be found at: http://blogs.datapolis.com.pl/workbox/Lists/Known%20errors/AllItems.aspx. Workbox is still expanding. While its base functionality is fully tested and stable, we are constantly adding new functionalities with each release. We strongly recommend you to register on http://partner.datapolis.com, where you will be able to easily track latest Workbox releases. Also, you will be able to get additional Workbox materials and to try our on-line demonstration environment with latest version of Workbox.

Page 63: Quick Start - Workflow and Process Management for SharePoint · at least basic knowledge of SharePoint Foundation 2010 and/or SharePoint Server 2010. 1.3 See the Tutorials Please

page 63 of 63

If you experience any problems with Workbox, either during installation or when using it, please contact us at http://www.datapolis.com/en/support.

If you are a developer, you can start creating your own activities and functions. Download Workbox SDK at http://www.datapolis.com/en/Offer/Products/WorkBox/Pages/SDK.aspx

If you are interested in purchasing a license, see our licensing and pricing information at http://www.datapolis.com/en/Offer/Products/WorkBox/Pages/SaleInfo.aspx