State Machine Workflow modification form  
Author Message
PaulKotlyar





PostPosted: SharePoint - Workflow, State Machine Workflow modification form Top

I'm trying to build a workflow modification form for MOSS that allows a user to reassign workflow (InfoPath form) tasks to other users (in case another user is away, etc.). The ECM Sample Starter Kit has an example that uses an InfoPath Modification form to do just that. However, it is sequential, and I'm using a state machine workflow.

Looking at the code for the example, I can see that it has an 'EnableWorkflowModification' step to, well, enable a modification form. I looked this up on the MSDN site, and found that the pages I saw ( http://www.hide-link.com/ and ( http://www.hide-link.com/ ) discuss the 'scope' of the enabled form.

However, scopes don't seem to make much sense in the context of a state machine workflow. The modification form would need to be enabled for a state, not a scope. There are no 'IEventActivity' steps to block the progress of the workflow while it is in a scope. Thus, 'rest' condition of the workflow is in a StateActivity, waiting for an event - and it is only in this condition that a user would have a chance of actually using a modification form.

Could you clarify how I'm meant to use Modification forms in SharePoint 2007 state machine workflow Or is this too specific to SharePoint



SharePoint Products and Technologies5  
 
 
cksturton





PostPosted: SharePoint - Workflow, State Machine Workflow modification form Top

Were you able to figure this out I'm trying to do the same thing and am stuck.

Thanks,

Cynthia


 
 
cksturton





PostPosted: SharePoint - Workflow, State Machine Workflow modification form Top

I'm still trying to figure this out. Has anyone been able to make it work I created a simple state machine workflow with three states, initialState, modifyState, and completedState. There are no tasks in the workflow. Basically, in the modifyState I do the following:

In the stateInitializationActivity I enable workflow modification, giving the modification a new correlation token (modificationToken). Then I have two eventDrivenActivities in the state. One of them uses onWorkflowItemChanged and when that event fires it just does a logToHistory and then moves the workflow to the completedState. The other eventDrivenActivity is waiting on an onWorkflowModified event. This event uses the modificationToken as its correlation token. The activity simple moves to the completedState if the workflow gets modified. I also have a stateFinalizationActivity that just does a logToHistory.

When I run the workflow, everything works, that is I don't get any errors, but when I'm in that modifyState I don't see the option to modify the workflow like I'm supposed to. The workflow just sits there saying it is In Progress until I modify the workflow item and then it logs to history and completes like it's supposed to.

Any ideas would be greatly appreciated.

Thanks,

Cynthia