package com.flowable.process;

import org.flowable.engine.ProcessEngine;
import org.flowable.engine.ProcessEngines;
import org.flowable.engine.repository.Deployment;
import org.flowable.engine.repository.ProcessDefinition;
import org.junit.Test;

import java.util.List;

public class DeploymentTest {

    @Test
    public void deployment(){
        ProcessEngine processEngine = ProcessEngines.getDefaultProcessEngine();
        processEngine.getRepositoryService().createDeployment()
                .addClasspathResource("test2.bpmn20.xml")
                .deploy();
        List<ProcessDefinition> list2 = processEngine.getRepositoryService().createProcessDefinitionQuery().latestVersion().list();
        list2.forEach(item ->{
            System.out.println(item.getKey());
        });

    }
}
