02-21-2014 06:09 AM
List<Execution> executions = runtimeService.createExecutionQuery()
.signalEventSubscriptionName(signalName)
.list();
List<Execution> executions = runtimeService.createExecutionQuery()
.signalEventSubscriptionName(signalName)
.processInstanceId(processInstanceId)
.list();
02-21-2014 08:03 AM
02-21-2014 01:11 PM
06-29-2015 03:51 AM
06-30-2015 04:11 PM
07-02-2015 03:00 AM
07-02-2015 11:34 AM
.setProperty("processesWithVar").groovy("return exchange.context.registry.lookupByName('runtimeService').createExecutionQuery().variableValueEquals('messageDiscriminator', exchange.properties['discriminator']).list().collect({ex -> ex.processInstanceId})")
.log("list of process ids with discriminator= '${property.processesWithVar}'")
.setProperty("processesWithMessageSubscription").groovy("return exchange.context.registry.lookupByName('runtimeService').createExecutionQuery().messageEventSubscriptionName('someEvent').list().collect({ex -> ex.processInstanceId})")
.log("list of process ids with subscription = '${property.processesWithMessageSubscription}'")
.setProperty("processIdList").groovy("return exchange.properties['processesWithMessageSubscription'].intersect(exchange.properties['processesWithVar'])")
.log("(intersection) property processIdList = '${property.processIdList}'")
Realizing this, I did two separate queries and found the intersection using Groovy. It's Groovy, but would be even groovier if I could use one compound query.
.setProperty("processIdList").groovy("return exchange.context.registry.lookupByName('runtimeService').createExecutionQuery().messageEventSubscriptionName('someEvent').variableValueEquals('messageDiscriminator', exchange.properties['discriminator']).list().collect({ex -> ex.processInstanceId})")
Unfortunately, the join goes badly and I always get an empty list.Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.