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

jpotts
World-Class Innovator
World-Class Innovator
You'll need to provide your pm_taskModel.xml. If your repository isn't starting that is where the problem most likely is.

Jeff

oshadha
Champ in-the-making
Champ in-the-making
You'll need to provide your pm_taskModel.xml. If your repository isn't starting that is where the problem most likely is.

Jeff

Post updated Smiley Happy

jpotts
World-Class Innovator
World-Class Innovator
If the server is coming up okay then your model is most likely fine. All of the files you've provided look good after a cursory glance.

You are running Alfresco 4. Have you enabled jBPM? If you used the installer, it is disabled by default. Check $TOMCAT_HOME/shared/classes/alfresco-global.properties for:
# Determines if the JBPM engine is enabled
system.workflow.engine.jbpm.enabled=true

If the engine is enabled, go to the workflow console:
http://localhost:8080/alfresco/faces/jsp/admin/workflow-console.jsp

Then try to manually deploy your process, like this:
deploy jbpm alfresco alfresco/extension/pm_processdefinition.xml

And see if it is successful or produces any helpful error messages.

Jeff

oshadha
Champ in-the-making
Champ in-the-making
If the server is coming up okay then your model is most likely fine. All of the files you've provided look good after a cursory glance.

You are running Alfresco 4. Have you enabled jBPM? If you used the installer, it is disabled by default. Check $TOMCAT_HOME/shared/classes/alfresco-global.properties for:
# Determines if the JBPM engine is enabled
system.workflow.engine.jbpm.enabled=true

If the engine is enabled, go to the workflow console:
http://localhost:8080/alfresco/faces/jsp/admin/workflow-console.jsp

Then try to manually deploy your process, like this:
deploy jbpm alfresco alfresco/extension/pm_processdefinition.xml

And see if it is successful or produces any helpful error messages.

Jeff

JBPM engine is enabled and here's the workflow console output result. Still it's not getting deployed.

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

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

jpotts
World-Class Innovator
World-Class Innovator
That looks like a clean deploy to me. Can you do a "show definitions all" and see if your workflow is listed?

Can you remind me what makes you think the workflow is not being deployed?

Jeff

oshadha
Champ in-the-making
Champ in-the-making
That looks like a clean deploy to me. Can you do a "show definitions all" and see if your workflow is listed?

Can you remind me what makes you think the workflow is not being deployed?

Jeff

Last command: show definitions all
Duration: 10ms
—–

id: activiti$activitiAdhoc:1:4 , name: activiti$activitiAdhoc , title: Adhoc Workflow , version: 1
id: activiti$activitiInvitationModerated:1:23 , name: activiti$activitiInvitationModerated , title: Invitation - Moderated , version: 1
id: activiti$activitiInvitationNominated:1:26 , name: activiti$activitiInvitationNominated , title: Site Invitation - Nominated , version: 1
id: activiti$activitiParallelGroupReview:1:20 , name: activiti$activitiParallelGroupReview , title: Group Review And Approve , version: 1
id: activiti$activitiParallelReview:1:16 , name: activiti$activitiParallelReview , title: Parallel Review And Approve , version: 1
id: activiti$activitiReview:1:8 , name: activiti$activitiReview , title: Review And Approve , version: 1
id: activiti$activitiReviewPooled:1:12 , name: activiti$activitiReviewPooled , title: Pooled Review And Approve , version: 1
id: activiti$publishWebContent:1:29 , name: activiti$publishWebContent , title: Publish Web Content Activiti Process , version: 1

I dont have a specific idea of why the workflow is not getting deployed. It maybe a alfresco version issue, or an incompetible JBPM version, or elase an issue in JBPM engine itself. I will try this in a different alfresco instance and let you know the results.

oshadha
Champ in-the-making
Champ in-the-making
Deployed on a different alfresco instance on a differant location. Still no luck the workflow is not getting deployed and there are no errors on the logs.

Thanks.

jpotts
World-Class Innovator
World-Class Innovator
Try deploying one of the out-of-the-box jBPM workflows. For example, do:
deploy jbpm alfresco/workflow/adhoc_processdefinition.xml

Jeff

Hi,

I'm experiencing the same problem on Alfresco 4.1.2.
The deployment of the workflow succeeds, but I can see only activiti workflows both in alfresco and share.
I have also tried to deploy an ootb workflow as Jeff suggested.

The workflow definitions are there because I can execute the command:

use definition jbpm$2455

I know the id of the workflow definition because I have the same repository on version 3.4.6 where the workflows work.

I thought it was a problem with the porting of the repository from version 3.4.6 to version 4.1.2, but I have also tried on a clean repository with the same results.

Is this a known bug?

Regards,
Marco