01-04-2014 07:29 PM
// find the wait task that is awaiting a mailing response signal
Execution execution = runtimeService.createExecutionQuery()
.activityId("awaitYearlyMailingResponse")
.processInstanceBusinessKey(PROSPECT_MAILING_PROCESS_BUSINESS_KEY)
.singleResult();
////////////////////////////////////////////////////////
// This fails, as execution is unexpectedly null here //
////////////////////////////////////////////////////////
assertNotNull(execution);
// deliver receive mailing response signal
runtimeService.signal(execution.getId(),
Collections.singletonMap("askedOffMailingList", (Object) false)); // was not an ask-off-list response
ProcessInstance processInstance = runtimeService
.createProcessInstanceQuery()
.processInstanceBusinessKey(PROSPECT_MAILING_PROCESS_BUSINESS_KEY)
.singleResult();
// find the wait task that is awaiting a mailing response signal
Execution execution = runtimeService.createExecutionQuery()
.activityId("awaitYearlyMailingResponse")
.processInstanceBusinessKey(processInstance.getId())
.singleResult();
//////////////////////////////////////////////////////////////////////////////////
// Returns expected result, but why should I have to do two queries? 😞 *pouts* //
//////////////////////////////////////////////////////////////////////////////////
assertNotNull(execution);
// deliver receive mailing response signal
runtimeService.signal(execution.getId(),
Collections.singletonMap("askedOffMailingList", (Object) false)); // was not an ask-off-list response
01-06-2014 07:27 AM
01-06-2014 07:28 AM
01-08-2014 12:19 AM
01-08-2014 12:22 AM
01-08-2014 04:37 AM
01-09-2014 10:27 PM
01-15-2014 01:53 AM
01-15-2014 04:07 AM
01-15-2014 05:07 AM
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.