diff --git a/app-builder/fel/java/pom.xml b/app-builder/fel/java/pom.xml
index b354708748..403135a264 100644
--- a/app-builder/fel/java/pom.xml
+++ b/app-builder/fel/java/pom.xml
@@ -24,7 +24,7 @@
17
- 3.5.0-SNAPSHOT
+ 3.5.0-M1
1.0.0-SNAPSHOT
1.0.0-SNAPSHOT
1.0.0-SNAPSHOT
diff --git a/app-builder/jane/dynamic-form-genericable/pom.xml b/app-builder/jane/dynamic-form-genericable/pom.xml
index 6428f94e54..67680dd588 100644
--- a/app-builder/jane/dynamic-form-genericable/pom.xml
+++ b/app-builder/jane/dynamic-form-genericable/pom.xml
@@ -19,12 +19,12 @@
org.fitframework
fit-api
- 3.5.0-SNAPSHOT
+ 3.5.0-M1
org.fitframework
fit-util
- 3.5.0-SNAPSHOT
+ 3.5.0-M1
modelengine.fit.jane
@@ -34,7 +34,7 @@
org.fitframework.service
fit-http-classic
- 3.5.0-SNAPSHOT
+ 3.5.0-M1
org.projectlombok
diff --git a/app-builder/jane/plugins/aipp-plugin/src/main/java/modelengine/fit/jober/aipp/fitable/FlowPublishSubscriber.java b/app-builder/jane/plugins/aipp-plugin/src/main/java/modelengine/fit/jober/aipp/fitable/FlowPublishSubscriber.java
index d31da9391c..1ade931657 100644
--- a/app-builder/jane/plugins/aipp-plugin/src/main/java/modelengine/fit/jober/aipp/fitable/FlowPublishSubscriber.java
+++ b/app-builder/jane/plugins/aipp-plugin/src/main/java/modelengine/fit/jober/aipp/fitable/FlowPublishSubscriber.java
@@ -9,6 +9,7 @@
import modelengine.fit.jober.aipp.constants.AippConst;
import modelengine.fit.jober.aipp.domain.AppBuilderRuntimeInfo;
import modelengine.fit.jober.aipp.dto.chat.AppChatRsp;
+import modelengine.fit.jober.aipp.entity.ChatSession;
import modelengine.fit.jober.aipp.repository.AppBuilderRuntimeInfoRepository;
import modelengine.fit.jober.aipp.service.AppChatSessionService;
import modelengine.fit.jober.aipp.service.AppChatSseService;
@@ -88,13 +89,17 @@ public void publishNodeInfo(FlowNodePublishInfo flowNodePublishInfo) {
private void stageProcessedHandle(FlowNodePublishInfo flowNodePublishInfo, Map businessData,
String aippInstId) {
+ Optional> instanceSession = this.appChatSessionService.getSession(aippInstId);
+ if (instanceSession.isPresent() && !instanceSession.get().isDebug()) {
+ return;
+ }
FlowPublishContext context = flowNodePublishInfo.getFlowContext();
String traceId = context.getTraceId();
String nodeId = flowNodePublishInfo.getNodeId();
String nodeType = flowNodePublishInfo.getNodeType();
FlowErrorInfo errorInfo = flowNodePublishInfo.getErrorMsg();
AtomicReference locale = new AtomicReference<>(Locale.getDefault());
- appChatSessionService.getSession(aippInstId).ifPresent(e -> locale.set(e.getLocale()));
+ instanceSession.ifPresent(session -> locale.set(session.getLocale()));
ToolExceptionHandle.handleFitException(errorInfo);
String finalErrorMsg = this.toolExceptionHandle.getFixErrorMsg(errorInfo, locale.get(), false);
if (StringUtils.isBlank(finalErrorMsg)) {
@@ -103,7 +108,7 @@ private void stageProcessedHandle(FlowNodePublishInfo flowNodePublishInfo, Map initContext,
OperationContext context) {
- Meta meta = getMetaByAppId(metaService, appId, isDebug, context);
+ Meta meta = CacheUtils.getMetaByAppId(metaService, appId, isDebug, context);
String metaInstId = this.createAippInstance(meta.getId(), meta.getVersion(), initContext, context);
return metaInstanceService.list(Collections.singletonList(metaInstId), 0, 1, context)
.getResults()
@@ -268,46 +268,16 @@ public String createLatestAippInstanceByAppId(String appId, boolean isDebug, Map
@Override
public Tuple createInstanceByApp(String appId, String question, Map businessData,
OperationContext context, boolean isDebug) {
- Meta meta = getMetaByAppId(metaService, appId, isDebug, context);
+ Meta meta = CacheUtils.getMetaByAppId(metaService, appId, isDebug, context);
return this.createInstanceHandle(question, businessData, meta, context, isDebug);
}
@Override
public MetaVo queryLatestMetaVoByAppId(String appId, boolean isDebug, OperationContext context) {
- Meta meta = getMetaByAppId(metaService, appId, isDebug, context);
+ Meta meta = CacheUtils.getMetaByAppId(metaService, appId, isDebug, context);
return MetaVo.builder().id(meta.getId()).version(meta.getVersion()).build();
}
- /**
- * 根据appid查询对应meta
- *
- * @param metaService 操作meta的service
- * @param appId 应用appId
- * @param isDebug 是否为debug会话
- * @param context 操作上下文
- * @return app对应的meta信息
- */
- public static Meta getMetaByAppId(MetaService metaService, String appId, boolean isDebug,
- OperationContext context) {
- if (isDebug) {
- return getLatestMetaByAppId(metaService, appId, context);
- }
- // get 一个aipp_id的缓存,然后根据aipp_id查询最新发布版的meta
- String aippId = CacheUtils.APP_ID_TO_AIPP_ID_CACHE.get(appId,
- (id) -> getLatestMetaByAppId(metaService, id, context).getId());
- Meta lastPublishedMeta = MetaUtils.getLastPublishedMeta(metaService, aippId, context);
- return Optional.ofNullable(lastPublishedMeta)
- .orElseThrow(() -> new AippException(AippErrCode.APP_CHAT_PUBLISHED_META_NOT_FOUND));
- }
-
- private static Meta getLatestMetaByAppId(MetaService metaService, String appId, OperationContext context) {
- List meta = MetaUtils.getAllMetasByAppId(metaService, appId, context);
- if (CollectionUtils.isEmpty(meta)) {
- throw new AippException(AippErrCode.APP_CHAT_DEBUG_META_NOT_FOUND);
- }
- return meta.get(0);
- }
-
@Override
public Choir