Expand my Community achievements bar.

SOLVED

how to create the WorkItemFilter object

Avatar

Level 2

Hi,

I have a requirement like below,

I need to find the assets associcate with specific workflow

to achieve this one way is

I can get all the active  com.adobe.granite.workflow.exec.WorkItem[] workItems from the workflowSession then iterate each one and compare with the workflowid

this may cause the performance issue while loading the page

--- other work around is using 

ResultSet<WorkItem> getActiveWorkItems(long start, long limit,WorkItemFilter filter) throws WorkflowException from the workflowSession 

but I am not sure about the params of this method 

what I guess start is 0/1 (indicating the first active workflow model) , limit is activeworkflow max size

and third one is 

WorkItemFilter ( this may be used with required workflow model what we required to compare)

I am not sure how to create WorkItemFilter with the given workflow model/object 

can any one help me on this.

thanks.

Saleem.

1 Accepted Solution

Avatar

Correct answer by
Employee

Hi - 

I am a bit confused, if you know the workflow you are interested in, it has a payload, and that payload points to the asset in question.  What information are you hoping to query for?

The WorkitemFilter is a bit decieving, there is no implementation provided you must implement your own class and pass it in.  This filter does not alter the query that is performed, it is used to post process the results of the query.  In your case it won't be any more performant than not providing the filter and post processing the results.

Will

View solution in original post

2 Replies

Avatar

Correct answer by
Employee

Hi - 

I am a bit confused, if you know the workflow you are interested in, it has a payload, and that payload points to the asset in question.  What information are you hoping to query for?

The WorkitemFilter is a bit decieving, there is no implementation provided you must implement your own class and pass it in.  This filter does not alter the query that is performed, it is used to post process the results of the query.  In your case it won't be any more performant than not providing the filter and post processing the results.

Will