h1. How to deploy a workflow? {anchor:id=CONTref.FAQ.HowToDeployWorkflow}
 
The _*addPlugin()*_ function of *WorkflowServiceContainer* service is used to register a Business Process when a workflow is implemented. Thus, if you want to use a workflow, you are required to configure the workflow service to invoke the _*addPlugin()*_ function by adding the _*external-component-plugins*_ element to the configuration file.

You have to set values for the name and location of the workflow which you want to use. There are *TWO* ways to configure the location of the workflow.

h2. Deploy a workflow inside a *.war* file {anchor:id=CONTref.FAQ.DeployWorkflowWarFile}

You can use "war:(FOLDER_PATH)" to configure which *.jar* files contain your workflow processes inside the _*.war*_ file.
	
{code:xml}
<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>war:/conf/bp</string></field>
					<field name="predefinedProcess">
						<collection type="java.util.HashSet">
							<value><string>/exo-ecms-ext-workflow-bp-jbpm-content-2.1.1.jar</string></value>
							<value><string>/exo-ecms-ext-workflow-bp-jbpm-payraise-2.1.1.jar</string></value>
							<value><string>/exo-ecms-ext-workflow-bp-jbpm-holiday-2.1.1.jar</string></value>
						</collection>
					</field>
				</object>
			</object-param>
		</init-params>
	</component-plugin>	    
</external-component-plugins>
{code}

h2. Deploy a workflow inside a *.jar* file {anchor:id=CONTref.FAQ.DeployWorkflowJarFile}


You can use "classpath:" to configure which *.jar* files contain your workflow processes inside the _*.jar*_ file.
	
{code:xml}
<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-jbpm-content-myworkflow.jar</string></value>     
						</collection>
					</field>
				</object>
			</object-param>
		</init-params>
	</component-plugin>	    
</external-component-plugins>
{code}	
  
The notification message is displayed when you deploy a workflow on Jboss. If you use "classpath:" to register, you must put your workflow in the *.jar* files inside the _*gatein.ear/lib*_ folder (instead of the *_lib_* folder) to make it work.
