As TASKANA is a pure Java application, there is a huge variety of options how to deploy and use TASKANA on Wildfly.
However we do have an integration test to ensure a compatibility with Wildfly. In this setup we use the REST module of TASKANA and deploy it to Wildfly as a web application. You have to keep in mind that the TASKANA REST module is based on the Spring Framework. The setup we are using can be found on GitHub: https://github.com/Taskana/taskana/tree/master/rest/taskana-rest-spring-example-wildfly
This setup is described in more detail on this page. However you are free and encouraged to change each configuration to your own needs.
Application Assembly
Required Dependencies
To create your own Wildfly application, you need to add this dependency for the REST controllers including the entire TASKANA functionality:
<dependency> <groupId>pro.taskana</groupId> <artifactId>taskana-rest-spring</artifactId> </dependency>
If you want the UI to be part of the application, add this dependency as well:
<dependency> <groupId>pro.taskana</groupId> <artifactId>taskana-web</artifactId> </dependency>
Thats’s all.
For the example application, we use this Maven dependency, as it contains the sample data in addition to the two mentioned dependencies above:
<dependency> <groupId>pro.taskana</groupId> <artifactId>taskana-rest-spring-example-common</artifactId> </dependency>
You can find the entire project structure on GitHub: https://github.com/Taskana/taskana/blob/master/rest/taskana-rest-spring-example-wildfly/pom.xml
Security
TASKANA requires a initialized JAAS Subject to work - at least as long you want to use the security features.
In our setup we have a Elytron setup, which ensures that all requests are authenticated and authorized before entering our application. We can find the details of the current user in the SecurityIdentity Elytron provides. To make this information accessible to TASKANA, we have created the ElytronToJaasFilter, to initialize a valid Subject from it. This filter is configured in our WildflyWebSecurityConfig:
@Override protected void configure(HttpSecurity http) throws Exception { http.addFilter(jaasApiIntegrationFilter()) .addFilterAfter(new ElytronToJaasFilter(), JaasApiIntegrationFilter.class) .csrf() .disable(); }