Explorar el Código

添加 回调信息

wangbo hace 2 meses
padre
commit
1d0bf9e2c8
Se han modificado 1 ficheros con 45 adiciones y 0 borrados
  1. 45 0
      ng_cws_client/callback_info.go

+ 45 - 0
ng_cws_client/callback_info.go

@@ -0,0 +1,45 @@
+package ng_cws_client
+
+const (
+	EventTypeNodeAgree  = iota + 1 // 节点同意事件
+	EventTypeNodeReject            // 节点退回事件
+	EventTypeRecall                // 撤回事件
+	EventTypeOverTime              // 超时事件
+	EventTypeNodeNotice            // 节点提醒事件
+
+	EventTypeWorkflowAgree  //流程同意事件
+	EventTypeWorkflowReject //流程退回事件
+
+	EventTypeNodeEnter //节点进入事件
+
+	EventTypeWorkflowRevoke //流程撤回事件
+)
+
+type (
+	WorkflowEventDataProcess struct {
+		DataProcess
+		Event     int    `json:"event"`
+		EventName string `json:"eventName"`
+	}
+
+	CloudEvent struct {
+		SpecVersion     string `json:"specversion"`
+		ID              string `json:"id"`
+		Type            string `json:"type"`
+		Source          string `json:"source"`
+		DataContentType string `json:"datacontenttype"`
+		Time            string `json:"time"`
+		Data            []byte `json:"data"`
+	}
+
+	DataProcess struct {
+		WorkflowID             string `json:"workflowId"`
+		TenantID               string `json:"tenantId"`
+		LaunchTime             string `json:"launchTime"`
+		LaunchUserID           string `json:"launchUserId"`
+		LaunchUserName         string `json:"launchUserName"`
+		ApproveUserID          string `json:"approveUserID"`   // 审批人id
+		ApproveUserName        string `json:"approveUserName"` // 审批人姓名
+		BusinessEntityInstance string `json:"businessEntityInstance"`
+	}
+)