Skip to main content

워크플로우와 대시보드

워크플로우

processNodes (프로세스 노드)

{
"refId": "pp_hcm_start",
"type": "startEvent",
"label": "구매 프로세스 시작",
"description": "발주 요청 시 자동 시작",
"boundTableRef": "hcm_purchase_orders",
"group": "hcm_purchase_process",
"config": {
"triggerType": "data_trigger",
"triggerEvents": ["on_create"]
}
}

노드 타입

타입설명config 예시
startEvent프로세스 시작{ triggerType: "data_trigger", triggerEvents: ["on_create"] }
endEvent프로세스 종료없음
humanTask사람 작업 (UI){ assignee: "구매담당자", dataAction: "create", screenMode: "drawer" }
autoTask자동 작업{ script: "UPDATE ...", notifyOnComplete: true }
approval승인 단계{ approvers: ["팀장"], approvalType: "순차", timeoutHours: 48 }
exclusiveGateway조건 분기 (XOR){ conditions: [{ label: "승인", expression: "status === '승인'" }] }
parallelGateway병렬 실행병렬 분기 정의
timerEvent시간 기반{ timerType: "date", expression: "delivery_date - 5days" }
email이메일 발송{ to: "{{partner.email}}", subject: "..." }
formulaCalc자동 계산{ formula: "quantity * unit_price", outputField: "total_amount" }
documentGen문서 생성{ templateId: "po_template", outputFormat: "PDF" }
dataFilter데이터 필터{ filterField: "status", filterValue: "유효" }
inAppNotification인앱 알림{ template: "{{field}} 변경 알림", recipients: ["담당자"] }

startEvent 고급 설정 — 데이터 트리거 조건

startEvent에서 data_trigger를 사용할 때, watchFieldstriggerConditions로 세밀한 조건부 트리거를 설정할 수 있습니다.

{
"refId": "scr_start",
"type": "startEvent",
"label": "표준원가 개정 트리거",
"boundTableRef": "std_cost_variances",
"group": "std_cost_revision_process",
"config": {
"triggerType": "data_trigger",
"triggerEnabled": true,
"triggerEvents": ["on_create", "on_update"],
"watchFields": ["variance_rate", "favorability"],
"triggerConditions": [
{ "field": "variance_rate", "operator": "gt", "value": "10" },
{ "field": "favorability", "operator": "eq", "value": "불리" }
]
}
}
config 필드타입설명
triggerEnabledboolean트리거 활성화 여부
watchFieldsstring[]변경 감시 대상 필드 (이 필드가 변경될 때만 트리거 평가)
triggerConditionsCondition[]조건 배열 (AND 결합 — 모든 조건을 만족해야 트리거)

triggerConditions 연산자

연산자의미예시
eq같음{ field: "status", operator: "eq", value: "완료" }
gt초과{ field: "variance_rate", operator: "gt", value: "10" }
gte이상{ field: "amount", operator: "gte", value: "1000000" }
lt미만{ field: "stock_qty", operator: "lt", value: "100" }
lte이하{ field: "defect_rate", operator: "lte", value: "5" }
changed_to변경됨{ field: "status", operator: "changed_to", value: "확정" }
changed_from변경 전{ field: "status", operator: "changed_from", value: "작성" }

inAppNotification 노드

인앱 알림을 발송하는 자동 노드입니다. template{{필드명}} 플레이스홀더를 사용할 수 있습니다.

{
"refId": "scr_notify_exceed",
"type": "inAppNotification",
"label": "차이 초과 알림",
"group": "std_cost_revision_process",
"config": {
"template": "[표준원가 차이 초과] 품목 {{item_id}}의 차이율이 {{variance_rate}}%로 기준(10%)을 초과했습니다.",
"recipients": ["원가관리자", "재무팀장"]
}
}
config 필드타입설명
templatestring알림 메시지 템플릿 ({{필드명}} 치환 지원)
recipientsstring[]수신 대상 역할 목록

flowConnections (프로세스 연결)

{
"sourceRef": "pp_hcm_start",
"targetRef": "pp_hcm_register",
"label": null
}
필드타입필수설명
sourceRefstring필수출발 노드 refId
targetRefstring필수도착 노드 refId
labelstring|null선택조건 분기용 라벨 (예: "승인", "반려")
  • exclusiveGateway에서 나가는 연결은 반드시 label 지정

대시보드

dashboardWidgets

{
"refId": "w_hcm_production_rate",
"type": "gaugeChart",
"label": "생산 달성률",
"description": "당월 생산 목표 대비 실적",
"boundTableRef": "hcm_production_results",
"config": { "min": 0, "max": 100, "dataField": "achievement_rate" },
"group": "production"
}

위젯 타입

타입설명
barChart막대 차트
lineChart라인 차트
pieChart파이 차트
kpiCardKPI 카드 (숫자 강조)
statCard통계 카드
gaugeChart게이지 차트 (목표 달성률)

dashboardPreset

{
"dashboardPreset": {
"coreWidgetRefs": ["w_hcm_production_rate", "w_hcm_quality_rate", "w_hcm_defect_trend"],
"layout": [
{ "widgetRef": "w_hcm_production_rate", "x": 0, "y": 0, "w": 4, "h": 3 },
{ "widgetRef": "w_hcm_quality_rate", "x": 4, "y": 0, "w": 4, "h": 3 },
{ "widgetRef": "w_hcm_defect_trend", "x": 8, "y": 0, "w": 4, "h": 3 }
]
}
}
  • 12-column 그리드 레이아웃 (w 최대 12)
  • x: 가로 위치 (0~11)
  • y: 세로 위치 (행)
  • w: 너비 (1~12)
  • h: 높이 (행 수)

액션 화면

워크플로우 노드에서 사용하는 처리 UI (모달/드로어/페이지).

{
"refId": "as_hcm_po_approve",
"label": "발주서 승인",
"screenMode": "modal",
"processNodeRef": "pp_hcm_approval",
"processNodeType": "approval",
"boundTableRef": "hcm_purchase_orders",
"displayFields": [
{ "columnName": "po_number", "label": "발주번호" },
{ "columnName": "partner_id", "label": "공급업체" },
{ "columnName": "total_amount", "label": "총액" }
],
"formFields": [
{
"columnName": "approval_comment",
"label": "승인 의견",
"required": false,
"fieldType": "textarea"
}
],
"actionButtons": [
{ "label": "승인", "action": "approve", "type": "primary", "requireComment": true, "order": 1 },
{
"label": "반려",
"action": "reject",
"type": "danger",
"requireComment": true,
"confirmMessage": "반려하시겠습니까?",
"order": 2
}
]
}

screenMode

모드설명
modal모달 팝업
drawer사이드 드로어
page전체 페이지

actionButtons.action

액션설명
approve승인
reject반려
complete완료
escalate상위 에스컬레이션
submit제출
download다운로드
scan스캔
custom커스텀

actionButtons와 워크플로우 통합

대시보드 및 POP 화면의 actionButtons는 워크플로우 상태 전이와 CascadeUpdate 연쇄 갱신을 트리거할 수 있습니다.

동작 흐름

사용자 버튼 클릭 (actionButton)
→ 대상 테이블 상태 변경 (예: work_orders.status = '완료')
→ CascadeUpdate Rule 트리거
→ 상위 테이블 갱신 (예: production_orders.actual_qty 재계산)
→ audit_trail 자동 INSERT

예시: POP 대시보드 "실적등록" 버튼

POP 화면에서 작업자가 "실적등록" 버튼을 누르면 다음과 같은 연쇄 처리가 발생합니다.

{
"refId": "pop_result_input",
"screenType": "pop",
"boundTableRef": "production_results",
"popConfig": {
"quickActions": [
{ "label": "실적등록", "action": "submit", "color": "#52c41a", "size": "large", "order": 1 }
]
}
}

실적등록 버튼 클릭 시 연쇄 처리 순서:

  1. production_results 테이블에 새 행 INSERT (양품수량, 불량수량)
  2. CascadeUpdate Rule 1: work_ordersgood_qty, defect_qty 집계 갱신
  3. CascadeUpdate Rule 2: production_ordersactual_qty, progress 재계산
  4. 각 단계마다 audit_trail에 변경 이력 자동 기록

액션 화면(actionScreens)의 actionButtons

워크플로우 노드에 연결된 액션 화면에서도 actionButtons를 사용하여 프로세스 상태를 전이시킵니다.

{
"refId": "as_po_approve",
"processNodeRef": "pp_approval",
"processNodeType": "approval",
"boundTableRef": "purchase_orders",
"actionButtons": [
{
"label": "승인",
"action": "approve",
"type": "primary",
"requireComment": true,
"order": 1
},
{
"label": "반려",
"action": "reject",
"type": "danger",
"requireComment": true,
"confirmMessage": "반려하시겠습니까?",
"order": 2
}
]
}
  • approve / reject 액션은 워크플로우 exclusiveGateway의 조건과 연동
  • 승인 → 다음 노드로 진행, 반려 → 반려 경로로 분기
  • requireComment: true이면 코멘트 입력 후 액션 실행

통합 규칙

  1. POP quickActionssubmit 액션은 CascadeUpdate 트리거와 자동 연동
  2. 액션 화면의 actionButtons는 워크플로우 processNodeType에 맞는 액션만 사용
  3. approval 노드에서는 approve, reject 액션 사용
  4. humanTask 노드에서는 complete, submit 액션 사용
  5. 상태 변경에 의한 CascadeUpdate 연쇄와 워크플로우 상태 전이는 같은 트랜잭션 내에서 처리

이전: 시각화 화면 구성 | 다음: 시드 데이터와 네이밍