The addPlugin() function of WorkflowServiceContainer service will be used to register when a workflow is implemented. Thus, if you want to use a workflow, you are required to configure 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.
You can use war:(FOLDER_PATH) to register the location in which you put the workflow in the .jar files.
<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>
You can use "classpath:" to register a workflow which you put inside the .jar file.
<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>
The notification message will be 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.