use of org.activiti.engine.ActivitiIllegalArgumentException in project Activiti by Activiti.
the class DelegateExpressionTaskListener method notify.
public void notify(DelegateTask delegateTask) {
// Note: we can't cache the result of the expression, because the
// execution can change: eg. delegateExpression='${mySpringBeanFactory.randomSpringBean()}'
Object delegate = expression.getValue(delegateTask.getExecution());
ClassDelegate.applyFieldDeclaration(fieldDeclarations, delegate);
if (delegate instanceof TaskListener) {
try {
Context.getProcessEngineConfiguration().getDelegateInterceptor().handleInvocation(new TaskListenerInvocation((TaskListener) delegate, delegateTask));
} catch (Exception e) {
throw new ActivitiException("Exception while invoking TaskListener: " + e.getMessage(), e);
}
} else {
throw new ActivitiIllegalArgumentException("Delegate expression " + expression + " did not resolve to an implementation of " + TaskListener.class);
}
}
use of org.activiti.engine.ActivitiIllegalArgumentException in project Activiti by Activiti.
the class UserQueryTest method testQueryByInvalidEmailLike.
public void testQueryByInvalidEmailLike() {
UserQuery query = identityService.createUserQuery().userEmailLike("%invalid%");
verifyQueryResults(query, 0);
try {
identityService.createUserQuery().userEmailLike(null).singleResult();
fail();
} catch (ActivitiIllegalArgumentException e) {
}
}
use of org.activiti.engine.ActivitiIllegalArgumentException in project Activiti by Activiti.
the class GroupQueryTest method testQueryByInvalidName.
public void testQueryByInvalidName() {
GroupQuery query = identityService.createGroupQuery().groupName("invalid");
verifyQueryResults(query, 0);
try {
identityService.createGroupQuery().groupName(null).list();
fail();
} catch (ActivitiIllegalArgumentException e) {
}
}
use of org.activiti.engine.ActivitiIllegalArgumentException in project Activiti by Activiti.
the class GroupQueryTest method testQueryByInvalidId.
public void testQueryByInvalidId() {
GroupQuery query = identityService.createGroupQuery().groupId("invalid");
verifyQueryResults(query, 0);
try {
identityService.createGroupQuery().groupId(null).list();
fail();
} catch (ActivitiIllegalArgumentException e) {
}
}
use of org.activiti.engine.ActivitiIllegalArgumentException in project Activiti by Activiti.
the class UserQueryTest method testQueryByInvalidFirstNameLike.
public void testQueryByInvalidFirstNameLike() {
UserQuery query = identityService.createUserQuery().userFirstNameLike("%mispiggy%");
verifyQueryResults(query, 0);
try {
identityService.createUserQuery().userFirstNameLike(null).singleResult();
fail();
} catch (ActivitiIllegalArgumentException e) {
}
}
Aggregations