Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade jBPM from 5.3 to 5.4 to allow admin to view enrollments #190

Merged
merged 4 commits into from
Jun 22, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -335,13 +335,16 @@ repository, update its location in your local properties:
If you have a previous build deployed already, you can replace the
deployment in the UI or add the `--force` switch after `deploy`.

1. Create database schema and initial data. Use the `seed.sql` data to create tables
and `legacy_seed.sql` to create tables for entities that have not yet
been migrated to Hibernate5:
1. Create database schema and initial data. Use `seed.sql` to create tables and
data for the application, `jbpm.sql` to create tables and data for the
embedded jBPM engine, and `legacy_seed.sql` to create tables for entities
that have not yet been migrated to Hibernate5:

```ShellSession
$ psql -h localhost -U psm psm < {/path/to/psm}/psm-app/db/seed.sql
$ psql -h localhost -U psm psm < {/path/to/psm}/psm-app/db/legacy_seed.sql
$ cat {/path/to/psm}/psm-app/db/legacy_seed.sql \
{/path/to/psm}/psm-app/db/jbpm.sql \
{/path/to/psm}/psm-app/db/seed.sql \
| psql -h localhost -U psm psm
```

1. To check that the app is running, navigate to
Expand Down
20 changes: 20 additions & 0 deletions psm-app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,21 @@ buildscript {
}
}

def jbpm_version = '5.4.0.Final'

ext.libs = [
jbpm_human_task_core: dependencies.create("org.jbpm:jbpm-human-task-core:${jbpm_version}") {
exclude group: 'javax.transaction'
exclude group: 'org.apache.cxf'
exclude group: 'org.hibernate.javax.persistence'
},
jbpm_persistence_jpa: dependencies.create("org.jbpm:jbpm-persistence-jpa:${jbpm_version}") {
exclude group: 'javax.transaction'
exclude group: 'org.hibernate'
exclude group: 'org.hibernate.javax.persistence'
},
]

allprojects {
repositories {
mavenCentral()
Expand All @@ -21,6 +36,7 @@ project(':services') {
apply plugin: 'java'

dependencies {
compile libs.jbpm_human_task_core
compile fileTree(dir: '../cms-portal-services/lib', include: '*.jar', exclude: 'cms-core.jar')
compile project(path: ':cms-business-model', configuration: 'archives')
compile fileTree(dir: '../../../wildfly-10.1.0.Final/modules/system/layers/base/javax')
Expand All @@ -44,10 +60,12 @@ project(':cms-business-process') {
dependencies {
compile project(path: ':services', configuration: 'archives')
compile project(path: ':cms-business-model', configuration: 'archives')
compile libs.jbpm_human_task_core
compile fileTree(dir: '../cms-portal-services/lib', include: '*.jar', exclude: 'cms-core.jar')
compile fileTree(dir: '../../../wildfly-10.1.0.Final/modules/system/layers/base/javax')
compile fileTree(dir: '../../../wildfly-10.1.0.Final/modules/system/layers/base/org/hibernate')
compile fileTree(dir: '../../../wildfly-10.1.0.Final/modules/system/layers/base/org/codehaus/jackson')
runtime libs.jbpm_persistence_jpa
}

sourceSets {
Expand Down Expand Up @@ -114,6 +132,8 @@ project(':cms-portal-services') {
deploy project(path: ':cms-web', configuration: 'archives')
deploy project(':cms-business-process')
earlib fileTree(dir: 'lib')
earlib libs.jbpm_human_task_core
earlib libs.jbpm_persistence_jpa
earlib project(path: ':cms-business-model', configuration: 'archives')
earlib project(path: ':services', configuration: 'archives')
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,6 @@
package gov.medicaid.services.impl;

import gov.medicaid.process.enrollment.GenericHandler;

import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.logging.Level;
import java.util.logging.Logger;

import org.drools.runtime.KnowledgeRuntime;
import org.drools.runtime.StatefulKnowledgeSession;
import org.drools.runtime.process.WorkItem;
Expand All @@ -34,15 +21,27 @@
import org.jbpm.task.Task;
import org.jbpm.task.TaskData;
import org.jbpm.task.User;
import org.jbpm.task.event.TaskCompletedEvent;
import org.jbpm.task.event.TaskEvent;
import org.jbpm.task.event.TaskEventKey;
import org.jbpm.task.event.TaskFailedEvent;
import org.jbpm.task.event.TaskSkippedEvent;
import org.jbpm.task.event.entity.TaskCompletedEvent;
import org.jbpm.task.event.entity.TaskEvent;
import org.jbpm.task.event.entity.TaskFailedEvent;
import org.jbpm.task.event.entity.TaskSkippedEvent;
import org.jbpm.task.service.ContentData;
import org.jbpm.task.service.local.LocalTaskService;
import org.jbpm.task.service.responsehandlers.AbstractBaseResponseHandler;

import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.logging.Level;
import java.util.logging.Logger;

/**
* This is a port of org.jbpm.process.workitem.wsht.CommandBasedWSHumanTaskHandler to use local connections.
*
Expand Down Expand Up @@ -152,7 +151,8 @@ public void executeWorkItem(WorkItem workItem, WorkItemManager manager) {
task.setTaskData(taskData);

ContentData content = saveContent(workItem);
task.setDeadlines(HumanTaskHandlerHelper.setDeadlines(workItem, businessAdministrators));
task.setDeadlines(HumanTaskHandlerHelper.setDeadlines(
workItem, businessAdministrators, null));
service.addTask(task, content);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
<jta-data-source>jdbc/MitaDS</jta-data-source>
<non-jta-data-source>jdbc/TaskServiceDS</non-jta-data-source>

<mapping-file>META-INF/ProcessInstanceInfoMapping-JPA2.xml</mapping-file>
<mapping-file>META-INF/JBPMorm-JPA2.xml</mapping-file>
<mapping-file>META-INF/ormTasks.xml</mapping-file>

Expand All @@ -33,7 +34,6 @@
<class>org.jbpm.task.EmailNotificationHeader</class>
<class>org.jbpm.task.PeopleAssignments</class>
<class>org.jbpm.task.Reassignment</class>
<class>org.jbpm.task.Status</class>
<class>org.jbpm.task.Task</class>
<class>org.jbpm.task.TaskData</class>
<class>org.jbpm.task.SubTasksStrategy</class>
Expand Down
Binary file removed psm-app/cms-portal-services/lib/antlr-2.7.6.jar
Binary file not shown.
Binary file removed psm-app/cms-portal-services/lib/antlr-3.3.jar
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed psm-app/cms-portal-services/lib/btm-2.1.2.jar
Binary file not shown.
Binary file not shown.
Binary file removed psm-app/cms-portal-services/lib/dom4j-1.6.1.jar
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed psm-app/cms-portal-services/lib/mina-core-2.0.1.jar
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed psm-app/cms-portal-services/lib/slf4j-api-1.6.4.jar
Binary file not shown.
Binary file not shown.
Binary file removed psm-app/cms-portal-services/lib/trove.jar
Binary file not shown.
Binary file removed psm-app/cms-portal-services/lib/xmlpull.jar
Binary file not shown.
Binary file removed psm-app/cms-portal-services/lib/xpp3_min-1.1.4c.jar
Binary file not shown.
Binary file removed psm-app/cms-portal-services/lib/xstream.jar
Binary file not shown.
4 changes: 4 additions & 0 deletions psm-app/db/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ initial test data.
This file sets up the database, inserts static data, and create some
default users to get you going

## jbpm.sql
Create the tables and static data needed by the embedded [jBPM
engine](http://www.jbpm.org/).

## Legacy_seed.sql
We are in the process of migrating all of the entities from Hibernate 4 to Hibernate 5,
however during the migration we need some of the unmigrated tables configured to perform
Expand Down
Loading