how to create the WorkItemFilter object | Community
Skip to main content
New Participant
April 27, 2016
Solved

how to create the WorkItemFilter object

  • April 27, 2016
  • 2 replies
  • 1013 views

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.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by WillMc1

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

2 replies

smacdonald2008
New Participant
April 27, 2016
WillMc1Accepted solution
Employee
April 27, 2016

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