Get and Update Workflow data in Filenet

863 Views Asked by At

I am having a hard time figuring out how I will get the workflow data from Filenet. I tried using process engine and content engine but I am lost on where to look at. Should I use PE or CE? also what particular part in the API?

I can already get the list of object stores from CE. Also I can already get the list of search parameters are its data from the PE, but I am lost on how to get the workflow step properties and its data and possible update it thru JAVA API.

1

There are 1 best solutions below

0
On

You need to query for the workitems using PE API. Assuming workitems are in a queue then,

VWQueueQuery vwQueueQuery = **yourqueue**.createQuery(java.lang.String indexName, java.lang.Object[] firstValues, java.lang.Object[] lastValues, int queryFlags, java.lang.String filter, java.lang.Object[] substitutionVars, int fetchType)

then

while (vwQueueQuery.hasNext()) {
         vwStepElement = (VWStepElement) vwQueueQuery.next();

    //lock if you want to modify the workitem
        vwStepElement.doLock(true);
//once you have vwstepelement, there are different ways to get properties
String[] properties = vwStepElement.getParameterNames();//this will give you all the properties that are exposed for that queue.
//if you want to get a specific property then use
Object specificParameter = vwStepElement.getParameterValue("propName");
//then if you want to set a value
vwStepElement.setParameterValue(parameterName, parameterValue, compareValue);
//finally, if you want save and dispatch to next level
vwStepElement.setSelectedResponse(response);
vwStepElement.doSave(true);
vwStepElement.doDispatch();
    }