You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lenya.apache.org by Thorsten Scherler <th...@juntadeandalucia.es> on 2007/05/16 17:45:39 UTC

Locking problem (was Re: DO NOT REPLY [Bug 34994] - Basic WebDAV functionality)

On Wed, 2007-05-16 at 08:05 -0700, bugzilla@apache.org wrote:
...
> src/modules-core/ac/java/src/org/apache/lenya/cms/ac/DocumentPolicyManagerWrapper.java
> 
> ===================================================================
> ---
> src/modules-core/ac/java/src/org/apache/lenya/cms/ac/DocumentPolicyManagerWrapper.java
>      (revision 537897)
> +++
> src/modules-core/ac/java/src/org/apache/lenya/cms/ac/DocumentPolicyManagerWrapper.java
>      (working copy)
> @@ -104,7 +104,7 @@
> 	     String prefixWithArea = prefix + ((area != null) ? area : "");
> 	     // String prefixWithArea = prefix + area;
> 	     String authoringUrl = prefix + Publication.AUTHORING_AREA
> -		     + webappUrl.substring(prefixWithArea.length());
> +		     +
> ((webappUrl.length()>prefixWithArea.length())?webappUrl.substring(prefixWithArea.length()):"/");
> 
>  
> 	     if (map.isDocument(authoringUrl)) {
> 		 Document authoringDoc = map.getFromURL(authoringUrl);
> 
> This patch brings back the auth dialog but now it fails to find the flow.

Caused by: org.mozilla.javascript.WrappedException: Wrapped
java.lang.IllegalStateException: No transition found for event
[lockInvolvedObjects] in state [start]!
(file:/home/thorsten/src/apache/lenya-1.4.x/build/lenya/webapp/lenya/modules/webdav/webdav.js#183)
	at
org.mozilla.javascript.Context.throwAsScriptRuntimeEx(Context.java:1693)

The line which he is complaining is:
usecase.lockInvolvedObjects();

Somebody an idea why and how we can fix it?

TIA for any tips.

salu2
-- 
Thorsten Scherler                                 thorsten.at.apache.org
Open Source Java                      consulting, training and solutions


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


Re: Locking problem (was Re: DO NOT REPLY [Bug 34994] - Basic WebDAV functionality)

Posted by Andreas Hartmann <an...@apache.org>.
Thorsten Scherler schrieb:

[...]

> No transition found for event [lockInvolvedObjects] in state [start]!

The AbstractUsecase contains a state machine which ensures that the
methods are called in the correct order. This avoids inconsistent
states (e.g., that execute() is called before the execution conditions
are checked).

Here's a list of the transitions (sourceState, destState, event/method):

("start", "preChecked", "checkPreconditions"),
("preChecked", "nodesLocked", "lockInvolvedObjects"),
("nodesLocked", "execChecked", "checkExecutionConditions"),
("execChecked", "execChecked", "checkExecutionConditions"),
("execChecked", "executed", "execute"),
("executed", "postChecked", "checkPostconditions") };


According to the state machine, you have to call checkPreconditions()
before you may call lockInvolvedObjects().

-- Andreas


-- 
Andreas Hartmann, CTO
BeCompany GmbH
http://www.becompany.ch


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