Index: main/plugin-explorer/src/org/ametys/plugins/explorer/calendar/workflow/CalendarWorkflowGenerator.java
===================================================================
--- main/plugin-explorer/src/org/ametys/plugins/explorer/calendar/workflow/CalendarWorkflowGenerator.java	(revision 47663)
+++ main/plugin-explorer/src/org/ametys/plugins/explorer/calendar/workflow/CalendarWorkflowGenerator.java	(working copy)
@@ -16,9 +16,13 @@
 package org.ametys.plugins.explorer.calendar.workflow;
 
 import java.io.IOException;
-import java.util.ArrayList;
 import java.util.HashMap;
+import java.util.Map;
 
+import org.ametys.plugins.explorer.calendar.Calendar;
+import org.ametys.plugins.explorer.workflow.AbstractExplorerNodeWorkflowComponent;
+import org.ametys.plugins.repository.AmetysObjectResolver;
+import org.ametys.plugins.workflow.Workflow;
 import org.apache.avalon.framework.service.ServiceException;
 import org.apache.avalon.framework.service.ServiceManager;
 import org.apache.cocoon.ProcessingException;
@@ -28,11 +32,6 @@
 import org.apache.cocoon.xml.XMLUtils;
 import org.xml.sax.SAXException;
 
-import org.ametys.plugins.explorer.calendar.Calendar;
-import org.ametys.plugins.explorer.workflow.AbstractExplorerNodeWorkflowComponent;
-import org.ametys.plugins.repository.AmetysObjectResolver;
-import org.ametys.plugins.workflow.Workflow;
-
 /**
  * Sax information on the workflow of a given calendar 
  */
@@ -44,6 +43,9 @@
     /** The workflow */
     protected Workflow _workflow;
     
+    /** The map of subcalendar workflow and if they can be initialized*/
+    private Map<String, Boolean> _subcalendarWorkflows;
+    
     @Override
     public void service(ServiceManager serviceManager) throws ServiceException
     {
@@ -72,15 +74,15 @@
         
         XMLUtils.endElement(contentHandler, "workflow");
         
-        ArrayList<String> listWorkflowName = new ArrayList<String>();
-        listWorkflowName.add(workflowName);
-        _saxWorkflowCalendar(calendar, listWorkflowName);
+        _subcalendarWorkflows = new HashMap<String, Boolean>();
+        _getWorkflowCalendarInfo(calendar);
+        _saxWorkflowCalendar();
         
         XMLUtils.endElement(contentHandler, "infos");  
         contentHandler.endDocument();
     }
     
-    private void _saxWorkflowCalendar(Calendar calendar, ArrayList<String> listWorkflowName) throws SAXException
+    private void _getWorkflowCalendarInfo(Calendar calendar) throws SAXException
     {
         for (Object object : calendar.getChildren())
         {
@@ -88,20 +90,34 @@
             {
                 Calendar subCalendar = (Calendar) object;
                 String workflowName = subCalendar.getWorkflowName();
-                if (!listWorkflowName.contains(workflowName))
+                if (!_subcalendarWorkflows.containsKey(workflowName))
+                {
+                	_subcalendarWorkflows.put(workflowName, false);
+                }
+                
+                Boolean canInitWorkflow = _subcalendarWorkflows.get(workflowName);
+                if (!canInitWorkflow)
                 {
-                    listWorkflowName.add(workflowName);
-                    XMLUtils.startElement(contentHandler, "workflow-child");
-                    XMLUtils.createElement(contentHandler, "name", workflowName);
-                    HashMap<String, Object> inputs = new HashMap<String, Object>();
-                    inputs.put(AbstractExplorerNodeWorkflowComponent.EXPLORERNODE_KEY, subCalendar);
-                    XMLUtils.createElement(contentHandler, "canInitWorkflow", _workflow.canInitialize(workflowName, 1, inputs) ? "true" : "false");
-                    XMLUtils.endElement(contentHandler, "workflow-child");
+                	HashMap<String, Object> inputs = new HashMap<String, Object>();
+                	inputs.put(AbstractExplorerNodeWorkflowComponent.EXPLORERNODE_KEY, subCalendar);
+                	_subcalendarWorkflows.put(workflowName, _workflow.canInitialize(workflowName, 1, inputs));
+                	
                 }
                 
-                _saxWorkflowCalendar(subCalendar, listWorkflowName);
+                _getWorkflowCalendarInfo(subCalendar);
             }
         }
     }
+    
+    private void _saxWorkflowCalendar() throws SAXException
+    {
+    	for (String workflowName : _subcalendarWorkflows.keySet())
+    	{
+    		XMLUtils.startElement(contentHandler, "workflow-child");
+    		XMLUtils.createElement(contentHandler, "name", workflowName);
+    		XMLUtils.createElement(contentHandler, "canInitWorkflow", String.valueOf(_subcalendarWorkflows.get(workflowName)));
+    		XMLUtils.endElement(contentHandler, "workflow-child");
+    	}
+    }
 
 }
