Created attachment 995008 [details]
Description of problem:
Having business central deployed on EAP together with jBPM EJB application, after undeploying a deployment unit via EJB DeploymentService, process definitions are still available via EJB DefinitionService.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. deploy business central to EAP, configure user account
2. build and deploy EJB app (see the attached reproducer), configure it to use the same DB schema as business central
3. run tests in reproducer project
maven project containing two modules:
- jBPM ejb-app
- tests invoking remote EJBs
this is actually expected. DefinitionService does provide information about process definitions as long as they can be executed in any way. That means it does not focus if the process can be started or not. As long as deployment is there definition service can and should provide details about definitions. Runtime services such as process service is responsible for rejecting requests that are towards inactive deployment unit.
Imagine situation that some custom application integrates with services and they do provide custom UI - for that definition service can be used to get hold of process variables types, or user task inputs and outputs to be able to successfully operate on already active process instances.
Does that make sense to you?
As we've already discussed this via IRC, the problem is deployment unit has been completely undeployed, so the process definitions shouldn't be available, as there shouldn't be any running process instances.
Verified with BPMS-6.1.0.ER6