예제


  1. Flowchart - 순서도

    1. Restful API

      1. Flowchart (순서도)

      2. 소스코드

        // initailize
        rankdir=TB
        fontname="맑은 고딕"
        graph [concentrate=true, splines=ortho, nodesep=0.5]
        node  [peripheries=0, style=filled, fillcolor=lightyellow, fontcolor=black,fontname="맑은 고딕",fixedsize=true, width=1, height=0.4]
        edge  [fontname="맑은 고딕",fontsize=8,fontcolor=black, labeldistance=1.8]
        start [shape=record, style="filled,rounded", label="HTTP Request", width=1.7]
        check [shape=rect, style="filled", label="Check HTTP Method\n(GET|POST|PUT|DELETE)", fillcolor="#8ECCFC", width=1.7,height=0.7]
        end	  [shape=record, style="filled,rounded", label="HTTP Response", width=1.7]
        
        {
          rank=same;
          match      [shape=rect, style="filled", label="Find Matching API URL", fillcolor="#8ECCFC", width=1.7, height=0.7]
          is_url     [shape=diamond, style="filled",label="URL\nFound?", fillcolor="#8ECCFC", width=1.2, height=1.2]
          is_protect [shape=diamond, style="filled",label="Protected\nAPI?", fillcolor="#8ECCFC", width=1.2, height=1.2]
        }
        
        subgraph cluster_a
        {
          color=white;
          {
            rank=same;
            auth    [shape=diamond, style="filled",label="Authenticated?", fillcolor="#8ECCFC", width=1.2, height=1.2]
            error   [shape=rect, style="filled", label="ERROR", fillcolor="#FF682A"]
          }
        }
        
        subgraph cluster_b
        {
          color=white;
          {
            rank=same;
            result  [shape=rect, style="filled", label="RESULT", fillcolor="#84FA3F"]
            method  [shape=rect, style="filled", label="API Method", fillcolor=yellow]
          }
        }
        
        // Draw flow
        start -> check
        check -> match
        match -> is_url
        is_url -> is_protect  [headlabel="YES", color=green]
        is_url -> error       [headlabel="NO", color=red, fontcolor=red]
        is_protect -> auth    [headlabel="YES", color=green]
        is_protect -> method  [headlabel="NO", color=red, fontcolor=red]
        auth -> error         [headlabel="NO", color=red, fontcolor=red]
        auth -> method        [headlabel="YES", color=green]
        method -> result
        {error, result} -> end

         

         

    2. PSDA 자동 번역
      1. Flowchart (순서도)

      2. 소스코드

        // Initailize
        rankdir  = TB
        fontname = "맑은 고딕"
        graph    [concentrate=true, splines=ortho, nodesep=0.5]
        node     [peripheries=0, style=filled, fixedsize=true, width=2.0, height=0.5, fillcolor=darkolivegreen1]
        edge     [fontsize=8, labeldistance=2.8]
        
        subgraph cluster_a
        {
            color=white
            {
                start           [shape=record, style="filled,rounded", fillcolor=lightyellow, label="CRON 시작"]
                cron_duplicate  [shape=diamond, height=0.7, fillcolor="#8ECCFC", label="동작중인 CRON이\n존재하지 않는가?"]
                cron_flag_on    [shape=rect, fillcolor=orange, label="CRON 수행 flag on"]
                do_standby_text [shape=diamond, height=0.7, fillcolor="#8ECCFC", label="텍스트 추출 완료\n상품이 존재하는가?"]
            }
            find_psd_file   [shape=rect, label="상품의 텍스트\n추출 완료 PSD 파일 수집"]
            find_ori_layer  [shape=rect, label="PSD 원문 레이어 텍스트 수집"]
            {
                rank=same
                do_standby_lang [shape=diamond, height=0.7, fillcolor="#8ECCFC", label="해당 레이어에 대한\n자동번역이 필요한가?"]
                update_trans    [shape=rect, fillcolor=orange, label="DB 번역문/타입 업데이트"]
            }
        }
        
        subgraph cluster_b
        {
            color=blue
            {
                rank=same
                exist_mall_dic [shape=diamond, height=0.7, fillcolor="#8ECCFC", label="문단/문장에 대한 몰사전\n번역이 존재하는가?"]
                make_token     [shape=rect, label="문장을 토큰 단위 분해"]
            }
            exist_tool_dic  [shape=diamond, height=0.7, fillcolor="#8ECCFC", label="번역툴 번역이\n존재하는가?"]
            {
                rank=same
                trans_mall_dic  [shape=rect, label="몰사전 번역"]
                trans_google    [shape=rect, label="구글 번역"]
                trans_tool_dic  [shape=rect, label="번역사전 번역"]
            }
            trans_result [shape=rect, label="번역 문장 및 번역 타입 수집"];
        }
        
        subgraph cluster_d {
            color=white;
            cron_flag_off   [shape=rect, fillcolor=orange, label="CRON 수행 flag off"]
            end	            [shape=record, style="filled,rounded", fillcolor=lightyellow, label="CRON 종료"]
        }
        
        start           -> cron_duplicate
        cron_duplicate  -> end              [headlabel="No",  color=red]
        cron_duplicate  -> cron_flag_on     [headlabel="Yes", color=green]
        cron_flag_on    -> do_standby_text
        do_standby_text -> cron_flag_off    [headlabel="No",  color=red]
        do_standby_text -> find_psd_file    [headlabel="Yes", color=green]
        find_psd_file   -> find_ori_layer  
        find_ori_layer  -> do_standby_lang 
        do_standby_lang -> exist_mall_dic   [headlabel="          Yes (번역정보 API 호출)", color=green]
        do_standby_lang -> do_standby_text  [headlabel="No",  color=red]
        exist_mall_dic  -> trans_mall_dic   [headlabel="Yes", color=green]
        exist_mall_dic  -> make_token       [headlabel="No",  color=red]
        make_token      -> exist_tool_dic
        exist_tool_dic  -> trans_tool_dic   [headlabel="Yes", color=green]
        exist_tool_dic  -> trans_google     [headlabel="No",  color=red]
        {trans_mall_dic, trans_tool_dic, trans_google} -> trans_result
        trans_result    -> update_trans     [headlabel="                    (번역정보 API 결과 반환)"]
        update_trans    -> do_standby_lang
        cron_flag_off   -> end
  2. Sequence Diagram - 시퀀스 다이어그램

 

 

해당 wiki는 자꾸 까 먹어서 새로 찾는 부분이 많이 발생하기 때문에 기본적인 부분에 대해서 정리를 합니다.