cancel
Showing results for 
Search instead for 
Did you mean: 

Parameter is not defined !

vinaxwater
Champ in-the-making
Champ in-the-making
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 !!!
9 REPLIES 9

vinaxwater
Champ in-the-making
Champ in-the-making
when i have report error: "bpm_assignees" is not defined <<< I defined in file Model + web-client-config-properties.xml + process. I don't understand for this error. Please help me, thanks !

algoworks
Champ in-the-making
Champ in-the-making
All custom aspects should be defined in your model xml file under "aspects" node, see below for an example:

        <aspect name="wfcustom:customassignees">
      <associations>
         <association name="wfcustom:customassignees">
            <source>
               <mandatory>false</mandatory>
               <many>false</many>
            </source>
            <target>
               <class>cm:person</class>
               <mandatory>true</mandatory>
               <many>true</many>
            </target>
         </association>
      </associations>
   </aspect>
Hope this helps.

Thanks,
Algoworks Alfresco Team
http://www.algoworks.com

vinaxwater
Champ in-the-making
Champ in-the-making
Thanks for reply ! I defined bpm_NTISgroupAssignees in bpmModel.xml

<aspects>
  <aspect name="bpm_NTISgroupAssignees">
      <associations>
          <association name="bpm_NTISgroupAssignees">
                 <source>
                     <mandatory>false</mandatory>
                     <many>false</many>
                 </source>
                 <target>
                      <class>cm:person</class>
                      <mandatory>true</mandatory>
                      <many>false</many>
                </target>
       </association>
    </associations>
  </aspect>
</aspects>
I saw it  in GUI of Webclient but i have that error. I check for 3 Node with use Foreach in every Node I will the same error. Thanks!

algoworks
Champ in-the-making
Champ in-the-making
The aspect you defined will not support foreach. Reason is explained below:

The aspect definition has "target" defined as


<target>
    <class>cm:person</class>
    <mandatory>true</mandatory>
    <many>false</many>
</target>

The problem lies in "<many>false</many>". Please make it "<many>true</many>" and it should work.

Please let us know in case of any issues.

Regards,
Algoworks Alfresco Team
http://www.algoworks.com

vinaxwater
Champ in-the-making
Champ in-the-making
Thanks for reply ! I repaired at:


<aspect name="bpm:NTISgroupAssignees">
            <associations>

                <association name="bpm:NTISgroupAssignees">
                    <source>
                        <mandatory>false</mandatory>
                        <many>false</many>
                    </source>
                    <target>
                        <!– TODO: Refactor when group is pulled into content model –>
                        <class>cm:person</class>
                        <mandatory>true</mandatory>
                        <many>true</many>
                    </target>
                </association>

            </associations>
        </aspect>

But it only create 2 tast first and second. At third task can not create with error "bpm:NTISgroupAssignees is not defined"
Note: It is show in GUI for choose user assignees for third task.

algoworks
Champ in-the-making
Champ in-the-making
Can you please share your current process definition xml file and let us know which task fails with the error you mentioned?

Thanks,
Algoworks Alfresco Team
http://www.algoworks.com

vinaxwater
Champ in-the-making
Champ in-the-making
OK! This is advance from Adhoc processs:
[img]http://chiase.anhso.net/as/08/11/25/temp653653.jpg[/img]

I have 3 task and group assigneed for every task:
Therefore I use foreach in Note object before Task. This code the same for every Task:

<node name="nodeapproved">
     <action class="org.alfresco.repo.workflow.jbpm.ForEachFork">
       <foreach>#{people.getMembers(bpm_groupAssignee)}</foreach>
           <var>user</var>
     </action>
     <transition to="adhoc"></transition>
</node>

In code of Task i have this line assignee:

<task name="wf:adhocTask" >
   <assignment class="org.alfresco.repo.workflow.jbpm.AlfrescoAssignment">
           <actor>#{user}</actor>
   </assignment>
</task>

It work with process: start -> adhoc -> viewed (the mean is: the task adhoc and viewed created normal) But user receive task viewed choose group assignee for task completed when i have error bpm_groupAssignee is not defined in log file

Please help me!

algoworks
Champ in-the-making
Champ in-the-making
We would need more information about process definition xml file. Meanwhile, will you please try the following:

Define a swimlane like this


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

And use this swimlane in your task assignment for "wf:adhocTask".

Hope this helps.

Thanks,
Algoworks Alfresco Team
http://www.algoworks.com

vinaxwater
Champ in-the-making
Champ in-the-making
Dear!

I can't use tab <pooledactors></pooledactors> it not satisfy my work. If I use tab <pooledactors></pooledactors> when member of group assigneed task done task is member's task remaining not exist. Therefore, I use tab <foreach></foreach> for get all action from member in group assigneed.

    <action class="org.alfresco.repo.workflow.jbpm.ForEachFork">
         <foreach>#{people.getMembers(bpm_groupAssignees)}</foreach>
         <var>user</var>
    </action>

This code in addHoc process. It's not working with 3 node have use tab foreach :


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

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

   <swimlane name="initiator" />

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

   <task-node name="adhoc">
      <task name="wf:adhocTask">
         <assignment class="org.alfresco.repo.workflow.jbpm.AlfrescoAssignment">
            <actor>#{user}</actor>
         </assignment>
      </task>
      <transition name="view" to="node2"></transition>
   </task-node>

   <task-node name="completed">
      <task name="wf:completedAdhocTask">
         <assignment class="org.alfresco.repo.workflow.jbpm.AlfrescoAssignment">
            <actor>#{user}</actor>
         </assignment>
      </task>
      <transition name="" to="end"/>
   </task-node>

   <node name="node1">
      <action class="org.alfresco.repo.workflow.jbpm.ForEachFork">
         <foreach>#{people.getMembers(bpm_groupAssignees)}</foreach>
         <var>user</var>
      </action>
      <transition to="adhoc"></transition>
   </node>

   <node name="node2">
      <action class="org.alfresco.repo.workflow.jbpm.ForEachFork">
         <foreach>#{people.getMembers(bpm_groupAssignees)}</foreach>
         <var>user</var>
      </action>
      <transition to="viewed"></transition>
   </node>

   <task-node name="viewed">
      <task name="wf:viewedAdhocTask">
         <assignment class="org.alfresco.repo.workflow.jbpm.AlfrescoAssignment">
            <actor>#{user}</actor>
         </assignment>
      </task>
      <transition name="completed" to="node3"></transition>
   </task-node>

   <node name="node3">
      <action class="org.alfresco.repo.workflow.jbpm.ForEachFork">
         <foreach>#{people.getMembers(bpm_groupAssignees)}</foreach>
         <var>user</var>
      </action>
      <transition to="completed"></transition>
   </node>

   <end-state name="end" />

</process-definition>

Node: parameters show in GUI normal and defined in workflowModel. I have error bpm_groupAssignees is not defined.. I don't understand. help me! Thanks

Regards.