How to retrieve the child concepts using TIBCO BusinessEvents Query Language (BQL) with parents extID

How to retrieve the child concepts using TIBCO BusinessEvents Query Language (BQL) with parents extID

book

Article ID: KB0086431

calendar_today

Updated On:

Products Versions
TIBCO BusinessEvents Enterprise Edition -
Not Applicable -

Description

Resolution:
Description:
===========
How to retrieve the child concepts using TIBCO BusinessEvents Query Language (BQL) with parents extID

Environment:
===========
TIBCO BusinessEvents 4.x,5.x
All Operating Systems

Symptoms:
=========
BQL:
Select p from /Concepts/slave s where p@parent@extId = 'extIDParent'

fails with exception (Collocated query):
Error [SnapshotQueryManager-1] - [query.stream] [be.agent.query.internal.dynamic]
java.lang.RuntimeException: com.tibco.as.space.ASException: remote_exception
Caused by: com.tibco.as.space.ASRemoteException: java.lang.RuntimeException: deReference: 7, class com.tibco.cep.runtime.model.element.impl.Reference Rule Session is NULL
    at com.tibco.as.space.impl.InvocationDispatcher.invokeMember(InvocationDispatcher.java:218)
Caused by: java.lang.RuntimeException: deReference: 7, class com.tibco.cep.runtime.model.element.impl.Reference Rule Session is NULL
    at com.tibco.cep.runtime.model.element.impl.ConceptImpl.deReference(ConceptImpl.java:305)
    at com.tibco.cep.runtime.model.element.impl.ConceptImpl.deReference(ConceptImpl.java:276)
    at com.tibco.cep.runtime.model.element.impl.ConceptImpl.deReference(ConceptImpl.java:272)
    at com.tibco.cep.runtime.model.element.impl.ConceptImpl.resolveConceptPointer(ConceptImpl.java:348)
    at com.tibco.cep.runtime.model.element.impl.ConceptImpl.getParent(ConceptImpl.java:949)
    at com.tibco.cep.query.stream.impl.expression.attribute.ParentAttributeEvaluator.evaluate(ParentAttributeEvaluator.java:30)
    at com.tibco.cep.query.stream.impl.expression.attribute.ExtIdAttributeEvaluator.evaluate(ExtIdAttributeEvaluator.java:29)
    at com.tibco.cep.query.stream.impl.expression.comparison.EqualityEvaluator.evaluateBoolean(EqualityEvaluator.java:57)
    at com.tibco.cep.query.stream.impl.expression.bool.AndEvaluator.evaluateBoolean(AndEvaluator.java:55)
    at com.tibco.cep.query.stream.impl.expression.bool.AndEvaluator.evaluateBoolean(AndEvaluator.java:55)
    at com.tibco.cep.query.stream.impl.expression.bool.AndEvaluator.evaluate(AndEvaluator.java:41)
    at com.tibco.cep.query.stream.impl.expression.EvaluatorToExtractorAdapter.extract(EvaluatorToExtractorAdapter.java:53)
    at com.tibco.cep.query.stream.impl.rete.expression.ReteEntityFilterImpl.allow(ReteEntityFilterImpl.java:28)
    at com.tibco.cep.query.stream.impl.rete.integ.filter.InterpretingFilter.evaluate(InterpretingFilter.java:67)
    at com.tibco.cep.runtime.service.rmi.ASNonIndexedFilter.evaluate(SourceFile:23)
    at com.tibco.cep.runtime.service.rmi.RemoteInvocableMember.invoke(SourceFile:92)
    at com.tibco.as.space.impl.InvocationDispatcher.invokeMember(InvocationDispatcher.java:207)

    at com.tibco.cep.as.kit.map.SpaceMap.traceAsException(SourceFile:96)
    at com.tibco.cep.as.kit.rmi.InvocationHelper.buildAndInvoke(SourceFile:154)
    at com.tibco.cep.runtime.service.rmi.RemoteFilterRunner.invoke(SourceFile:111)
    at com.tibco.cep.runtime.service.rmi.RemoteFilterRunner.entrySet(SourceFile:46)
    at com.tibco.cep.runtime.service.dao.impl.tibas.ASEntityDao.entrySet(SourceFile:422)
    at com.tibco.cep.query.stream.impl.rete.integ.EntityLoaderImpl.init(EntityLoaderImpl.java:79)
    at com.tibco.cep.query.stream.impl.rete.integ.EntityLoaderImpl.resumeOrStartBatchLoad(EntityLoaderImpl.java:86)
    at com.tibco.cep.query.stream.impl.rete.service.SnapshotQueryFeeder$FeederJob.run(SnapshotQueryFeeder.java:227)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
    at java.util.concurrent.FutureTask.run(FutureTask.java:166)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
    at com.tibco.cep.query.stream.monitor.CustomDaemonThreadFactory$FactoryDaemonThread.run(CustomDaemonThreadFactory.java:65)
Caused by: com.tibco.as.space.ASException: remote_exception
Caused by: com.tibco.as.space.ASRemoteException: java.lang.RuntimeException: deReference: 7, class com.tibco.cep.runtime.model.element.impl.Reference Rule Session is NULL
    at com.tibco.as.space.impl.InvocationDispatcher.invokeMember(InvocationDispatcher.java:218)
Caused by: java.lang.RuntimeException: deReference: 7, class com.tibco.cep.runtime.model.element.impl.Reference Rule Session is NULL
    at com.tibco.cep.runtime.model.element.impl.ConceptImpl.deReference(ConceptImpl.java:305)
    at com.tibco.cep.runtime.model.element.impl.ConceptImpl.deReference(ConceptImpl.java:276)
    at com.tibco.cep.runtime.model.element.impl.ConceptImpl.deReference(ConceptImpl.java:272)
    at com.tibco.cep.runtime.model.element.impl.ConceptImpl.resolveConceptPointer(ConceptImpl.java:348)
    at com.tibco.cep.runtime.model.element.impl.ConceptImpl.getParent(ConceptImpl.java:949)
    at com.tibco.cep.query.stream.impl.expression.attribute.ParentAttributeEvaluator.evaluate(ParentAttributeEvaluator.java:30)
    at com.tibco.cep.query.stream.impl.expression.attribute.ExtIdAttributeEvaluator.evaluate(ExtIdAttributeEvaluator.java:29)
    at com.tibco.cep.query.stream.impl.expression.comparison.EqualityEvaluator.evaluateBoolean(EqualityEvaluator.java:57)
    at com.tibco.cep.query.stream.impl.expression.bool.AndEvaluator.evaluateBoolean(AndEvaluator.java:55)
    at com.tibco.cep.query.stream.impl.expression.bool.AndEvaluator.evaluateBoolean(AndEvaluator.java:55)
    at com.tibco.cep.query.stream.impl.expression.bool.AndEvaluator.evaluate(AndEvaluator.java:41)
    at com.tibco.cep.query.stream.impl.expression.EvaluatorToExtractorAdapter.extract(EvaluatorToExtractorAdapter.java:53)
    at com.tibco.cep.query.stream.impl.rete.expression.ReteEntityFilterImpl.allow(ReteEntityFilterImpl.java:28)
    at com.tibco.cep.query.stream.impl.rete.integ.filter.InterpretingFilter.evaluate(InterpretingFilter.java:67)
    at com.tibco.cep.runtime.service.rmi.ASNonIndexedFilter.evaluate(SourceFile:23)
    at com.tibco.cep.runtime.service.rmi.RemoteInvocableMember.invoke(SourceFile:92)
    at com.tibco.as.space.impl.InvocationDispatcher.invokeMember(InvocationDispatcher.java:207)

    at JRemoteService.invoke(JRemoteService.cpp:314)
    at com.tibco.as.space.impl.ResultHelper.MakeInvokeResultList(ResultHelper.java:83)
    at com.tibco.as.space.impl.ASSpace.invokeMembers(ASSpace.java:671)
    at com.tibco.as.space.impl.ASSpace.invokeSeeders(ASSpace.java:708)
    at com.tibco.as.space.impl.ASSpace.invokeSeeders(ASSpace.java:1721)
    at com.tibco.cep.as.kit.rmi.InvocationHelper.buildAndInvoke(SourceFile:140)
    ... 12 more

Cause:
======
BQL syntax

Resolution:
========
Update BQL and use:

select s from /Concepts/Slave s, /Concepts/Master m
              where m@extId = '&ltextIDMaster>' and s@parent = m;

Issue/Introduction

How to retrieve the child concepts using TIBCO BusinessEvents Query Language (BQL) with parents extID