Workflow

From Sense/Net Wiki
Jump to: navigation, search
  •  
  •  
  •  
  •  
  • 100%
  • 6.0
  • Enterprise
  • Community
  • Planned

Overview

Workflow definition
Workflow is a widely used concept that has many different definitions. See Wikipedia:Workflow article for a detailed overview. In Sense/Net we consider it as a way for modeling business processes. We integrated Windows Workflow Foundation 4 into the portal to have a well-known and standard framework for defining and developing workflows.

Workflows are a great tool for building business processes involving content creation or response to human interactions.

On this page we will provide you an overview of the way workflows work in Sense/Net and the steps you need to follow to use your own workflows on the portal.

Details

This section will introduce the main concepts of the Sense/Net workflow framework. If you are interested only in using workflows on a portal user level, please check the end users section. As a portal builder or developer you should be familiar with the concepts below to be able to customize the default behavior or build your own workflows.

Sense/Net workflow types

Manage Content workflows

In Sense/Net there are two different types of workflows: Content workflows and Standalone workflows. These differ in the starting mechanism the portal offers for them. Content workflows are related to one particular content and are connected to Content Lists, while Standalone workflows may be placed and started anywhere in the system.

For detailed information about each type please check the Workflow types article.

Workflow Definition

To create your own workflow you need to define the activities the workflow should do - for example sending emails, creating tasks or other content. The workflow definition is a XAML file that you can edit in Visual Studio Workflow Designer or directly with any text editor. For more information see the following pages:

Workflow content type

After creating the workflow definition you need to create a content type for the workflow. It must be named exactly the same as the Workflow Definition file, without the .XAML extension.

Please note that the workflow will work correctly only if you follow the name convention: MyWorkflow.xaml for the definition file and MyWorkflow for the name of the content type.

See the following page about the base workflow content type in the system that you should use as a parent type when developing your own workflow:

Content Views

Initial view

The workflow framework in Sense/Net uses the Content View architecture to define the input that workflows need before or during start up. Depending on your workflow type you will need to create one or more content views to let users initialize or start workflows. See the following page for the workflow view how-to:

Initial view

Initial view is needed only for Content workflows. This view contains the fields that the content list administrator will see when he/she assigns the workflow to a Content List.

Start view

The Start view is displayed to the user when he/she starts the workflow. This content view is necessary for all types of workflows to function correctly.

Managing workflows

Manage workflows

In Sense/Net there are several pages for managing workflows. Please check the following pages for more information on how to assign workflows to Content Lists and how to review them during their life cycle.


Workflow templates and instances

Workflow templates

When the content list administrator assigns a workflow to a content list, a workflow template will be created. The place of the template is the WorkflowTemplates system folder under the content list. These content are normal workflow content containing the initial data that the admin gave - for example approver users and time frames for approval. Users will be able to start a workflow in that list only if the workflow is assigned to that list, meaning a template exists for that workflow under the list.

When a user starts a workflow, a new workflow instance will be created under the Workflows system folder of the content list. This workflow instance contains the same field values as the template plus any other data the start view enables to set. These workflow instances are used by the workflow framework to make a connection between the content on the portal and the workflow engine.

User group information

for End users

In many cases end users will not notice if they start a workflow. A registration process is a good example of a simple workflow where the user clicks on a Register button to start the workflow. He/she will notice only that a mail appeared in his/her mailbox to ask for confirmation.

Sense/Net is built around content and this applies to workflows too. In case of Content Workflows users may want to start them manually. For example after completing the work on a document users may want to send it for approval. Our sample approval workflow defines a two-level approval where a leader or second level approvers both can approve the document.

Users can abort a running workflow that was started accidentally or needs to be stopped.

for Portal builders

To let users start a Standalone Workflow portal builders will need to create a start content view and create a portal page where the Workflow start Portlet is placed to launch the workflow. See the following pages on how to do this step-by-step:

for Developers

Creating a new workflow may need some developer work if the desired result cannot be achieved with the built-in activities. In this case you will be creating activities that perform special tasks related to the particular business logic.

See the following page for information about deploying the Workflow Definition to the portal.

for System operators

If the workflow module is configured in Sense/Net, administrators should be aware that it will take some system resources to constantly monitor and reanimate the running workflows. Please check the following page to learn more about configuring the workflow module:

Example/Tutorials

Related links

References