RE: create multiple tasks in a State Machine workflow?
- From: Jeff Richardson <bobcatridge@xxxxxxxxxxxxxxxx>
- Date: Fri, 4 Apr 2008 09:37:02 -0700
Hi Steven,
I sent you an email on Wednesday 4/2/08. Did you receive it?
--
Jeff Richardson
""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?= <bobcatridge@xxxxxxxxxxxxxxxx>
References: <6E62BB3A-A103-4B2C-B7A9-4C0F1D8ACEF2@xxxxxxxxxxxxx>
<VzZ7M3zgIHA.4672@xxxxxxxxxxxxxxxxxxxxxx>
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,you've
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
described, such parellel tasks are quite hard to do in state machinewe
workflow. In some former cases, some other engineers have suggested that
use sequential workflow instead (which may use replicator or multi taskscurrent
more conveniently).
Or someone ever suggested that you launch another workflow from the
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 thattask
is set to complete you would create a replicator activity that would callthe
other instances of the same workflow which will continue until you want
replicator code to cease calling other instances.manager
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
at: msdnmg@xxxxxxxxxxxxxxhttp://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
==================================================
Get notification to my posts through email? Please refer to
ications.issues
Note: The MSDN Managed Newsgroup support offering is for non-urgent
where an initial responsefollow
from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each
up response may takerights.
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
have
--------------------
From: =?Utf-8?B?SmVmZiBSaWNoYXJkc29u?= <bobcatridge@xxxxxxxxxxxxxxxx>
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
been completed the workflow can move on to another state.none
I have tried several different ways to implement this but I have found
that work. The problem stems from that while you can use a Replicator init
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
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
- Follow-Ups:
- RE: create multiple tasks in a State Machine workflow?
- From: Steven Cheng [MSFT]
- RE: create multiple tasks in a State Machine workflow?
- Prev by Date: RE: Infopath Browser Form - Webservice return value
- Next by Date: SharePoint 2007: Content Deployment Issue
- Previous by thread: Sharepoint Web Application issue
- Next by thread: RE: create multiple tasks in a State Machine workflow?
- Index(es):
Relevant Pages
|