 |
|
 |
|
|
 |
HWS Activity Model - Independent Action Coordination |
 |
 |
|
|
09-25-04 01:48 AM
Hi,
I'm trying to tie together an activity model's independent HWS actions
and having little success.
I've built a basic activity model consisting of 2 actions. The first
one simply sends a notification out and accepts no message back. The
second one sends a notification, and handles a response.
My first UI uses "GetActivityList" to get the activity model I want,
and then I use "GetActivityModelParameters" to get back the parameter
for the first block (a single XML document, given that there are no
dependent transitions). I then pass the parameter array in as part of
the "AddActivationBlockToActivityFlow" call. The first action runs
fine, and the notification is sent.
However, at this point, I can't seem to use the activity flow ID in
the next UI form to get the next step/action in the flow. And the
flow appears as inactive in the HWS admin console.
So my question is ... how do you tie together independent actions in
an activity model? Where can I see a list of steps to choose from, or
at least the next step that I should be executing? Making a request
again to "GetActivityList" in a subsequent UI form, passing in the
flow ID for the instance, returns with an error saying no actions are
available.
Thanks for any assistance.
[ Post a follow-up to this message ]
|
|
|
 |
|
 |
|
 |
|
|
 |
RE: HWS Activity Model - Independent Action Coordination |
 |
 |
|
|
09-27-04 10:52 PM
Hey Richard,
So, the first thing that comes to mind is: Are you supplying the previous
action instance Id and/or the previous task id to the call to
GetActivityList in the second UI?
The way GetActivityList works is that it returns the set of actions a user
can perform at a given point in the activity flow. The point in the
activity flow is determined by using the flowId, the previous action
instance id, and the previous task id. When you activate the first step in
an activity flow, there is no previous action or task, and so both these
values are the empty guid. If are calling GetActivityList for an activity
flow that already has an action activated in it, and again pass empty guids
for the aciton and task, the method will return no actions. In that
context, that's the right answer, because you're essentially asking HWS
what actions you can append to the activity flow as the first action.
Since the flow already has a first action, the answer is none.
As for the flow's inactive status in the admin console, that's actually
what it should be. A flow's status is the aggregate of the stati of all
actions within the flow. An action is active if it's orchestration is
still running, otherwise it's inactive. If there is at least one active
action in a flow, the flow is active, otherwise it's inactive. In your
case, since your first action doesn't wait around for a response after
sending our the notification, it should have run through completely and
finished. As such, that action has become inactive. Since you weren't
able to add the second action to your flow, the flow only contains one
action, which is inactivate, and as such the flow is inactive.
To activate the second action in your flow, you will need to pass the
action Id from the first action you activated into the GetActivityList
call. You can also pass the task id, depending on your situation. In HWS,
there are 2 classes of users that can append action into an activity flow
at any given point in the flow: a) The user who initiated the previous step
(by passing the previous action Id to GetActivityList) and b) A user who
received a task from the previous step (by passing that task Id and the
previous action Id to GetActivityList).
Hope that helps,
--Chris
--------------------[vbcol=seagreen]
[ Post a follow-up to this message ]
|
|
|
 |
|
 |
|
 |
|
|
 |
Re: HWS Activity Model - Independent Action Coordination |
 |
 |
|
|
09-28-04 10:52 PM
Chris,
Just a great response post, thanks. The parentActionInstanceID was
the key I was missing.
So, in my second user interface, after the initial step has fired, I
used the below code:
Activity[] validActions =
workflowService.GetActivityList(activityFlowId, parentActionId,
parentTaskId, null, null);
That retrieved my activity model, and then I pulled back my next
step's parameter document by doing this:
parameters = workflowService.GetActivityModelParameters(myModel.ActivityMode
lTypeID,
activityBlockId, null);
I updated the parameter document nodes, and continued on my flow by
doing this:
workflowService. AddActivationBlockToActivityFlow(activit
yFlowId,
modelInstanceId, parentActionId, parentTaskId, false, parameters,
null);
Thanks for providing the push I needed.
cwhytock@online.microsoft.com (Chris Whytock[MSFT]) wrote in message news:<ulHVagNpEHA.3
636@cpmsftngxa06.phx.gbl>...[vbcol=seagreen]
> Hey Richard,
>
> So, the first thing that comes to mind is: Are you supplying the previous
> action instance Id and/or the previous task id to the call to
> GetActivityList in the second UI?
>
> The way GetActivityList works is that it returns the set of actions a user
> can perform at a given point in the activity flow. The point in the
> activity flow is determined by using the flowId, the previous action
> instance id, and the previous task id. When you activate the first step i
n
> an activity flow, there is no previous action or task, and so both these
> values are the empty guid. If are calling GetActivityList for an activity
> flow that already has an action activated in it, and again pass empty guid
s
> for the aciton and task, the method will return no actions. In that
> context, that's the right answer, because you're essentially asking HWS
> what actions you can append to the activity flow as the first action.
> Since the flow already has a first action, the answer is none.
>
> As for the flow's inactive status in the admin console, that's actually
> what it should be. A flow's status is the aggregate of the stati of all
> actions within the flow. An action is active if it's orchestration is
> still running, otherwise it's inactive. If there is at least one active
> action in a flow, the flow is active, otherwise it's inactive. In your
> case, since your first action doesn't wait around for a response after
> sending our the notification, it should have run through completely and
> finished. As such, that action has become inactive. Since you weren't
> able to add the second action to your flow, the flow only contains one
> action, which is inactivate, and as such the flow is inactive.
>
> To activate the second action in your flow, you will need to pass the
> action Id from the first action you activated into the GetActivityList
> call. You can also pass the task id, depending on your situation. In HWS
,
> there are 2 classes of users that can append action into an activity flow
> at any given point in the flow: a) The user who initiated the previous ste
p
> (by passing the previous action Id to GetActivityList) and b) A user who
> received a task from the previous step (by passing that task Id and the
> previous action Id to GetActivityList).
>
> Hope that helps,
>
> --Chris
>
> --------------------
[ Post a follow-up to this message ]
|
|
|
 |
|
 |
|
 |
|
|
|
Sponsored Links |
 |
 |
|
|
 |
All times are GMT. The time now is 03:22 PM. |
 |
|
|
 |
|
 |
|
|
 |
|
Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
|
|
|
|
Medical and Health forum | Computer Games Reviews | Graphics design forum
|
 |
|
 |
|