Flowable 6.6.0 BPMN 사용자 가이드 - 7 BPMN 2.0 소개 - 7.3 입문: 10 분 튜 토리 얼 (11 - 12)

《 Flowable 6.6.0 BPMN 사용자 매 뉴 얼 》
1. 입문
2. 설정
3 The Flowable API
4 Flowable 6.6.0 BPMN 사용자 가이드 - (4) Spring 집성
5 Spring Boot
6 배치
7 BPMN 2.0 안내
7.1 BPMN 은 무엇 입 니까?7.2 정의 절차 7.3 입문: 10 분 튜 토리 얼
  • 7.3.1 선 결 조건
  • 7.3.2 개체
  • 7.3.3 사례
  • 7.3.4 흐름 도
  • 7.3.5 XML 표시
  • 7.3.6 시작 프로 세 스 인 스 턴 스
  • 7.3.7 퀘 스 트 리스트
  • 7.3.8 수령 임무 (Claiming the task)
  • 7.3.9 임무 완수
  • 7.3.10 종료 절차
  • 7.3.11 코드 개술
  • 7.3.12 미래 증강
  • Flowable 에 관 한 더 많은 문서, 참조:
    《 Flowable 문서 대전 》
    7.3.11 코드 개요
    Combine all the snippets from previous sections, and you should have something like the following. The code takes into account that you probably will have started a few process instances through the Flowable app UI. It retrieves a list of tasks instead of one task, so it always works:
    앞의 몇 절 에 있 는 모든 코드 세 션 을 합치 면 다음 과 같은 내용 을 얻 을 수 있 습 니 다.코드 는 Flowable 응용 UI (Flowable app UI) 를 통 해 몇 개의 프로 세 스 인 스 턴 스 를 시 작 했 을 수도 있 음 을 고려 합 니 다.작업 목록 이 아 닌 작업 목록 을 검색 하기 때문에 항상 유효 합 니 다.
    public class TenMinuteTutorial {
         
    
      public static void main(String[] args) {
         
    
        // Create Flowable process engine
        ProcessEngine processEngine = ProcessEngineConfiguration
          .createStandaloneProcessEngineConfiguration()
          .buildProcessEngine();
    
        // Get Flowable services
        RepositoryService repositoryService = processEngine.getRepositoryService();
        RuntimeService runtimeService = processEngine.getRuntimeService();
    
        // Deploy the process definition
        repositoryService.createDeployment()
          .addClasspathResource("FinancialReportProcess.bpmn20.xml")
          .deploy();
    
        // Start a process instance
        String procId = runtimeService.startProcessInstanceByKey("financialReport").getId();
    
        // Get the first task
        TaskService taskService = processEngine.getTaskService();
        List<Task> tasks = taskService.createTaskQuery().taskCandidateGroup("accountancy").list();
        for (Task task : tasks) {
         
          System.out.println("Following task is available for accountancy group: " + task.getName());
    
          // claim it
          taskService.claim(task.getId(), "fozzie");
        }
    
        // Verify Fozzie can now retrieve the task
        tasks = taskService.createTaskQuery().taskAssignee("fozzie").list();
        for (Task task : tasks) {
         
          System.out.println("Task for fozzie: " + task.getName());
    
          // Complete the task
          taskService.complete(task.getId());
        }
    
        System.out.println("Number of tasks for fozzie: "
                + taskService.createTaskQuery().taskAssignee("fozzie").count());
    
        // Retrieve and claim the second task
        tasks = taskService.createTaskQuery().taskCandidateGroup("management").list();
        for (Task task : tasks) {
         
          System.out.println("Following task is available for management group: " + task.getName());
          taskService.claim(task.getId(), "kermit");
        }
    
        // Completing the second task ends the process
        for (Task task : tasks) {
         
          taskService.complete(task.getId());
        }
    
        // verify that the process is actually finished
        HistoryService historyService = processEngine.getHistoryService();
        HistoricProcessInstance historicProcessInstance =
          historyService.createHistoricProcessInstanceQuery().processInstanceId(procId).singleResult();
        System.out.println("Process instance end time: " + historicProcessInstance.getEndTime());
      }
    }
    

    7.3.12 미래 강화
    It’s easy to see that this business process is too simple to be usable in reality. However, as you are going through the BPMN 2.0 constructs available in Flowable, you will be able to enhance the business process by:
    이 업무 절 차 는 너무 간단 해서 실제 적 으로 사용 할 수 없다 는 것 을 쉽게 알 수 있다.단, Flowable 에서 사용 할 수 있 는 BPMN 2.0 구 조 를 알 게 되면 다음 과 같은 방식 으로 업무 절 차 를 강화 할 수 있 습 니 다.
  • defining gateways so a manager can decide to reject the financial report and recreate the task for the accountant, following a different path than when accepting the report.
  • declaring and using variables to store or reference the report so that it can be visualized in the form.
  • defining a service task at the end of the process to send the report to every shareholder.
  • etc.
  • 관리자 가 재무 보 고 를 거부 하고 회계 에 임 무 를 재 구축 하여 절 차 를 보고 받 는 것 과 다른 경 로 를 따 르 도록 게 이 트 웨 이 (gateway) 를 정의 합 니 다.
  • 폼 에서 시각 화 할 수 있 도록 변수 (variable) 를 사용 하여 보고 서 를 저장 하거나 참조 합 니 다.
  • 절차 가 끝 날 때 서비스 임무 (service task) 를 정의 하여 모든 주주 에 게 보고 서 를 보 냅 니 다.
  • 등등.
  • 좋은 웹페이지 즐겨찾기