cancel
Showing results for 
Search instead for 
Did you mean: 

Creating a new WCM workflow

dafyddjames
Champ in-the-making
Champ in-the-making
Hi,

I'm currently using 3.1.2 and I'd like to create a new WCM workflow that allows me to make use of the auto-deploy feature that doesn't seem to appear unless you're using a workflow for submission in your web project. All existing workflows seem to involve review/submission and I don't want that step in my workflow.

I've been reading the wiki docs but some things aren't clear:

  • where should I store my process definition XML? I don't want to store it inside the exploded webapp (so that I don't mix up core alfresco code with the code that I've written), can I store it inside the extension directory somewhere?

  • the workflow-context.xml file inside WEB-INF is quite different to the workflow-context.xml.sample file in the extension directory; it has no specific workflow definitions, and a lot more beans are defined than in the sample file. Am I doing the right thing if I rename workflow-context.xml.sample to workflow-context.xml?
Thanks for help in advance! Smiley Very Happy
3 REPLIES 3

romschn
Star Collaborator
Star Collaborator
1. You can put your process definition.xml file under tomcat/shared/classes/alfresco/extension/workflow folder.
2. Leave out-of-the-box workflow-context.xml as it is. You do not require to modify it. It contains the out-of-the-bean entries.
3. Create a new custom-workflow-context.xml file in which add entry to register your process definition.xml file as below example.
   <bean id="customWorkflow" parent="workflowDeployer">
        <property name="workflowDefinitions">
            <list>
                <!– Adhoc workflow definition –>
                <props>
                    <prop key="engineId">jbpm</prop>
                    <prop key="location">alfresco/extension/workflow/my_processdefinition.xml</prop>
                    <prop key="mimetype">text/xml</prop>
                    <prop key="redeploy">false</prop>
                </props>
            </list>
        </property>
You may want to take a look at bootstrap-context.xml for more detail in which out-of-the-box workflows are registered.

Hope this helps,

Thanks,

dafyddjames
Champ in-the-making
Champ in-the-making
That's great, thanks! I'm now using Alfresco 3.4.0, I hope that your instructions apply to this version too. I'll give them a go ASAP Smiley Happy

romschn
Star Collaborator
Star Collaborator
Yes, it applies to version 3.4 as well.