Browse Source

feat: 添加GenBusinessEntity

wangbo 2 tuần trước cách đây
mục cha
commit
9cc7b605fb
1 tập tin đã thay đổi với 8 bổ sung0 xóa
  1. 8 0
      ng_cws_client/callback_info.go

+ 8 - 0
ng_cws_client/callback_info.go

@@ -60,3 +60,11 @@ func (ce CloudEvent) GetDataProcess() (*WorkflowEventDataProcess, error) {
 	}
 	return dataProcess, nil
 }
+
+func (dp *DataProcess) GenBusinessEntity(businessEntity any) error {
+	err := json.Unmarshal([]byte(dp.BusinessEntityInstance), businessEntity)
+	if err != nil {
+		return err
+	}
+	return nil
+}