Details
-
Bug
-
Resolution: Done
-
Blocker
-
6.3.0
-
None
Description
Description of problem:
We execute a flow with subprocesses as you can see in the attached file "proc_encendido_v1.bpmn2". When the execution process arrives to "Subproceso de encendido de dispositivo", it receives a list of "dispositivos" and by using each element of the list, it triggers a process. At the end of the execution we can see that in PROCESSINSTANCELOG table the subprocesses info appears twice. Moreover you can see duplicated process instances in the Process Instances list in the business-central.
Version-Release number of selected component (if applicable):
EAP 6.4.5 + BPMS 6.2 + PostgreSQL
How reproducible:
You must log on the business-central and create an empty project although you can use the default project created the first time you installed BPMS. Then you can import the processes attached to this ticket "proc_encendido_v1.bpmn2" and "task_encender_v1.bpmn2" and deploy the project as "PER_PROCESS_INSTANCE" strategy. Finally you can start the process from a java code using REST API.
Steps to Reproduce:
1. Install EAP 6.4.5 + BPMS 6.2 + PostgreSQL
2. Create a user "bpmsAdmin" with roles: admin,analyst,rest-all
3. Log on the business-central.
4. Create an empty project or use the default project created the first time you installed BPMS.
5. Import the processes attached to this ticket "proc_encendido_v1.bpmn2" and "task_encender_v1.bpmn2".
6. Deploy the project as "PER_PROCESS_INSTANCE" strategy.
7. Start the process from a java code as following:
~~~
package org.gss.jbpm;
import java.net.URL;
import java.util.ArrayList;
import java.util.GregorianCalendar;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.xml.datatype.DatatypeConfigurationException;
import javax.xml.datatype.DatatypeFactory;
import javax.xml.datatype.XMLGregorianCalendar;
import org.kie.api.runtime.KieSession;
import org.kie.api.runtime.manager.RuntimeEngine;
import org.kie.remote.client.api.RemoteRuntimeEngineFactory;
public class RESTTriggerExample {
/*
Set the parameters according your installation
org.kie.example:project1:1.0.0-SNAPSHOT
*/
private static final String DEPLOYMENT_ID = "org.kie.example:project1:LATEST";
private static final String APP_URL = "http://localhost:8080/business-central/";
private static final String USER = "bpmsAdmin";
private static final String PASSWORD = "admin@123";
public static final void main(String[] args) {
try
catch (Throwable t)
{ t.printStackTrace(); }}
public static final String lanzarProceso(KieSession ksession) {
String results = "OK";
long centro = 2002;
GregorianCalendar gcal = new GregorianCalendar();
XMLGregorianCalendar hora_encendido = null;
try
catch (DatatypeConfigurationException e1)
{ e1.printStackTrace(); } List<String> dispositivos = new ArrayList<String>();
dispositivos.add("CAJ1.2002.SHOP");
dispositivos.add("CAJ2.2002.SHOP");
dispositivos.add("CAJ3.2002.SHOP");
dispositivos.add("CAJ4.2002.SHOP");
dispositivos.add("CAJ5.2002.SHOP");
dispositivos.add("CAJ6.2002.SHOP");
dispositivos.add("CAJ7.2002.SHOP");
dispositivos.add("CAJ8.2002.SHOP");
dispositivos.add("CAJ9.2002.SHOP");
dispositivos.add("CAJ10.2002.SHOP");
Map<String, Object> params = new HashMap<String, Object>();
params.put("codNCentro", centro);
params.put("diario", false);
params.put("horaEncendido", hora_encendido != null ? hora_encendido.toXMLFormat() : "");
params.put("listadoDispositivos", dispositivos);
params.put("aplicacion", "orquestarbpm");
try
{ ksession.startProcess("org.gss.jbpm.procesos.encendidoV1", params); }catch (Throwable e)
{ e.printStackTrace(); results = "KOOOOOOOO"; } return results;
}
}
~~~
Actual results:
21 instances in PROCESSINSTANCELOG table where the subprocesses info appears twice.
21 process instances in the Process Instances list in the business-central with duplicated process instances.
Expected results:
11 instances in PROCESSINSTANCELOG table.
11 process instances in the Process Instances list in the business-central.
Additional info:
These tests have been executed in PostgreSQL and Oracle.
Attachments
Issue Links
- blocks
-
RHBPMS-1251 [GSS](6.3.z)Duplicated process instances running a process with a multi-instance sub-process
- Verified
- is duplicated by
-
RHBPMS-1251 [GSS](6.3.z)Duplicated process instances running a process with a multi-instance sub-process
- Verified