AnsweredAssumed Answered

Workflow not getting deployed

Question asked by oshadha on Aug 27, 2012
Latest reply on Apr 18, 2013 by marco.altieri
Hi all,

I'm trying to deploy a workflow as mentioned in the book "Alfresco Cookbook" from PacktPub. But unfortunatly it's not getting deployed. And there's are no errors/exceptions in the logs, everything runs smoothly when restarting the server.

files
pm_processdefinition.xml
pm_taskModel.xml
pm-workflow-messages.properties
workflow-context.xml

location
tomcat/shared/classes/alfresco/extension

workflow-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="parallel.workflowBootstrap" parent="workflowDeployer">

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

                <property name="models">
                        <list>
                                 <value>alfresco/extension/pm_taskModel.xml</value>
                        </list>
                </property>

                <property name="labels">
                        <list>
                                 <value>alfresco/extension/pm-workflow-messages</value>
                        </list>
                </property>
        </bean>

</beans>

Finally edited the "web-client-config-custom.xml" to configure workflow task dialogs.

   <config evaluator="node-type" condition="iabookwf:startTask" replace="true">
      <property-sheet>
         <separator name="sep1" display-label-id="general" component-generator="HeaderSeparatorGenerator" />
         <show-property name="bpm:workflowDescription" component-generator="TextAreaGenerator" />
         <show-property name="bpm:workflowPriority" />
         <show-property name="bpm:workflowDueDate" />
      </property-sheet>
   </config>


   <config evaluator="node-type" condition="iabookwf:createRequirementTask" replace="true">
      <property-sheet>
         <separator name="sep1" display-label-id="general" component-generator="HeaderSeparatorGenerator" />
         <show-property name="iabookwf:clientName" />
         <show-property name="iabookwf:projectName" />
         <show-property name="iabookwf:budget" />
         <separator name="sep2" display-label-id="iabookwf_pm_header" component-generator="HeaderSeparatorGenerator" />
         <show-association name="bpm:assignee" display-label-id="iabookwf_pm" />
      </property-sheet>
   </config>


   <config evaluator="node-type" condition="iabookwf:createProjectSizingTask" replace="true">
      <property-sheet>
         <separator name="sep1" display-label-id="general" component-generator="HeaderSeparatorGenerator" />
         <show-property name="iabookwf:mandays" />
         <show-property name="iabookwf:totalCost" />
         <separator name="sep2" display-label-id="iabookwf_pm_header" component-generator="HeaderSeparatorGenerator" />
         <show-association name="bpm:assignee" display-label-id="iabookwf_pm" />
      </property-sheet>
   </config>


   <config evaluator="node-type" condition="iabookwf:createProjectPlanTask" replace="true">
      <property-sheet>
         <separator name="sep1" display-label-id="general" component-generator="HeaderSeparatorGenerator" />
         <show-property name="iabookwf:startDate" />
         <show-property name="iabookwf:endDate" />
         <show-property name="iabookwf:releaseDate" />
         <separator name="sep2" display-label-id="iabookwf_pm_header" component-generator="HeaderSeparatorGenerator" />
         <show-association name="bpm:assignee" display-label-id="iabookwf_pm" />
      </property-sheet>
   </config>


   <config evaluator="node-type" condition="iabookwf:kickOffDevelopmentTask" replace="true">
      <property-sheet>
         <separator name="sep1" display-label-id="general" component-generator="HeaderSeparatorGenerator" />
         <show-property name="iabookwf:projectTeam" />
         <show-property name="iabookwf:projectEnvDone" />
         <separator name="sep2" display-label-id="iabookwf_pm_header" component-generator="HeaderSeparatorGenerator" />
         <show-association name="bpm:assignee" display-label-id="iabookwf_pm" />
      </property-sheet>
   </config>


pm_taskModel.xml

<?xml version="1.0" encoding="UTF-8"?>
<model xmlns="http://www.alfresco.org/model/dictionary/1.0" name="iabookwf:BookWFModel">
  <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"/>
    <import uri="http://www.alfresco.org/model/content/1.0" prefix="cm"/>
  </imports>
  <namespaces>
    <namespace uri="http://www.infoaxon.com/book/models/workflow/1.0" prefix="iabookwf"/>
  </namespaces>
  <types>
    <type name="iabookwf:startTask">
      <title>Project Start</title>
      <parent>bpm:startTask</parent>
    </type>
    <type name="iabookwf:createRequirementTask">
      <parent>bpm:workflowTask</parent>
      <properties>
        <property name="iabookwf:clientName">
          <title>Client Name</title>
          <type>d:text</type>
          <mandatory>true</mandatory>
        </property>
        <property name="iabookwf:projectName">
          <title>Project Name</title>
          <type>d:text</type>
          <mandatory>true</mandatory>
        </property>
        <property name="iabookwf:budget">
          <title>Project Estimated Budget</title>
          <type>d:double</type>
          <mandatory>true</mandatory>
        </property>
      </properties>
      <overrides>
        <property name="bpm:packageActionGroup">
          <default>add_package_item_actions</default>
        </property>
        <property name="bpm:packageItemActionGroup">
          <default>edit_package_item_actions</default>
        </property>
      </overrides>
      <mandatory-aspects>
        <aspect>bpm:assignee</aspect>
      </mandatory-aspects>
    </type>
    <type name="iabookwf:reviewRequirementTask">
      <parent>bpm:workflowTask</parent>
      <overrides>
        <property name="bpm:packageItemActionGroup">
          <default>edit_package_item_actions</default>
        </property>
      </overrides>
      <mandatory-aspects>
        <aspect>bpm:assignee</aspect>
      </mandatory-aspects>
    </type>
    <type name="iabookwf:createProjectSizingTask">
      <parent>bpm:workflowTask</parent>
      <properties>
        <property name="iabookwf:mandays">
          <title>Estimated Man Days</title>
          <type>d:int</type>
          <mandatory>true</mandatory>
        </property>
        <property name="iabookwf:totalCost">
          <title>Total Estimated Cost</title>
          <type>d:double</type>
          <mandatory>true</mandatory>
        </property>
      </properties>
      <overrides>
        <property name="bpm:packageItemActionGroup">
          <default>edit_package_item_actions</default>
        </property>
      </overrides>
      <mandatory-aspects>
        <aspect>bpm:assignee</aspect>
      </mandatory-aspects>
    </type>
    <type name="iabookwf:createProjectPlanTask">
      <parent>bpm:workflowTask</parent>
      <properties>
        <property name="iabookwf:startDate">
          <title>Proposed Start Date</title>
          <type>d:date</type>
          <mandatory>true</mandatory>
        </property>
        <property name="iabookwf:endDate">
          <title>Proposed End Date</title>
          <type>d:date</type>
          <mandatory>true</mandatory>
        </property>
        <property name="iabookwf:releaseDate">
          <title>Proposed Final Release Date</title>
          <type>d:date</type>
          <mandatory>true</mandatory>
        </property>
      </properties>
      <overrides>
        <property name="bpm:packageItemActionGroup">
          <default>edit_package_item_actions</default>
        </property>
      </overrides>
      <mandatory-aspects>
        <aspect>bpm:assignee</aspect>
      </mandatory-aspects>
    </type>
    <type name="iabookwf:kickOffDevelopmentTask">
      <parent>bpm:workflowTask</parent>
      <properties>
        <property name="iabookwf:projectTeam">
          <title>Finalized Project Team</title>
          <type>d:text</type>
          <mandatory>false</mandatory>
          <multiple>true</multiple>
        </property>
        <property name="iabookwf:projectEnvDone">
          <title>Project Environment setup Done?</title>
          <type>d:boolean</type>
          <mandatory>true</mandatory>
        </property>
      </properties>
      <overrides>
        <property name="bpm:packageItemActionGroup">
          <default>edit_package_item_actions</default>
        </property>
      </overrides>
      <mandatory-aspects>
        <aspect>bpm:assignee</aspect>
      </mandatory-aspects>
    </type>
  </types>
</model>

Result from workflow console

Last command: deploy jbpm /alfresco/extension/pm_processdefinition.xml
Duration: 82ms
—–

[WARNING] swimlane 'initiator' does not have an assignment
deployed definition id: jbpm$80 , name: jbpm$iabookwf:pmprocess , title: Project Management , version: 61
definition: jbpm$80 , name: Project Management , version: 61
workflow: None
path: None

referance:- Alfresco Cookbook: Chapter 11 - Working With Workflows


Thanks.
Oshadha

Outcomes