This discussion is archived
1 Reply Latest reply: Nov 25, 2013 12:33 AM by JahangirPasha RSS

queryInstances() from IInstanceQueryInput Interface.

sgumpula Newbie
Currently Being Moderated

Hello Everyone,


We have a requirement to retrieve "CompositeInstanceId ", "CompositeName" values of all the composites with the same ProtectTextAttribute1 value.

Used the below code :


            IInstanceQueryService queryService = getBPMServiceClient().getInstanceQueryService();

            IBPMContext bpmContext = getIBPMContext("weblogic", "Welkom01");

            List<Column> columns = new ArrayList<Column>();

            columns.add(IColumnConstants.PROCESS_ID_COLUMN);

            Predicate pred = new Predicate(Column.getColumn("PROTECTEDTEXTATTRIBUTE1"), Predicate.OP_EQ, "2011");

            IInstanceQueryInput input = new InstanceQueryInput();

            input.setAssignmentFilter(IInstanceQueryInput.AssignmentFilter.MY_AND_GROUP);

           

            List<IProcessInstance> processInstances =

                queryService.queryInstances(bpmContext, columns, pred, null,

                                                   input);


Its returning an empty list, even though there is matching PROTECTEDTEXTATTRIBUTE1 value.


Also the below methods are returning null :

            for (IProcessInstance instance : processInstances) {

                System.out.println(instance.getSystemAttributes().getProcessInstanceId()     

                                    + "\t\t" + instance.getSca().getCompositeInstanceId()

                                    + "\t\t" + instance.getSca().getCompositeName());

 

The instance.getSca().getCompositeInstanceId() and nstance.getSca().getCompositeName()) returning null values.

 

Any ideas?

 

Regards,

Subhashini

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points