[Yanel-commits] rev 24598 -
public/yanel/trunk/src/resources/xml/src/java/org/wyona/yanel/impl/resources
michi at wyona.com
michi at wyona.com
Tue May 22 00:05:42 CEST 2007
Author: michi
Date: 2007-05-22 00:05:40 +0200 (Tue, 22 May 2007)
New Revision: 24598
Modified:
public/yanel/trunk/src/resources/xml/src/java/org/wyona/yanel/impl/resources/XMLResource.java
Log:
fix date of initial workflow state
Modified: public/yanel/trunk/src/resources/xml/src/java/org/wyona/yanel/impl/resources/XMLResource.java
===================================================================
--- public/yanel/trunk/src/resources/xml/src/java/org/wyona/yanel/impl/resources/XMLResource.java 2007-05-21 20:08:22 UTC (rev 24597)
+++ public/yanel/trunk/src/resources/xml/src/java/org/wyona/yanel/impl/resources/XMLResource.java 2007-05-21 22:05:40 UTC (rev 24598)
@@ -43,11 +43,7 @@
import org.wyona.yanel.core.transformation.XIncludeTransformer;
import org.wyona.yanel.core.util.PathUtil;
import org.wyona.yanel.core.util.ResourceAttributeHelper;
-/*
-import org.wyona.yanel.core.workflow.Transition;
import org.wyona.yanel.core.workflow.Workflow;
-import org.wyona.yanel.core.workflow.WorkflowBuilder;
-*/
import org.wyona.yanel.core.workflow.WorkflowException;
import org.wyona.yanel.core.workflow.WorkflowHelper;
@@ -356,7 +352,12 @@
public void checkin(String comment) throws Exception {
Node node = getRealm().getRepository().getNode(getPath());
- node.checkin(comment);
+ Revision revision = node.checkin(comment);
+ // set initial workflow state and date:
+ Workflow workflow = WorkflowHelper.getWorkflow(this);
+ if (workflow != null) {
+ setWorkflowState(workflow.getInitialState(), revision.getRevisionName());
+ }
/*
if (node.isCheckedOut()) {
String checkoutUserID = node.getCheckoutUserID();
@@ -513,6 +514,7 @@
java.util.HashMap map = new java.util.HashMap();
map.put("xslt", request.getParameter("rp.xslt"));
map.put("mime-type", request.getParameter("rp.mime-type"));
+ map.put("workflow-schema", request.getParameter("rp.workflow-schema"));
return map;
}
@@ -581,7 +583,7 @@
sb.append("<checkin url=\"?yanel.resource.usecase=checkin\" method=\"PUT\"/>");
sb.append("</edit>");
- sb.append(WorkflowHelper.getWorkflowIntrospection(this));
+ sb.append(getWorkflowIntrospection());
sb.append("</resource>");
sb.append("</introspection>");
More information about the Yanel-commits
mailing list