AnsweredAssumed Answered

new workflow definition not getting display in the list wf

Question asked by amitnerkar on Dec 18, 2012
Latest reply on Aug 6, 2015 by darkredd
Hi,

I have to create a new workflow process definition. I created the following files:

-alfresco/model/DocuModel.xml
-alfresco/workflow/TaskModel.xml
-alfresco/workflow/ProcessDefinition.xml
-alfresco/extension/docuModel-context.xml
-alfresco/web-client-config.xml

I have configured the xmls. But when i store a document in the repository and start a workflow the initial list of workflows is displayed. This list doesn't contain the new process definition.

The document model alfresco/model/DocuModel.xml is working alright. The process definition is not.

-alfresco/workflow/TaskModel.xml

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

<model name="wf:workflowmodel" xmlns="http://www.alfresco.org/model/dictionary/1.0">

  <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>

  <namespaces>
     <namespace uri="http://www.alfresco.org/model/workflow/1.0" prefix="wf"/>
  </namespaces>
     
  <types>


     <type name="wf:submitAdhocTask">
        <parent>bpm:startTask</parent>
        
        <properties>
           <property name="wf:notifyMe">
              <type>d:boolean</type>
              <default>false</default>
           </property>
        </properties>

        <mandatory-aspects>
           <aspect>bpm:assignee</aspect>
        </mandatory-aspects>
     </type>

     <type name="wf:adhocTask">
        <parent>bpm:workflowTask</parent>
      <properties>
      <property name="wf:adhocname">
              <type>d:text</type>
              <default>false</default>
        </property>
      </properties>
     </type>

     <type name="wf:completedAdhocTask">
        <parent>bpm:workflowTask</parent>
      <properties>
      <property name="wf:completedadhocname">
              <type>d:text</type>
              <default>false</default>
        </property>
      </properties>
     </type>
     
  </types>
  
</model>




-alfresco/workflow/ProcessDefinition.xml


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

<process-definition xmlns="urn:jbpm.org:jpdl-3.1" name="wf:adhoc">

   <swimlane name="initiator"/>

   <start-state name="start">
      <task name="wf:submitAdhocTask" swimlane="initiator"/>
      <transition name="" to="adhoc"/>
   </start-state>

   <swimlane name="assignee"/>
  
   <task-node name="adhoc">
      <task name="wf:adhocTask" swimlane="assignee"/>
      <transition name="" to="completed"/>
   </task-node>
  
   <task-node name="completed">
      <task name="wf:completedAdhocTask" swimlane="initiator"/>
      <transition name="" to="end"/>
   </task-node>
     
   <end-state name="end"/>
  
</process-definition>


-alfresco/extension/docuModel-context.xml


<?xml version="1.0" encoding="UTF-8"?>
<model xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"              
       xsi:schemaLocation="http://www.alfresco.org/model/dictionary/1.0 ../../../../webapps/alfresco/WEB-INF/classes/alfresco/model/modelSchema.xsd"    
       xmlns="http://www.alfresco.org/model/dictionary/1.0" name="lts:model">

  <author>LTS</author>
  <version>1.0</version>
  <imports>
     <import uri="http://www.alfresco.org/model/dictionary/1.0" prefix="d"/>
     <import uri="http://www.alfresco.org/model/content/1.0" prefix="cm"/>
  </imports>
  <namespaces>
     <namespace uri="model" prefix="lts"/>
  </namespaces> 
  <types>  
     <type name="lts:meta">
        <title>Leo TechnoSoft</title>
        <parent>cm:content</parent>
        <archive>true</archive>
         <properties>
           <property name="lts:documentname">
              <title>Prj</title>
              <type>d:text</type>
              <mandatory>true</mandatory>
           </property>
          </properties>
     </type>
   </types>
</model>



-alfresco/extension/docuModel-context.xml


<?xml version="1.0" encoding="UTF-8"?>
<!– Source: config/alfresco/extension/mycompany-model-context.xml –>
<!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN'
    'http://www.springframework.org/dtd/spring-beans.dtd'>
<beans>
  <bean id="lts.context" parent="dictionaryModelBootstrap" depends-on="dictionaryBootstrap">
    <property name="models">
      <list>
        <value>alfresco/model/LTSDocuModel.xml</value>
      <value>alfresco/workflow/ltsTaskModel.xml</value>
      </list>
    </property>
  </bean>

<bean id="lts.process" parent="workflowDeployer">
   <property name="workflowDefinitions">
      <list>
         <props>
            <prop key="engineId">jbpm</prop>
            <prop key="location">alfresco/workflow/ltsProcessDefinition.xml</prop>
            <prop key="mimetype">text/xml</prop>
         </props>
      </list>
   </property>
</bean>

</beans>



-alfresco/web-client-config.xml



<config evaluator="node-type" condition="wf:submitAdhocTask" replace="true">
      <property-sheet>
         <separator name="sep1" display-label-id="general" component-generator="HeaderSeparatorGenerator" />
         <show-property name="wf:notifyMe" />
      </property-sheet>
   </config>

  <config evaluator="node-type" condition="wf:adhocTask" replace="true">
      <property-sheet>
         <separator name="sep1" display-label-id="general" component-generator="HeaderSeparatorGenerator" />
         <show-property name="wf:adhocname" />
      </property-sheet>
   </config>
<config evaluator="node-type" condition="wf:completedAdhocTask" replace="true">
      <property-sheet>
         <separator name="sep1" display-label-id="general" component-generator="HeaderSeparatorGenerator" />
         <show-property name="wf:completedadhocname" />
      </property-sheet>
   </config>



Is there something not properly configured in the xmls.

Thanks & Regards,
Amit

Outcomes