cancel
Showing results for 
Search instead for 
Did you mean: 

I have problem with Definition workflow

vinaxwater
Champ in-the-making
Champ in-the-making
I have example with definition workflow:
<?xml version="1.0" encoding="UTF-8"?>

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

   <swimlane name="initiator" />
   <swimlane name="reviewer">
      <assignment
         class="org.alfresco.repo.workflow.jbpm.AlfrescoAssignment">
         <actor>#{bpm_assignee}</actor>
      </assignment>
   </swimlane>
   <swimlane name="filler">
      <assignment
         class="org.alfresco.repo.workflow.jbpm.AlfrescoAssignment">
         <actor>
            #{people.getPerson("tsmith").properties["cm:userName"]}
         </actor>
      </assignment>
   </swimlane>

   <start-state name="start">
      <task name="ccswfcredential:startTask" swimlane="initiator" />
      <transition name="Initiate" to="Initiate" />
   </start-state>

   <task-node name="Initiate">
      <event type="node-leave">
         <script>
            System.out.println("———- Node Leave of LicenseTask
            ————");
         </script>
      </event>
      <task name="ccswfcredential:licenseTask" swimlane="initiator">
         <event type="task-create">
            <script>
               System.out.println("———-in Task Create of
               LicenseTask———");
            </script>
            <action
               class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript">
               <script>
                  taskInstance.setVariable("ccswfcredential_firstname","WFDefault");
                  taskInstance.setVariable("ccswfcredential_lastname","WFDefault");
                  taskInstance.setVariable("ccswfcredential_info","WFDefault");
                  taskInstance.setVariable("ccswfcredential_st","WFDefault");
                  bpm_package.children[0].properties["ccs:fname"]
                  = "WFDefault";
                  bpm_package.children[0].properties["ccs:lname"]
                  = "WFDefault";
                  bpm_package.children[0].properties["ccs:st"] =
                  "WFDefault";
                  bpm_package.children[0].properties["ccs:info"] =
                  "WFDefault";
               </script>
            </action>
         </event>
         <event type="task-end">
            <script>
               System.out.println("———-in Task End of
               LicenseTask ———–");
            </script>
         </event>
         <timer name='AutoPreFill' duedate='3 minute'
            transition='Pre-Fill'>
            <action
               class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript">
               <script>var temp2 = "dummy";</script>
            </action>
         </timer>
      </task>
      <transition name="Evaluate" to="Evaluate" />
      <transition name="Pre-Fill" to="Prefill" />
   </task-node>

   <task-node name="Prefill">
      <task name="ccswfcredential:prefillTask" swimlane="filler" />
      <event type="task-create">
         <script>
            System.out.println("———-in Task Create of PreFill
            Task———");
         </script>
         <action
            class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript">
            <script>
               var temp =
               bpm_package.children[0].properties["ccs:fname"];
               taskInstance.setVariable("ccswfcredential_firstname",temp);
               temp =
               bpm_package.children[0].properties["ccs:lname"];
               taskInstance.setVariable("ccswfcredential_lastname",temp);
               temp =
               bpm_package.children[0].properties["ccs:info"];
               taskInstance.setVariable("ccswfcredential_info",temp);
               temp = bpm_package.children[0].properties["ccs:st"];
               taskInstance.setVariable("ccswfcredential_st",temp);
            </script>
         </action>
      </event>
      <transition name="Evaluate" to="Evaluate" />
   </task-node>


   <task-node name="Evaluate">
      <task name="ccswfcredential:evaluateTask" swimlane="reviewer" />
      <transition name="moreInfoNeeded" to="moreInfoNeeded" />
      <transition name="Complete" to="complete" />
   </task-node>
   <task-node name="moreInfoNeeded">
      <task name="ccswfcredential:moreInfoNeededTask"
         swimlane="initiator" />
      <transition name="Re-Evaluate" to="Evaluate">
         <action
            class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript">
            <script>
               var mail = actions.create("mail");
               mail.parameters.to = "ani@possible.com";
               mail.parameters.subject = "ReEvaluate " +
               ccswfcredential_firstname + " " +
               ccswfcredential_lastname +"'s Credentials";
               mail.parameters.text = "Please Re-Evaluate the
               additional Information \n "+ "License Number : " +
               ccswfcredential_info + "\n"+ "State : " +
               ccswfcredential_st + "\n" ;
               mail.execute(bpm_package);
            </script>
         </action>
      </transition>
   </task-node>

   <task-node name="complete">
      <task name="ccswfcredential:completeTask" swimlane="initiator" />
      <transition name="Complete" to="end">
         <action
            class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript">
            <script>
               var scriptnode_mycontent = bpm_package.children[0];
               var documentfolder = bpm_package.children[0].parent;
               var destinationFolder =
               documentfolder.childByNamePath("Evaluated
               Licenses");
               bpm_package.children[0].copy(destinationFolder);
            </script>
         </action>
      </transition>
   </task-node>

   <end-state name="end" />

</process-definition>

Example get from url: http://anipossible3.blogspot.com/2007/09/alfresco-workflow-model-setup-features.html
I deploy workflow by webclient of alfresco all file in example, then i have that workflow in list startwork but i have in start GUI workflow button Assign not display (plz see image below), i have log 'Mandatory task properties have not been provided: {http://www.alfresco.org/model/bpm/1.0}assignee'. Help me! Thanks
[img]http://img337.imageshack.us/img337/7518/startworkflowhk4.th.jpg[/img]
2 REPLIES 2

vedran
Champ in-the-making
Champ in-the-making
You should show your model file. Also, have you exposed the bpm:assignee in your config for the task?

<show-association name="bpm:assignee" />

Also I can't enlarge the image you included.

vinaxwater
Champ in-the-making
Champ in-the-making
Thanks for reply I have solution for this problem.

Regard.