shchienko
(Nikita Schienko)
30.Октябрь.2024 14:42:02
2
Здравствуйте,
Для версии 2.3 мы в экспериментальном формате реализовывали REST API starter для BPM, поэтому не делали подробную документацию, вы можете подключить стартер для BPM REST API добавив зависимость:
implementation 'io.jmix.bpm:jmix-bpm-rest-starter'
В новой версии 2.4 данный стартер будут удалены, в скором времени описания подключения напрямую через flowable зависимость будет добавлено в документацию, а пока можно прочитать информацию здесь:
открытые 01:42PM - 28 Feb 24 UTC
закрытые 07:00AM - 14 Oct 24 UTC
size: M
in: bpm
There is a `io.jmix.bpm:jmix-bpm-rest-starter` in the repository.
This starter… attaches standard Flowable REST API endpoints to the project.
We need to analyze:
* how security configuration may look like for securing Flowable endpoints
* analyze if any modifications are required for the `jmix-bpm-rest`
* write documentation for this starter
An example of security configuration that may be defined in the project:
```java
@Configuration
public class BpmRestSecurityConfiguration {
@Bean
@Order(JmixSecurityFilterChainOrder.AUTHSERVER_RESOURCE_SERVER - 10)
SecurityFilterChain bpmRestSecurityFilterChain(HttpSecurity http,
AuthenticationManager authenticationManager
) throws Exception {
http.securityMatcher(new AntPathRequestMatcher("/rest/bpm/**"))
.httpBasic(Customizer.withDefaults())
.authenticationManager(authenticationManager)
.authorizeHttpRequests(requests -> requests.anyRequest().authenticated());
return http.build();
}
}
```
Инструкция по подключению вручную:
открытые 01:42PM - 28 Feb 24 UTC
закрытые 07:00AM - 14 Oct 24 UTC
size: M
in: bpm
There is a `io.jmix.bpm:jmix-bpm-rest-starter` in the repository.
This starter… attaches standard Flowable REST API endpoints to the project.
We need to analyze:
* how security configuration may look like for securing Flowable endpoints
* analyze if any modifications are required for the `jmix-bpm-rest`
* write documentation for this starter
An example of security configuration that may be defined in the project:
```java
@Configuration
public class BpmRestSecurityConfiguration {
@Bean
@Order(JmixSecurityFilterChainOrder.AUTHSERVER_RESOURCE_SERVER - 10)
SecurityFilterChain bpmRestSecurityFilterChain(HttpSecurity http,
AuthenticationManager authenticationManager
) throws Exception {
http.securityMatcher(new AntPathRequestMatcher("/rest/bpm/**"))
.httpBasic(Customizer.withDefaults())
.authenticationManager(authenticationManager)
.authorizeHttpRequests(requests -> requests.anyRequest().authenticated());
return http.build();
}
}
```
Похожий вопрос на форуме:
Добрый день,
А какая у вас версия jmix? Возможно нужно добавить параметр jmix.rest.authenticated-url-patterns в application.properties:
jmix.rest.authenticated-url-patterns=/process-api/**
Также есть библиотека jmix-bpm-rest-starter, которая включает Flowable REST API. Для подключения нужно добавить зависимость:
implementation 'io.jmix.bpm:jmix-bpm-rest-starter'
Нужно учитывать, что в jmix-bpm-rest-starter изменен путь к flowable endpoints:
flowable.process.servlet.path=/rest/bpm/process
f…
Does jmix have ready-made endpoints for working with BPM? If not, how can I activate the endpoints that Flowable has for working with the business process engine?
Reading time: 1 mins 🕑
Likes: 2 ❤
С Уважением,
Никита