Can I have an embedded engine to execute processes via API and provide user customized task dashboard and a tailor made form engine while have bonita web portal as the process deployment and administration interface?
How to archive that? Connect these two application to the same database?
If you use the standard packaging of Bonita web application it’s include:
- The Bonita Engine
- Engine API, accessible using:
- Bonita Client Java library (communication between Client and Engine can use Java, HTTP or EJB3)
- REST
- The Bonita Portal that includes deployment and administration user interface
To connect your own custom application to Bonita, just use one of the two kind of API (Java library or REST).
You can refer to the development section of the official documentation for more details about API usage.
Edit:
Ok, so the missing information was that you run on Bonita 5
In such situation, you need to make sure that JAAS is correctly configured and it’s seems that it’s not: Aucun LoginModule configuré pour BonitaStore
.
First of all locate which JAAS configuration file is loaded. If you run on Tomcat, the JAAS configuration file location is usually defined using a JVM System Property named: java.security.auth.login.config
. The property value is commonly set in <TOMCAT_HOME>/bin/setenv.bat
(Windows) or <TOMCAT_HOME>/bin/setenv.sh
(Linux).
Once you locate the file, make sure that you have a BonitaStore
LoginContext defined.
The LoginModule to use in this context will depend about how Bonita Client Java library access Bonita Engine:
- If the Bonita Engine jar file (bonita-server.jar) is accessible in a ClassLoader shared by Bonita User XP and your application (e.g.
<TOMCAT_HOME>/lib
folder) you should have this kind of configuration:
BonitaStore {
org.ow2.bonita.identity.auth.LocalStorageLoginModule required;
};
- If Engine is packaged in a different web application (e.g. REST web application) you will need to use Bonita Client Java library in REST mode and have such JAAS configuration:
BonitaStore {
org.ow2.bonita.identity.auth.BonitaRESTLoginModule required restUser=“restuser” restPassword=“restbpm”;
};
Also remember, for REST, to set the following JVM system properties:
-Dorg.ow2.bonita.rest-server-address = (i.e. http://localhost:8080/bonita-server-rest/)
-Dorg.ow2.bonita.api-type=REST
hi,
i try to connecte to bonita from jee application, i test this code :
<%@ page language=“java” contentType=“text/html; charset=ISO-8859-1” pageEncoding=“ISO-8859-1”%>
<%@ page import=“org.ow2.bonita.facade.QueryDefinitionAPI”%>
<%@ page import=“org.ow2.bonita.util.AccessorUtil” %>
<%@ page import=“org.ow2.bonita.light.LightProcessDefinition” %>
<%@ page import=“javax.security.auth.login.LoginContext” %>
<%@ page import=“org.ow2.bonita.util.SimpleCallbackHandler” %>
<% LoginContext loginContext = new LoginContext(“BonitaStore”, new SimpleCallbackHandler(“admin”, “bpm”));
%>
but i get this error
Stacktrace:
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:568)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:455)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
cause mère
javax.servlet.ServletException: javax.security.auth.login.LoginException: Aucun LoginModule configuré pour BonitaStore
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:916)
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:845)
org.apache.jsp.NewFile_jsp._jspService(NewFile_jsp.java:88)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:432)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
cause mère
javax.security.auth.login.LoginException: Aucun LoginModule configuré pour BonitaStore
javax.security.auth.login.LoginContext.init(Unknown Source)
javax.security.auth.login.LoginContext.(Unknown Source)
org.apache.jsp.NewFile_jsp._jspService(NewFile_jsp.java:74)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:432)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
(for information i don’t have xcmis file and environnement variable) i use bonita 5.10
any idea please ?
thank you