<?xml version="1.0" encoding="ISO-8859-1"?>

<configuration
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://www.exoplatform.org/xml/ns/kernel_1_2.xsd http://www.exoplatform.org/xml/ns/kernel_1_2.xsd"
	xmlns="http://www.exoplatform.org/xml/ns/kernel_1_2.xsd">
  
	
	<component>
    <key>org.exoplatform.services.workflow.WorkflowFormsService</key>
    <type>org.exoplatform.services.workflow.impl.bonita.WorkflowFormsServiceImpl</type>
  </component>
  
  <component>
    <key>org.exoplatform.services.workflow.WorkflowFileDefinitionService</key>
    <type>org.exoplatform.services.workflow.impl.bonita.JCRFileDefinitionServiceImpl</type>
  </component>
      
    <component>
    <key>org.exoplatform.services.workflow.WorkflowServiceContainer</key>
    <type>org.exoplatform.services.workflow.impl.bonita.WorkflowServiceContainerImpl</type>
	<init-params>
			<value-param>
	    	<name>super.user</name>
	    	<value>root</value>
	    </value-param>
			<value-param>
	    	<name>super.pass</name>
	    	<value>gtn</value>
	    </value-param>	        
	    <value-param>
	    	<name>jaas.login.context</name>
	    	<value>gatein-domain</value>
	    </value-param>
    </init-params>
	</component>
	
	<external-component-plugins>
		<target-component>org.exoplatform.services.workflow.WorkflowServiceContainer</target-component>	
	  <component-plugin>
	    <name>deploy.predefined.processes</name>
	    <set-method>addPlugin</set-method>
	    <type>org.exoplatform.services.workflow.PredefinedProcessesPlugin</type>
	    <init-params>
	      <object-param>
	        <name>predefined.processes</name>
	        <description>load of default business processes</description>
	        <object type="org.exoplatform.services.workflow.ProcessesConfig">
	          <field name="processLocation"><string>classpath:</string></field>
	          <field name="predefinedProcess">
	            <collection type="java.util.HashSet">
	              <value><string>/exo-ecms-ext-workflow-bp-bonita-content-${project.version}.jar</string></value>
	              <value><string>/exo-ecms-ext-workflow-bp-bonita-holiday-${project.version}.jar</string></value>
	              <value><string>/exo-ecms-ext-workflow-bp-bonita-payraise-${project.version}.jar</string></value>
	            </collection>
	          </field>
	        </object>
	      </object-param>
	    </init-params>
	  </component-plugin>
	</external-component-plugins>
	
	<!-- Script & template for reloadBP action-->	
	<external-component-plugins>
    <target-component>org.exoplatform.services.cms.scripts.ScriptService</target-component>
    	<component-plugin> 
        <name>manage.script.plugin</name>
        <set-method>addScriptPlugin</set-method>
        <type>org.exoplatform.services.cms.scripts.impl.ScriptPlugin</type>
        <description>Nothing</description>
		    <init-params>		    	
	        <value-param>
	        	<name>autoCreateInNewRepository</name>
	        	<value>true</value>
	        </value-param>	        
	        <value-param>
	        	<name>repository</name>
	        	<value>repository</value>
	        </value-param>
	        <value-param>
	        	<name>predefinedScriptsLocation</name>
	        	<value>classpath:/conf/workflow/artifacts</value>
	        </value-param>	        
		      <object-param>
		        <name>predefined.scripts</name>
		        <description>description</description>
		        <object type="org.exoplatform.services.cms.impl.ResourceConfig">		        	
		          <field  name="resources">
		            <collection type="java.util.ArrayList">		              
		              <value>
		                <object type="org.exoplatform.services.cms.impl.ResourceConfig$Resource">
		                  <field  name="name"><string>ecm-explorer/action/ReloadBPScript.groovy</string></field>
		                </object>
		              </value>		              
		            </collection>   
		          </field>
		        </object>
		      </object-param>
		    </init-params> 
		   </component-plugin> 
  </external-component-plugins>
  
  <!--external-component-plugins>
    <target-component>org.exoplatform.services.cms.templates.TemplateService</target-component>
      <component-plugin>
        <name>addTemplates</name>
        <set-method>addTemplates</set-method>
        <type>org.exoplatform.services.cms.templates.impl.TemplatePlugin</type>    
        <init-params>
	        <value-param>
	        	<name>autoCreateInNewRepository</name>
	        	<value>true</value>
	        </value-param>
	        <value-param>
	        	<name>storedLocation</name>
	        	<value>classpath:/conf/workflow/artifacts/templates</value>
	        </value-param>
	        <value-param>
	        	<name>repository</name>
	        	<value>repository</value>
	        </value-param>	        
          <object-param>
            <name>template.configuration</name>
            <description>configuration for the localtion of templates to inject in jcr</description>
            <object type="org.exoplatform.services.cms.templates.impl.TemplateConfig">            	
              <field  name="nodeTypes">
                <collection type="java.util.ArrayList">                  
                  <value>
                    <object type="org.exoplatform.services.cms.templates.impl.TemplateConfig$NodeType">
                      <field name="nodetypeName"><string>exo:ReloadBPAction</string></field>
                      <field name="documentTemplate"><boolean>false</boolean></field>
                      <field  name="label"><string>Reload Business Process Action</string></field>
                      <field name="referencedView">
                        <collection type="java.util.ArrayList">
                          <value>
                            <object type="org.exoplatform.services.cms.templates.impl.TemplateConfig$Template">
                              <field name="templateFile"><string>/actions/script/reloadBP/views/view1.gtmpl</string></field>
                              <field name="roles"><string>*</string></field>
                            </object>
                          </value>
                        </collection>
                      </field>
                      <field name="referencedDialog">
                        <collection type="java.util.ArrayList">
                          <value>
                            <object type="org.exoplatform.services.cms.templates.impl.TemplateConfig$Template">
                              <field name="templateFile"><string>/actions/script/reloadBP/dialogs/dialog1.gtmpl</string></field>
                              <field name="roles"><string>*</string></field>
                            </object>
                          </value>
                        </collection>
                      </field>
                    </object>
                  </value>                                                                                            
                </collection>
              </field>
            </object>
          </object-param>
        </init-params>       
      </component-plugin>
  </external-component-plugins-->
</configuration>
