Showing posts with label work flow. Show all posts
Showing posts with label work flow. Show all posts

Saturday, June 16, 2012

Workflow issue with Content Type Hub


I have configured a content type hub in SP2010. My document content types have Expiration policies assigned to them. My record center application is a subscriber of the content type hub in the portal site collection. So the content types with policies get synchronized over to the record center.


In the main portal, I have a two stage policy triggered by an event date property. this first stage sends the document to the record center for archival. where the second stage kicks in and counts down a set number of years. at the expiration of this period, it is supposed to launch a disposition WF but it does not. I can find nothing in the event logs to hint at a problem.


Note. for testing I set the archival period of the second stage to 0 days. I run the expiration timer job manually to get it to trigger the policy, but nothing happens.


I use the same "0 day" trigger to test the first stage of the policy and it works fine.


The disposition WF starts automatically in the portal on docs that have policies that do not send them to the record center.


I can start the Disposition WF manually in the record center on docs that were sent there by my policy, and the disposition task gets created as it should. it just will not trigger the WF automatically.


If a published site content type has a workflow, and the content type is consumed in a another site, the workflow will have to be recreated and the following modification done:

  • Open “xoml.wfconfig.xml” of the workflow in Parent site/sitecollection
  • Find tag which says ‘<Template BaseID="{GUID}" ‘
  • Copy the GUID into workflow xoml in site/sitecollection that is consuming that content.

Saturday, September 3, 2011

Workflow Basics


SP Workflow is an option to manage business process generally oriented around SharePoint list data model. User can start SharePoint workflow manually but they usually start automatically in response to some event connected with a list item or library item such as adding, deleting or updating an item. 

There are workflows associated with subsites rather than lists or content types - these cannot be started in response to an event ; it  has to happen manually or programatically. Such workflows will be helpful in setting and retrieving multiple list items across lists or performing non list operations like creating and configuring subsites.

The Reusable and Globally Reusable workflows in SPD is another kind of list workflow that can be used on multiple lists without having to recreate them for for each list.

SharePoint workflows are built on top of WF. when a workflow is running in SharePoint WF engine is hosted in SP Process; it loads and unloads WF templates and provides sequencing and persistence for workflows. WF enables customization in transaction, persistence, notifications, roles, tracking and messaging of SharePoint workflows.   
Every SharePoint Workflow is represented by the following Two entities that work together

  1. Workflow Definition that specifies the paremeters, events (like activation), sequence of activities , branching structure, conditions that determine the paths of execution. WF Definition can be defined in code and compiled into an assembly. The other option is to define it in  an XOML markup (declarative / nocode workflow) where it persist uncompiled in content DB until its called
  2. Workflow Template Definition which is an XML file that contains the info require to instantiate and run workflow like name of WF, Description, class with WF assembly to call, Identity of WF assembly, Location of any custom forms. These XML files can be stored at 14\TEMPLATE\1033\Workflow or Workflows list of root site in a site collection. In rutime, WF template defintion is used to create a cached SPWorkflowTemplate object.

The extensibilty options in WF are

  1. Custom compiled workflows using VS Workflow designer
  2. Custom Declarative WF using SPD

Usually Workflows installed as Site Collection Level Features but we can also publish WF directly from SPD which doesnt require any feature. Every WF association will have an entry in Site Collection Content DB.