Go Back   TechArena Community > Software > Windows Software
Become a Member!
Forgot your username/password?
Tags Active Topics RSS Search Mark Forums Read

Reply
 
Thread Tools Search this Thread
  #1  
Old 13-03-2011
Member
 
Join Date: Nov 2008
Posts: 1,185
An event handler to start the Approval Workflow in MOSS 2007

The Approval Workflow is a workflow present in the default installation of Office SharePoint Server 2007. The inclusion of features such as workflow within sharepoint has certainly given a great new touch to the product and the resulting benefits can be truly useful. The workflow in question, in fact, offers advanced features with regard to the approval of a generic object, I say generic because the flow of approval may be linked both to the elements of a document library, which the elements of a simple list (as may be a schedule or list of news), and the modification of the contents of a content page (in SharePoint sites with the publishing feature activated.) These are the characteristics of the workflow:
  • approval of the transactions are divided into task
  • ability to manage the flow in parallel or in series mode
  • rules for assigning tasks to individual users or user groups
  • ability to delegate the execution of a task to another user (or group)
  • ability to reassign a task to another user (or group)
  • option to terminate the workflow first refusal (in multi-task)
  • ability to update information on the state of the end of the workflow
  • to add a voting system object
  • option to terminate the workflow if the content object is changed
Given all these features, I would say that we can all agree that the approval system default Sharepoint Services is clearly outdated by the introduction of this workflow.
Reply With Quote
  #2  
Old 13-03-2011
Member
 
Join Date: May 2008
Posts: 860
Re: An event handler to start the Approval Workflow in MOSS 2007

To use it within a SharePoint list, you must not do is go on the list settings of the selected list, select the Workflow Settings and choose the process of adding a new workflow. Here you will see a page containing all installed in the site collection workflow father and all the settings for the proper installation of the workflow. Such information includes the name of the task list and history list and how to start the workflow. Sharepoint allows you to start a workflow in two ways:
  • adding a new item
  • modification of an existing item in the list
Once you have chosen installation parameters, the wizard will take you to the configuration page of the selected workflow. In our case, this page will contain all matters pertaining to the configuration properties of Approval Workflow. Selected default values, we have completed successfully the installation process and we can start to use all the features offered by this powerful flow of content approval.
Reply With Quote
  #3  
Old 13-03-2011
Member
 
Join Date: Mar 2009
Posts: 1,360
Re: An event handler to start the Approval Workflow in MOSS 2007

Customizing the workflow

Although the approval workflow in question appears to meet all our needs, we try to think of a scenario in which, for example, we need to set a different group of approvers for each one of our list, among other things definitely need real in large corporate environments, where content in a given category, must be approved by different divisions. To do this, we must try to change the default boot parameters of the workflow and write a custom event handler to the creation of a new item in the list (or even being edited), I start the new flow approval. To start "by hand" a workflow within SharePoint, we can make use of using the method of the class StartWorkflow SPWorkflowManager (Microsoft.Sharepoint.Workflow namespace). This method accepts as parameters:
  • the item to which to attach the workflow
  • the workflow template to be used
  • a boolean value indicating whether the workflow should start automatically or not
  • initialization parameters, in XML format
Reply With Quote
  #4  
Old 13-03-2011
Member
 
Join Date: Nov 2008
Posts: 1,192
Re: An event handler to start the Approval Workflow in MOSS 2007

These parameters must be passed to init Infopath form of workflow, it is from this form that we're going to pick up the data structures to initialize the flow and allow the start. These are the steps for creating data structures from the init form of the workflow:
  1. Achieve the following location on the server c: \ Program Files \ Common Files \ Microsoft Shared \ web server extensions \ 12 \ TEMPLATE \ FEATURES \ ReviewWorkflows \ Forms \
  2. Copy the file ReviewRouting_Init_1033.xsn (Infopath form in workflow init)
  3. Open the form with Infopath by clicking with the right mouse button on the file and selecting the "design" in the context menu
  4. Choose File menu> Save as source files
  5. Choose the location to save the file
  6. Close form
In this way, Infopath created the file scheme for data structure initialization of Approval Workflow. Now this pattern is transformed into a class. NET so that you can use it inside our event handler. To make this transformation, we use use XSD utility, included with the default installation on the entire SDK. NET Framework 2.0.
Reply With Quote
Reply

  TechArena Community > Software > Windows Software
Tags: , , , ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "An event handler to start the Approval Workflow in MOSS 2007"
Thread Thread Starter Forum Replies Last Post
The event handler in WSS 3.0 Computer_Freak Tips & Tweaks 2 21-02-2011 07:05 AM
Server control Event Handler rashmi_ay Software Development 5 05-03-2010 11:27 AM
Event handler in Share Point Server Cruzz Software Development 3 20-11-2009 05:48 AM
MOSS 2007 (Microsoft Office Sharepoint Server 2007) Jarhead69 Windows Software 4 31-08-2009 01:54 PM
How to add an AutoPlay Handler for an Event ? Dyumani Operating Systems 3 17-03-2009 11:29 AM


All times are GMT +5.5. The time now is 10:59 AM.