Search in sources :

Example 1 with CustomMybatisMapper

use of activiti.mappers.CustomMybatisMapper in project Activiti by Activiti.

the class CustomMybatisMapperConfigurationTest method executeCustomMybatisMapperQuery.

@Test
public void executeCustomMybatisMapperQuery() throws Exception {
    AnnotationConfigApplicationContext applicationContext = this.context(Application.class);
    ManagementService managementService = applicationContext.getBean(ManagementService.class);
    String processDefinitionId = managementService.executeCustomSql(new AbstractCustomSqlExecution<CustomMybatisMapper, String>(CustomMybatisMapper.class) {

        @Override
        public String execute(CustomMybatisMapper customMybatisMapper) {
            return customMybatisMapper.loadProcessDefinitionIdByKey("waiter");
        }
    });
    Assert.assertNotNull("the processDefinitionId should not be null!", processDefinitionId);
}
Also used : AnnotationConfigApplicationContext(org.springframework.context.annotation.AnnotationConfigApplicationContext) ManagementService(org.activiti.engine.ManagementService) CustomMybatisMapper(activiti.mappers.CustomMybatisMapper) Test(org.junit.Test)

Aggregations

CustomMybatisMapper (activiti.mappers.CustomMybatisMapper)1 ManagementService (org.activiti.engine.ManagementService)1 Test (org.junit.Test)1 AnnotationConfigApplicationContext (org.springframework.context.annotation.AnnotationConfigApplicationContext)1