You are viewing a plain text version of this content. The canonical link for it is here.
Posted to kandula-dev@ws.apache.org by 竹伟饶 <10...@gmail.com> on 2007/08/08 05:35:12 UTC

Question about kandual BA States

Hi,All:
       I make every participant in State Active.Then ,I excute
"BAParticipantType[] plist = ((MixedCoordinatorIProxy)
coordIProxy) .completeParticipants(participantsToOperateOn);" I get
plist[i].getResultState().getState() is "active "  and
plist[i].getStatus().getState() is "completing".But,in fact,the state of
coordinate and participant have been "completed"(participant will send
"completed" message automatically).So I think the  ResultState() shoule be
 "completing"  and Status should be "completed".It seems that the plist[i]'s
state slower than the coordinate and participant ' current state.Why design
this way? If I want to get the coordinate and participant 's current
state,what I mean is the true current state.What should I do?
-- 
               饶竹伟
北京邮电大学 PCN&CAD中心

Re: Question about kandual BA States

Posted by Hannes Erven <ha...@erven.at>.
竹伟饶 wrote:

> plist[i].getResultState().getState() is "active "  and 
> plist[i].getStatus().getState() is "completing".

> But,in fact,the state of 
> coordinate and participant have been "completed"(participant will send 
> "completed" message automatically).

The contents of the plist are *not* updated, but reflect the states at
the point in time the plist was returned. In this case, this is
immediately after the coordinator sent out the "Complete" messages to
the participants.
New messages from the participants do not change the contents of this
plist instance anymore.

But: you can at any time fetch an updated plist from the coordinator
with plist = coordIProxy.listParticipants();


> So I think the  ResultState() shoule 
> be  "completing"  and Status should be "completed".

The "ResultState" reflects what actually happened on a business level.
Please see the javadoc on AbstractCoordParticipant#getResultState and
the WS-BAI specification (linked at
http://ws.apache.org/kandula/1/publications.html ) what this means.

In short: this value is only important when the participant has already
reached the Ended state (and .getStatus().getState() returns "Ended").
Without ResultState you would not be able to know whether the
participant completed (= executed your work) or exited (= did nothing).


> what I mean is the true current state.

The true current state can only be fetched by obtaining a current
participant list through coordIProxy.listParticipants() and examining
the .getStatus().getState() return value of the desired participant.



I hope I could explain this?

-hannes

---------------------------------------------------------------------
To unsubscribe, e-mail: kandula-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: kandula-dev-help@ws.apache.org