Search in sources :

Example 96 with ActivitiIllegalArgumentException

use of org.activiti.engine.ActivitiIllegalArgumentException in project Activiti by Activiti.

the class DeploymentQueryTest method testQueryByInvalidDeploymentId.

public void testQueryByInvalidDeploymentId() {
    DeploymentQuery query = repositoryService.createDeploymentQuery().deploymentId("invalid");
    assertNull(query.singleResult());
    assertEquals(0, query.list().size());
    assertEquals(0, query.count());
    try {
        repositoryService.createDeploymentQuery().deploymentId(null);
        fail();
    } catch (ActivitiIllegalArgumentException e) {
    }
}
Also used : DeploymentQuery(org.activiti.engine.repository.DeploymentQuery) ActivitiIllegalArgumentException(org.activiti.engine.ActivitiIllegalArgumentException)

Example 97 with ActivitiIllegalArgumentException

use of org.activiti.engine.ActivitiIllegalArgumentException in project Activiti by Activiti.

the class DeploymentQueryTest method testQueryByInvalidName.

public void testQueryByInvalidName() {
    DeploymentQuery query = repositoryService.createDeploymentQuery().deploymentName("invalid");
    assertNull(query.singleResult());
    assertEquals(0, query.list().size());
    assertEquals(0, query.count());
    try {
        repositoryService.createDeploymentQuery().deploymentName(null);
        fail();
    } catch (ActivitiIllegalArgumentException e) {
    }
}
Also used : DeploymentQuery(org.activiti.engine.repository.DeploymentQuery) ActivitiIllegalArgumentException(org.activiti.engine.ActivitiIllegalArgumentException)

Example 98 with ActivitiIllegalArgumentException

use of org.activiti.engine.ActivitiIllegalArgumentException in project Activiti by Activiti.

the class UserQueryTest method testQueryByInvalidId.

public void testQueryByInvalidId() {
    UserQuery query = identityService.createUserQuery().userId("invalid");
    verifyQueryResults(query, 0);
    try {
        identityService.createUserQuery().userId(null).singleResult();
        fail();
    } catch (ActivitiIllegalArgumentException e) {
    }
}
Also used : ActivitiIllegalArgumentException(org.activiti.engine.ActivitiIllegalArgumentException) UserQuery(org.activiti.engine.identity.UserQuery)

Example 99 with ActivitiIllegalArgumentException

use of org.activiti.engine.ActivitiIllegalArgumentException in project Activiti by Activiti.

the class JobQueryTest method testQueryByInvalidProcessInstanceId.

public void testQueryByInvalidProcessInstanceId() {
    JobQuery query = managementService.createJobQuery().processInstanceId("invalid");
    verifyQueryResults(query, 0);
    try {
        managementService.createJobQuery().processInstanceId(null);
        fail();
    } catch (ActivitiIllegalArgumentException e) {
    }
}
Also used : ActivitiIllegalArgumentException(org.activiti.engine.ActivitiIllegalArgumentException) JobQuery(org.activiti.engine.runtime.JobQuery)

Example 100 with ActivitiIllegalArgumentException

use of org.activiti.engine.ActivitiIllegalArgumentException in project Activiti by Activiti.

the class ProcessDefinitionQueryTest method testQueryByInvalidKey.

public void testQueryByInvalidKey() {
    ProcessDefinitionQuery query = repositoryService.createProcessDefinitionQuery().processDefinitionKey("invalid");
    verifyQueryResults(query, 0);
    try {
        repositoryService.createProcessDefinitionQuery().processDefinitionKey(null);
        fail();
    } catch (ActivitiIllegalArgumentException e) {
    }
}
Also used : ActivitiIllegalArgumentException(org.activiti.engine.ActivitiIllegalArgumentException) ProcessDefinitionQuery(org.activiti.engine.repository.ProcessDefinitionQuery)

Aggregations

ActivitiIllegalArgumentException (org.activiti.engine.ActivitiIllegalArgumentException)154 ActivitiException (org.activiti.engine.ActivitiException)32 ActivitiObjectNotFoundException (org.activiti.engine.ActivitiObjectNotFoundException)31 RequestMapping (org.springframework.web.bind.annotation.RequestMapping)27 HashMap (java.util.HashMap)24 ProcessInstance (org.activiti.engine.runtime.ProcessInstance)20 Deployment (org.activiti.engine.test.Deployment)16 ArrayList (java.util.ArrayList)12 TaskQuery (org.activiti.engine.task.TaskQuery)12 ExecutionEntity (org.activiti.engine.impl.persistence.entity.ExecutionEntity)11 MultipartHttpServletRequest (org.springframework.web.multipart.MultipartHttpServletRequest)10 ProcessDefinitionEntity (org.activiti.engine.impl.persistence.entity.ProcessDefinitionEntity)9 RestVariable (org.activiti.rest.service.api.engine.variable.RestVariable)9 UserQuery (org.activiti.engine.identity.UserQuery)8 Execution (org.activiti.engine.runtime.Execution)8 QueryVariable (org.activiti.rest.service.api.engine.variable.QueryVariable)8 ProcessDefinition (org.activiti.engine.repository.ProcessDefinition)7 HistoricProcessInstance (org.activiti.engine.history.HistoricProcessInstance)6 RestVariableScope (org.activiti.rest.service.api.engine.variable.RestVariable.RestVariableScope)6 MultipartFile (org.springframework.web.multipart.MultipartFile)6