Loading...
Showing posts with label WorkFlows. Show all posts
Showing posts with label WorkFlows. Show all posts

Sunday, February 1, 2015

How OOB approval workflows work ?

For beginners it may appear complex to use existing OOB approval workflow
But if we understand entire structure of approval workflow and about how it works, it would be easier to build the complex workflow on the top of OOB structure with least customization.
here is the high level view.


also high level view of OOB workflow

Thursday, November 12, 2009

How to check if Workflow is already Running and to Avoid Error Exception from HRESULT: 0×8102009B

1: public static bool IsWorkflowRunning(SPListItem item, Guid baseID)
2: {
3: bool isRunning = false;
4:
5: SPWorkflowCollection workflowCol = item.Workflows;
6:
7: var query = from SPWorkflow work in item.Workflows
8: where work.ParentAssociation.BaseId == baseID && (work.InternalState & SPWorkflowState.Running) == SPWorkflowState.Running
9: select work;
10:
11: if (query.Count() > 0)
12: {
13: isRunning = true;
14: }
15:
16: return isRunning;
17: }