---
test-notify-card:
  Inited:
    CreatedEvent:
      state: Created
      action:
        cmd: ["notify", "card", "test", "alert", "both"]
        on_success: NotifyEvent
  Created:
    NotifyEvent:
      state: Finished
  Finished:

test:
  Inited:
    CreatedEvent:
      state: Created
      action:
        cmd: ["assign"]
        on_success: AssignEvent
        log_on_comment: true
  Created:
    AssignEvent:
      state: Assigned
      action:
        cmd: ["notify", "phone", "assignee", "alert"]
        log_on_comment: true
        on_success: NotifyEvent
  Assigned:
    NotifyEvent:
      state: Notified1Times
      action:
        cmd: ["timeout", "20"]
        on_success: TimeoutEvent
    AcknowledgeEvent:
      state: Acknowledged
      action:
        cmd: ["eval", "{{index .Args 0}}", "true"]
        on_success: ReqLogOnCommentEvent
  Notified1Times:
    TimeoutEvent:
      state: Notified1TimesTimeout
      action:
        cmd: ["notify", "phone", "assignee", "alert"]
        log_on_comment: true
        on_success: NotifyEvent
    AcknowledgeEvent:
      state: Acknowledged
      action:
        cmd: ["eval"]
        on_success: ReqLogOnCommentEvent
    UpdatedStatusToDoneEvent:
      state: Done
    UpdatedStatusToIndeterminateEvent:
      state: StrongAcknowledged
      action:
        cmd: ["eval", "{{index .Args 0}}", "true"]
        on_success: ReqLogOnCommentEvent
  Notified1TimesTimeout:
    NotifyEvent:
      state: NoResponse
      action:
        cmd: ["timeout", "20"]
        on_success: TimeoutEvent

  NoResponse:
    TimeoutEvent:
      state: BadEnd

  Acknowledged:
    ReqLogOnCommentEvent:
      state: AcknowledgedWaitComment
      action:
        cmd: ["comment", "ack by completing reading the Feishu message"]
        on_success: CommentedEvent
  AcknowledgedWaitComment:
    CommentedEvent:
      state: AcknowledgedAndCommented
  AcknowledgedAndCommented:
    UpdatedAssigneeEvent:
      state: Assigned
      action:
        cmd: ["notify", "card", "cloudfb", "alert", "both"]
  StrongAcknowledged:
    ReqLogOnCommentEvent:
      state: StrongAcknowledgedWaitComment
      action:
        cmd: ["comment", "ack by changing status to \"Start Progress\""]
        on_success: CommentedEvent
  StrongAcknowledgedWaitComment:
    CommentedEvent:
      state: StrongAcknowledgedAndCommented
  StrongAcknowledgedAndCommented:
  BadEnd:
  Done:

test-multi-escalate:
  General:
    UpdatedStatusToIndeterminateEvent:
      state: Acknowledged
    UpdatedStatusToDoneEvent:
      state: Done
    EscalateErrorEvent:
      state: BadEnd
  Inited:
    CreatedEvent:
      state: Created
      action:
        cmd: ["assign", "hu.guo@pingcap.com"]
        on_success: AssignHuEvent
        on_error: AssignErrorEvent
        log_on_comment: true
  Created:
    AssignHuEvent:
      state: NotifiedHu1
      action:
        cmd: ["notify", "phone", "assignee", "alert"]
        on_success: NotifyHu1Event
        log_on_comment: true
    AssignErrorEvent:
      state: BadEnd
  NotifiedHu1:
    NotifyHu1Event:
      state: WaitHu2
      action:
        cmd: ["timeout", "60"]
        on_success: TimeoutEvent
  WaitHu2:
    TimeoutEvent:
      state: NotifiedHu2
      action:
        cmd: ["notify", "phone", "assignee", "alert"]
        on_success: NotifyHu2Event
        log_on_comment: true
  NotifiedHu2:
    NotifyHu2Event:
      state: WaitHu3
      action:
        cmd: ["timeout", "60"]
        on_success: TimeoutEvent
  WaitHu3:
    TimeoutEvent:
      state: NotifiedHu3
      action:
        cmd: ["notify", "phone", "assignee", "alert"]
        on_success: NotifyHu3Event
        log_on_comment: true
  NotifiedHu3:
    NotifyHu3Event:
      state: WaitEscalateXie
      action:
        cmd: ["timeout", "60"]
        on_success: TimeoutEvent
  WaitEscalateXie:
    TimeoutEvent:
      state: EscalatedToXie
      action:
        cmd: ["escalate", "xieyujie@pingcap.com"]
        on_success: EscalateXieEvent
        on_error: EscalateErrorEvent
        log_on_comment: true
  EscalatedToXie:
    EscalateXieEvent:
      state: NotifiedXie
      action:
        cmd: ["notify", "phone", "assignee", "alert"]
        on_success: NotifyXieEvent
        log_on_comment: true
  NotifiedXie:
    NotifyXieEvent:
      state: WaitEscalateWu
      action:
        cmd: ["timeout", "60"]
        on_success: TimeoutEvent
  WaitEscalateWu:
    TimeoutEvent:
      state: EscalatedToWu
      action:
        cmd: ["escalate", "hu.guo@pingcap.com"]
        on_success: EscalateWuEvent
        on_error: EscalateErrorEvent
        log_on_comment: true
  EscalatedToWu:
    EscalateWuEvent:
      state: NotifiedWu
      action:
        cmd: ["notify", "phone", "assignee", "alert"]
        on_success: NotifyWuEvent
        log_on_comment: true
  NotifiedWu:
    NotifyWuEvent:
      state: Finished
  Acknowledged:
  Done:
  Finished:
  BadEnd:

test-infra-staging:
  Inited:
    CreatedEvent:
      state: Created
      action:
        cmd: ["notify", "card", "test_infra_staging", "alert", "both"]
        on_success: NotifyEvent
  Created:
    NotifyEvent:
      state: Finished
  Finished:

platform-staging-dev:
  Inited:
    CreatedEvent:
      state: Created
      action:
        cmd: ["notify", "card", "cp_platform_dev_stg_alert", "alert", "both"]
        on_success: NotifyEvent
  Created:
    NotifyEvent:
      state: Finished
  Finished:

account-staging-dev:
  Inited:
    CreatedEvent:
      state: Created
      action:
        cmd: ["notify", "card", "account_dev_stg_alert", "alert"]
        on_success: NotifyEvent
  Created:
    NotifyEvent:
      state: Finished
  Finished:

billing-staging-dev:
  Inited:
    CreatedEvent:
      state: Created
      action:
        cmd: ["notify", "card", "billing_dev_stg_alert", "alert", "both"]
        on_success: NotifyEvent
  Created:
    NotifyEvent:
      state: Finished
  Finished:

auto-staging-dev:
  Inited:
    CreatedEvent:
      state: Created
      action:
        cmd: ["notify", "card", "autonomous_staging_alert", "alert", "both"]
        on_success: NotifyEvent
  Created:
    NotifyEvent:
      state: Finished
  Finished:

serverless-staging-dev:
  Inited:
    CreatedEvent:
      state: Created
      action:
        cmd: ["notify", "card", "dev_tier_staging_dev_alert", "alert", "both"]
        on_success: NotifyEvent
  Created:
    NotifyEvent:
      state: Finished
  Finished:

aipower-dev:
  Inited:
    CreatedEvent:
      state: Created
      action:
        cmd: ["notify", "card", "ai_power_dev_staging_alerts", "alert", "both"]
        on_success: NotifiedOssEvent
  Created:
     NotifiedOssEvent:
      state: Finished
  Finished:

dev-dp:
  Inited:
    CreatedEvent:
      state: Created
      action:
        cmd: ["timeout", "25"]
        on_success: TimeoutEvent
  Created:
    TimeoutEvent:
      state: MayUpdatedAssignee
      action:
        cmd: ["notify", "card", "dp_dev_staging_alert", "alert"]
        on_success: NotifyEvent
    InnerUpdatedAssigneeEvent:
      state: MayUpdatedAssignee
      action:
        cmd: ["notify", "card", "dp_dev_staging_alert", "alert"]
        on_success: NotifyEvent
  MayUpdatedAssignee:
    NotifyEvent:
      state: Finished
  Finished:

tidb-management-service-cc:
  Inited:
    CreatedEvent:
      state: Created
      action:
        cmd: ["notify", "card", "tidb-management-service-cc", "alert", "both"]
        on_success: NotifiedCertikEvent
  Created:
     NotifiedCertikEvent:
      state: Finished
  Finished:

oncall:
  Inited:
    CreatedEvent:
      state: WaitForNotified
      action:
        cmd: ["notify", "card", "assignee", "oncall"]
        on_success: NotifyEvent
        log_on_comment: true
    UpdatedPriorityEvent:
      state: WaitForNotified
      action:
        cmd: ["notify", "card", "assignee", "oncall"]
        on_success: NotifyEvent
        log_on_comment: true
    UpdatedAssigneeEvent:
      state: WaitForNotified
      action:
        cmd: ["notify", "card", "assignee", "oncall"]
        on_success: NotifyEvent
        log_on_comment: true
  WaitForNotified:
    NotifyEvent:
      state: Finished
    UpdatedPriorityEvent:
      state: WaitForNotified
      action:
        cmd: ["notify", "card", "assignee", "oncall"]
        on_success: NotifyEvent
        log_on_comment: true
    UrgentUpdatedPriorityEvent:
      state: Upgraded
    UpdatedAssigneeEvent:
      state: WaitForNotified
      action:
        cmd: ["notify", "card", "assignee", "oncall"]
        on_success: NotifyEvent
        log_on_comment: true
  Finished:
    NotifyEvent:
      state: Finished
    UpdatedPriorityEvent:
      state: WaitForNotified
      action:
        cmd: ["notify", "card", "assignee", "oncall"]
        log_on_comment: true
        on_success: NotifyEvent
    UrgentUpdatedPriorityEvent:
      state: Upgraded
    UpdatedAssigneeEvent:
      state: WaitForNotified
      action:
        cmd: ["notify", "card", "assignee", "oncall"]
        on_success: NotifyEvent
        log_on_comment: true
  Upgraded:
    UpdatedPriorityEvent:
      state: WaitForNotified
      action:
        cmd: ["notify", "card", "assignee", "oncall"]
        on_success: NotifyEvent
        log_on_comment: true

oncall-assign:
  Inited:
    UrgentUpdatedPriorityEvent:
      state: WaitForTimeout
      action:
        cmd: ["timeout", 5]
        on_success: TimeoutEvent
    UpdatedPriorityEvent:
      state: WaitForTimeout
      action:
        cmd: ["timeout", 5]
        on_success: TimeoutEvent
  WaitForTimeout:
    TimeoutEvent:
      state: WaitForNotified
      action:
        cmd: ["assign"]
        on_success: FinishEvent
        on_error: ErrorAssignEvent
  WaitForNotified:
    FinishEvent:
      state: Finished
    ErrorAssignEvent:
      state: WaitNotifyHu
      action:
        cmd: ["notify", "phone", "static-hu", "oncall"]
        on_success: NotifyHuSuccessEvent
        log_on_comment: true
  WaitNotifyHu:
    NotifyHuSuccessEvent:
      state: Finished
  Finished:

next-gen-cc:
  Inited:
    CreatedEvent:
      state: Created
      action:
        cmd: ["notify", "card", "cluster_next_gen_alert", "alert", "default"]
        on_success: NotifiedCertikEvent
  Created:
    NotifiedCertikEvent:
      state: Finished
  Finished:

next-gen-cc-kernel:
  Inited:
    CreatedEvent:
      state: Created
      action:
        cmd: ["notify", "card", "premium_alerts", "alert", "default"]
        on_success: NotifiedCertikEvent
  Created:
    NotifiedCertikEvent:
      state: Finished
  Finished:

next-gen-cluster-service-cc:
  Inited:
    CreatedEvent:
      state: Created
      action:
        cmd: ["notify", "card", "next_gen_cluster_service_alert", "alert", "default"]
        on_success: NotifiedCertikEvent
  Created:
    NotifiedCertikEvent:
      state: Finished
  Finished:

guardian-alert:
  Inited:
    CreatedEvent:
      state: Created
      action:
        cmd: ["guardian"]
        log_on_comment: true
        on_success: CreateAnalysisEvent
  Created:
    CreateAnalysisEvent:
      state: Finished
  Finished:

cloudfb-day-hu-special:
  General:
    AutoRecoveredEvent:
      state: Acknowledged
    UpdatedStatusToDoneEvent:
      state: Done
    UpdatedStatusToIndeterminateEvent:
      state: StrongAcknowledged
      action:
        cmd: ["eval"]
        on_success: ReqLogOnCommentEvent
  Inited:
    CreatedEvent:
      state: Created
      action:
        cmd: ["assign"]
        on_success: AssignEvent
        on_error: ErrorOnAssigningEvent
  Created:
    AssignEvent:
      state: Assigned
      action:
        cmd: ["notify", "card", "cloudfb", "alert", "both"]
        on_success: NotifyEvent
    ErrorOnAssigningEvent:
      state: AssignmentError
      action:
        cmd: ["notify", "card", "cloudfb", "alert", "both"]
        on_success: NotifyErrorHandlerEvent
  Assigned:
    NotifyEvent:
      state: Notified1Times
      action:
        cmd: ["notify", "phone", "assignee", "alert"]
        log_on_comment: true
        on_success: NotifyEvent
  Notified1Times:
    NotifyEvent:
      state: Notified1TimesTimeout
      action:
        cmd: ["timeout", "25"]
        on_success: TimeoutEvent

  Notified1TimesTimeout:
    TimeoutEvent:
      state: Notified2Times
      action:
        cmd: ["notify", "phone", "assignee", "alert"]
        log_on_comment: true
        on_success: NotifyEvent

  Notified2Times:
    NotifyEvent:
      state: Notified2TimesTimeout
      action:
        cmd: ["timeout", "25"]
        on_success: TimeoutEvent

  Notified2TimesTimeout:
    TimeoutEvent:
      state: Notified3Times
      action:
        cmd: ["notify", "phone", "assignee", "alert"]
        log_on_comment: true
        on_success: NotifyEvent

  Notified3Times:
    NotifyEvent:
      state: BranchAfterThirdCall
      action:
        cmd: ["timeout", "25"]
        on_success: TimeoutEvent

  BranchAfterThirdCall:
    TimeoutEvent:
      state: BranchAfterThirdCall
      action:
        cmd: ["eval", "{{eq .Issue.AssigneeEmail \"hu.guo@pingcap.com\"}}"]
        on_success: HuSpecialEvent
        on_failure: NormalEvent

    HuSpecialEvent:
      state: HuSpecialXieAssigned
      action:
        cmd: ["assign", "xieyujie@pingcap.com"]
        log_on_comment: true
        on_success: AssignedXieEvent
        on_error: NormalEvent

    NormalEvent:
      state: Notified3TimesTimeout
      action:
        cmd: ["notify", "phone", "secondary", "alert"]
        log_on_comment: true
        on_success: NotifiedSecondaryEvent
        on_error: NotifiedSecondaryErrorEvent

  HuSpecialXieAssigned:
    AssignedXieEvent:
      state: HuSpecialXieNotified
      action:
        cmd: ["notify", "phone", "assignee", "alert"]
        log_on_comment: true
        on_success: NotifyXieEvent

  HuSpecialXieNotified:
    NotifyXieEvent:
      state: HuSpecialHuAssigned
      action:
        cmd: ["assign", "hu.guo@pingcap.com"]
        log_on_comment: true
        on_success: AssignedHuEvent
        on_error: AssignHuErrorEvent
    AssignHuErrorEvent:
      state: EscalateError
      action:
        cmd: ["notify", "phone", "firemaster", "alert"]
        log_on_comment: true
        on_success: NotifyFiremasterEvent

  HuSpecialHuAssigned:
    AssignedHuEvent:
      state: HuSpecialHuNotified
      action:
        cmd: ["notify", "phone", "assignee", "alert"]
        log_on_comment: true
        on_success: NotifyHuEvent

  HuSpecialHuNotified:
    NotifyHuEvent:
      state: NotifiedSecondaryTimeout
      action:
        cmd: ["escalate", "hu.guo@pingcap.com"]
        log_on_comment: true
        on_success: EscalateEvent
        on_error: EscalateErrorEvent

  Notified3TimesTimeout:
    NotifiedSecondaryEvent:
      state: NotifiedSecondary
      action:
        cmd: ["timeout", "25"]
        on_success: TimeoutEvent
    NotifiedSecondaryErrorEvent:
      state: NotifiedSecondaryTimeout
      action:
        cmd: ["escalate", "hu.guo@pingcap.com"]
        log_on_comment: true
        on_success: EscalateEvent
        on_error: EscalateErrorEvent

  NotifiedSecondary:
    TimeoutEvent:
      state: NotifiedSecondaryTimeout
      action:
        cmd: ["escalate", "hu.guo@pingcap.com"]
        log_on_comment: true
        on_success: EscalateEvent
        on_error: EscalateErrorEvent

  NotifiedSecondaryTimeout:
    EscalateEvent:
      state: Escalated
      action:
        cmd: ["notify", "phone", "assignee", "alert"]
        log_on_comment: true
        on_success: NotifyEscalationEvent
    EscalateErrorEvent:
      state: EscalateError
      action:
        cmd: ["notify", "phone", "firemaster", "alert"]
        log_on_comment: true
        on_success: NotifyFiremasterEvent

  Escalated:
    NotifyEscalationEvent:
      state: NotifiedEscalation
      action:
        cmd: ["timeout", "25"]
        on_success: TimeoutEvent

  EscalateError:
    NotifyFiremasterEvent:
      state: NotifiedFiremaster
      action:
        cmd: ["timeout", "25"]
        on_success: TimeoutEvent

  NotifiedEscalation:
    TimeoutEvent:
      state: NotifiedEscalationTimeout
      action:
        cmd: ["escalate", "hu.guo@pingcap.com"]
        log_on_comment: true
        on_success: EscalateEvent
        on_error: EscalateErrorEvent

  NotifiedEscalationTimeout:
    EscalateEvent:
      state: Escalated
      action:
        cmd: ["notify", "phone", "assignee", "alert"]
        log_on_comment: true
        on_success: NotifyEscalationEvent
    EscalateErrorEvent:
      state: EscalateError
      action:
        cmd: ["notify", "phone", "firemaster", "alert"]
        log_on_comment: true
        on_success: NotifyFiremasterEvent

  NotifiedFiremaster:
    TimeoutEvent:
      state: NotifiedFiremasterTimeout
      action:
        cmd: ["notify", "phone", "firemaster", "alert"]
        log_on_comment: true
        on_success: NotifiedFiremasterEvent

  NotifiedFiremasterTimeout:
    NotifiedFiremasterEvent:
      state: NotifiedFireMaster2Times
      action:
        cmd: ["timeout", "25"]
        on_success: TimeoutEvent

  NotifiedFireMaster2Times:
    TimeoutEvent:
      state: NotifiedFiremaster2TimesTimeout
      action:
        cmd: ["notify", "phone", "siddon", "alert"]
        log_on_comment: true
        on_success: NotifiedSiddonEvent

  NotifiedFiremaster2TimesTimeout:
    NotifiedSiddonEvent:
      state: NotifiedSiddon

  NotifiedSiddon:
  Acknowledged:
    ReqLogOnCommentEvent:
      state: AcknowledgedWaitComment
      action:
        cmd: ["comment", "ack by completing reading the Feishu message"]
        on_success: CommentedEvent
  AcknowledgedWaitComment:
    CommentedEvent:
      state: AcknowledgedAndCommented
  AcknowledgedAndCommented:
  StrongAcknowledged:
    ReqLogOnCommentEvent:
      state: StrongAcknowledgedWaitComment
      action:
        cmd: ["comment", 'ack by changing status to "Start Progress"']
        on_success: CommentedEvent
  StrongAcknowledgedWaitComment:
    CommentedEvent:
      state: StrongAcknowledgedAndCommented
  StrongAcknowledgedAndCommented:
  AssignmentError:
    NotifyErrorHandlerEvent:
      state: BadEnd
  Done:
  Finished:
  BadEnd:

cloudfb:
  General:
    AutoRecoveredEvent:
      state: Acknowledged
    # AcknowledgeEvent:
    #   state: Acknowledged
    #   action:
    #     cmd: ["eval"]
    #     on_success: ReqLogOnCommentEvent
    UpdatedStatusToDoneEvent:
      state: Done
    UpdatedStatusToIndeterminateEvent:
      state: StrongAcknowledged
      action:
        cmd: ["eval"]
        on_success: ReqLogOnCommentEvent
    UpdateAssigneeWhenInProgressEvent:
      state: Reassigned
      action:
        cmd: ["transition", "31"] # Transition to "To Do" status
        on_success: TransitionSuccessEvent
        on_error: TransitionErrorEvent
        log_on_comment: true
  Reassigned:
    TransitionSuccessEvent:
      state: Assigned
      action:
        cmd: ["notify", "card", "cloudfb", "alert", "both"]
        on_success: NotifyEvent
    TransitionErrorEvent:
      state: BadEnd
      action:
        cmd: ["comment", "Failed to transition issue to 'To Do' status. Please notify the assignee manually."]
  Inited:
    CreatedEvent:
      state: Created
      action:
        cmd: ["assign"]
        on_success: AssignEvent
        on_error: ErrorOnAssigningEvent
  Created:
    AssignEvent:
      state: Assigned
      action:
        cmd: ["notify", "card", "cloudfb", "alert", "both"]
        on_success: NotifyEvent
    ErrorOnAssigningEvent:
      state: AssignmentError
      action:
        cmd: ["notify", "card", "cloudfb", "alert", "both"]
        on_success: NotifyErrorHandlerEvent
  Assigned:
    NotifyEvent:
      state: NotifiedCFB
      action:
        cmd: ["notify", "phone", "assignee", "alert"]
        log_on_comment: true
        on_success: NotifyEvent
  NotifiedCFB:
    NotifyEvent:
      state: Notified1Times
      action:
        cmd: ["timeout", "25"]
        on_success: TimeoutEvent
  Notified1Times:
    TimeoutEvent:
      state: Notified1TimesTimeout
      action:
        cmd: ["notify", "phone", "assignee", "alert"]
        log_on_comment: true
        on_success: NotifyEvent

  Notified1TimesTimeout:
    NotifyEvent:
      state: Notified2Times
      action:
        cmd: ["timeout", "25"]
        on_success: TimeoutEvent

  Notified2Times:
    TimeoutEvent:
      state: Notified2TimesTimeout
      action:
        cmd: ["notify", "phone", "assignee", "alert"]
        log_on_comment: true
        on_success: NotifyEvent

  Notified2TimesTimeout:
    NotifyEvent:
      state: Notified3Times
      action:
        cmd: ["timeout", "25"]
        on_success: TimeoutEvent

  Notified3Times:
    TimeoutEvent:
      state: Notified3TimesTimeout
      action:
        cmd: ["notify", "phone", "secondary", "alert"]
        log_on_comment: true
        on_success: NotifiedSecondaryEvent
        on_error: NotifiedSecondaryErrorEvent

  Notified3TimesTimeout:
    NotifiedSecondaryEvent:
      state: NotifiedSecondary
      action:
        cmd: ["timeout", "25"]
        on_success: TimeoutEvent
    NotifiedSecondaryErrorEvent:
      state: NotifiedSecondaryTimeout
      action:
        cmd: ["escalate", "hu.guo@pingcap.com"]
        log_on_comment: true
        on_success: EscalateEvent
        on_error: EscalateErrorEvent

  NotifiedSecondary:
    TimeoutEvent:
      state: NotifiedSecondaryTimeout
      action:
        cmd: ["escalate", "hu.guo@pingcap.com"]
        log_on_comment: true
        on_success: EscalateEvent
        on_error: EscalateErrorEvent

  NotifiedSecondaryTimeout:
    EscalateEvent:
      state: Escalated
      action:
        cmd: ["notify", "phone", "assignee", "alert"]
        log_on_comment: true
        on_success: NotifyEscalationEvent
    EscalateErrorEvent:
      state: EscalateError
      action:
        cmd: ["notify", "phone", "firemaster", "alert"]
        log_on_comment: true
        on_success: NotifyFiremasterEvent

  Escalated:
    NotifyEscalationEvent:
      state: NotifiedEscalation
      action:
        cmd: ["timeout", "25"]
        on_success: TimeoutEvent

  EscalateError:
    NotifyFiremasterEvent:
      state: NotifiedFiremaster
      action:
        cmd: ["timeout", "25"]
        on_success: TimeoutEvent

  NotifiedEscalation:
    TimeoutEvent:
      state: NotifiedEscalationTimeout
      action:
        cmd: ["escalate", "hu.guo@pingcap.com"]
        log_on_comment: true
        on_success: EscalateEvent
        on_error: EscalateErrorEvent

  NotifiedEscalationTimeout:
    EscalateEvent:
      state: Escalated
      action:
        cmd: ["notify", "phone", "assignee", "alert"]
        log_on_comment: true
        on_success: NotifyEscalationEvent
    EscalateErrorEvent:
      state: EscalateError
      action:
        cmd: ["notify", "phone", "firemaster", "alert"]
        log_on_comment: true
        on_success: NotifyFiremasterEvent

  NotifiedFiremaster:
    TimeoutEvent:
      state: NotifiedFiremasterTimeout
      action:
        cmd: ["notify", "phone", "firemaster", "alert"]
        log_on_comment: true
        on_success: NotifiedFiremasterEvent

  NotifiedFiremasterTimeout:
    NotifiedFiremasterEvent:
      state: NotifiedFireMaster2Times
      action:
        cmd: ["timeout", "25"]
        on_success: TimeoutEvent

  NotifiedFireMaster2Times:
    TimeoutEvent:
      state: NotifiedFiremaster2TimesTimeout
      action:
        cmd: ["notify", "phone", "siddon", "alert"]
        log_on_comment: true
        on_success: NotifiedSiddonEvent

  NotifiedFiremaster2TimesTimeout:
    NotifiedSiddonEvent:
      state: NotifiedSiddon

  NotifiedSiddon:

  Acknowledged:
    ReqLogOnCommentEvent:
      state: AcknowledgedWaitComment
      action:
        cmd: ["comment", "ack by completing reading the Feishu message"]
        on_success: CommentedEvent
  AcknowledgedWaitComment:
    CommentedEvent:
      state: AcknowledgedAndCommented
  AcknowledgedAndCommented:
    UpdatedAssigneeEvent:
      state: Assigned
      action:
        cmd: ["notify", "card", "cloudfb", "alert", "both"]
        on_success: NotifyEvent
  StrongAcknowledged:
    ReqLogOnCommentEvent:
      state: StrongAcknowledgedWaitComment
      action:
        cmd: ["comment", 'ack by changing status to "Start Progress"']
        on_success: CommentedEvent
  StrongAcknowledgedWaitComment:
    CommentedEvent:
      state: StrongAcknowledgedAndCommented
  StrongAcknowledgedAndCommented:
  AssignmentError:
    NotifyErrorHandlerEvent:
      state: BadEnd
  BadEnd:
  Done:

cloudfb-leader:
  Inited:
    CreatedEvent:
      state: Created
      action:
        cmd: ["timeout", "20"]
        on_success: TimeoutEvent
  Created:
    UpdatedStatusToDoneEvent:
      state: Finished
    TimeoutEvent:
      state: WaitNotifyLeader
      action:
        cmd: ["notify", "card", "leader", "alert"]
        on_success: NotifyLeaderEvent
  WaitNotifyLeader:
    NotifyLeaderEvent:
      state: Finished 
  Finished:

next-gen-assign:
  Inited:
    CreatedEvent:
      state: Created
      action:
        cmd: ["assign"]
        on_success: AssignEvent
        on_error: ErrorOnAssigningEvent
  Created:
    AssignEvent:
      state: Assigned
      action:
        cmd: ["notify", "card", "assignee", "alert"]
        on_success: NotifyEvent
        log_on_comment: true
  Assigned:
    NotifyEvent:
      state: NotifiedAssignee
  NotifiedAssignee:


big3-http-forward:
  Inited:
    CreatedEvent:
      state: Created
      action:
        cmd: ["http_forward", "POST", "http://ec2-35-89-86-210.us-west-2.compute.amazonaws.com/alert"]
        on_success: HttpForwardSuccessEvent
        on_error: HttpForwardErrorEvent
  Created:
    HttpForwardSuccessEvent:
      state: Finished
    HttpForwardErrorEvent:
      state: Error
  Finished:
  Error:

next-gen-import-cc:
  Inited:
    CreatedEvent:
      state: Created
      action:
        cmd: ["notify", "card", "next_gen_import_dev_staging", "alert", "default"]
        on_success: NotifiedCertikEvent
  Created:
    NotifiedCertikEvent:
      state: Finished
  Finished:

guardian-jsm-ticket:
  Inited:
    CreatedEvent:
      state: Created
      action:
        cmd: ["backfill"]
        log_on_comment: true
        on_success: BackfilledEvent
  Created:
    BackfilledEvent:
      state: Backfilled
      action:
        cmd: ["guardian"]
        log_on_comment: true
        on_success: CreateAnalysisEvent
  Backfilled:
    CreateAnalysisEvent:
      state: Finished
  Finished:

next-gen-stg-cc:
  Inited:
    CreatedEvent:
      state: Created
      action:
        cmd: ["notify", "card", "staging_premium_internal_alert", "alert", "default"]
        on_success: NotifiedCertikEvent
  Created:
    NotifiedCertikEvent:
      state: Finished
  Finished:

regression_test:
  Inited:
    CreatedEvent:
      state: Created
      action:
        cmd: ["notify", "card", "regression_test", "alert", "both"]
        on_success: NotifyEvent
  Created:
    NotifyEvent:
      state: Finished
  Finished: