cancel
Showing results for 
Search instead for 
Did you mean: 

Advanced workflow

liso
Champ in-the-making
Champ in-the-making
I created and uploaded processdefinition using jbpm. I also add:
      <type name="wf:iniApp">
         <parent>bpm:startTask</parent>
         <mandatory-aspects>
            <aspect>bpm:assignee</aspect>
         </mandatory-aspects>
      </type>
In this file "workflowModel.xml" which is in this path "/opt/alfresco-3.4.d/tomcat/webapps/alfresco/WEB-INF/classes/alfresco/workflow/"

When I try to start advanced workflow I got the following error:
WARN  [repo.dictionary.DictionaryDAO] Type not found: {http://www.alfresco.org/model/workflow/1.0}
5 REPLIES 5

ramesh_ram
Champ in-the-making
Champ in-the-making
hi Liso,

I think some thing miss or mistake in name space tag of your model file. Check it once.

If you post your model and process definition file, some one can help you, without those finding the error very difficult.

liso
Champ in-the-making
Champ in-the-making
I created a workflow using JBPM and it generated the following process defenition file. I deployed process definition using JBPM.
<?xml version="1.0" encoding="UTF-8"?>

<process-definition  xmlns="urn:jbpm.org:jpdl-3.2"  name="Vehicle Process4">

   <swimlane name ="initiator"/>
   
   <start-state name="initiate">
      <description>
         Initiate process
      </description>
       <task name="wf:initApp" swimlane="initiator">
       
</task>

      <transition to="supervisor" name="to supervisor"></transition>
   </start-state>
  <swimlane name="assignee">
    <assignment actor-id="#{bpm_assignee.properties['cm:userName']}"/>
  </swimlane>
   

    <swimlane name ="c pule"/>
   
    <task-node name="supervisor">
       <description>
         Applicant Supervisor
      </description>
        <task name="wf:appSuptask" swimlane="c pule"/>
      <transition to="resp-manager" name="to resp-manager"></transition>
    </task-node>

    <swimlane name =" c pitso"/>
   
    <task-node name="resp-manager">
       <description>
         Responsibility Manager
      </description>
        <task name="wf:respManagertask" swimlane="c pitso"/>
      <transition to="trans-office" name="to trans-office"></transition>
    </task-node>
   
    <swimlane name ="dichaba"/>
   
    <task-node name="trans-office">
       <description>
         Transport Officer
      </description>
        <task name="wf:transOfficetask" swimlane="dichaba"/>
      <transition to="end-process" name="to end-process"></transition>
    </task-node>

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

I also created workflowModel.xml on opt/alfresco/tomcat/webapps/alfresco/WEB-INF/classes/alfresco/extention
<?xml version="1.0" encoding="UTF-8"?>

<model name="wf:workflowmodel" 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/bpm/1.0" prefix="bpm"/>
  </imports>

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


     <type name="wf:initApp">
        <parent>bpm:startTask</parent>
        
        <properties>
           <property name="wf:notifyMe">
              <type>d:boolean</type>
              <default>false</default>
           </property>
        </properties>

        <mandatory-aspects>
           <aspect>bpm:assignee</aspect>
        </mandatory-aspects>
     </type>

     <type name="wf:appSuptask">
        <parent>bpm:workflowTask</parent>
     </type>

     <type name="wf:respManagertask">
        <parent>bpm:workflowTask</parent>
     </type>
     
    <type name="wf:transOfficetask">
        <parent>bpm:workflowTask</parent>
     </type>
  </types>
  
</model>

when i start advaced workflow i'm getting the following warning:
WARN  [repo.dictionary.DictionaryDAO] Type not found: {http://www.alfresco.org/model/workflow/1.0}initApp

carlos_miguens
Champ on-the-rise
Champ on-the-rise
Hi Liso

It is bad practice to change the files under webapps and not a good idea to change the alfresco workflow model.

Create a new model file for yourself (see example below) and deploy this model (I assume that you know how to do that). Re-instate the Alfresco workflow model to what it was and then let's try it again.

<?xml version="1.0" encoding="UTF-8"?>

<model name="wfge:workflow-green-energy" xmlns="http://www.alfresco.org/model/dictionary/1.0">

    <description>Green Energy Workflow Model</description>
    <author>Alfresco Training</author>
    <version>1.1</version>

   <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"/>
   </imports>

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

   <types>

      <type name="wfge:startSopReview">
         <parent>bpm:startTask</parent>
         <mandatory-aspects>
         <aspect>wfge:instructionAspect</aspect>
         </mandatory-aspects>
      </type>
     
      <type name="wfge:sopReview">
         <parent>bpm:workflowTask</parent>
         <mandatory-aspects>
         <aspect>wfge:commentAspect</aspect>
         <aspect>wfge:instructionAspect</aspect>         
         </mandatory-aspects>
      </type>
     
   </types>
  
   <aspects>

      <aspect name="wfge:instructionAspect">
         <properties>
             <property name="wfge:instructions">
                <type>d:text</type>
                <mandatory>true</mandatory>
             </property>
         </properties>
      </aspect>
     
      <aspect name="wfge:commentAspect">
         <properties>
             <property name="wfge:comment">
                <type>d:text</type>
                <mandatory>false</mandatory>
             </property>
         </properties>
      </aspect>     

   </aspects>

</model>

We cover task models on the Alfresco Workflow course.

Carlos

himanshuk4u
Champ in-the-making
Champ in-the-making
hi all , i have created new customized workflow ,using activiti plugin in eclipse

i have created

test_demo.bpmn20.xml
###########################

<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:activiti="http://activiti.org/bpmn" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlnsSmiley Surprisedmgdc="http://www.omg.org/spec/DD/20100524/DC" xmlnsSmiley Surprisedmgdi="http://www.omg.org/spec/DD/20100524/DI" typeLanguage="http://www.w3.org/2001/XMLSchema" expressionLanguage="http://www.w3.org/1999/XPath" targetNamespace="http://www.activiti.org/test">
  <process id="myProcess" name="My process" isExecutable="true">
    <userTask id="visaMsc" name="visa console" activiti:assignee="${initiator.properties.userName}" activiti:formKey="wfmy:visaconsole">
      <documentation>visa desk</documentation>
      <extensionElements>
        <activiti:taskListener event="create" class="org.alfresco.repo.workflow.activiti.tasklistener.ScriptTaskListener">
          <activiti:field name="script">
            <activiti:string>if (typeof bpm_workflowDueDate != 'undefined') task.setVariableLocal('bpm_dueDate', bpm_workflowDueDate);
                      if (typeof bpm_workflowPriority != 'undefined') task.priority = bpm_workflowPriority;
if (typeof bpm_comment != 'undefined') task.setVariable('bpm_comment', bpm_comment);</activiti:string>
          </activiti:field>
        </activiti:taskListener>
      </extensionElements>
    </userTask>
    <userTask id="verify" name="verify" activiti:assignee="${bpm_assignee.properties.userName}" activiti:formKey="wfmy:verify">
      <documentation>verify the document</documentation>
      <extensionElements>
        <activiti:taskListener event="create" class="org.alfresco.repo.workflow.activiti.tasklistener.ScriptTaskListener">
          <activiti:field name="script">
            <activiti:string>if (typeof bpm_workflowDueDate != 'undefined') task.setVariableLocal('bpm_dueDate', bpm_workflowDueDate);
                      if (typeof bpm_workflowPriority != 'undefined') task.priority = bpm_workflowPriority;
if (typeof bpm_comment != 'undefined') task.setVariable('bpm_comment', bpm_comment);</activiti:string>
          </activiti:field>
        </activiti:taskListener>
        <activiti:taskListener event="complete" class="org.alfresco.repo.workflow.activiti.tasklistener.ScriptTaskListener">
          <activiti:field name="script">
            <activiti:string>execution.setVariable('wf_reviewOutcome', task.getVariable('wf_reviewOutcome'));
execution.setVariable('bpm_comment', task.getVariable('bpm_comment'));</activiti:string>
          </activiti:field>
        </activiti:taskListener>
      </extensionElements>
    </userTask>
    <endEvent id="end" name="End"></endEvent>
    <sequenceFlow id="flow3" sourceRef="verify" targetRef="end"></sequenceFlow>
    <startEvent id="start" name="Alfresco start" activiti:formKey="wfmy:visa"></startEvent>
    <sequenceFlow id="flow6" sourceRef="start" targetRef="visaMsc"></sequenceFlow>
    <sequenceFlow id="flow7" sourceRef="visaMsc" targetRef="verify"></sequenceFlow>
  </process>
  <bpmndi:BPMNDiagram id="BPMNDiagram_myProcess">
    <bpmndi:BPMNPlane bpmnElement="myProcess" id="BPMNPlane_myProcess">
      <bpmndi:BPMNShape bpmnElement="visaMsc" id="BPMNShape_visaMsc">
        <omgdc:Bounds height="55.0" width="105.0" x="180.0" y="150.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="verify" id="BPMNShape_verify">
        <omgdc:Bounds height="55.0" width="105.0" x="600.0" y="150.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="end" id="BPMNShape_end">
        <omgdc:Bounds height="35.0" width="35.0" x="770.0" y="160.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="start" id="BPMNShape_start">
        <omgdc:Bounds height="35.0" width="35.0" x="110.0" y="180.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge bpmnElement="flow3" id="BPMNEdge_flow3">
        <omgdi:waypoint x="705.0" y="177.0"></omgdi:waypoint>
        <omgdi:waypoint x="770.0" y="177.0"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow6" id="BPMNEdge_flow6">
        <omgdi:waypoint x="145.0" y="197.0"></omgdi:waypoint>
        <omgdi:waypoint x="180.0" y="177.0"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow7" id="BPMNEdge_flow7">
        <omgdi:waypoint x="285.0" y="177.0"></omgdi:waypoint>
        <omgdi:waypoint x="600.0" y="177.0"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
    </bpmndi:BPMNPlane>
  </bpmndi:BPMNDiagram>
</definitions>

and have placed in Alfresco\tomcat\webapps\alfresco\WEB-INF\classes\alfresco\workflow
############################################################################################
i have created test_demo-custom.xml

<?xml version="1.0" encoding="UTF-8"?>

<model name="wfmy:workflowmodel" xmlns="http://www.alfresco.org/model/dictionary/1.0">

   <imports>
      <!– Import Alfresco Dictionary Definitions –>
      <import uri="http://www.alfresco.org/model/dictionary/1.0"
         prefix="d" />
      <!– Import Alfresco System Definitions –>
      <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" />
      <import uri="http://www.alfresco.org/model/bpm/1.0" prefix="bpm" />
   </imports>

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

   <types>

      <type name="wfmy:visa">
         <parent>bpm:startTask</parent>
          
        
      </type>

      <type name="wfmy:visaconsole">
         <parent>bpm:workflowTask</parent>

         <overrides>

            <property name="bpmSmiley TongueackageActionGroup">
               <default>add_package_item_actions</default>
            </property>
            <property name="bpmSmiley TongueackageItemActionGroup">
               <default>remove_package_item_actions</default>
            </property>
            
            </overrides>
            <mandatory-aspects>
            
            <aspect>bpm:assignee</aspect>
         </mandatory-aspects>         
            
      </type>
            
      <type name="wfmy:verify">
         <parent>bpm:activitiOutcomeTask</parent>
         <properties>
            <property name="wfmy:reviewOutcome">
               <type>d:text</type>
               <default>Reject</default>
               <constraints>
                  <constraint name="wfmy:reviewOutcomeOptions" type="LIST">
                     <parameter name="allowedValues">
                        <list>
                           <value>Approve</value>
                           <value>Reject</value>
                        </list>
                     </parameter>
                  </constraint>
               </constraints>
            </property>
         </properties>   

      <mandatory-aspects>
            <aspect>bpm:assignee</aspect>
            
         </mandatory-aspects>   
  </type>         
            
</types>

</model>
####################################################################   
and in share-workflow-form-config.xml

i have added

config evaluator="string-compare" condition="activiti$myProcess">
      <forms>
         <form>
            <field-visibility>
               <show id="bpm:workflowDescription" />
               <show id="bpm:workflowDueDate" />
               <show id="bpm:workflowPriority" />
               <show id="bpm:assignee" />
               <show id="packageItems" />
               <show id="bpm:sendEMailNotifications" />
            </field-visibility>
            <appearance>
               <set id="" appearance="title" label-id="workflow.set.general" />
               <set id="info" appearance="" template="/org/alfresco/components/form/2-column-set.ftl" />
               <set id="assignee" appearance="title" label-id="workflow.set.assignee" />
               <set id="items" appearance="title" label-id="workflow.set.items" />
               <set id="other" appearance="title" label-id="workflow.set.other" />
              
               <field id="bpm:workflowDescription" label-id="workflow.field.message">
                  <control template="/org/alfresco/components/form/controls/textarea.ftl">
                     <control-param name="style">width: 95%</control-param>
                  </control>
               </field>
               <field id="bpm:workflowDueDate" label-id="workflow.field.due" set="info">
                  <control template="/org/alfresco/components/form/controls/date.ftl">
                      <control-param name="showTime">false</control-param>
                      <control-param name="submitTime">false</control-param>
                  </control>
               </field>
               <field id="bpm:workflowPriority" label-id="workflow.field.priority" set="info">
                  <control template="/org/alfresco/components/form/controls/workflow/priority.ftl" />
               </field>
               <field id="bpm:assignee" label-id="workflow.field.assign_to" set="assignee" />
               <field id="packageItems" set="items" />
               <field id="bpm:sendEMailNotifications" set="other">
                  <control template="/org/alfresco/components/form/controls/workflow/email-notification.ftl" />
               </field>
            </appearance>
         </form>
      </forms>
   </config>
  
  
  <config evaluator="task-type" condition="wfmy:visaconsole">
      <forms>
         <form>
            <field-visibility>
               <show id="bpm:workflowDescription" />
               <show id="bpm:workflowDueDate" />
               <show id="bpm:workflowPriority" />
               <show id="bpm:assignee" />
               <show id="packageItems" />
               <show id="bpm:sendEMailNotifications" />
            </field-visibility>
            <appearance>
               <set id="" appearance="title" label-id="workflow.set.general" />
               <set id="info" appearance="" template="/org/alfresco/components/form/2-column-set.ftl" />
               <set id="assignee" appearance="title" label-id="workflow.set.assignee" />
               <set id="items" appearance="title" label-id="workflow.set.items" />
               <set id="other" appearance="title" label-id="workflow.set.other" />
              
               <field id="bpm:workflowDescription" label-id="workflow.field.message">
                  <control template="/org/alfresco/components/form/controls/textarea.ftl">
                     <control-param name="style">width: 95%</control-param>
                  </control>
               </field>
               <field id="bpm:workflowDueDate" label-id="workflow.field.due" set="info">
                  <control template="/org/alfresco/components/form/controls/date.ftl">
                      <control-param name="showTime">false</control-param>
                      <control-param name="submitTime">false</control-param>
                  </control>
               </field>
               <field id="bpm:workflowPriority" label-id="workflow.field.priority" set="info">
                  <control template="/org/alfresco/components/form/controls/workflow/priority.ftl" />
               </field>
               <field id="bpm:assignee" label-id="workflow.field.assign_to" set="assignee" />
               <field id="packageItems" set="items" />
               <field id="bpm:sendEMailNotifications" set="other">
                  <control template="/org/alfresco/components/form/controls/workflow/email-notification.ftl" />
               </field>
            </appearance>
         </form>
      </forms>
   </config>
   
     <config evaluator="task-type" condition="wfmy:verify">
      <forms>
         <form>
            <field-visibility>
               <show id="bpm:workflowDescription" />
               <show id="bpm:workflowDueDate" />
               <show id="bpm:workflowPriority" />
               <show id="bpm:assignee" />
               <show id="packageItems" />
               <show id="bpm:sendEMailNotifications" />
            </field-visibility>
            <appearance>
               <set id="" appearance="title" label-id="workflow.set.general" />
               <set id="info" appearance="" template="/org/alfresco/components/form/2-column-set.ftl" />
               <set id="assignee" appearance="title" label-id="workflow.set.assignee" />
               <set id="items" appearance="title" label-id="workflow.set.items" />
               <set id="other" appearance="title" label-id="workflow.set.other" />
              
               <field id="bpm:workflowDescription" label-id="workflow.field.message">
                  <control template="/org/alfresco/components/form/controls/textarea.ftl">
                     <control-param name="style">width: 95%</control-param>
                  </control>
               </field>
               <field id="bpm:workflowDueDate" label-id="workflow.field.due" set="info">
                  <control template="/org/alfresco/components/form/controls/date.ftl">
                      <control-param name="showTime">false</control-param>
                      <control-param name="submitTime">false</control-param>
                  </control>
               </field>
               <field id="bpm:workflowPriority" label-id="workflow.field.priority" set="info">
                  <control template="/org/alfresco/components/form/controls/workflow/priority.ftl" />
               </field>
               <field id="bpm:assignee" label-id="workflow.field.assign_to" set="assignee" />
               <field id="packageItems" set="items" />
               <field id="bpm:sendEMailNotifications" set="other">
                  <control template="/org/alfresco/components/form/controls/workflow/email-notification.ftl" />
               </field>
            </appearance>
         </form>
      </forms>
   </config>
   
###################################################
i have created bean in bootstrap-config.xml

<bean id="myProcess.workflowBootstrap" parent="workflowDeployer">
        <property name="workflowDefinitions">
            <list>
      
                <!– Activiti myprocess service workflow definition –>
                <props>
                    <prop key="engineId">activiti</prop>
                    <prop key="location">alfresco/workflow/test_demo.bpmn20.xml</prop>
                    <prop key="mimetype">text/xml</prop>
                    <prop key="redeploy">false</prop>
                </props>

            </list>
        </property>
        <property name="models">
            <list>
               <value>alfresco/workflow/test_demo-custom.xml</value>
            </list>
        </property>
      <property name="labels">
            <list>
               <value>alfresco/workflow/workflow-messages</value>
            </list>
        </property>
      </bean>


when i start workflow in alfresco share it shows
rg.alfresco.service.cmr.workflow.WorkflowException: 02200055 Failed to start workflow activiti$myProcess:2:2446

WARN  [org.alfresco.repo.dictionary.DictionaryDAO] Type not found: {http://www.alfresco.org/model/workflow/1.0}visa


org.activiti.engine.ActivitiException: Unknown property used in expression
   at org.activiti.engine.impl.el.JuelExpression.getValue(JuelExpression.java:55)
   at org.activiti.engine.impl.bpmn.behavior.UserTaskActivityBehavior.handleAssignments(UserTaskActivityBehavior.java:98)
   at org.activiti.engine.impl.bpmn.behavior.UserTaskActivityBehavior.execute(UserTaskActivityBehavior.java:85)
   at org.activiti.engine.impl.pvm.runtime.AtomicOperationActivityExecute.execute(AtomicOperationActivityExecute.java:44)
   at org.activiti.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:80)
   at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:546)
   at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:541)
   at org.activiti.engine.impl.pvm.runtime.AtomicOperationTransitionNotifyListenerStart.eventNotificationsCompleted(AtomicOperationTransitionNotifyListenerStart.java:52)


Caused by: org.activiti.engine.impl.javax.el.PropertyNotFoundException: Cannot resolve identifier 'bpm_assignee'
   at org.activiti.engine.impl.juel.AstIdentifier.eval(AstIdentifier.java:83)
   at org.activiti.engine.impl.juel.AstProperty.eval(AstProperty.java:52)
   at org.activiti.engine.impl.juel.AstProperty.eval(AstProperty.java:52)
   at org.activiti.engine.impl.juel.AstEval.eval(AstEval.java:50)
   at org.activiti.engine.impl.juel.AstNode.getValue(AstNode.java:26)
   at org.activiti.engine.impl.juel.TreeValueExpression.getValue(TreeValueExpression.java:114)


and i am not getting assignee option in workflow

pls help me out… i have try a lot

anuradha
Champ in-the-making
Champ in-the-making
Hi All,
I have create the workflow based on this url
https://wiki.alfresco.com/wiki/WorkflowAdministration#Step_6:_Test_the_Workflow
But iam unable view that workflow in Alfresco explorer.
I am using alfresco 4.2 C