@xuda.io/xuda-worker-bundle-min 1.3.89 → 1.3.91
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +35 -6
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -828,7 +828,7 @@ func.api.invoke_event = async function (event_id) {
|
|
|
828
828
|
|
|
829
829
|
return await api_utils.invoke_event(event_id);
|
|
830
830
|
};
|
|
831
|
-
func.api.call_api_program = async function (prog_id, params
|
|
831
|
+
func.api.call_api_program = async function (prog_id, params) {
|
|
832
832
|
const SESSION_ID = Object.keys(SESSION_OBJ)[0];
|
|
833
833
|
const api_utils = await func.common.get_module(
|
|
834
834
|
SESSION_ID,
|
|
@@ -844,7 +844,7 @@ func.api.call_api_program = async function (prog_id, params, opts) {
|
|
|
844
844
|
dsSession: Object.keys(SESSION_OBJ[SESSION_ID].DS_GLB).length - 1,
|
|
845
845
|
});
|
|
846
846
|
|
|
847
|
-
return await api_utils.call_api_program(prog_id, params,
|
|
847
|
+
return await api_utils.call_api_program(prog_id, params, null);
|
|
848
848
|
};
|
|
849
849
|
glb.DEBUG_INFO_OBJ = {};
|
|
850
850
|
// var CONNECTION_ATTEMPTS = 0;
|
|
@@ -8076,10 +8076,39 @@ func.events.execute = async function (
|
|
|
8076
8076
|
return;
|
|
8077
8077
|
}
|
|
8078
8078
|
let parameters = args?.calling_trigger_prop?.data?.name?.parameters;
|
|
8079
|
-
const
|
|
8080
|
-
|
|
8081
|
-
|
|
8082
|
-
|
|
8079
|
+
const api_ret = await func.api.call_api_program(args.prog_id, parameters);
|
|
8080
|
+
// {
|
|
8081
|
+
// dsSession: dsSessionP,
|
|
8082
|
+
// }
|
|
8083
|
+
// await func.api.set_field_value(output_field, ret);
|
|
8084
|
+
// const datasource_changes = {
|
|
8085
|
+
// [dsSessionP]: {
|
|
8086
|
+
// [ret_get_value.currentRecordId]: { [field_id]: value },
|
|
8087
|
+
// },
|
|
8088
|
+
// };
|
|
8089
|
+
// return await func.datasource.update(_this.SESSION_ID, datasource_changes);
|
|
8090
|
+
|
|
8091
|
+
let datasource_changes = {};
|
|
8092
|
+
|
|
8093
|
+
let ret_get_value = await func.datasource.get_value(
|
|
8094
|
+
SESSION_ID,
|
|
8095
|
+
output_field,
|
|
8096
|
+
dsSessionP
|
|
8097
|
+
);
|
|
8098
|
+
if (ret_get_value.found) {
|
|
8099
|
+
let _ds = _session.DS_GLB[ret_get_value.dsSessionP];
|
|
8100
|
+
if (!datasource_changes[_ds.dsSession]) {
|
|
8101
|
+
datasource_changes[_ds.dsSession] = {};
|
|
8102
|
+
}
|
|
8103
|
+
if (!datasource_changes[_ds.dsSession][ret_get_value.currentRecordId]) {
|
|
8104
|
+
datasource_changes[_ds.dsSession][ret_get_value.currentRecordId] = {};
|
|
8105
|
+
}
|
|
8106
|
+
datasource_changes[_ds.dsSession][ret_get_value.currentRecordId][
|
|
8107
|
+
output_field
|
|
8108
|
+
] = api_ret;
|
|
8109
|
+
await func.datasource.update(SESSION_ID, datasource_changes);
|
|
8110
|
+
}
|
|
8111
|
+
|
|
8083
8112
|
func.events.delete_job(SESSION_ID, jobNoP);
|
|
8084
8113
|
},
|
|
8085
8114
|
};
|