This repository has been archived by the owner on Nov 30, 2021. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
365 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
76 changes: 76 additions & 0 deletions
76
jbpm-dashboard-distributions/src/main/assembly/assembly-websphere-as-8.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
Copyright (C) 2012 JBoss Inc | ||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
--> | ||
|
||
<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd"> | ||
|
||
<id>was-8</id> | ||
<formats> | ||
<format>war</format> | ||
</formats> | ||
|
||
<includeBaseDirectory>false</includeBaseDirectory> | ||
|
||
<dependencySets> | ||
<dependencySet> | ||
<includes> | ||
<include>org.jbpm.dashboard:jbpm-dashboard-webapp:war</include> | ||
</includes> | ||
<outputDirectory>.</outputDirectory> | ||
<unpack>true</unpack> | ||
<unpackOptions> | ||
<excludes> | ||
<exclude>WEB-INF/jetty-*.xml</exclude> | ||
<exclude>WEB-INF/jboss-web.xml</exclude> | ||
<exclude>WEB-INF/jboss-deployment-structure.xml</exclude> | ||
<exclude>WEB-INF/web.xml</exclude> | ||
<exclude>WEB-INF/etc/hibernate.cfg.xml</exclude> | ||
<exclude>WEB-INF/lib/weld-*.jar</exclude> | ||
<exclude>WEB-INF/lib/jta-*.jar</exclude> | ||
<exclude>WEB-INF/lib/xml-apis-*.jar</exclude> | ||
<exclude>WEB-INF/lib/javax.*.jar</exclude> | ||
<exclude>WEB-INF/lib/jsr250-*.jar</exclude> | ||
<exclude>WEB-INF/lib/mail-*.jar</exclude> | ||
<exclude>WEB-INF/lib/cdi-*.jar</exclude> | ||
<exclude>WEB-INF/lib/activation-*.jar</exclude> | ||
</excludes> | ||
</unpackOptions> | ||
<useStrictFiltering>true</useStrictFiltering> | ||
</dependencySet> | ||
<dependencySet> | ||
<includes> | ||
<!-- Bind SLF4J with JUL as it's the logging API used by Websphere --> | ||
<include>org.slf4j:slf4j-jdk14:jar</include> | ||
</includes> | ||
<outputDirectory>WEB-INF/lib</outputDirectory> | ||
<unpack>false</unpack> | ||
<useStrictFiltering>true</useStrictFiltering> | ||
</dependencySet> | ||
|
||
</dependencySets> | ||
|
||
<fileSets> | ||
<fileSet> | ||
<directory>${project.basedir}/src/main/was8/</directory> | ||
<outputDirectory>.</outputDirectory> | ||
</fileSet> | ||
</fileSets> | ||
|
||
</assembly> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,127 @@ | ||
Deployment onto Websphere 8 | ||
============================= | ||
|
||
Please follow the next steps in order to deploy the application on Websphere. | ||
|
||
Prerequisites | ||
-------------------------------- | ||
|
||
The jBPM Dashboard requires the jBPM History log's database tables to exist. So, it's **MANDATORY** to deploy the | ||
jBPM Human Task console (or a superset, i.e: kie-wb) first. Otherwise, the jBPM Dashboard will not be initialized | ||
correctly, will not be possible to display its key performance indicators and you are certain to see some database | ||
exceptions on the log, similar to: _ERROR: relationship «processinstancelog» does not exists_. | ||
|
||
|
||
Configure a data source | ||
-------------------------------- | ||
|
||
The jBPM Dashboard also requires a data source which **MUST BE** configured against the same database used by kie-wb | ||
in order to get access to the jBPM's history log. To create this data source, follow the next steps: | ||
|
||
1. Open the WebSphere's Adminitration Console _http://127.0.0.1:9060/ibm/console_ | ||
|
||
Then login (if you have administrative security setup) | ||
|
||
2. Create the JDBC provider | ||
|
||
- Left side panel, click on _Resources > JDBC > JDBC Providers_ | ||
- Select the appropriate scope and click on the _New_ button. | ||
- Fill out the form. For non-listed database types (i.e: H2, Postgres & Mysql) you need to provide the path to the JDBC driver jar file plus the following class name: | ||
|
||
+------------+-------------------------------------------------------------+ | ||
| Database | Implementation class name | | ||
+------------+-------------------------------------------------------------+ | ||
| H2 | org.h2.jdbcx.JdbcDataSource | | ||
| Postgres | org.postgresql.xa.PGXADataSource | | ||
| Mysql | com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource | | ||
+------------+-------------------------------------------------------------+ | ||
|
||
When you finish, click _Ok_. If there are no data entry errors, you should be back at the list of JDBC Providers, where you should now see your new provider displayed. | ||
|
||
3. Create the data source | ||
|
||
- Left side panel, click on _Resources > JDBC > Data sources_ | ||
- Select the appropriate scope and click on the _New_ button. | ||
- Fill out the creation form. The _JNDI name_ **MUST** be defined as _jdbc/dashbuilder. Click _Next_. | ||
- Select the existing JDBC provider you created. Click _Next_. | ||
- Keep clicking _Next_ until _Finish_. | ||
- Save to master configuration. | ||
- Edit the datasource you just created and click on the _Custom properties_ link. | ||
- Edit and fill the appropriate values required to set-up the connection. This depends on the database type. | ||
|
||
+------------+------------------------------------------------------+ | ||
| Database | Connection settings | | ||
+------------+------------------------------------------------------+ | ||
| H2 | URL, user, password | | ||
| Postgres | serverName, databaseName, portNumber, user, password | | ||
| Mysql | serverName, databaseName, port, user, password | | ||
+------------+------------------------------------------------------+ | ||
|
||
|
||
jBPM Dashboard Deployment | ||
---------------------------- | ||
|
||
Get the proper WAR file (e.g. jbpm-dashbuilder-was-8.war) and run the following steps: | ||
|
||
1. http://127.0.0.1:9060/ibm/console | ||
|
||
Then login (if you have administrative security setup) | ||
|
||
2. Deploy the WAR file | ||
|
||
- Left side panel click on *Applications > Application types > Websphere enterprise applications* | ||
- Click on _Install_, select the *jbpm-dashbuilder_was_8.war* file from your local filesystem. Click _Next_ | ||
- From here, you will be asked with several deployments settings. Click _Next_ until finished. | ||
- **DO NOT FORGET** to set <code>dashbuilder</code> as the webapp context path since that path is referred by some kie-wb modules. | ||
|
||
Once deployed you can start/stop the application from the Websphere console. | ||
|
||
|
||
Authentication and authorization | ||
--------------------------------- | ||
|
||
Dashbuilder uses container managed authentication and authorization. The application roles are defined in the application's | ||
<code>web.xml</code> file. In a nutshell, to get access to the aplication a new user has to be created and mapped with one | ||
or several application roles. Next is the list of steps to achieve so from the WebSphere's Adminitration Console: | ||
|
||
1. Enable security | ||
|
||
- Left side panel click on *Security > Global security* | ||
- Section *Application security*, Check the box *Enable application security* | ||
- Click *Apply*, then save to master config. | ||
|
||
Then you have application security turned on. Now you need to map the users of your application to users within Websphere. | ||
|
||
2. Map users | ||
|
||
- _Applications > Enterprise Applications_ click on your application. | ||
- Under the _Detailed Properties_ section you will see a link _Security role to user/group mapping_. Click on it. | ||
- Select the roles you wish to use for authentication, _admin_ for instance. | ||
- Click look up users (you need to create users first, see below). | ||
- Click search and select users. | ||
- Use the arrows to move the selected users/groups to the right hand box. | ||
- Click ok and save to master configuration and restart the server. | ||
|
||
3. Create users | ||
|
||
- Just go to the left side panel and click on *Users and Groups > Manage Users*. | ||
- Click on the _Create_ button, fill out the form and click _Ok_. | ||
- The _User ID_ field is the login, the word to be used to sign into the application. | ||
- if you create a user with login=<code>root</code> it'll be granted with all the permissions within the application. | ||
|
||
Once created and mapped the user should be able to sign into the application. | ||
|
||
|
||
User Authentication | ||
-------------------------- | ||
|
||
The jBPM Process Dashboard can be accessed in two ways: | ||
|
||
* As root, by selecting the jBPM Dashboard workspace at the top administration toolbar, or | ||
* Typing the following URL: <code>http://localhost:8080/dashbuilder/workspace/jbpm-dashboard</code> | ||
|
||
You can sign in with any of the users defined above. | ||
|
||
You can create process instances and tasks from the jBPM Human Task console and later on refresh the jBPM Dashboard to | ||
see how the different key performance monitoring indicators are updated. | ||
|
57 changes: 57 additions & 0 deletions
57
jbpm-dashboard-distributions/src/main/was8/WEB-INF/etc/hibernate.cfg.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
<?xml version='1.0' encoding='utf-8'?> | ||
<!-- | ||
Copyright (C) 2012 JBoss Inc | ||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
--> | ||
<!DOCTYPE hibernate-configuration | ||
PUBLIC "-//Hibernate/Hibernate Configuration DTD//EN" | ||
"classpath://org/hibernate/hibernate-configuration-3.0.dtd"> | ||
|
||
<hibernate-configuration> | ||
|
||
<session-factory> | ||
<!-- Database connection settings --> | ||
<property name="connection.datasource">jdbc/dashbuilder</property> | ||
|
||
<!-- Use java.io streams to read / write binary data from / to JDBC --> | ||
<property name="jdbc.use_streams_for_binary">true</property> | ||
|
||
<!-- 2L cache is disabled by default --> | ||
<property name="cache.use_second_level_cache">false</property> | ||
<property name="cache.use_query_cache">false</property> | ||
|
||
<!-- Context scoping for org.hibernate.SessionFactory#getCurrentSession() processing --> | ||
<property name="current_session_context_class">thread</property> | ||
|
||
<!-- Enable statistics collection --> | ||
<property name="generate_statistics">true</property> | ||
|
||
<!-- Echo all executed SQL to stdout --> | ||
<property name="show_sql">false</property> | ||
<property name="format_sql">true</property> | ||
|
||
<!-- | ||
BZ-1030424: Depending on database schema configuration for connection user, some jdbc drivers | ||
metadata returns all tables for all schemas if the schema parameter is null. | ||
To avoid this behaviour, user can set the default schema used by dashbuilder application here. | ||
**IMPORTANT NOTE**: If you don't wont to set the default_schema property, comment the following line, but | ||
DO NOT leave it blank. | ||
--> | ||
<!--<property name="default_schema"></property>--> | ||
|
||
</session-factory> | ||
</hibernate-configuration> |
96 changes: 96 additions & 0 deletions
96
jbpm-dashboard-distributions/src/main/was8/WEB-INF/web.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
<!-- | ||
Copyright (C) 2012 JBoss Inc | ||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
--> | ||
<web-app metadata-complete="false" | ||
version="3.0" xmlns="http://java.sun.com/xml/ns/javaee" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"> | ||
|
||
<display-name>dashbuilder</display-name> | ||
<description>jBPM Dashboard Builder Application</description> | ||
|
||
<!-- Security configuration --> | ||
|
||
<security-role> | ||
<description>Administrator - Administrates the BPMS system. Has full access rights to make any changes necessary. Also has the ability to add and remove users from the system.</description> | ||
<role-name>admin</role-name> | ||
</security-role> | ||
|
||
<security-role> | ||
<description>Analyst - Responsible for creating and designing processes into the system. Creates process flows and handles process change requests. Needs to test processes that they create. Also creates forms and dashboards.</description> | ||
<role-name>analyst</role-name> | ||
</security-role> | ||
|
||
<security-role> | ||
<description>Developer - Implements code required for process to work. Mostly uses the JBDS connection to view processes, but may use the web tool occasionally.</description> | ||
<role-name>developer</role-name> | ||
</security-role> | ||
|
||
<security-role> | ||
<description>Business user - Daily user of the system to take actions on business tasks that are required for the processes to continue forward. Works primarily with the task lists.</description> | ||
<role-name>user</role-name> | ||
</security-role> | ||
|
||
<security-role> | ||
<description>Manager/Viewer-only User - Viewer of the system that is interested in statistics around the business processes and their performance, business indicators, and other reporting of the system and people who interact with the system.</description> | ||
<role-name>manager</role-name> | ||
</security-role> | ||
|
||
<security-constraint> | ||
<web-resource-collection> | ||
<web-resource-name>Free access</web-resource-name> | ||
<url-pattern>/images/jb_logo.png</url-pattern> | ||
</web-resource-collection> | ||
</security-constraint> | ||
|
||
<security-constraint> | ||
<web-resource-collection> | ||
<web-resource-name>Restricted access</web-resource-name> | ||
<url-pattern>/*</url-pattern> | ||
</web-resource-collection> | ||
<auth-constraint> | ||
<role-name>admin</role-name> | ||
<role-name>analyst</role-name> | ||
<role-name>developer</role-name> | ||
<role-name>manager</role-name> | ||
<role-name>user</role-name> | ||
</auth-constraint> | ||
</security-constraint> | ||
|
||
<login-config> | ||
<auth-method>FORM</auth-method> | ||
<form-login-config> | ||
<form-login-page>/login.jsp</form-login-page> | ||
<form-error-page>/login_failed.jsp</form-error-page> | ||
</form-login-config> | ||
</login-config> | ||
|
||
<error-page> | ||
<error-code>403</error-code> | ||
<location>/not_authorized.jsp</location> | ||
</error-page> | ||
|
||
<!-- CDI support --> | ||
|
||
<resource-env-ref> | ||
<resource-env-ref-name>BeanManager</resource-env-ref-name> | ||
<resource-env-ref-type> | ||
javax.enterprise.inject.spi.BeanManager | ||
</resource-env-ref-type> | ||
</resource-env-ref> | ||
|
||
</web-app> |