AnsweredAssumed Answered

Namespace

Question asked by bcoulson on Mar 18, 2011
Latest reply on Feb 7, 2012 by jalxm
All

We have been struggling with an issue for a few weeks now and whilst I see alot of other folks have struggled as well, I do not see any solutions. Here is the situation. We have a workflow process that is not being started by Alfresco. When we attempt to deploy it using Eclipse BPM plugin, we get an error as shown in the log below.


SEVERE: Servlet.service() for servlet JBPMDeployProcessServlet threw exception
org.alfresco.service.namespace.NamespaceException: Namespace prefix ipdswf is not mapped to a namespace URI
   at org.alfresco.service.namespace.QName.createQName(QName.java:101)
   at org.alfresco.service.namespace.QName.createQName(QName.java:123)
   at org.alfresco.repo.workflow.jbpm.JBPMEngine.getTaskDefinition(JBPMEngine.java:1969)
   at org.alfresco.repo.workflow.jbpm.JBPMEngine.createWorkflowTaskDefinition(JBPMEngine.java:3004)
   at org.alfresco.repo.workflow.jbpm.JBPMEngine.createWorkflowDefinition(JBPMEngine.java:2942)
   at org.alfresco.repo.workflow.jbpm.JBPMEngine.createWorkflowDeployment(JBPMEngine.java:3017)
   at org.alfresco.repo.workflow.jbpm.JBPMEngine$1.doInJbpm(JBPMEngine.java:357)
   at org.springmodules.workflow.jbpm31.JbpmTemplate$1.doInHibernate(JbpmTemplate.java:87)
   at org.springframework.orm.hibernate3.HibernateTemplate.doExecute(HibernateTemplate.java:406)
   at org.springframework.orm.hibernate3.HibernateTemplate.execute(HibernateTemplate.java:339)
   at org.springmodules.workflow.jbpm31.JbpmTemplate.execute(JbpmTemplate.java:80)
   at org.alfresco.repo.workflow.jbpm.JBPMEngine.deployDefinition(JBPMEngine.java:346)
   at org.alfresco.repo.workflow.WorkflowServiceImpl.deployDefinition(WorkflowServiceImpl.java:170)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:597)…

The process definition file is below and is in the <tomcat_install>/webapps/alfresco/web-inf/classes/alfresco/extension/workflow/SimpleApproval directory.

<?xml version="1.0" encoding="UTF-8"?>

<process-definition  xmlns="urn:jbpm.org:jpdl-3.1"  name="ipdswf:SimpleApproval">
   <swimlane name="initiator" />

   <swimlane name="managers">
      <assignment class="org.alfresco.repo.workflow.jbpm.AlfrescoAssignment">
         <pooledactors>#{people.getGroup('GROUP_managers')}</pooledactors>
      </assignment>
   </swimlane>

   <start-state name="start">
      <task name="ipdswf:submitApprovalTask" swimlane="initiator" />
      <transition name="" to="Submit"></transition>
   </start-state>
  
   <node name="Submit">
      <event type="node-enter">
         <script>
            <variable name="approveCount" access="read,write"/>
            <expression>
               approveCount = 0;
            </expression>
         </script>
      </event>
      <transition name="" to="end1"></transition>
   </node>

   <end-state name="end1"></end-state>
</process-definition>

The workflow model file which is located in the <tomcat_install>/webapps/alfresco/web-inf/classes/alfresco/extension/model directory.

<?xml version="1.0" encoding="UTF-8"?>
<!– Definition of new Model –>
<model name="ipdswf:workflowmodel"
   xmlns="http://www.alfresco.org/model/dictionary/1.0">

   <!– Optional meta-data about the model –>
   <description>IPDS Workflow Model</description>
   <author>Zunsik Lim</author>
   <version>1.0</version>

   <!– Imports are required to allow references to definitions in other models –>
   <imports>
      <import uri="http://www.alfresco.org/model/dictionary/1.0"
         prefix="d" />
      <import uri="http://www.alfresco.org/model/bpm/1.0"
         prefix="bpm" />
   </imports>

   <!– Introduction of new namespaces defined by this model –>
   <namespaces>
      <namespace uri="http://www.ipds.com/model/workflow/1.0"
         prefix="ipdswf" />
   </namespaces>

   <types>

      <type name="ipdswf:submitApprovalTask">
         <parent>bpm:startTask</parent>
      </type>
   </types>
</model>

The context file which is in the <tomcat_install>/webapps/alfresco/web-inf/classes/alfresco/extension directory.

<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN' 'http://www.springframework.org/dtd/spring-beans.dtd'>

<beans>
    <!– Registration of new models –>
    <bean id="extension.dictionaryBootstrap" parent="dictionaryModelBootstrap" depends-on="dictionaryBootstrap">
        <property name="models">
            <list>
                <value>alfresco/extension/model/ipdsWorkflowModel.xml</value>
            </list>
        </property>
    </bean>
   
   <!– Registration of resource bundles –>
    <bean id="extension.workflowBootstrap"
          parent="workflowDeployer">
        <property name="workflowDefinitions">
         <list>
            <props>
               <prop key="engineId">jbpm</prop>
               <prop key="location">alfresco/extension/workflows/SimpleApproval/processdefinition.xml</prop>
               <prop key="mimetype">text/xml</prop>
               <prop key="redeploy">true</prop>
            </props>
         </list>
      </property>
        <property name="labels">
                <list>
                <value>alfresco/extension/ipdsWorkflow</value>
            </list>
        </property>
    </bean>
</beans>


We have tried the following.
1. Uninstalled and reinstalled Alfresco
2. Changed the name of the namespace prefix
3. Deployed the process on another local machine with Alfresco. The fact that the error still occurs tells us it is not due to previous existing versions of the model or workflow but rather a data issue, but we can't figure it out! And it's a simple workflow proof of concept at the moment.
4. Tried deploying it as a Spring bean AND via Eclipse plugin, either way, the error persists.

We look at the workflow definitions in the workflow-console and there is no sign of this process.
None of these had any effect - the results were always the same. If anyone could shed some light on this for us, we would greatly appreciate it.

Outcomes