AnsweredAssumed Answered

Parameter is not defined !

Question asked by vinaxwater on Nov 19, 2008
Latest reply on Dec 11, 2008 by vinaxwater
I have a workflow below:  :shock:

This is file process:

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

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

   <swimlane name="initiator"></swimlane>
   
   <start-state name="start">
      <task name="wf:startStaffTask" swimlane="initiator"></task>
      <transition to="submitView" name="startStaffLoan"></transition>
   </start-state>

   <task-node name="Viewed">
      <event type="node-enter">
           <action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript">
               <script>
                  <variable name="bpm_package" access="read" />
                  <variable name="user" access="read" />
                  <expression>
                      for (var j = 0; j &lt; bpm_package.children.length; j++)
                      {
                         var resource = bpm_package.children[j];
                       resource.setPermission("Coordinator", user.properties.userName);
                      }
                  </expression>
               </script>
           </action>
       </event>
      <task name="wf:viewStaffTask">
         <assignment class="org.alfresco.repo.workflow.jbpm.AlfrescoAssignment">
              <pooledactorsNTIS>#{people.getIVBMembers(bpm_NTISgroupAssignees)}</pooledactorsNTIS>
           </assignment>
           <event type="task-create">
              <script>
                 <variable name="wf_dueDate" access="read,write" />
                   <variable name="wf_priority" access="read,write" />
                   <expression>
                      taskInstance.dueDate = wf_dueDate;
                  taskInstance.priority = wf_priority;
                   </expression>
                </script>
         </event>
      </task>
      <transition to="viewApproved" name="Approved"></transition>
      <transition to="Rejected" name="Rejected"></transition>
   </task-node>

   <task-node name="AppRe">
      <task name="wf:submitStaffTask" >
         <assignment class="org.alfresco.repo.workflow.jbpm.AlfrescoAssignment">
              <pooledactorsNTIS>#{user}</pooledactorsNTIS>
           </assignment>
           <event type="task-create">
              <script>
                 <variable name="wf_dueDate" access="read,write" />
                   <variable name="wf_priority" access="read,write" />
                   <expression>
                      taskInstance.dueDate = wf_dueDate;
                  taskInstance.priority = wf_priority;
                   </expression>
                </script>
         </event>
      </task>
      <transition to="node" name="Continue"></transition>
   </task-node>

   <task-node name="Approved">
      <event type="node-enter">
           <action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript">
               <script>
                  <variable name="bpm_package" access="read" />
                  <variable name="user" access="read" />
                  <expression>
                      for (var e = 0; e &lt; bpm_package.children.length; e++)
                      {
                         var resource = bpm_package.children[e];
                       resource.setPermission("Coordinator", user.properties.userName);
                      }
                  </expression>
               </script>
           </action>
       </event>
      <transition to="Viewed" name="Continue"></transition>
      <task name="wf:approveStaffTask">
         <assignment class="org.alfresco.repo.workflow.jbpm.AlfrescoAssignment">
              <pooledactorsNTIS>#{user}</pooledactorsNTIS>
          </assignment>
          <event type="task-create">
              <script>
                 <variable name="wf_dueDate" access="read,write" />
                   <variable name="wf_priority" access="read,write" />
                   <expression>
                      taskInstance.dueDate = wf_dueDate;
                  taskInstance.priority = wf_priority;
                   </expression>
                </script>
         </event>
      </task>
   </task-node>

   <task-node name="Rejected">
      <task name="wf:rejectStaffTask" swimlane="initiator">
         <event type="task-create">
              <script>
                 <variable name="wf_dueDate" access="read,write" />
                   <variable name="wf_priority" access="read,write" />
                   <expression>
                      taskInstance.dueDate = wf_dueDate;
                  taskInstance.priority = wf_priority;
                   </expression>
                </script>
         </event>
      </task>
      <transition to="end" name="End"></transition>
   </task-node>

   <node name="submitView">
      <action class="org.alfresco.repo.workflow.jbpm.ForEachFork">
            <foreach>#{people.getIVBMembers(bpm_NTISgroupAssignees)}</foreach>
            <var>user</var>
        </action>
        <event type="node-enter">
            <script>
                <variable name="wf_dueDate" access="write" />
                <variable name="wf_priority" access="write" />
                <expression>
                    if (bpm_workflowDueDate != void) wf_dueDate = bpm_workflowDueDate;
                    if (bpm_workflowPriority.equals("Urgent")) wf_priority = 1;
               if (bpm_workflowPriority.equals("Intermediate")) wf_priority = 2;
               if (bpm_workflowPriority.equals("Normal")) wf_priority = 3;
                </expression>
            </script>
        </event>
      <transition to="AppRe">
         <action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript">
                 <script>
                    if (wf_staffNotifyMe)
                    {
                       var mail = actions.create("mail");
                       mail.parameters.to = user.properties.email;
                       mail.parameters.subject = "Staff Document Task " + bpm_workflowDescription;
                       mail.parameters.from = initiator.properties.email;
                       mail.parameters.text = "You have a STAFF TASK from" + initiator;
                       mail.execute(bpm_package);
                      
                       var mail1 = actions.create("mail");
                       mail1.parameters.to = initiator.properties.email;
                       mail1.parameters.subject = "List email assignee: " + user.properties.userName;
                       mail1.parameters.from = initiator.properties.email;
                       mail1.parameters.text = "You have a STAFF TASK from" + initiator;
                       mail1.execute(bpm_package);
                    }
                    for (var i = 0; i &lt; bpm_package.children.length; i++)
                      {
                       var resource = bpm_package.children[i];
                       resource.setPermission("Coordinator", user.properties.userName);
                      }
                 </script>
           </action>
      </transition>
   </node>
   
   <task-node name="viewApproved">
      <task name="wf:viewApproveStaffTask" swimlane="initiator">
         <event type="task-create">
              <script>
                 <variable name="wf_dueDate" access="read,write" />
                   <variable name="wf_priority" access="read,write" />
                   <expression>
                      taskInstance.dueDate = wf_dueDate;
                  taskInstance.priority = wf_priority;
                   </expression>
                </script>
         </event>
      </task>
      <transition to="end" name="End"></transition>
   </task-node>

   <node name="node">
      <action class="org.alfresco.repo.workflow.jbpm.ForEachFork">
            <foreach>#{people.getIVBMembers(bpm_NTISgroupAssignees)}</foreach>
            <var>user</var>
        </action>
      <transition to="Approved"></transition>
   </node>

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

</process-definition>

This is model:

<type name="wf:startStaffTask">
         <parent>bpm:startTask</parent>
         <properties>
            <property name="wf:staffNotifyMe">
               <type>d:boolean</type>
               <default>false</default>
            </property>
         </properties>
         <mandatory-aspects>
            <!– <aspect>bpm:assignee</aspect> –>
            <aspect>bpm:NTISgroupAssignees</aspect>
         </mandatory-aspects>
      </type>
     
      <type name="wf:submitStaffTask">
         <parent>bpm:workflowTask</parent>
         <overrides>
            <property name="bpm:packageItemActionGroup">
               <default>edit_package_item_actions</default>
            </property>
            <property name="bpm:status">
               <default>Wait for Process</default>
            </property>
         </overrides>
         <mandatory-aspects>
            <!– <aspect>bpm:assignee</aspect> –>
            <aspect>bpm:NTISgroupAssignees</aspect>
         </mandatory-aspects>
      </type>
     
       <type name="wf:approveStaffTask">
         <parent>bpm:workflowTask</parent>
         <overrides>
            <property name="bpm:packageItemActionGroup">
               <default>read_package_item_actions</default>
            </property>
            <property name="bpm:packageActionGroup">
               <default>add_package_item_actions</default>
            </property>
            <property name="bpm:status">
               <default>Wait for Process</default>
            </property>
         </overrides>
          <mandatory-aspects>
            <!– <aspect>bpm:assignee</aspect> –>
            <aspect>bpm:NTISgroupAssignees</aspect>
         </mandatory-aspects>
      </type>
     
      <type name="wf:rejectStaffTask">
         <parent>bpm:workflowTask</parent>
         <overrides>
            <property name="bpm:packageItemActionGroup">
               <default>read_package_item_actions</default>
            </property>
            <property name="bpm:status">
               <default>Rejected</default>
            </property>
         </overrides>
      </type>
     
      <type name="wf:viewStaffTask">
         <parent>bpm:workflowTask</parent>
         <overrides>
            <property name="bpm:packageItemActionGroup">
               <default>read_package_item_actions</default>
            </property>
            <property name="bpm:status">
               <default>Wait for Process</default>
            </property>
         </overrides>
      </type>
     
      <type name="wf:viewApproveStaffTask">
         <parent>bpm:workflowTask</parent>
         <overrides>
            <property name="bpm:packageItemActionGroup">
               <default>read_package_item_actions</default>
            </property>
            <property name="bpm:status">
               <default>Approved</default>
            </property>
         </overrides>
      </type>

This is web-client-config-propertices.xml:

<config evaluator="node-type" condition="wf:startStaffTask" replace="true">
      <property-sheet>
         <separator name="sep1" display-label-id="general" component-generator="HeaderSeparatorGenerator" />
         <show-property name="bpm:workflowDescription" component-generator="TextAreaGenerator" read-only="false"/>
         <show-property name="bpm:workflowDueDate" read-only="false" />
         <show-property name="bpm:workflowPriority" read-only="false" />
         <show-property name="wf:staffNotifyMe" />
         <separator name="sep2" display-label-id="users_and_roles" component-generator="HeaderSeparatorGenerator"/>
         <show-association name="bpm:NTISgroupAssignees" display-label-id="wf_adhoc_assign_to" />
      </property-sheet>
   </config>
  
   <config evaluator="node-type" condition="wf:submitStaffTask" replace="true">
      <property-sheet>
         <separator name="sep1" display-label-id="general" component-generator="HeaderSeparatorGenerator" />
         <show-property name="bpm:description" component-generator="TextAreaGenerator" read-only="true"/>
         <show-property name="bpm:dueDate" read-only="true" />
         <show-property name="bpm:priority" read-only="true" />
         <show-property name="bpm:comment" component-generator="TextAreaGenerator" read-only="false" />
         <show-association name="bpm:NTISgroupAssignees" display-label-id="wf_adhoc_assign_to" />
      </property-sheet>
   </config>
  
   <config evaluator="node-type" condition="wf:approveStaffTask" replace="true">
      <property-sheet>
         <separator name="sep1" display-label-id="general" component-generator="HeaderSeparatorGenerator" />
         <show-property name="bpm:description" component-generator="TextAreaGenerator" read-only="true"/>
         <show-property name="bpm:dueDate" read-only="true" />
         <show-property name="bpm:priority" read-only="true" />
         <show-property name="bpm:comment" component-generator="TextAreaGenerator" read-only="false" />
         <separator name="sep2" display-label-id="users_and_roles" component-generator="HeaderSeparatorGenerator" />
         <show-association name="bpm:NTISgroupAssignees" display-label-id="wf_adhoc_assign_to" />
      </property-sheet>
   </config>
  
   <config evaluator="node-type" condition="wf:rejectStaffTask" replace="true">
      <property-sheet>
         <separator name="sep1" display-label-id="general" component-generator="HeaderSeparatorGenerator" />
         <show-property name="bpm:description" component-generator="TextAreaGenerator" read-only="true"/>
         <show-property name="bpm:dueDate" read-only="true" />
         <show-property name="bpm:priority" read-only="true" />
         <show-property name="bpm:comment" component-generator="TextAreaGenerator" read-only="false" />
      </property-sheet>
   </config>
  
   <config evaluator="node-type" condition="wf:viewStaffTask" replace="true">
      <property-sheet>
         <separator name="sep1" display-label-id="general" component-generator="HeaderSeparatorGenerator" />
         <show-property name="bpm:description" component-generator="TextAreaGenerator" read-only="true"/>
         <show-property name="bpm:dueDate" read-only="true" />
         <show-property name="bpm:priority" read-only="true" />
         <show-property name="bpm:comment" component-generator="TextAreaGenerator" read-only="false" />
      </property-sheet>
   </config>
  
   <config evaluator="node-type" condition="wf:viewApproveStaffTask" replace="true">
      <property-sheet>
         <separator name="sep1" display-label-id="general" component-generator="HeaderSeparatorGenerator" />
         <show-property name="bpm:description" component-generator="TextAreaGenerator" read-only="true"/>
         <show-property name="bpm:dueDate" read-only="true" />
         <show-property name="bpm:priority" read-only="true" />
         <show-property name="bpm:comment" component-generator="TextAreaGenerator" read-only="false" />
      </property-sheet>
   </config>

But i have error: bpm_NTISgroupAssignees is not defined <<< i defined in web-client-config-propertices.xml
Help me !!!

Outcomes