Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Unable to Instantiate Process After BPE Restart #269

Closed
hhund opened this issue Sep 6, 2021 · 0 comments · Fixed by #272
Closed

Unable to Instantiate Process After BPE Restart #269

hhund opened this issue Sep 6, 2021 · 0 comments · Fixed by #272
Assignees
Labels
bug Something isn't working ready for release Issue is fixed and merged into develop, ready for next release
Milestone

Comments

@hhund
Copy link
Member

hhund commented Sep 6, 2021

Effected Version: 0.5.1

After a restart of the BPE new internal versions of every process definition (key + version) are created, if multiple versions of the same process plugin are present (e.g. codex-process-data-transfer-0.4.0.jar and codex-process-data-transfer-0.4.1.jar). This leads to multiple instances being found in the BPE database when instantiating a process based using a FHIR Task resource.

ERROR Grizzly(1) - BaseLogger.logError(160) | ENGINE-16004 Exception while closing command context: Query return 2 results instead of max 1
	org.camunda.bpm.engine.ProcessEngineException: Query return 2 results instead of max 1
		at org.camunda.bpm.engine.impl.AbstractQuery.executeSingleResult(AbstractQuery.java:245) ~[camunda-engine-7.15.0.jar:7.15.0]
		at org.camunda.bpm.engine.impl.AbstractQuery.execute(AbstractQuery.java:195) ~[camunda-engine-7.15.0.jar:7.15.0]
		at org.camunda.bpm.engine.impl.interceptor.CommandExecutorImpl.execute(CommandExecutorImpl.java:28) ~[camunda-engine-7.15.0.jar:7.15.0]
		at org.camunda.bpm.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:110) ~[camunda-engine-7.15.0.jar:7.15.0]
		at org.camunda.bpm.engine.spring.SpringTransactionInterceptor$1.doInTransaction(SpringTransactionInterceptor.java:72) ~[camunda-engine-spring-7.15.0.jar:7.15.0]
		at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:140) ~[spring-tx-5.3.9.jar:5.3.9]
		at org.camunda.bpm.engine.spring.SpringTransactionInterceptor.execute(SpringTransactionInterceptor.java:70) ~[camunda-engine-spring-7.15.0.jar:7.15.0]
		at org.camunda.bpm.engine.impl.interceptor.ProcessApplicationContextInterceptor.execute(ProcessApplicationContextInterceptor.java:70) ~[camunda-engine-7.15.0.jar:7.15.0]
		at org.camunda.bpm.engine.impl.interceptor.CommandCounterInterceptor.execute(CommandCounterInterceptor.java:35) ~[camunda-engine-7.15.0.jar:7.15.0]
		at org.camunda.bpm.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:33) ~[camunda-engine-7.15.0.jar:7.15.0]
		at org.camunda.bpm.engine.impl.AbstractQuery.executeResult(AbstractQuery.java:160) ~[camunda-engine-7.15.0.jar:7.15.0]
		at org.camunda.bpm.engine.impl.AbstractQuery.singleResult(AbstractQuery.java:136) ~[camunda-engine-7.15.0.jar:7.15.0]
		at org.highmed.dsf.fhir.task.TaskHandler.getProcessDefinition(TaskHandler.java:193) ~[dsf-bpe-server-0.5.1.jar:0.5.1]
		
		...

Workaround:
If a restart of the BPE is needed, make sure to delete the BPE Database.

  1. stop BPE containers
    cd /opt/bpe/
    docker-compose down
    
  2. delete BPE database
    cd /opt/bpe/postgres-data
    sudo rm -r *
    
  3. start BPE containers, execute in /opt/bpe
    cd /opt/bpe/
    docker-compose up -d && docker-compose logs -f
    
@hhund hhund added the bug Something isn't working label Sep 6, 2021
@hhund hhund added this to the v0.5.2 milestone Sep 6, 2021
@hhund hhund self-assigned this Sep 6, 2021
@hhund hhund added the ready for release Issue is fixed and merged into develop, ready for next release label Sep 6, 2021
@hhund hhund mentioned this issue Sep 7, 2021
@hhund hhund closed this as completed in f5366d1 Sep 7, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working ready for release Issue is fixed and merged into develop, ready for next release
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant