Hello,
i want to set a filter to the worklistcriteria with 8 filter fields but a error occured : "Destination array was not long enough. Check destIndex and length, and the array's lower bounds". Is there a limit for using filterfields?? 4 filterfields is no problem, but not more than this amount.
Greetings Edwin
Page 1 / 1
Hi,
I don't think there's a limit on the number of Filter fields and if there is a limit I think it would be more than 8.
Can you please post your list of Filters you're trying to implement? And...
Also, please post your required logical grouping you would like to get back i.e. '(A or and (A or C) or D'
Regards,
Ockert
I don't think there's a limit on the number of Filter fields and if there is a limit I think it would be more than 8.
Can you please post your list of Filters you're trying to implement? And...
Also, please post your required logical grouping you would like to get back i.e. '(A or and (A or C) or D'
Regards,
Ockert
Hi,
this is the code I try to execute:
SourceCode.K2ROM.WorklistCriteria oWorklistCriteria = new WorklistCriteria();
//Specify all the required filters
oWorklistCriteria.Platform = ("ASP");
// All running en active processes
// All activities -> open en available
// A: SourceCode.K2ROM.ProcInstStatus.Running
// B: SourceCode.K2ROM.ProcInstStatus.Active
// C: SourceCode.K2ROM.WorklistStatus.Available
// SourceCode.K2ROM.WorklistStatus.Open
// (A OR AND (C OR D) -> A AND C
// OR
// A AND D
// OR
// B AND C
// OR
// B AND D
oWorklistCriteria.AddFilterField(SourceCode.K2ROM.WCLogical.And, SourceCode.K2ROM.WCField.ProcessStatus,
SourceCode.K2ROM.WCCompare.Equal, SourceCode.K2ROM.ProcInstStatus.Running );
oWorklistCriteria.AddFilterField(SourceCode.K2ROM.WCLogical.And, SourceCode.K2ROM.WCField.WorklistItemStatus,
SourceCode.K2ROM.WCCompare.Equal, SourceCode.K2ROM.WorklistStatus.Available );
oWorklistCriteria.AddFilterField(SourceCode.K2ROM.WCLogical.Or, SourceCode.K2ROM.WCField.ProcessStatus,
SourceCode.K2ROM.WCCompare.Equal, SourceCode.K2ROM.ProcInstStatus.Running );
oWorklistCriteria.AddFilterField(SourceCode.K2ROM.WCLogical.And, SourceCode.K2ROM.WCField.WorklistItemStatus,
SourceCode.K2ROM.WCCompare.Equal, SourceCode.K2ROM.WorklistStatus.Open );
// Proces is Active
oWorklistCriteria.AddFilterField(SourceCode.K2ROM.WCLogical.And, SourceCode.K2ROM.WCField.ProcessStatus,
SourceCode.K2ROM.WCCompare.Equal, SourceCode.K2ROM.ProcInstStatus.Active );
oWorklistCriteria.AddFilterField(SourceCode.K2ROM.WCLogical.And, SourceCode.K2ROM.WCField.WorklistItemStatus,
SourceCode.K2ROM.WCCompare.Equal, SourceCode.K2ROM.WorklistStatus.Available );
oWorklistCriteria.AddFilterField(SourceCode.K2ROM.WCLogical.Or, SourceCode.K2ROM.WCField.ProcessStatus,
SourceCode.K2ROM.WCCompare.Equal, SourceCode.K2ROM.ProcInstStatus.Active );
oWorklistCriteria.AddFilterField(SourceCode.K2ROM.WCLogical.And, SourceCode.K2ROM.WCField.WorklistItemStatus,
SourceCode.K2ROM.WCCompare.Equal, SourceCode.K2ROM.WorklistStatus.Open );
SourceCode.K2ROM.Worklist worklist = fK2Connection.OpenWorklist(oWorklistCriteria);
Greetings Edwin
this is the code I try to execute:
SourceCode.K2ROM.WorklistCriteria oWorklistCriteria = new WorklistCriteria();
//Specify all the required filters
oWorklistCriteria.Platform = ("ASP");
// All running en active processes
// All activities -> open en available
// A: SourceCode.K2ROM.ProcInstStatus.Running
// B: SourceCode.K2ROM.ProcInstStatus.Active
// C: SourceCode.K2ROM.WorklistStatus.Available
// SourceCode.K2ROM.WorklistStatus.Open
// (A OR AND (C OR D) -> A AND C
// OR
// A AND D
// OR
// B AND C
// OR
// B AND D
oWorklistCriteria.AddFilterField(SourceCode.K2ROM.WCLogical.And, SourceCode.K2ROM.WCField.ProcessStatus,
SourceCode.K2ROM.WCCompare.Equal, SourceCode.K2ROM.ProcInstStatus.Running );
oWorklistCriteria.AddFilterField(SourceCode.K2ROM.WCLogical.And, SourceCode.K2ROM.WCField.WorklistItemStatus,
SourceCode.K2ROM.WCCompare.Equal, SourceCode.K2ROM.WorklistStatus.Available );
oWorklistCriteria.AddFilterField(SourceCode.K2ROM.WCLogical.Or, SourceCode.K2ROM.WCField.ProcessStatus,
SourceCode.K2ROM.WCCompare.Equal, SourceCode.K2ROM.ProcInstStatus.Running );
oWorklistCriteria.AddFilterField(SourceCode.K2ROM.WCLogical.And, SourceCode.K2ROM.WCField.WorklistItemStatus,
SourceCode.K2ROM.WCCompare.Equal, SourceCode.K2ROM.WorklistStatus.Open );
// Proces is Active
oWorklistCriteria.AddFilterField(SourceCode.K2ROM.WCLogical.And, SourceCode.K2ROM.WCField.ProcessStatus,
SourceCode.K2ROM.WCCompare.Equal, SourceCode.K2ROM.ProcInstStatus.Active );
oWorklistCriteria.AddFilterField(SourceCode.K2ROM.WCLogical.And, SourceCode.K2ROM.WCField.WorklistItemStatus,
SourceCode.K2ROM.WCCompare.Equal, SourceCode.K2ROM.WorklistStatus.Available );
oWorklistCriteria.AddFilterField(SourceCode.K2ROM.WCLogical.Or, SourceCode.K2ROM.WCField.ProcessStatus,
SourceCode.K2ROM.WCCompare.Equal, SourceCode.K2ROM.ProcInstStatus.Active );
oWorklistCriteria.AddFilterField(SourceCode.K2ROM.WCLogical.And, SourceCode.K2ROM.WCField.WorklistItemStatus,
SourceCode.K2ROM.WCCompare.Equal, SourceCode.K2ROM.WorklistStatus.Open );
SourceCode.K2ROM.Worklist worklist = fK2Connection.OpenWorklist(oWorklistCriteria);
Greetings Edwin
Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.