cancel
Showing results for 
Search instead for 
Did you mean: 

CUSTOM 'advanced' workflow

dteca
Champ in-the-making
Champ in-the-making
Hi,
i want to make a advanced workflow. My SO is Windows XP Pro SP2, alfresco version: alfresco-community-war-2.1.0.zip, apache-tomcat-5.5.23.exe!

I edit the follow files:
1) tirocino_processdefinition.xml;
2) tirocinioModel.xml;
3) web-client-tirocinio-config-properties.xml;
4) tirocinio.properties;
5) tirocinio-context.xml

I placed the files in the folder:
C:\Programmi\Apache Software Foundation\Tomcat 5.5\webapps\alfresco\WEB-INF\classes\alfresco\extension\tirocinio

1) tirocinio_processdefinition.xml
?xml version="1.0" encoding="UTF-8"?>

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

   <swimlane name="initiator"/>

   <start-state name="start">
      <task name="tir:richiestaTirocinio" swimlane="initiator"/>
      <transition name="" to="analisiTirocinio"/>
   </start-state>

   <swimlane name="assegnee">
      <assignment class="org.alfresco.repo.workflow.jbpm.AlfrescoAssignment">
         <actor>#{bpm_assignee}</actor>
      </assignment>
   </swimlane>
  
   <task-node name="analisiTirocinio">
      <task name="tir:analisiTirocinio" swimlane="assignee">
         <event type="task-create">
            <script>
               if (bpm_workflowDueDate != void) taskInstance.dueDate = bpm_workflowDueDate;
               if (bpm_workflowPriority != void) taskInstance.priority = bpm_workflowPriority;
            </script>
         </event>
      </task>
      <transition name="" to="completato">
         <action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript">
           <script>
              if (wf_notifyMe)
              {
                 var mail = actions.create("mail");
                 mail.parameters.to = initiator.properties.email;
                 mail.parameters.subject = "Adhoc Task " + bpm_workflowDescription;
                 mail.parameters.from = bpm_assignee.properties.email;
                 mail.parameters.text = "It's done";
                 mail.execute(bpm_package);
              }
           </script>
         </action>
      </transition>
   </task-node>
  
   <task-node name="completato">
      <task name="tir:analisiTirocinioCompletata" swimlane="initiator"/>
      <transition name="" to="end"/>
   </task-node>
     
   <end-state name="end"/>
  
</process-definition>

2) tirocinioModel.xml
<?xml version="1.0" encoding="UTF-8"?>

<model name="tir:tirocinioModel" 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/system/1.0" prefix="sys" />
    <!– Import Alfresco Content Domain Model Definitions –>
    <import uri="http://www.alfresco.org/model/content/1.0" prefix="cm" />
    <!– Import User Model Definitions –>
    <import uri="http://www.alfresco.org/model/user/1.0" prefix="usr"/>
  </imports>

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

 
  
        <constraints>
   
           <constraint name="tir:allowedPriority" type="LIST">
               <parameter name="allowedValues">
                   <!–  TODO: Determine if priority values can be mapped to human-readable strings –>
                   <list>
                       <value>1</value>
                       <value>2</value>
                       <value>3</value>
                       <value>4</value>
                   </list>
               </parameter>
           </constraint>
   
           <constraint name="tir:allowedStatus" type="LIST">
               <parameter name="allowedValues">
                   <!–  TODO: Determine if status values can be mapped to human-readable strings –>
                   <list>
                       <value>non è partito</value>
                       <value>ci sto lavorando</value>
                       <value>in attesa</value>
                       <value>Cancellato</value>
                       <value>Completato</value>
                   </list>
               </parameter>
           </constraint>
   
           <constraint name="tir:percentage" type="MINMAX">
               <parameter name="minValue">
                   <value>0</value>
               </parameter>
               <parameter name="maxValue">
                   <value>100</value>
               </parameter>
           </constraint>
   
     </constraints>
   
     <types>
   
           <!–                                 –>
           <!–  Base definition for all Tasks  –>
           <!–                                 –>
   
           <type name="tir:task">
               <parent>cm:content</parent>
   
               <properties>
   
                   <!–             –>
                   <!–  Assignment –>
                   <!–             –>
                   <!–  Note: Implemented via cm:ownable aspect –>
   
                   <!–                  –>
                   <!–  Task Identifier –>
                   <!–                  –>
                   <property name="tir:taskId">
                       <type>d:long</type>
                       <protected>true</protected>
                       <mandatory>true</mandatory>
                   </property>
   
                   <!–  Task Description –>
                   <property name="tir:description">
                       <type>d:text</type>
                   </property>
   
                   <!–             –>
                   <!–  Task Dates –>
                   <!–             –>
                   <property name="tir:startDate">
                       <type>d:date</type>
                       <protected>true</protected>
                   </property>
                   <property name="tir:completionDate">
                       <type>d:date</type>
                       <protected>true</protected>
                   </property>
                   <property name="tir:dueDate">
                       <type>d:date</type>
                   </property>
   
                   <!–                –>
                   <!–  Task Progress –>
                   <!–                –>
                   <property name="tir:status">
                       <type>d:text</type>
                       <mandatory>true</mandatory>
                       <default>non è partito</default>
                       <constraints>
                           <constraint ref="tir:allowedStatus" />
                       </constraints>
                   </property>
                   <property name="tir:priority">
                       <type>d:int</type>
                       <mandatory>true</mandatory>
                       <default>3</default>
                       <constraints>
                           <constraint ref="tir:allowedPriority" />
                       </constraints>
                   </property>
                   <property name="tir:percentComplete">
                       <type>d:int</type>
                       <mandatory>true</mandatory>
                       <default>0</default>
                       <constraints>
                           <constraint ref="tir:percentage" />
                       </constraints>
                   </property>
   
                   <!–             –>
                   <!–  Task Notes –>
                   <!–             –>
                   <property name="tir:comment">
                       <type>d:text</type>
                   </property>
   
               </properties>
   
               <associations>
   
                   <!–  List of users who may potentially get assigned to the task –>
                   <association name="tir:pooledActors">
                       <source>
                           <mandatory>false</mandatory>
                           <many>false</many>
                       </source>
                       <target>
                           <!– For now, this may consists of cm:person or usr:authorityContainer –>
                           <class>sys:base</class>
                           <mandatory>false</mandatory>
                           <many>true</many>
                       </target>
                   </association>
   
               </associations>
   
               <mandatory-aspects>
                   <aspect>cm:ownable</aspect>
               </mandatory-aspects>
           </type>
   
   
           <!–                                                 –>
           <!–  The base for all Tasks assigned via a Workflow –>
           <!–                                                 –>
   
           <type name="tir:workflowTask">
               <parent>tir:task</parent>
   
               <properties>
   
                   <!–  Task Context          –>
                   <!–  e.g. Space, Document  –>
                   <property name="tir:context">
                       <type>d:noderef</type>
                   </property>
   
                   <!–  Task Outcome –>
                   <property name="tir:outcome">
                       <!– NOTE: Transition id –>
                       <type>d:text</type> 
                   </property>
   
                   <!–  Items within package marked as complete –>
                   <property name="tir:completedItems">
                       <type>d:noderef</type>
                       <multiple>true</multiple>
                   </property>
   
                   <!–  Applicable actions for workflow package –>
                   <property name="tir:packageActionGroup">
                       <type>d:text</type>
                       <!– NOTE: empty default specified, therefore no actions –>
                       <default></default>
                   </property>
   
                   <!–  Applicable actions for workflow package item –>
                   <property name="tir:packageItemActionGroup">
                       <type>d:text</type>
                       <default>read_package_item_actions</default>
                   </property>
   
               </properties>
   
               <associations>
   
                   <association name="tir:package">
                       <source>
                           <mandatory>false</mandatory>
                           <many>false</many>
                       </source>
                       <target>
                           <class>tir:workflowPackage</class>
                           <mandatory>true</mandatory>
                           <many>false</many>
                       </target>
                   </association>
   
               </associations>
   
           </type>
   
   
           <!–                     –>
           <!–  Default Start Task –>
           <!–                     –>
   
           <type name="tir:startTask">
               <parent>tir:workflowTask</parent>
   
               <properties>
   
                   <!–  Description for the workflow as a whole –>
                   <property name="tir:workflowDescription">
                       <type>d:text</type>
                   </property>
   
                   <!–  Due date for the workflow as a whole –>
                   <property name="tir:workflowDueDate">
                       <type>d:date</type>
                   </property>
   
                   <!–  Priority for the workflow as a whole –>
                   <property name="tir:workflowPriority">
                       <type>d:int</type>
                       <default>2</default>
                       <constraints>
                           <constraint ref="tir:allowedPriority" />
                       </constraints>
                   </property>
   
               </properties>
   
               <overrides>
   
                   <property name="tir:packageActionGroup">
                       <default>add_package_item_actions</default>
                   </property>
   
                   <property name="tir:packageItemActionGroup">
                       <default>start_package_item_actions</default>
                   </property>
   
               </overrides>
   
           </type>
   
   
          <!–  tirocinioModel–>              
          <!–                –>
         
          <type name="tir:analisiTirocinio">
             <parent>bpm:startTask</parent>
             <properties>
                <property name="tir:notifyMe">
                   <type>d:boolean</type>
                   <default>false</default>
                </property>
             </properties>
             <mandatory-aspects>
                <aspect>tir:assignee</aspect>
             </mandatory-aspects>
          </type>
   
          <type name="tir:analisiTirocinio">
             <parent>bpm:workflowTask</parent>
             <overrides>
                <property name="tir:packageActionGroup">
                   <default>add_package_item_actions</default>
                </property>
                <property name="tir:packageItemActionGroup">
                   <default>edit_package_item_actions</default>
                </property>
             </overrides>
          </type>
   
          <type name="tir:analisiTirocinioCompletata">
             <parent>tir:workflowTask</parent>
             <mandatory-aspects>
                <aspect>tir:assignee</aspect>
             </mandatory-aspects>
          </type>
  
   
   
   </types>
   
       <aspects>
      
           <!–                       –>
           <!–  Single Task Assignee –>
           <!–                       –>
          
           <aspect name="tir:assignee">
               <associations>
   
                   <association name="tir:assignee">
                       <source>
                           <mandatory>false</mandatory>
                           <many>false</many>
                       </source>
                       <target>
                           <class>cm:person</class>
                           <mandatory>true</mandatory>
                           <many>false</many>
                       </target>
                   </association>
   
               </associations>
           </aspect>
      
           <!–                          –>
           <!–  Multiple Task Assignees –>
           <!–                          –>
   
           <aspect name="tir:assignees">
               <associations>
   
                   <association name="tir:assignees">
                       <source>
                           <mandatory>false</mandatory>
                           <many>false</many>
                       </source>
                       <target>
                           <class>cm:person</class>
                           <mandatory>true</mandatory>
                           <many>true</many>
                       </target>
                   </association>
   
               </associations>
           </aspect>
   
           <!–                          –>
           <!–  Single Group Assignee   –>
           <!–                          –>
   
           <aspect name="tir:groupAssignee">
               <associations>
   
                   <association name="tir:groupAssignee">
                       <source>
                           <mandatory>false</mandatory>
                           <many>false</many>
                       </source>
                       <target>
                           <!– TODO: Refactor when group is pulled into content model –>
                           <class>usr:authorityContainer</class>
                           <mandatory>true</mandatory>
                           <many>false</many>
                       </target>
                   </association>
   
               </associations>
           </aspect>
   
           <!–                             –>
           <!–  Multiple Group Assignees   –>
           <!–                             –>
   
           <aspect name="tir:groupAssignees">
               <associations>
   
                   <association name="tir:groupAssignees">
                       <source>
                           <mandatory>false</mandatory>
                           <many>false</many>
                       </source>
                       <target>
                           <!– TODO: Refactor when group is pulled into content model –>
                           <class>usr:authorityContainer</class>
                           <mandatory>true</mandatory>
                           <many>true</many>
                       </target>
                   </association>
   
               </associations>
           </aspect>
   
           <!–                                                             –>
           <!–  A collection of content routed through a workflow.         –>
           <!–                                                             –>
           <!–  Note: this aspect should be applied to a container such as –>
           <!–        a folder, versioned folder or layered folder.        –>
           <!–                                                             –>
   
           <aspect name="tir:workflowPackage">
               <properties>
   
                   <!–  Created by Workflow Service (true), or provided from outside (false) –>               
                   <property name="bpm:isSystemPackage">
                       <type>d:boolean</type>
                   </property>
   
                   <!–                        –>
                   <!–  Associated Workflow   –>
                   <!–                        –>
                   <property name="tir:workflowDefinitionId">
                       <type>d:text</type>
                   </property>
                   <property name="bpm:workflowDefinitionName">
                       <type>d:text</type>
                   </property>
                   <property name="tir:workflowInstanceId">
                       <type>d:text</type>
                   </property>
   
                   <!–  TODO: Define properties (replicated from Workflow/Task Engine) for –>
                   <!–        search within Alfresco e.g. task info, workflow info …     –>
   
               </properties>
   
           </aspect>
   
          </aspects>

</model>


3) web-client-tirocinio-config-properties.xml;
<alfresco-config>


<!– tirocinio workflow tasks –>

   <config evaluator="node-type" condition="tir:richiestaTirocinio" replace="true">
      <property-sheet>
         <separator name="sep1" display-label-id="generale" component-generator="HeaderSeparatorGenerator" />
         <show-property name="tir:workflowDescription" component-generator="TextAreaGenerator" />
         <show-property name="tir:workflowPriority" display-label-id="wf_adhoc_priority" />
         <show-property name="tir:workflowDueDate" display-label-id="wf_adhoc_due_date" />
         <show-property name="tir:notifyMe" />
         <separator name="sep2" display-label-id="user_filter_user" component-generator="HeaderSeparatorGenerator" />
         <show-association name="tir:assignee" display-label-id="wf_adhoc_assign_to" />
      </property-sheet>
   </config>

   <config evaluator="node-type" condition="tir:analisiTirocinio" replace="true">
      <property-sheet>
         <separator name="sep1" display-label-id="general" component-generator="HeaderSeparatorGenerator" />
         <show-property name="tir:taskId" />
         <show-property name="tir:description" component-generator="TextAreaGenerator" read-only="true" />
         <show-property name="tir:dueDate" read-only="true" />
         <show-property name="tir:priority" read-only="true" />
         <show-property name="tir:status" />
         <show-property name="tir:comment" component-generator="TextAreaGenerator" />
      </property-sheet>
   </config>

   <config evaluator="node-type" condition="tir:analisiTirocinioCompletata" replace="true">
      <property-sheet>
         <separator name="sep1" display-label-id="general" component-generator="HeaderSeparatorGenerator" />
         <show-property name="tir:taskId" />
         <show-property name="tir:description" component-generator="TextAreaGenerator" read-only="true" />
         <show-property name="tir:dueDate" read-only="true" />
         <show-property name="tir:priority" read-only="true" />
         <separator name="sep2" display-label-id="users_and_roles" component-generator="HeaderSeparatorGenerator" />
         <show-association name="tir:assignee" display-label-id="wf_adhoc_assignee" read-only="true" />
      </property-sheet>
   </config>
  
</alfresco-config>

4) tirocinio.properties;
# Display labels for base Business Process Model

tir_tirocinioModel.title=Business Process Model
tir_tirocinioModel.description=Base definitions of all Business Processes

# Default transition
tir_tirocinioModel.transition.title=Task Done
tir_tirocinioModel.transition.description=Task Done

# Base Task
tir_tirocinioModel.type.tir_task.title=Task
tir_tirocinioModel.type.tir_task.description=Task
tir_tirocinioModel.property.tir_taskId.title=Identifier
tir_tirocinioModel.property.tir_taskId.description=Identifier
tir_tirocinioModel.property.tir_startDate.title=Start Date
tir_tirocinioModel.property.tir_startDate.description=Start Date
tir_tirocinioModel.property.tir_completionDate.title=Completion Date
tir_tirocinioModel.property.tir_completionDate.description=Completion Date
tir_tirocinioModel.property.tir_dueDate.title=Scadenza
tir_tirocinioModel.property.tir_dueDate.description=Scadenza
tir_tirocinioModel.property.tir_status.title=Status
tir_tirocinioModel.property.tir_status.description=Status
tir_tirocinioModel.property.tir_priority.title=Priorità tir
tir_tirocinioModel.property.tir_priority.description=Priorità tir
tir_tirocinioModel.property.tir_percentComplete.title=Percent Complete
tir_tirocinioModel.property.tir_percentComplete.description=Percent Complete
tir_tirocinioModel.property.tir_comment.title=Comment
tir_tirocinioModel.property.tir_comment.description=Comment
tir_tirocinioModel.association.tir_pooledActors.title=Pooled Users
tir_tirocinioModel.association.tir_pooledActors.description=Pool

# Workflow Task
tir_tirocinioModel.type.tir_workflowTask.title=Workflow Task
tir_tirocinioModel.type.tir_workflowTask.description=Task assigned by a Workflow
tir_tirocinioModel.property.tir_workflowDefinitionId.title=Workflow Definition Id
tir_tirocinioModel.property.tir_workflowDefinitionId.description=Workflow Definition Id
tir_tirocinioModel.property.tir_workflowInstanceId.title=Workflow Instance Id
tir_tirocinioModel.property.tir_workflowInstanceId.description=Workflow Instance Id
tir_tirocinioModel.property.tir_context.title=Task Context
tir_tirocinioModel.property.tir_context.description=The context within which this task has been assigned
tir_tirocinioModel.property.tir_description.title=Description
tir_tirocinioModel.property.tir_description.description=Description of what needs to be achieved
tir_tirocinioModel.property.tir_outcome.title=Outcome
tir_tirocinioModel.property.tir_outcome.description=Decision made on completing Task
tir_tirocinioModel.property.tir_completedItems.title=Completed Items
tir_tirocinioModel.property.tir_completedItems.description=Package items marked as complete
tir_tirocinioModel.property.tir_packageActionGroup.title=Package Actions
tir_tirocinioModel.property.tir_packageActionGroup.description=Actions available on workflow package
tir_tirocinioModel.property.tir_packageItemActionGroup.title=Package Item Actions
tir_tirocinioModel.property.tir_packageItemActionGroup.description=Actions available on workflow package items
tir_tirocinioModel.association.tir_package.title=Content Package
tir_tirocinioModel.association.tir_package.description=The collection of content routed through the workflow
tir_tirocinioModel.aspect.tir_workflowPackage.title=Workflow Package
tir_tirocinioModel.aspect.tir_workflowPackage.description=The collection of content routed through the workflow

# Workflow Start Task
tir_tirocinioModel.type.tir_startTask.title=Workflow Start Task
tir_tirocinioModel.type.tir_startTask.description=Task used to collect information required for initiating Workflow
tir_tirocinioModel.property.tir_workflowDescription.title=Descrizione tirocinio
tir_tirocinioModel.property.tir_workflowDescription.description=Description
tir_tirocinioModel.property.tir_workflowDueDate.title=Workflow Due Date
tir_tirocinioModel.property.tir_workflowDueDate.description=Workflow Due Date
tir_tirocinioModel.property.tir_workflowPriority.title=Workflow Priority
tir_tirocinioModel.property.tir_workflowPriority.description=Workflow Priority
tir_tirocinioModel.association.tir_assignee.title=Workflow Assignee
tir_tirocinioModel.association.tir_assignee.description=Workflow Assignee
tir_tirocinioModel.association.tir_assignees.title=Workflow Assignees
tir_tirocinioModel.association.tir_assignees.description=Workflow Assignees
tir_tirocinioModel.association.tir_groupAssignee.title=Workflow Group Assignee
tir_tirocinioModel.association.tir_groupAssignee.description=Workflow Group Assignee
tir_tirocinioModel.association.tir_groupAssignees.title=Workflow Group Assignees
tir_tirocinioModel.association.tir_groupAssignees.description=Workflow Group Assignees

#cerco di aggiungere qualcosina io
generale=Generale Cataldo

# Workflow Definitions
wf_adhoc_due_date=Scadenza
wf_adhoc_priority=Priorità
wf_adhoc_assign_to=Assegnare a
wf_adhoc_assignee=Assegnato a

#
# Adhoc Task Workflow
#

wf_adhoc.workflow.title=Adhoc Task
wf_adhoc.workflow.description=Assign task to colleague

# Adhoc Task Definitions

wf_workflowmodel.type.wf_submitAdhocTask.title=Inizia richiesta tirocinio
wf_workflowmodel.type.wf_submitAdhocTask.description=Allocate task to colleague
wf_workflowmodel.property.wf_notifyMe.title=Notify Me
wf_workflowmodel.property.wf_notifyMe.description=Notify me when task is complete
wf_workflowmodel.type.wf_adhocTask.title=Adhoc Task
wf_workflowmodel.type.wf_adhocTask.description=Adhoc Task allocated by colleague
wf_workflowmodel.type.wf_completedAdhocTask.title=Adhoc Task Completed
wf_workflowmodel.type.wf_completedAdhocTask.description=Adhoc Task Complete

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

    <beans>

        <bean id="extension.dictionaryBootstrap" parent="dictionaryModelBootstrap" depends-on="dictionaryBootstrap">
           <property name="models">
      <list>
           <value>alfresco/extension/tirocinio/tirocinioModel.xml</value>
        </list>
        </property>
   </bean>

       
       
        <bean id="extension.workflowBootstrap" parent="workflowDeployer">

          <property name="workflowDefinitions">
             <list>
          <props>
            <prop key="engineId">jbpm</prop>
            <prop key="location">alfresco/extension/tirocinio/tirocinio_processdefinition.xml</prop>
            <prop key="mimetype">text/xml</prop>
            <prop key="redeploy">true</prop>
          </props>
             </list>
          </property>

           <property name="labels">
             <list>
              <value>alfresco/extension/tirocinio/tirocinio</value>
             </list>
          </property>

       </bean>
   
    </beans>

When i run Start Advanced Workflow Wizard my workflow is not listed.
What i'm wrog? this is the  way to make an advanced custom workflow?

thank you

m.
5 REPLIES 5

poptarts
Champ in-the-making
Champ in-the-making
Is your tirocinio-context.xml in the alfresco/extension directory? I don't know if alfresco will know to look in all the subfolders. Try placing the context.xml one directory up.

dteca
Champ in-the-making
Champ in-the-making
Hi,
i have place tirocinio-context.xml, on the folder
C:\Programmi\Apache Software Foundation\Tomcat 5.5\webapps\alfresco\WEB-INF\classes\alfresco\extension

When i start tomcat Alfresco crash:
this is the alfresco.log file:

22:35:14,640 ERROR [org.alfresco.repo.content.transform.magick.AbstractImageMagickContentTransformer] ImageMagickContentTransformer not available: Failed to perform ImageMagick transformation: 
Execution result:
   os:         Windows XP
   command:    imconvert "C:\Programmi\Apache Software Foundation\Tomcat 5.5\temp\Alfresco\ImageMagickContentTransformer_init_source_45805.gif"  "C:\Programmi\Apache Software Foundation\Tomcat 5.5\temp\Alfresco\ImageMagickContentTransformer_init_target_45806.png"
   succeeded:  false
   exit code:  1
   out:       
   err:        CreateProcess: imconvert "C:\Programmi\Apache Software Foundation\Tomcat 5.5\temp\Alfresco\ImageMagickContentTransformer_init_source_45805.gif" "C:\Programmi\Apache Software Foundation\Tomcat 5.5\temp\Alfresco\ImageMagickContentTransformer_init_targe
22:35:17,718 WARN  [org.springframework.remoting.rmi.RmiRegistryFactoryBean] Could not detect RMI registry - creating new one
22:35:18,093 ERROR [org.springframework.web.context.ContextLoader] Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'extension.dictionaryBootstrap' defined in file [C:\Programmi\Apache Software Foundation\Tomcat 5.5\webapps\alfresco\WEB-INF\classes\alfresco\extension\tirocinio-context.xml]: Invocation of init method failed; nested exception is org.alfresco.service.cmr.dictionary.DictionaryException: Could not import bootstrap model alfresco/extension/tirocinio/tirocinioModel.xml
Caused by:
org.alfresco.service.cmr.dictionary.DictionaryException: Could not import bootstrap model alfresco/extension/tirocinio/tirocinioModel.xml
   at org.alfresco.repo.dictionary.DictionaryBootstrap.bootstrap(DictionaryBootstrap.java:111)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
   at java.lang.reflect.Method.invoke(Unknown Source)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1160)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1122)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1085)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:429)
   at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:250)
   at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:141)
   at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:247)
   at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:161)
   at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:273)
   at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:346)
   at org.springframework.web.context.support.AbstractRefreshableWebApplicationContext.refresh(AbstractRefreshableWebApplicationContext.java:156)
   at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:246)
   at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:184)
   at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:49)
   at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3764)
   at org.apache.catalina.core.StandardContext.start(StandardContext.java:4216)
   at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:760)
   at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:740)
   at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:544)
   at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:825)
   at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:714)
   at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:490)
   at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1138)
   at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
   at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120)
   at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1022)
   at org.apache.catalina.core.StandardHost.start(StandardHost.java:736)
   at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
   at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
   at org.apache.catalina.core.StandardService.start(StandardService.java:448)
   at org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
   at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
   at java.lang.reflect.Method.invoke(Unknown Source)
   at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295)
   at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)
Caused by: org.alfresco.service.cmr.dictionary.DictionaryException: Failed to compile model tir:tirocinioModel
   at org.alfresco.repo.dictionary.CompiledModel.<init>(CompiledModel.java:112)
   at org.alfresco.repo.dictionary.M2Model.compile(M2Model.java:134)
   at org.alfresco.repo.dictionary.DictionaryDAOImpl.putModel(DictionaryDAOImpl.java:93)
   at org.alfresco.repo.dictionary.DictionaryBootstrap.bootstrap(DictionaryBootstrap.java:107)
   … 42 more
Caused by: org.alfresco.service.namespace.NamespaceException: Namespace prefix bpm is not mapped to a namespace URI
   at org.alfresco.service.namespace.QName.createQName(QName.java:103)
   at org.alfresco.service.namespace.QName.createQName(QName.java:125)
   at org.alfresco.repo.dictionary.M2ClassDefinition.<init>(M2ClassDefinition.java:88)
   at org.alfresco.repo.dictionary.M2TypeDefinition.<init>(M2TypeDefinition.java:47)
   at org.alfresco.repo.dictionary.CompiledModel.constructDefinitions(CompiledModel.java:153)
   at org.alfresco.repo.dictionary.CompiledModel.<init>(CompiledModel.java:94)
   … 45 more
22:35:18,093 ERROR [org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/alfresco]] Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'extension.dictionaryBootstrap' defined in file [C:\Programmi\Apache Software Foundation\Tomcat 5.5\webapps\alfresco\WEB-INF\classes\alfresco\extension\tirocinio-context.xml]: Invocation of init method failed; nested exception is org.alfresco.service.cmr.dictionary.DictionaryException: Could not import bootstrap model alfresco/extension/tirocinio/tirocinioModel.xml
Caused by:
org.alfresco.service.cmr.dictionary.DictionaryException: Could not import bootstrap model alfresco/extension/tirocinio/tirocinioModel.xml
   at org.alfresco.repo.dictionary.DictionaryBootstrap.bootstrap(DictionaryBootstrap.java:111)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
   at java.lang.reflect.Method.invoke(Unknown Source)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1160)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1122)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1085)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:429)
   at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:250)
   at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:141)
   at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:247)
   at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:161)
   at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:273)
   at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:346)
   at org.springframework.web.context.support.AbstractRefreshableWebApplicationContext.refresh(AbstractRefreshableWebApplicationContext.java:156)
   at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:246)
   at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:184)
   at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:49)
   at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3764)
   at org.apache.catalina.core.StandardContext.start(StandardContext.java:4216)
   at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:760)
   at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:740)
   at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:544)
   at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:825)
   at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:714)
   at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:490)
   at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1138)
   at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
   at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120)
   at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1022)
   at org.apache.catalina.core.StandardHost.start(StandardHost.java:736)
   at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
   at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
   at org.apache.catalina.core.StandardService.start(StandardService.java:448)
   at org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
   at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
   at java.lang.reflect.Method.invoke(Unknown Source)
   at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295)
   at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)
Caused by: org.alfresco.service.cmr.dictionary.DictionaryException: Failed to compile model tir:tirocinioModel
   at org.alfresco.repo.dictionary.CompiledModel.<init>(CompiledModel.java:112)
   at org.alfresco.repo.dictionary.M2Model.compile(M2Model.java:134)
   at org.alfresco.repo.dictionary.DictionaryDAOImpl.putModel(DictionaryDAOImpl.java:93)
   at org.alfresco.repo.dictionary.DictionaryBootstrap.bootstrap(DictionaryBootstrap.java:107)
   … 42 more
Caused by: org.alfresco.service.namespace.NamespaceException: Namespace prefix bpm is not mapped to a namespace URI
   at org.alfresco.service.namespace.QName.createQName(QName.java:103)
   at org.alfresco.service.namespace.QName.createQName(QName.java:125)
   at org.alfresco.repo.dictionary.M2ClassDefinition.<init>(M2ClassDefinition.java:88)
   at org.alfresco.repo.dictionary.M2TypeDefinition.<init>(M2TypeDefinition.java:47)
   at org.alfresco.repo.dictionary.CompiledModel.constructDefinitions(CompiledModel.java:153)
   at org.alfresco.repo.dictionary.CompiledModel.<init>(CompiledModel.java:94)
   … 45 more
22:35:18,093 ERROR [org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/alfresco]] Exception sending context initialized event to listener instance of class org.alfresco.web.app.ContextListener
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'extension.dictionaryBootstrap' defined in file [C:\Programmi\Apache Software Foundation\Tomcat 5.5\webapps\alfresco\WEB-INF\classes\alfresco\extension\tirocinio-context.xml]: Invocation of init method failed; nested exception is org.alfresco.service.cmr.dictionary.DictionaryException: Could not import bootstrap model alfresco/extension/tirocinio/tirocinioModel.xml
Caused by:
org.alfresco.service.cmr.dictionary.DictionaryException: Could not import bootstrap model alfresco/extension/tirocinio/tirocinioModel.xml
   at org.alfresco.repo.dictionary.DictionaryBootstrap.bootstrap(DictionaryBootstrap.java:111)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
   at java.lang.reflect.Method.invoke(Unknown Source)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1160)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1122)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1085)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:429)
   at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:250)
   at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:141)
   at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:247)
   at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:161)
   at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:273)
   at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:346)
   at org.springframework.web.context.support.AbstractRefreshableWebApplicationContext.refresh(AbstractRefreshableWebApplicationContext.java:156)
   at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:246)
   at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:184)
   at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:49)
   at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3764)
   at org.apache.catalina.core.StandardContext.start(StandardContext.java:4216)
   at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:760)
   at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:740)
   at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:544)
   at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:825)
   at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:714)
   at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:490)
   at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1138)
   at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
   at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120)
   at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1022)
   at org.apache.catalina.core.StandardHost.start(StandardHost.java:736)
   at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
   at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
   at org.apache.catalina.core.StandardService.start(StandardService.java:448)
   at org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
   at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
   at java.lang.reflect.Method.invoke(Unknown Source)
   at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295)
   at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)
Caused by: org.alfresco.service.cmr.dictionary.DictionaryException: Failed to compile model tir:tirocinioModel
   at org.alfresco.repo.dictionary.CompiledModel.<init>(CompiledModel.java:112)
   at org.alfresco.repo.dictionary.M2Model.compile(M2Model.java:134)
   at org.alfresco.repo.dictionary.DictionaryDAOImpl.putModel(DictionaryDAOImpl.java:93)
   at org.alfresco.repo.dictionary.DictionaryBootstrap.bootstrap(DictionaryBootstrap.java:107)
   … 42 more
Caused by: org.alfresco.service.namespace.NamespaceException: Namespace prefix bpm is not mapped to a namespace URI
   at org.alfresco.service.namespace.QName.createQName(QName.java:103)
   at org.alfresco.service.namespace.QName.createQName(QName.java:125)
   at org.alfresco.repo.dictionary.M2ClassDefinition.<init>(M2ClassDefinition.java:88)
   at org.alfresco.repo.dictionary.M2TypeDefinition.<init>(M2TypeDefinition.java:47)
   at org.alfresco.repo.dictionary.CompiledModel.constructDefinitions(CompiledModel.java:153)
   at org.alfresco.repo.dictionary.CompiledModel.<init>(CompiledModel.java:94)
   … 45 more

thank you

m.

poptarts
Champ in-the-making
Champ in-the-making
I can't debug your stuff for you each time you encounter a crash - you'll have to look at the errors and determine what is going on.

This time, I can tell you that

"Caused by: org.alfresco.service.namespace.NamespaceException: Namespace prefix bpm is not mapped to a namespace URI"

Seems to indicate you forgot to import the bpm namespace in your model.

It's rough, but we've all gone through the same thing. It's easy to leave out mandatory imports and required fields. You will face similar crashes if you don't follow the correct order in some of your xml files as specified by the schemas.

dteca
Champ in-the-making
Champ in-the-making
Sorry,
but my aim is to create a custom workflow in Alfresco.
So, my fundamental question is  whether the procedure that I am using to generate a custom workflow is correct.
With regard to the log file in fact, I reported as the first error:

ERROR [org.springframework.web.context.ContextLoader] Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'extension.dictionaryBootstrap' defined in file [C:\Programmi\Apache Software Foundation\Tomcat 5.5\webapps\alfresco\WEB-INF\classes\alfresco\extension\tirocinio-context.xml]: Invocation of init method failed; nested exception is org.alfresco.service.cmr.dictionary.DictionaryException: Could not import bootstrap model alfresco/extension/tirocinio/tirocinioModel.xml
Caused by:
org.alfresco.service.cmr.dictionary.DictionaryException: Could not import bootstrap model alfresco/extension/tirocinio/tirocinioModel.xml
I imagine that this is a trivial problem, but for me it is not!

thank you

poptarts
Champ in-the-making
Champ in-the-making
I know you are trying to create a custom workflow. Yes it is the correct way, but you have bugs in your model that are failing.

You did not import the "bpm" namespace into your model.