AnsweredAssumed Answered

Deploy workflow

Question asked by evdgeest on Mar 13, 2007
Latest reply on Mar 6, 2008 by linhnh
I followed the Creating and Customizing Workflow guide, but i got stuck at the point of deploying the definition into alfresco. I renamed workflow-context.xml.sample into workflow-context.xml in the extension folder, after restarting alfresco I get other workflow options like pooled and parallel review workflow and my own "brief workflow". When I choose brief workflow the properties did not work. I tried a lot, but when I delete the workflow-context.xml from the extension folder and restart alfresco I still have all the workflow options (only my workflow is missing his label) and after choosing my brief workflow all the properties does work without the assigning property.
This error is displayed in the tomcat command prompt: WARN [component.property.UIAssociation] Failed to find association definition for association 'bpm:assignee'

I'm out of options, can someone help me please. I hope my description of the problem is clear enough, otherwise I will give more information.

The files I created/edited:
Processdefinition: brief_processdefinition.xml in <configroot>\alfresco\workflow\
Task model: briefModel.xml in <configroot>\alfresco\workflow\
Web client config: web-client-config-properties.xml in <configroot>\alfresco\
Deployment: workflow-context.xml in <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="myworkflows.workflowBootstrap" parent="workflowDeployer">
      <property name="workflowDefinitions">
         <list>
        <?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="myworkflows.workflowBootstrap" parent="workflowDeployer">
            <property name="workflowDefinitions">
              <list>
                <props>
                  <prop key="engineId">jbpm</prop>
                  <prop key="location">alfresco/workflow/parallelreview_processdefinition.xml</prop>
                  <prop key="mimetype">text/xml</prop>
                  <prop key="redeploy">false</prop>
                </props>
                <props>
                  <prop key="engineId">jbpm</prop>
                  <prop key="location">alfresco/workflow/parallelreview_group_processdefinition.xml</prop>
                  <prop key="mimetype">text/xml</prop>
                  <prop key="redeploy">false</prop>
                </props>
                <props>
                  <prop key="engineId">jbpm</prop>
                  <prop key="location">alfresco/workflow/review_pooled_processdefinition.xml</prop>
                  <prop key="mimetype">text/xml</prop>
                  <prop key="redeploy">false</prop>
                </props>
                <props>
                  <prop key="engineId">jbpm</prop>
                  <prop key="location">alfresco/workflow/brief_processdefinition.xml</prop>
                  <prop key="mimetype">text/xml</prop>
                  <prop key="redeploy">true</prop>
                </props>
              </list>
            </property>
            <property name="models">
              <list>
                <value>alfresco/workflow/briefModel.xml</value>
              </list>
            </property>
            <property name="labels">
              <list>
                <value>alfresco/workflow/brief-messages</value>
              </list>
            </property>
          </bean>
        </beans>

        <props>
          <prop key="engineId">jbpm</prop>
          <prop key="location">alfresco/workflow/brief_processdefinition.xml</prop>
          <prop key="mimetype">text/xml</prop>
          <prop key="redeploy">true</prop>
        </props>
         </list>
      </property>
      <property name="models">
         <list>
        <value>alfresco/workflow/briefModel.xml</value>
         </list>
      </property>
      <property name="labels">
         <list>
       <value>alfresco/workflow/brief-messages</value>
         </list>
      </property>
   </bean>
</beans>

The process definition:
<?xml version="1.0" encoding="UTF-8"?>

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

  <swimlane name="initiator"/>

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


  <swimlane name="assignee">
    <assignment class="org.alfresco.repo.workflow.jbpm.AlfrescoAssignment">
      <actor>#{bpm_assignee}</actor>
    </assignment>
  </swimlane>

  <task-node name="behandeling">
    <task name="wf:behandelingTask" 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="controle"/>
  </task-node>
 
  
  <swimlane name="afdelinghoofd"/>

  <task-node name="controle">
    <task name="wf:controleTask" swimlane="afdelinghoofd">
    </task>
    <transition name="" to="verzending">
    </transition>
  </task-node>

  <task-node name="verzending">
    <task name="wf:verzendingTask" swimlane="afdelinghoofd"/>
    <transition name="" to="end"/>
  </task-node>

  <end-state name="end"/> 
 
</process-definition>

Outcomes