I copy code from user guide,and make some change. "Deployment deployment = (Deployment) repositoryService.createDeployment().addClasspathResource(flowwork).deploy();" is error. error info is "Exception in thread "main" org.activiti.engine.ActivitiException: resource 'F:/activiti-5.9/workspace/testactivitione/src/main/resources/diagrams/MyProcess.bpmn20.xml' not found".
this is classpath and xml path:'F:/activiti-5.9/workspace/testactivitione/src/main/resources/diagrams/MyProcess.bpmn20.xml' and "F:\activiti-5.9\workspace\testactivitione\src\main\java\testactiviti\Testnew.java".
public static void main(String[] args) {
RuntimeService runtimeService;
TaskService taskService;
ProcessEngine processEngine = ProcessEngineConfiguration
.createStandaloneInMemProcessEngineConfiguration()
.buildProcessEngine();
String flowwork = "F:/activiti-5.9/workspace/testactivitione/src/main/resources/diagrams/MyProcess.bpmn20.xml";
String flowworkpng = "F:/activiti-5.9/workspace/testactivitione/src/main/resources/diagrams/MyProcess.png";
RepositoryService repositoryService = processEngine
.getRepositoryService();
Deployment deployment = (Deployment) repositoryService.createDeployment()
.addClasspathResource(flowwork)
.deploy();
runtimeService = processEngine.getRuntimeService();
taskService = processEngine.getTaskService();
runtimeService.startProcessInstanceByKey("MyProcess");
Task task = taskService.createTaskQuery().singleResult();
//assertEquals("MyProcess", task.getName());
taskService.complete(task.getId());
//assertEquals(0, runtimeService.createProcessInstanceQuery().count());
}