Search in sources :

Example 11 with WkfInstance

use of com.axelor.apps.bpm.db.WkfInstance in project axelor-open-suite by axelor.

the class WkfInstanceServiceImpl method createWkfInstance.

@Override
@Transactional
public WkfInstance createWkfInstance(String processInstanceId, WkfProcess wkfProcess) {
    WkfInstance instance = new WkfInstance();
    instance.setWkfProcess(wkfProcess);
    instance.setInstanceId(processInstanceId);
    instance.setName(wkfProcess.getProcessId() + " : " + processInstanceId);
    return wkfInstanceRepository.save(instance);
}
Also used : WkfInstance(com.axelor.apps.bpm.db.WkfInstance) Transactional(com.google.inject.persist.Transactional)

Aggregations

WkfInstance (com.axelor.apps.bpm.db.WkfInstance)11 WkfInstanceRepository (com.axelor.apps.bpm.db.repo.WkfInstanceRepository)6 Model (com.axelor.db.Model)5 HashMap (java.util.HashMap)5 HistoricProcessInstance (org.camunda.bpm.engine.history.HistoricProcessInstance)5 WkfProcess (com.axelor.apps.bpm.db.WkfProcess)4 Transactional (com.google.inject.persist.Transactional)4 ProcessEngine (org.camunda.bpm.engine.ProcessEngine)4 RuntimeService (org.camunda.bpm.engine.RuntimeService)4 WkfModel (com.axelor.apps.bpm.db.WkfModel)3 WkfProcessConfig (com.axelor.apps.bpm.db.WkfProcessConfig)3 MetaJsonRecord (com.axelor.meta.db.MetaJsonRecord)3 ArrayList (java.util.ArrayList)3 HashSet (java.util.HashSet)3 Map (java.util.Map)3 ProcessInstance (org.camunda.bpm.engine.runtime.ProcessInstance)3 WkfTaskConfig (com.axelor.apps.bpm.db.WkfTaskConfig)2 WkfTaskConfigRepository (com.axelor.apps.bpm.db.repo.WkfTaskConfigRepository)2 WkfInstanceService (com.axelor.apps.bpm.service.execution.WkfInstanceService)2 ProcessEngineService (com.axelor.apps.bpm.service.init.ProcessEngineService)2