I sent you an email on Wednesday 4/2/08. Did you receive it?
""Steven Cheng"" wrote:
> Hi Jeff,
> Please ignore another wrong message sent due to tool issue. As for those
> potential workarounds I mentioned, I just get them from another previous
> issue and so far I haven't any existing code or demo on hand. According to
> that case, the problem would be quite hard to workaround due to the current
> limitation model in state machine workflow. I can understand your concern
> and difficulty here, I'll do some further research and may leverage some
> further resource to assist you on this issue. Would you send me a mail
> through the following address(so that I can ask you for some further things
> offline):
> "stcheng" + "@" + "microsoft.com"
> Sincerely,
> Steven Cheng
> Microsoft MSDN Online Support Lead
> This posting is provided "AS IS" with no warranties, and confers no rights.
> --------------------
> From: =?Utf-8?B?SmVmZiBSaWNoYXJkc29u?= <bobcatri...@community.nospam>
> References: <6E62BB3A-A103-4B2C-B7A9-4C0F1D8AC...@microsoft.com>
> <VzZ7M3zgIHA.4...@TK2MSFTNGHUB02.phx.gbl>
> Subject: RE: create multiple tasks in a State Machine workflow?
> Date: Tue, 11 Mar 2008 10:47:08 -0700
> Steven,
> Thanks for the response. Unfortunately it is not the response I wanted to
> hear. This is a serious design flaw (I know the link you provided states
> it
> is not a design flaw) that Microsoft needs to fix. Microsoft claims that
> State Machines are the best way to design workflows that involve people.
> But
> there are few human workflows that don’t involve running tasks in
> parallel.
> I have found no evidence that Microsoft has ever documented that state
> machine workflows are designed to not allow multiple tasks to be run in
> parallel.
> The problem comes from the design of the StateActivity. The StateActivity
> has three phases of its lifespan, 1st it allows you to run a sequential
> workflow to initialize the state, 2nd it waits for any events that have
> been
> configured, and finally it runs another sequential workflow to clean up the
> state. Because the StateActivity has been hard-wired to only accept events
> for the ones configured in the second phase it is not possible to use the
> ReplicatorActivity in the initialization phase.
> To solve this problem, Microsoft should create an additional state activity
> that has a simpler lifespan. In the simpler state, the state would only
> have
> one execution phase. In that single phase, a single sequential state
> machine
> could execute without the restrictions on when events can be accepted.
> With
> this simpler state activity it would then be possible to put the replicator
> in the state just like you would do in a sequential workflow.
> Can you provide a detailed example of how to call a sequential workflow
> from
> the initialization phase of the StateActivity that is able to use the task
> and history lists of the parent state machine workflow as well as how to
> pass
> in data to the child workflow so that it can create the tasks?
> --
> Jeff Richardson
> ""Steven Cheng"" wrote:
> > Hi Peter,
> > Regarding on the multiple task in workflow issue, I've found some similar
> > discussion and issues on this. So far what I found is somewhat like
> you've
> > described, such parellel tasks are quite hard to do in state machine
> > workflow. In some former cases, some other engineers have suggested that
> we
> > use sequential workflow instead (which may use replicator or multi tasks
> > more conveniently).
> > Or someone ever suggested that you launch another workflow from the
> current
> > workflow that would create the task and handle the task completion i.e.
> You
> > would create a sequential workflow which creates a task and when that
> task
> > is set to complete you would create a replicator activity that would call
> > other instances of the same workflow which will continue until you want
> the
> > replicator code to cease calling other instances.
> > Here is a web entry I've found which also mentioned some suggestion the
> > replicator related issues:
> > #Workflow Tasks, the Replicator activity and State Machines
> > http://www.pseale.com/blog/SharePointWorkflowNuttinessVolume1.aspx
> > you may also have a look to see whether it helps some.
> > Sincerely,
> > Steven Cheng
> > Microsoft MSDN Online Support Lead
> > Delighting our customers is our #1 priority. We welcome your comments and
> > suggestions about how we
> > can improve the support we provide to you. Please feel free to let my
> > manager know what you think of
> > the level of service provided. You can send feedback directly to my
> manager
> > at: msd...@microsoft.com.
> > ==================================================
> > Get notification to my posts through email? Please refer to
> http://msdn.microsoft.com/subscriptions/managednewsgroups/default.asp...
> > ications.
> > Note: The MSDN Managed Newsgroup support offering is for non-urgent
> issues
> > where an initial response
> > from the community or a Microsoft Support
> > Engineer within 1 business day is acceptable. Please note that each
> follow
> > up response may take
> > approximately 2 business days as the support
> > professional working with you may need further investigation to reach the
> > most efficient resolution.
> > The offering is not appropriate for situations
> > that require urgent, real-time or phone-based interactions or complex
> > project analysis and dump
> > analysis issues. Issues of this nature are best handled working with a
> > dedicated Microsoft Support
> > Engineer by contacting Microsoft Customer Support Services (CSS) at
> > http://msdn.microsoft.com/subscriptions/support/default.aspx.
> > ==================================================
> > This posting is provided "AS IS" with no warranties, and confers no
> rights.
> > --------------------
> > From: =?Utf-8?B?SmVmZiBSaWNoYXJkc29u?= <bobcatri...@community.nospam>
> > Subject: create multiple tasks in a State Machine workflow?
> > Date: Mon, 10 Mar 2008 10:15:02 -0700
> > I have a non-trivial SharePoint State Machine workflow that in one of its
> > states needs to create multiple SharePoint tasks. Once all the tasks
> have
> > been completed the workflow can move on to another state.
> > I have tried several different ways to implement this but I have found
> none
> > that work. The problem stems from that while you can use a Replicator in
> > the
> > State Initialization there does not seem to be a way to setup a
> > corresponding
> > number of onTaskChanged events.
> > Replicator examples I have seen all use a sequential workflow model. The
> > same technique does not seem to work for State Machine workflows because
> it
> > will not allow activities at implement IEventActivity to be added to the
> > states stateInitializationActivity. This limitation means that the
> > createTaskActivity and the onTaskChangedActivity cannot be in the
> > Replicator.
> > How do I create multiple tasks in a State Machine workflow state?
> > Has anyone tried using InvokeWorkflow to synchronously call a sequential
> > workflow to do the work?
> > Thanks in advance.
> > --
> > Jeff Richardson