cancel
Showing results for 
Search instead for 
Did you mean: 

Workflow not getting deployed

oshadha
Champ in-the-making
Champ in-the-making
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
12 REPLIES 12

marco_altieri
Star Contributor
Star Contributor
My fault…
It was necessary to set also the property:

system.workflow.engine.jbpm.definitions.visible=true

Regards,
Marco

mwarme
Champ in-the-making
Champ in-the-making
I'm attempting to deploy a custom workflow to alfresco 4.2.c.  I have the following files stored in /alfresco 4.2.c/tomcat/shared/classes/alfresco/extension/workflow/contractor_process/: contractor_processmodel.xml, contractor_processdefinition.xml.  In general terms, I need to deploy a workflow that allows a user to begin a workflow and assign three users and a document to the workflow.  The three chosen users need to sequentially edit the document then pass it down the line.  I'm basically brand-new to alfresco and I'm not what you'd call a developer–I'm a discrete math person.  I'm almost positive my issues with deploying the workflow stem from incorrectly placing the "spring workflow deployer bean", and I've found exactly zero information anywhere on the forums or tutorials about where to place this snippet of code.  Based on all the examples of this bean that i've found, I'm positive I've correctly constructed the code for it, but I have absolutely no idea WHERE or under what folder I need to save this piece of code to manually deploy my workflow.

tusharpatel88
Champ in-the-making
Champ in-the-making
I have been working on Alfresco 4.2

I have same problem for cookbook  workflow example.

system.workflow.engine.jbpm.enabled=true
system.workflow.engine.jbpm.definitions.visible=true

Above two propertiez in alfresco-global.properties solve my problem.

Thanks marco and Jeff.