@xuda.io/xuda-worker-bundle 1.3.1158 → 1.3.1160

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.
Files changed (2) hide show
  1. package/index.js +47 -46
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -5092,7 +5092,51 @@ func.datasource.update_changes_for_out_parameter = async function (
5092
5092
  }
5093
5093
  }
5094
5094
  };
5095
- func.utils = {};
5095
+
5096
+ func.datasource.set_outputField = async function (SESSION_ID, elementP, triggerP, functionP, dsSessionP, result) {
5097
+ var _session = SESSION_OBJ[SESSION_ID];
5098
+
5099
+ const output_field = await get_args_property_value("outputField");
5100
+
5101
+ // if (!output_field) {
5102
+ // func.utils.debug_report(
5103
+ // SESSION_ID,
5104
+ // "func.events.execute",
5105
+ // `${elementP} >${triggerP} >${functionP} > Output field not defined`,
5106
+ // "W"
5107
+ // );
5108
+
5109
+ // }
5110
+
5111
+
5112
+
5113
+ if (output_field) {
5114
+ let datasource_changes = {};
5115
+
5116
+ let ret_get_value = await func.datasource.get_value(
5117
+ SESSION_ID,
5118
+ output_field,
5119
+ dsSessionP
5120
+ );
5121
+ if (ret_get_value.found) {
5122
+ let _ds = _session.DS_GLB[ret_get_value.dsSessionP];
5123
+ if (!datasource_changes[_ds.dsSession]) {
5124
+ datasource_changes[_ds.dsSession] = {};
5125
+ }
5126
+ if (
5127
+ !datasource_changes[_ds.dsSession][ret_get_value.currentRecordId]
5128
+ ) {
5129
+ datasource_changes[_ds.dsSession][ret_get_value.currentRecordId] =
5130
+ {};
5131
+ }
5132
+ datasource_changes[_ds.dsSession][ret_get_value.currentRecordId][
5133
+ output_field
5134
+ ] = result;
5135
+ await func.datasource.update(SESSION_ID, datasource_changes);
5136
+ }
5137
+ }
5138
+
5139
+ } func.utils = {};
5096
5140
 
5097
5141
  func.utils.debug = {};
5098
5142
  func.utils.debug.watch = async function (
@@ -8092,50 +8136,7 @@ func.events.execute = async function (
8092
8136
  return _value;
8093
8137
  };
8094
8138
 
8095
- const set_outputField = async function (SESSION_ID, elementP, triggerP, functionP, dsSessionP, result) {
8096
- var _session = SESSION_OBJ[SESSION_ID];
8097
-
8098
- const output_field = await get_args_property_value("outputField");
8099
-
8100
- // if (!output_field) {
8101
- // func.utils.debug_report(
8102
- // SESSION_ID,
8103
- // "func.events.execute",
8104
- // `${elementP} >${triggerP} >${functionP} > Output field not defined`,
8105
- // "W"
8106
- // );
8107
-
8108
- // }
8109
8139
 
8110
-
8111
-
8112
- if (output_field) {
8113
- let datasource_changes = {};
8114
-
8115
- let ret_get_value = await func.datasource.get_value(
8116
- SESSION_ID,
8117
- output_field,
8118
- dsSessionP
8119
- );
8120
- if (ret_get_value.found) {
8121
- let _ds = _session.DS_GLB[ret_get_value.dsSessionP];
8122
- if (!datasource_changes[_ds.dsSession]) {
8123
- datasource_changes[_ds.dsSession] = {};
8124
- }
8125
- if (
8126
- !datasource_changes[_ds.dsSession][ret_get_value.currentRecordId]
8127
- ) {
8128
- datasource_changes[_ds.dsSession][ret_get_value.currentRecordId] =
8129
- {};
8130
- }
8131
- datasource_changes[_ds.dsSession][ret_get_value.currentRecordId][
8132
- output_field
8133
- ] = result;
8134
- await func.datasource.update(SESSION_ID, datasource_changes);
8135
- }
8136
- }
8137
-
8138
- }
8139
8140
  var args = {
8140
8141
  prog_id: refIdP?.prog,
8141
8142
  screenIdP: refIdP?.prog,
@@ -8698,7 +8699,7 @@ func.events.execute = async function (
8698
8699
  batch: async function () {
8699
8700
  const result = await this.get_data();
8700
8701
  debugger
8701
- await set_outputField(SESSION_ID, elementP, triggerP, functionP, dsSessionP, result);
8702
+ // await set_outputField(SESSION_ID, elementP, triggerP, functionP, dsSessionP, result);
8702
8703
  return result
8703
8704
 
8704
8705
  },
@@ -8850,7 +8851,7 @@ func.events.execute = async function (
8850
8851
 
8851
8852
  const api_ret = await func.api.call_project_api(_prog_id, params_obj);
8852
8853
 
8853
- await set_outputField(SESSION_ID, elementP, triggerP, functionP, dsSessionP, api_ret);
8854
+ await func.datasource.set_outputField(SESSION_ID, elementP, triggerP, functionP, dsSessionP, api_ret);
8854
8855
 
8855
8856
  // if (output_field) {
8856
8857
  // let datasource_changes = {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/xuda-worker-bundle",
3
- "version": "1.3.1158",
3
+ "version": "1.3.1160",
4
4
  "description": "xuda framework",
5
5
  "main": "index.js",
6
6
  "scripts": {