Issue 31181  —   Calling an occurrence operation with parameter(s) fails with retrieve/a

Status:   Solved in 10.2.01

Solution available in patch(es):      MG01

Description:

 Summary:
 When an occurrence operation with parameter(s) is called in the context of a
 retrieve/a instruction then this will fail with the error -1122 (Wrong number
 of arguments). When the operation has no parameter then the call works fine.

 Environment:
  +Uniface: Version 8.1.01 and higher
  +Operating System: OS independent
  +Database: DBMS independent

 Symptoms:
 When an occurrence operation with parameter(s) is called in the context of a
 retrieve/a instruction then this will fail with the error -1122 (Wrong number
 of arguments). When the operation has no parameter then the call seems to work
 fine.

 Consider the following scenario:

 - The form FRM1 has the entity ENT1 painted
 - In the Occurrence operations trigger of ENT1 the operation
   occOper1Ent1 is defined with one parameter
 - In the Read trigger the occurrence operation occOperEnt1 is
   called; e.g.

     read
     if ($status >= 0)
       vStatus = $occHandle->occOper1Ent1("Process")
     endif
     return($status)

 - In the Exec trigger of FRM1 the following code is executed:

     FLD1.ENT1/init = "ABC"
     retrieve/e "ENT1"

     creocc "ENT1", -1
     FLD1.ENT1/init = "XYZ"
     retrieve/a "ENT1"

 Result: when the Read trigger is fired by retrieve/e then
 all the calls of the occurrence operation occOper1Ent1 are successful,
 but when the Read trigger is fired by retrieve/a (retrieve additional
 occurrences without discarding the hitlist) then all the calls of the
 occurrence operation occOper1Ent1 will fail with the error
    -1122 - Wrong number of arguments.

 The problem does not occur when the occurrence operation has
 no parameters defined.

Workaround:

 Instead of Occurrence Operations use Collection Operations.

Notes: