org.activiti.engine.impl.cmd.AbstractCustomSqlExecution Java Examples

The following examples show how to use org.activiti.engine.impl.cmd.AbstractCustomSqlExecution. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: CustomMybatisMapperConfigurationTest.java    From activiti6-boot2 with Apache License 2.0 5 votes vote down vote up
@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);
}