Build & deploy does not create package directory structure in .jar deployments. I wanted to create a project with groupId com.bpms.flood. I was able to find the deployment both in GUI and REST API, but no process definitions inside. I found out that the .jar file contained just folder with name "com.bpms.flood", which contained only default WorkDefinitions.wid instead of expected directory structure com/bpms/flood. I guess that this is the reason why also the process definition was not included in the deployment .jar. To reproduce: 1. Login to business-central. 2. Create new git repo. Create new project and package named "com.bpms.flood". 3. Inside the package create a simple process and save it. 4. Open project and add a session ksession1 to kmodule.xml. (I think this could be fixed as well - that the project should forbid here the name "default" as it later complains when deploying. Also the name of the session is later usually invisible. I'll file a new bugzilla for this.) 5. Try to Build & Deploy and try to run the process instance either in gui or rest api. Investigate the local maven repo and content of the .jar file. My environment: business-central.war - BPMS 6 DR5
Hi, this is the Project Editor responsibility, and it's not related with the jbpm side. This issues should be assigned to Michael Anstis or Toni Rikkola, or at least ask them who is responsible for the Project Editor screen and how the assets and projects are generated.
Just to make sure I understand the problem: is the problem that the process definition is not included in the generated kjar?
As explained during the call, it happens only when a custom package name is used. In that case, the process definition is not added to the kjar.
Edson, I just tried out the following: 1) create a new project in any predefined repository (I used jbpm-playground.git) I tried four possibilities I think can happen in a project in the resources directory: 1) don't create a package but you create a process definition 2) create the defaultPackage and a process definition in it 3) create a com/jboss/flood package and a process definition in it 4) create a com.jboss.flood package and a process definition in it Every time I hit build & deploy then the following happens for the cases above 1) WorkDefinitions.wid is included without the process definition 2)3)4) directory structure is included with the WorkDefinitions.wid in the directories but no process definition.
Marek, I believe this might also be caused by the "default" kbase that is automatically added (in Beta3 at least) to a new project. Could you try the following, immediately after create a new project: - open the project editor - open the kmodule.xml tab - remove the "default" kbase - save the file Now try adding a new process and doing Build & Deploy on that, the process should show up in the jar after a successful build. This means a user would have to manually remove the "default" kbase every time he creates a new project. I've asked Maciej to identify the commit that fixes this in master, so we can consider if we want to cherry-pick this on top of Beta3 as a possible solution. Kris
Kris, removing the default kbase as described above works. Processes are included on each level. This solution has one problem. It generates the following segment in kmodule.xml <kbase name="defaultKieBase" default="true" ...> <ksession name="..." default="true" .../> </kbase> When such a project is deployed the the server restart will fail. Which is this bug: https://bugzilla.redhat.com/show_bug.cgi?id=975820 Marek
It may not be the same issue after all. The NPE is thrown on a different line. org.jbpm.kie.services.impl.KModuleDeploymentService.deploy(KModuleDeploymentService.java:68)
... meaning the server may fail to start not because of BZ-975820.
Marek, Are you using an in memory database? If so, the session that is was using before for execution will no longer be there (as the database is empty), and that's why it's probably complaining (the link between the deployment and the session is stored in a .ser file inside the server data dir). Could you try either: - removing the .ser file(s) inside - configuring a datasource that would survive a restart, like file-based h2 Note that we have fixed this to not fail on this any more (simply create a new ksession in that case) for Beta4). Kris
To summarize all the findings to get this working: On the new project after it was created: - open the project editor - open the kmodule.xml tab - remove the "default" kbase - save the file Then when you made changes (either to kmodule.xml or you just added a new process or an existing process definition has been updated) - open the project editor - open the pom.xml tab - change (e.g. increase) the version - save the file You're ready to "build and deploy".
Fixed in Beta4
Verified on DR6.