Hi,
at AIESEC we are experiencing a pretty weird problem with the bugtracker, caused by the workflow module. I would really like your input on the best way to solve this bug:
The actual bug was that no bug report could be displayed anymore, instead returning the Oracle error message "cannot have more than 1000 expressions in a list". This is caused by the following query in /packages/workflow/tcl/case-procs-oracle.xql
, called by the procedure workflow::case::role::get_picklist
select acs_object.name(p.party_id) || ' (' || p.email || ')' as label, p.party_id
from parties p
where p.party_id in ([join $party_id_list ", "])
order by label
That $party_id_list has over 1000 items in our installation. It is generated by the following query in
/packages/workflow/tcl/implementation-procs.xql
, called by the procedure
workflow::impl::role_assignee_pick_list::current_assignees::get_pick_list
select m.party_id
from workflow_case_role_party_map m,
workflow_cases c
where m.role_id = :role_id
and m.case_id = c.case_id
and c.workflow_id = (select workflow_id from workflow_cases where case_id = :case_id)
Now there are two specific points/questions I have about this:
- For some reason the first query returns information on only a very limited set of party_id's. I.e. if 999 items exist in party_id_list, information is returned only about 30. As far as I can judge, this can only happen if the party_id_list contains lots of ids that are in fact _not_ party_ids. Am I correct? How does this happen?
- What is the best way to redeem this problem? Right now I am simply cutting off the party_id_list after item 999. This cannot be the solution 😉. I am sure there is a proper way, however I do not feel comfortable enough with the workflow package to judge where to make which changes. Any comments are welcome.
Thanks, Markus