@magic-xpa/engine 4.1100.0-dev4110.19 → 4.1100.0-dev4110.190

Sign up to get free protection for your applications and to get access to all the features.
Files changed (515) hide show
  1. package/{esm2020 → esm2022}/index.mjs +188 -188
  2. package/{esm2020 → esm2022}/magic-xpa-engine.mjs +1 -1
  3. package/esm2022/src/AccessHelper.mjs +15 -0
  4. package/esm2022/src/ClientManager.mjs +399 -0
  5. package/esm2022/src/CommandsProcessorBase.mjs +56 -0
  6. package/esm2022/src/CommandsProcessorManager.mjs +26 -0
  7. package/esm2022/src/CommandsTable.mjs +162 -0
  8. package/esm2022/src/ConstInterface.mjs +516 -0
  9. package/{esm2020 → esm2022}/src/CurrentClientVersion.mjs +2 -2
  10. package/esm2022/src/FlowMonitorInterface.mjs +16 -0
  11. package/esm2022/src/GUIManager.mjs +62 -0
  12. package/esm2022/src/GlobalCommandsManager.mjs +34 -0
  13. package/esm2022/src/GuiEventsProcessor.mjs +154 -0
  14. package/{esm2020 → esm2022}/src/ICommandsTable.mjs +1 -1
  15. package/esm2022/src/ServerConfig.mjs +118 -0
  16. package/{esm2020 → esm2022}/src/bridge/IGuiEvent.mjs +19 -19
  17. package/{esm2020 → esm2022}/src/bridge/MagicBridge.mjs +40 -40
  18. package/esm2022/src/commands/ClientOriginatedCommandTaskTag.mjs +12 -0
  19. package/{esm2020 → esm2022}/src/commands/ClientToServer/AddUserLocateDataViewCommand.mjs +8 -8
  20. package/{esm2020 → esm2022}/src/commands/ClientToServer/AddUserRangeDataviewCommand.mjs +9 -9
  21. package/{esm2020 → esm2022}/src/commands/ClientToServer/AddUserSortDataViewCommand.mjs +9 -9
  22. package/{esm2020 → esm2022}/src/commands/ClientToServer/BrowserEscEventCommand.mjs +23 -23
  23. package/{esm2020 → esm2022}/src/commands/ClientToServer/ClientOriginatedCommand.mjs +14 -14
  24. package/esm2022/src/commands/ClientToServer/ClientOriginatedCommandSerializer.mjs +60 -0
  25. package/{esm2020 → esm2022}/src/commands/ClientToServer/ColumnSortEventCommand.mjs +26 -26
  26. package/esm2022/src/commands/ClientToServer/CommandFactory.mjs +260 -0
  27. package/esm2022/src/commands/ClientToServer/CommandSerializationHelper.mjs +67 -0
  28. package/{esm2020 → esm2022}/src/commands/ClientToServer/ComputeEventCommand.mjs +23 -23
  29. package/{esm2020 → esm2022}/src/commands/ClientToServer/ContextTerminationEventCommand.mjs +20 -20
  30. package/{esm2020 → esm2022}/src/commands/ClientToServer/ContextTimeoutResetCommand.mjs +19 -19
  31. package/{esm2020 → esm2022}/src/commands/ClientToServer/ControlItemsRefreshCommand.mjs +8 -8
  32. package/esm2022/src/commands/ClientToServer/DataViewOutputCommand.mjs +13 -0
  33. package/{esm2020 → esm2022}/src/commands/ClientToServer/DataviewCommand.mjs +44 -44
  34. package/esm2022/src/commands/ClientToServer/EvaluateCommand.mjs +37 -0
  35. package/esm2022/src/commands/ClientToServer/EventCommand.mjs +40 -0
  36. package/esm2022/src/commands/ClientToServer/ExecOperCommand.mjs +67 -0
  37. package/esm2022/src/commands/ClientToServer/FetchDataControlValuesEventCommand.mjs +22 -0
  38. package/{esm2020 → esm2022}/src/commands/ClientToServer/GlobalParamsQueryCommand.mjs +10 -10
  39. package/{esm2020 → esm2022}/src/commands/ClientToServer/ICommandTaskTag.mjs +1 -1
  40. package/{esm2020 → esm2022}/src/commands/ClientToServer/IndexChangeEventCommand.mjs +21 -21
  41. package/esm2022/src/commands/ClientToServer/IniputForceWriteCommand.mjs +23 -0
  42. package/{esm2020 → esm2022}/src/commands/ClientToServer/NonReversibleExitEventCommand.mjs +23 -23
  43. package/{esm2020 → esm2022}/src/commands/ClientToServer/QueryCommand.mjs +20 -20
  44. package/esm2022/src/commands/ClientToServer/RecomputeCommand.mjs +27 -0
  45. package/esm2022/src/commands/ClientToServer/RefreshEventCommand.mjs +27 -0
  46. package/esm2022/src/commands/ClientToServer/RefreshScreenEventCommand.mjs +24 -0
  47. package/esm2022/src/commands/ClientToServer/RollbackEventCommand.mjs +40 -0
  48. package/{esm2020 → esm2022}/src/commands/ClientToServer/SelectProgramCommand.mjs +14 -14
  49. package/{esm2020 → esm2022}/src/commands/ClientToServer/SetTransactionStateDataviewCommand.mjs +9 -9
  50. package/{esm2020 → esm2022}/src/commands/ClientToServer/SubformOpenEventCommand.mjs +21 -21
  51. package/esm2022/src/commands/ClientToServer/SubformRefreshEventCommand.mjs +24 -0
  52. package/esm2022/src/commands/ClientToServer/TransactionCommand.mjs +30 -0
  53. package/{esm2020 → esm2022}/src/commands/ClientToServer/UnloadCommand.mjs +14 -14
  54. package/esm2022/src/commands/ClientToServer/WriteMessageToServerLogCommand.mjs +18 -0
  55. package/esm2022/src/commands/DataViewCommandBase.mjs +8 -0
  56. package/{esm2020 → esm2022}/src/commands/IClientCommand.mjs +1 -1
  57. package/esm2022/src/commands/IClientTargetedCommand.mjs +13 -0
  58. package/{esm2020 → esm2022}/src/commands/IClientToServerCommandInfo.mjs +1 -1
  59. package/esm2022/src/commands/ServerToClient/AbortCommand.mjs +65 -0
  60. package/{esm2020 → esm2022}/src/commands/ServerToClient/AddLocateCommand.mjs +21 -21
  61. package/esm2022/src/commands/ServerToClient/AddRangeCommand.mjs +62 -0
  62. package/esm2022/src/commands/ServerToClient/AddSortCommand.mjs +33 -0
  63. package/esm2022/src/commands/ServerToClient/ClientRefreshCommand.mjs +25 -0
  64. package/esm2022/src/commands/ServerToClient/ClientTargetedCommandBase.mjs +24 -0
  65. package/esm2022/src/commands/ServerToClient/EnhancedVerifyCommand.mjs +45 -0
  66. package/esm2022/src/commands/ServerToClient/OpenURLCommand.mjs +221 -0
  67. package/{esm2020 → esm2022}/src/commands/ServerToClient/ResetLocateCommand.mjs +14 -14
  68. package/{esm2020 → esm2022}/src/commands/ServerToClient/ResetRangeCommand.mjs +14 -14
  69. package/{esm2020 → esm2022}/src/commands/ServerToClient/ResetSortCommand.mjs +14 -14
  70. package/esm2022/src/commands/ServerToClient/ResultCommand.mjs +37 -0
  71. package/esm2022/src/commands/ServerToClient/VerifyCommand.mjs +83 -0
  72. package/esm2022/src/commands/ServerToClient/XMLBasedCommandBuilder.mjs +132 -0
  73. package/{esm2020 → esm2022}/src/communications/IConnectionStateManager.mjs +1 -1
  74. package/esm2022/src/communications/InteractiveCommunicationsFailureHandler.mjs +15 -0
  75. package/{esm2020 → esm2022}/src/data/DataSourceIdKey.mjs +2 -2
  76. package/esm2022/src/data/DataView.mjs +1613 -0
  77. package/{esm2020 → esm2022}/src/data/DataViewBase.mjs +3 -3
  78. package/esm2022/src/data/DataviewManager.mjs +28 -0
  79. package/esm2022/src/data/DataviewManagerBase.mjs +15 -0
  80. package/esm2022/src/data/DvCache.mjs +67 -0
  81. package/esm2022/src/data/Field.mjs +646 -0
  82. package/esm2022/src/data/FieldBase.mjs +15 -0
  83. package/esm2022/src/data/FieldsTable.mjs +103 -0
  84. package/{esm2020 → esm2022}/src/data/IRecordsTable.mjs +1 -1
  85. package/esm2022/src/data/Key.mjs +88 -0
  86. package/esm2022/src/data/Record.mjs +866 -0
  87. package/{esm2020 → esm2022}/src/data/RecordOutOfDataViewException.mjs +15 -15
  88. package/esm2022/src/data/RecordsTable.mjs +267 -0
  89. package/esm2022/src/data/TaskTransactionManager.mjs +103 -0
  90. package/esm2022/src/data/XMLBasedDcValuesBuilder.mjs +74 -0
  91. package/{esm2020 → esm2022}/src/enums.mjs +23 -23
  92. package/esm2022/src/env/EnvVariablesTable.mjs +340 -0
  93. package/esm2022/src/env/Environment.mjs +487 -0
  94. package/{esm2020 → esm2022}/src/env/ILanguageData.mjs +1 -1
  95. package/esm2022/src/env/LanguageData.mjs +226 -0
  96. package/esm2022/src/env/MirrorString.mjs +65 -0
  97. package/esm2022/src/event/ActionManager.mjs +91 -0
  98. package/esm2022/src/event/Event.mjs +1333 -0
  99. package/esm2022/src/event/EventHandler.mjs +766 -0
  100. package/esm2022/src/event/EventHandlerPosition.mjs +204 -0
  101. package/esm2022/src/event/EventsManager.mjs +2975 -0
  102. package/{esm2020 → esm2022}/src/event/IEventsManager.mjs +6 -6
  103. package/esm2022/src/event/RunTimeEvent.mjs +392 -0
  104. package/{esm2020 → esm2022}/src/event/RunTimeEventBase.mjs +3 -3
  105. package/esm2022/src/event/UserEventsTable.mjs +47 -0
  106. package/esm2022/src/exp/ExpTable.mjs +57 -0
  107. package/esm2022/src/exp/Expression.mjs +200 -0
  108. package/esm2022/src/exp/ExpressionDict.mjs +727 -0
  109. package/esm2022/src/exp/ExpressionEvaluator.mjs +4206 -0
  110. package/esm2022/src/exp/ExpressionLocalJpn.mjs +314 -0
  111. package/esm2022/src/exp/GlobalParamsTable.mjs +85 -0
  112. package/esm2022/src/exp/YesNoExp.mjs +36 -0
  113. package/esm2022/src/gui/CreatedFormVector.mjs +23 -0
  114. package/esm2022/src/gui/FormsTable.mjs +66 -0
  115. package/esm2022/src/gui/MgControl.mjs +363 -0
  116. package/esm2022/src/gui/MgForm.mjs +1181 -0
  117. package/esm2022/src/http/HttpManager.mjs +97 -0
  118. package/esm2022/src/http/client/HttpClientAsync.mjs +68 -0
  119. package/esm2022/src/http/client/HttpClientBase.mjs +132 -0
  120. package/esm2022/src/http/client/HttpClientEvents.mjs +39 -0
  121. package/esm2022/src/http/client/HttpClientSync.mjs +42 -0
  122. package/esm2022/src/http/client/HttpUtility.mjs +84 -0
  123. package/{esm2020 → esm2022}/src/http/client/ICommunicationsFailureHandler.mjs +1 -1
  124. package/esm2022/src/remote/AddUserLocateRemoteDataViewCommand.mjs +18 -0
  125. package/esm2022/src/remote/AddUserRangeRemoteDataViewCommand.mjs +18 -0
  126. package/esm2022/src/remote/AddUserSortRemoteDataViewCommand.mjs +18 -0
  127. package/esm2022/src/remote/RemoteCommandsProcessor.mjs +882 -0
  128. package/esm2022/src/remote/RemoteControlItemsRefreshCommand.mjs +25 -0
  129. package/esm2022/src/remote/RemoteDataViewCommandBase.mjs +24 -0
  130. package/esm2022/src/remote/RemoteDataViewCommandFactory.mjs +61 -0
  131. package/{esm2020 → esm2022}/src/remote/RemoteDataViewCommandUpdateNonModifiable.mjs +15 -15
  132. package/{esm2020 → esm2022}/src/remote/RemoteDataviewManager.mjs +17 -17
  133. package/{esm2020 → esm2022}/src/remote/RemoteInitDataViewCommand.mjs +10 -10
  134. package/esm2022/src/remote/ResetUserLocateRemoteDataviewCommand.mjs +17 -0
  135. package/{esm2020 → esm2022}/src/remote/ResetUserRangeRemoteDataviewCommand.mjs +12 -12
  136. package/esm2022/src/remote/ResetUserSortRemoteDataviewCommand.mjs +16 -0
  137. package/esm2022/src/remote/ServerError.mjs +40 -0
  138. package/esm2022/src/remote/SetTransactionStateRemoteDataViewCommand.mjs +20 -0
  139. package/esm2022/src/rt/Argument.mjs +265 -0
  140. package/esm2022/src/rt/ArgumentsList.mjs +103 -0
  141. package/esm2022/src/rt/Boundary.mjs +152 -0
  142. package/esm2022/src/rt/CompMainPrgTable.mjs +63 -0
  143. package/{esm2020 → esm2022}/src/rt/DataviewHeaderBase.mjs +98 -96
  144. package/{esm2020 → esm2022}/src/rt/DataviewHeaderFactory.mjs +6 -6
  145. package/esm2022/src/rt/DataviewHeaders.mjs +53 -0
  146. package/esm2022/src/rt/DataviewHeadersSaxHandler.mjs +38 -0
  147. package/esm2022/src/rt/ExecutionStack.mjs +94 -0
  148. package/{esm2020 → esm2022}/src/rt/ExecutionStackEntry.mjs +17 -17
  149. package/esm2022/src/rt/HandlersTable.mjs +96 -0
  150. package/{esm2020 → esm2022}/src/rt/IDataSourceViewDefinition.mjs +1 -1
  151. package/{esm2020 → esm2022}/src/rt/IDataviewHeader.mjs +1 -1
  152. package/{esm2020 → esm2022}/src/rt/IResultValue.mjs +1 -1
  153. package/esm2022/src/rt/LastFocusedManager.mjs +65 -0
  154. package/esm2022/src/rt/Operation.mjs +735 -0
  155. package/esm2022/src/rt/OperationTable.mjs +67 -0
  156. package/esm2022/src/rt/Recompute.mjs +355 -0
  157. package/esm2022/src/rt/RecomputeTable.mjs +63 -0
  158. package/esm2022/src/rt/RemoteDataviewHeader.mjs +108 -0
  159. package/esm2022/src/rt/ResultValue.mjs +10 -0
  160. package/esm2022/src/rt/TableCache.mjs +177 -0
  161. package/esm2022/src/rt/TableCacheManager.mjs +67 -0
  162. package/esm2022/src/rt/Transaction.mjs +53 -0
  163. package/esm2022/src/security/UserDetails.mjs +71 -0
  164. package/{esm2020 → esm2022}/src/tasks/IMGDataCollection.mjs +1 -1
  165. package/esm2022/src/tasks/MGData.mjs +552 -0
  166. package/esm2022/src/tasks/MGDataCollection.mjs +252 -0
  167. package/esm2022/src/tasks/RCTimer.mjs +63 -0
  168. package/esm2022/src/tasks/RemoteTaskService.mjs +45 -0
  169. package/esm2022/src/tasks/Task.mjs +2497 -0
  170. package/esm2022/src/tasks/TaskBase.mjs +83 -0
  171. package/esm2022/src/tasks/TaskServiceBase.mjs +25 -0
  172. package/esm2022/src/tasks/TasksTable.mjs +80 -0
  173. package/esm2022/src/tasks/sort/Sort.mjs +5 -0
  174. package/esm2022/src/tasks/sort/SortCollection.mjs +67 -0
  175. package/esm2022/src/util/ConstUtils.mjs +14 -0
  176. package/esm2022/src/util/FlowMonitorQueue.mjs +451 -0
  177. package/esm2022/src/util/HeapSort.mjs +70 -0
  178. package/{esm2020 → esm2022}/src/util/IMirrorXML.mjs +1 -1
  179. package/{esm2020 → esm2022}/src/util/IServerConfig.mjs +1 -1
  180. package/{esm2020 → esm2022}/src/util/MgBlockingQueue.mjs +1 -1
  181. package/esm2022/src/util/MgPriorityBlockingQueue.mjs +74 -0
  182. package/esm2022/src/util/MgPriorityQueue.mjs +66 -0
  183. package/{esm2020 → esm2022}/src/util/ParamParseResult.mjs +7 -7
  184. package/esm2022/src/util/PrmMap.mjs +152 -0
  185. package/esm2022/src/util/ReturnResult.mjs +46 -0
  186. package/esm2022/src/util/ReturnResultBase.mjs +18 -0
  187. package/esm2022/src/util/Scrambler.mjs +89 -0
  188. package/esm2022/src/util/UniqueIDUtils.mjs +13 -0
  189. package/esm2022/src/util/cookie.service.mjs +92 -0
  190. package/{fesm2020 → fesm2022}/magic-xpa-engine.mjs +29713 -29693
  191. package/fesm2022/magic-xpa-engine.mjs.map +1 -0
  192. package/index.d.ts +187 -187
  193. package/package.json +8 -14
  194. package/src/AccessHelper.d.ts +20 -20
  195. package/src/ClientManager.d.ts +32 -32
  196. package/src/CommandsProcessorBase.d.ts +23 -23
  197. package/src/CommandsProcessorManager.d.ts +6 -6
  198. package/src/CommandsTable.d.ts +22 -22
  199. package/src/ConstInterface.d.ts +515 -515
  200. package/src/CurrentClientVersion.d.ts +1 -1
  201. package/src/FlowMonitorInterface.d.ts +15 -15
  202. package/src/GUIManager.d.ts +17 -17
  203. package/src/GlobalCommandsManager.d.ts +17 -17
  204. package/src/GuiEventsProcessor.d.ts +24 -24
  205. package/src/ICommandsTable.d.ts +9 -9
  206. package/src/ServerConfig.d.ts +34 -34
  207. package/src/bridge/IGuiEvent.d.ts +19 -19
  208. package/src/bridge/MagicBridge.d.ts +16 -16
  209. package/src/commands/ClientOriginatedCommandTaskTag.d.ts +8 -8
  210. package/src/commands/ClientToServer/AddUserLocateDataViewCommand.d.ts +4 -4
  211. package/src/commands/ClientToServer/AddUserRangeDataviewCommand.d.ts +6 -6
  212. package/src/commands/ClientToServer/AddUserSortDataViewCommand.d.ts +6 -6
  213. package/src/commands/ClientToServer/BrowserEscEventCommand.d.ts +8 -8
  214. package/src/commands/ClientToServer/ClientOriginatedCommand.d.ts +8 -8
  215. package/src/commands/ClientToServer/ClientOriginatedCommandSerializer.d.ts +6 -6
  216. package/src/commands/ClientToServer/ColumnSortEventCommand.d.ts +10 -10
  217. package/src/commands/ClientToServer/CommandFactory.d.ts +64 -64
  218. package/src/commands/ClientToServer/CommandSerializationHelper.d.ts +20 -20
  219. package/src/commands/ClientToServer/ComputeEventCommand.d.ts +8 -8
  220. package/src/commands/ClientToServer/ContextTerminationEventCommand.d.ts +7 -7
  221. package/src/commands/ClientToServer/ContextTimeoutResetCommand.d.ts +7 -7
  222. package/src/commands/ClientToServer/ControlItemsRefreshCommand.d.ts +6 -6
  223. package/src/commands/ClientToServer/DataViewOutputCommand.d.ts +9 -9
  224. package/src/commands/ClientToServer/DataviewCommand.d.ts +32 -32
  225. package/src/commands/ClientToServer/EvaluateCommand.d.ts +15 -15
  226. package/src/commands/ClientToServer/EventCommand.d.ts +15 -15
  227. package/src/commands/ClientToServer/ExecOperCommand.d.ts +23 -23
  228. package/src/commands/ClientToServer/FetchDataControlValuesEventCommand.d.ts +8 -8
  229. package/src/commands/ClientToServer/GlobalParamsQueryCommand.d.ts +5 -5
  230. package/src/commands/ClientToServer/ICommandTaskTag.d.ts +3 -3
  231. package/src/commands/ClientToServer/IndexChangeEventCommand.d.ts +8 -8
  232. package/src/commands/ClientToServer/IniputForceWriteCommand.d.ts +10 -10
  233. package/src/commands/ClientToServer/NonReversibleExitEventCommand.d.ts +8 -8
  234. package/src/commands/ClientToServer/QueryCommand.d.ts +8 -8
  235. package/src/commands/ClientToServer/RecomputeCommand.d.ts +11 -11
  236. package/src/commands/ClientToServer/RefreshEventCommand.d.ts +12 -12
  237. package/src/commands/ClientToServer/RefreshScreenEventCommand.d.ts +10 -10
  238. package/src/commands/ClientToServer/RollbackEventCommand.d.ts +14 -14
  239. package/src/commands/ClientToServer/SelectProgramCommand.d.ts +6 -6
  240. package/src/commands/ClientToServer/SetTransactionStateDataviewCommand.d.ts +5 -5
  241. package/src/commands/ClientToServer/SubformOpenEventCommand.d.ts +8 -8
  242. package/src/commands/ClientToServer/SubformRefreshEventCommand.d.ts +9 -9
  243. package/src/commands/ClientToServer/TransactionCommand.d.ts +12 -12
  244. package/src/commands/ClientToServer/UnloadCommand.d.ts +7 -7
  245. package/src/commands/ClientToServer/WriteMessageToServerLogCommand.d.ts +6 -6
  246. package/src/commands/DataViewCommandBase.d.ts +6 -6
  247. package/src/commands/IClientCommand.d.ts +2 -2
  248. package/src/commands/IClientTargetedCommand.d.ts +12 -12
  249. package/src/commands/IClientToServerCommandInfo.d.ts +3 -3
  250. package/src/commands/ServerToClient/AbortCommand.d.ts +11 -11
  251. package/src/commands/ServerToClient/AddLocateCommand.d.ts +6 -6
  252. package/src/commands/ServerToClient/AddRangeCommand.d.ts +10 -10
  253. package/src/commands/ServerToClient/AddSortCommand.d.ts +9 -9
  254. package/src/commands/ServerToClient/ClientRefreshCommand.d.ts +7 -7
  255. package/src/commands/ServerToClient/ClientTargetedCommandBase.d.ts +12 -12
  256. package/src/commands/ServerToClient/EnhancedVerifyCommand.d.ts +13 -13
  257. package/src/commands/ServerToClient/OpenURLCommand.d.ts +21 -21
  258. package/src/commands/ServerToClient/ResetLocateCommand.d.ts +6 -6
  259. package/src/commands/ServerToClient/ResetRangeCommand.d.ts +6 -6
  260. package/src/commands/ServerToClient/ResetSortCommand.d.ts +6 -6
  261. package/src/commands/ServerToClient/ResultCommand.d.ts +10 -10
  262. package/src/commands/ServerToClient/VerifyCommand.d.ts +17 -17
  263. package/src/commands/ServerToClient/XMLBasedCommandBuilder.d.ts +11 -11
  264. package/src/communications/IConnectionStateManager.d.ts +4 -4
  265. package/src/communications/InteractiveCommunicationsFailureHandler.d.ts +6 -6
  266. package/src/data/DataSourceIdKey.d.ts +2 -2
  267. package/src/data/DataView.d.ts +162 -162
  268. package/src/data/DataViewBase.d.ts +12 -12
  269. package/src/data/DataviewManager.d.ts +14 -14
  270. package/src/data/DataviewManagerBase.d.ts +11 -11
  271. package/src/data/DvCache.d.ts +15 -15
  272. package/src/data/Field.d.ts +103 -103
  273. package/src/data/FieldBase.d.ts +23 -23
  274. package/src/data/FieldsTable.d.ts +27 -27
  275. package/src/data/IRecordsTable.d.ts +7 -7
  276. package/src/data/Key.d.ts +15 -15
  277. package/src/data/Record.d.ts +156 -156
  278. package/src/data/RecordOutOfDataViewException.d.ts +10 -10
  279. package/src/data/RecordsTable.d.ts +38 -38
  280. package/src/data/TaskTransactionManager.d.ts +17 -17
  281. package/src/data/XMLBasedDcValuesBuilder.d.ts +11 -11
  282. package/src/enums.d.ts +21 -21
  283. package/src/env/EnvVariablesTable.d.ts +17 -17
  284. package/src/env/Environment.d.ts +118 -118
  285. package/src/env/ILanguageData.d.ts +3 -3
  286. package/src/env/LanguageData.d.ts +20 -20
  287. package/src/env/MirrorString.d.ts +15 -15
  288. package/src/event/ActionManager.d.ts +14 -14
  289. package/src/event/Event.d.ts +79 -79
  290. package/src/event/EventHandler.d.ts +66 -66
  291. package/src/event/EventHandlerPosition.d.ts +25 -25
  292. package/src/event/EventsManager.d.ts +204 -204
  293. package/src/event/IEventsManager.d.ts +77 -77
  294. package/src/event/RunTimeEvent.d.ts +123 -123
  295. package/src/event/RunTimeEventBase.d.ts +5 -5
  296. package/src/event/UserEventsTable.d.ts +11 -11
  297. package/src/exp/ExpTable.d.ts +11 -11
  298. package/src/exp/Expression.d.ts +37 -37
  299. package/src/exp/ExpressionDict.d.ts +12 -12
  300. package/src/exp/ExpressionEvaluator.d.ts +198 -198
  301. package/src/exp/ExpressionLocalJpn.d.ts +18 -18
  302. package/src/exp/GlobalParamsTable.d.ts +19 -19
  303. package/src/exp/YesNoExp.d.ts +9 -9
  304. package/src/gui/CreatedFormVector.d.ts +10 -10
  305. package/src/gui/FormsTable.d.ts +15 -15
  306. package/src/gui/MgControl.d.ts +60 -60
  307. package/src/gui/MgForm.d.ts +93 -93
  308. package/src/http/HttpManager.d.ts +25 -25
  309. package/src/http/client/HttpClientAsync.d.ts +16 -16
  310. package/src/http/client/HttpClientBase.d.ts +30 -30
  311. package/src/http/client/HttpClientEvents.d.ts +18 -18
  312. package/src/http/client/HttpClientSync.d.ts +17 -17
  313. package/src/http/client/HttpUtility.d.ts +10 -10
  314. package/src/http/client/ICommunicationsFailureHandler.d.ts +5 -5
  315. package/src/remote/AddUserLocateRemoteDataViewCommand.d.ts +8 -8
  316. package/src/remote/AddUserRangeRemoteDataViewCommand.d.ts +8 -8
  317. package/src/remote/AddUserSortRemoteDataViewCommand.d.ts +8 -8
  318. package/src/remote/RemoteCommandsProcessor.d.ts +51 -51
  319. package/src/remote/RemoteControlItemsRefreshCommand.d.ts +8 -8
  320. package/src/remote/RemoteDataViewCommandBase.d.ts +10 -10
  321. package/src/remote/RemoteDataViewCommandFactory.d.ts +6 -6
  322. package/src/remote/RemoteDataViewCommandUpdateNonModifiable.d.ts +8 -8
  323. package/src/remote/RemoteDataviewManager.d.ts +9 -9
  324. package/src/remote/RemoteInitDataViewCommand.d.ts +7 -7
  325. package/src/remote/ResetUserLocateRemoteDataviewCommand.d.ts +7 -7
  326. package/src/remote/ResetUserRangeRemoteDataviewCommand.d.ts +7 -7
  327. package/src/remote/ResetUserSortRemoteDataviewCommand.d.ts +7 -7
  328. package/src/remote/ServerError.d.ts +16 -16
  329. package/src/remote/SetTransactionStateRemoteDataViewCommand.d.ts +8 -8
  330. package/src/rt/Argument.d.ts +36 -36
  331. package/src/rt/ArgumentsList.d.ts +24 -24
  332. package/src/rt/Boundary.d.ts +27 -27
  333. package/src/rt/CompMainPrgTable.d.ts +10 -10
  334. package/src/rt/DataviewHeaderBase.d.ts +34 -34
  335. package/src/rt/DataviewHeaderFactory.d.ts +5 -5
  336. package/src/rt/DataviewHeaders.d.ts +12 -12
  337. package/src/rt/DataviewHeadersSaxHandler.d.ts +10 -10
  338. package/src/rt/ExecutionStack.d.ts +22 -22
  339. package/src/rt/ExecutionStackEntry.d.ts +7 -7
  340. package/src/rt/HandlersTable.d.ts +19 -19
  341. package/src/rt/IDataSourceViewDefinition.d.ts +6 -6
  342. package/src/rt/IDataviewHeader.d.ts +10 -10
  343. package/src/rt/IResultValue.d.ts +4 -4
  344. package/src/rt/LastFocusedManager.d.ts +23 -23
  345. package/src/rt/Operation.d.ts +97 -97
  346. package/src/rt/OperationTable.d.ts +15 -15
  347. package/src/rt/Recompute.d.ts +41 -41
  348. package/src/rt/RecomputeTable.d.ts +9 -9
  349. package/src/rt/RemoteDataviewHeader.d.ts +14 -14
  350. package/src/rt/ResultValue.d.ts +7 -7
  351. package/src/rt/TableCache.d.ts +29 -29
  352. package/src/rt/TableCacheManager.d.ts +10 -10
  353. package/src/rt/Transaction.d.ts +23 -23
  354. package/src/security/UserDetails.d.ts +16 -16
  355. package/src/tasks/IMGDataCollection.d.ts +26 -26
  356. package/src/tasks/MGData.d.ts +63 -63
  357. package/src/tasks/MGDataCollection.d.ts +42 -42
  358. package/src/tasks/RCTimer.d.ts +13 -13
  359. package/src/tasks/RemoteTaskService.d.ts +16 -16
  360. package/src/tasks/Task.d.ts +312 -312
  361. package/src/tasks/TaskBase.d.ts +123 -123
  362. package/src/tasks/TaskServiceBase.d.ts +16 -16
  363. package/src/tasks/TasksTable.d.ts +21 -21
  364. package/src/tasks/sort/Sort.d.ts +4 -4
  365. package/src/tasks/sort/SortCollection.d.ts +11 -11
  366. package/src/util/ConstUtils.d.ts +3 -3
  367. package/src/util/FlowMonitorQueue.d.ts +70 -70
  368. package/src/util/HeapSort.d.ts +6 -6
  369. package/src/util/IMirrorXML.d.ts +6 -6
  370. package/src/util/IServerConfig.d.ts +11 -11
  371. package/src/util/MgBlockingQueue.d.ts +5 -5
  372. package/src/util/MgPriorityBlockingQueue.d.ts +17 -17
  373. package/src/util/MgPriorityQueue.d.ts +13 -13
  374. package/src/util/ParamParseResult.d.ts +6 -6
  375. package/src/util/PrmMap.d.ts +28 -28
  376. package/src/util/ReturnResult.d.ts +18 -18
  377. package/src/util/ReturnResultBase.d.ts +11 -11
  378. package/src/util/Scrambler.d.ts +10 -10
  379. package/src/util/UniqueIDUtils.d.ts +4 -4
  380. package/src/util/cookie.service.d.ts +8 -8
  381. package/esm2020/src/AccessHelper.mjs +0 -9
  382. package/esm2020/src/ClientManager.mjs +0 -399
  383. package/esm2020/src/CommandsProcessorBase.mjs +0 -58
  384. package/esm2020/src/CommandsProcessorManager.mjs +0 -26
  385. package/esm2020/src/CommandsTable.mjs +0 -162
  386. package/esm2020/src/ConstInterface.mjs +0 -516
  387. package/esm2020/src/FlowMonitorInterface.mjs +0 -16
  388. package/esm2020/src/GUIManager.mjs +0 -62
  389. package/esm2020/src/GlobalCommandsManager.mjs +0 -34
  390. package/esm2020/src/GuiEventsProcessor.mjs +0 -154
  391. package/esm2020/src/ServerConfig.mjs +0 -117
  392. package/esm2020/src/commands/ClientOriginatedCommandTaskTag.mjs +0 -11
  393. package/esm2020/src/commands/ClientToServer/ClientOriginatedCommandSerializer.mjs +0 -60
  394. package/esm2020/src/commands/ClientToServer/CommandFactory.mjs +0 -260
  395. package/esm2020/src/commands/ClientToServer/CommandSerializationHelper.mjs +0 -69
  396. package/esm2020/src/commands/ClientToServer/DataViewOutputCommand.mjs +0 -13
  397. package/esm2020/src/commands/ClientToServer/EvaluateCommand.mjs +0 -36
  398. package/esm2020/src/commands/ClientToServer/EventCommand.mjs +0 -40
  399. package/esm2020/src/commands/ClientToServer/ExecOperCommand.mjs +0 -67
  400. package/esm2020/src/commands/ClientToServer/FetchDataControlValuesEventCommand.mjs +0 -22
  401. package/esm2020/src/commands/ClientToServer/IniputForceWriteCommand.mjs +0 -23
  402. package/esm2020/src/commands/ClientToServer/RecomputeCommand.mjs +0 -27
  403. package/esm2020/src/commands/ClientToServer/RefreshEventCommand.mjs +0 -27
  404. package/esm2020/src/commands/ClientToServer/RefreshScreenEventCommand.mjs +0 -24
  405. package/esm2020/src/commands/ClientToServer/RollbackEventCommand.mjs +0 -39
  406. package/esm2020/src/commands/ClientToServer/SubformRefreshEventCommand.mjs +0 -24
  407. package/esm2020/src/commands/ClientToServer/TransactionCommand.mjs +0 -28
  408. package/esm2020/src/commands/ClientToServer/WriteMessageToServerLogCommand.mjs +0 -18
  409. package/esm2020/src/commands/DataViewCommandBase.mjs +0 -10
  410. package/esm2020/src/commands/IClientTargetedCommand.mjs +0 -9
  411. package/esm2020/src/commands/ServerToClient/AbortCommand.mjs +0 -65
  412. package/esm2020/src/commands/ServerToClient/AddRangeCommand.mjs +0 -62
  413. package/esm2020/src/commands/ServerToClient/AddSortCommand.mjs +0 -33
  414. package/esm2020/src/commands/ServerToClient/ClientRefreshCommand.mjs +0 -25
  415. package/esm2020/src/commands/ServerToClient/ClientTargetedCommandBase.mjs +0 -27
  416. package/esm2020/src/commands/ServerToClient/EnhancedVerifyCommand.mjs +0 -45
  417. package/esm2020/src/commands/ServerToClient/OpenURLCommand.mjs +0 -221
  418. package/esm2020/src/commands/ServerToClient/ResultCommand.mjs +0 -37
  419. package/esm2020/src/commands/ServerToClient/VerifyCommand.mjs +0 -83
  420. package/esm2020/src/commands/ServerToClient/XMLBasedCommandBuilder.mjs +0 -132
  421. package/esm2020/src/communications/InteractiveCommunicationsFailureHandler.mjs +0 -17
  422. package/esm2020/src/data/DataView.mjs +0 -1610
  423. package/esm2020/src/data/DataviewManager.mjs +0 -28
  424. package/esm2020/src/data/DataviewManagerBase.mjs +0 -15
  425. package/esm2020/src/data/DvCache.mjs +0 -67
  426. package/esm2020/src/data/Field.mjs +0 -646
  427. package/esm2020/src/data/FieldBase.mjs +0 -18
  428. package/esm2020/src/data/FieldsTable.mjs +0 -103
  429. package/esm2020/src/data/Key.mjs +0 -88
  430. package/esm2020/src/data/Record.mjs +0 -846
  431. package/esm2020/src/data/RecordsTable.mjs +0 -267
  432. package/esm2020/src/data/TaskTransactionManager.mjs +0 -103
  433. package/esm2020/src/data/XMLBasedDcValuesBuilder.mjs +0 -74
  434. package/esm2020/src/env/EnvVariablesTable.mjs +0 -340
  435. package/esm2020/src/env/Environment.mjs +0 -489
  436. package/esm2020/src/env/LanguageData.mjs +0 -226
  437. package/esm2020/src/env/MirrorString.mjs +0 -65
  438. package/esm2020/src/event/ActionManager.mjs +0 -91
  439. package/esm2020/src/event/Event.mjs +0 -1333
  440. package/esm2020/src/event/EventHandler.mjs +0 -766
  441. package/esm2020/src/event/EventHandlerPosition.mjs +0 -204
  442. package/esm2020/src/event/EventsManager.mjs +0 -2975
  443. package/esm2020/src/event/RunTimeEvent.mjs +0 -392
  444. package/esm2020/src/event/UserEventsTable.mjs +0 -47
  445. package/esm2020/src/exp/ExpTable.mjs +0 -59
  446. package/esm2020/src/exp/Expression.mjs +0 -200
  447. package/esm2020/src/exp/ExpressionDict.mjs +0 -727
  448. package/esm2020/src/exp/ExpressionEvaluator.mjs +0 -4212
  449. package/esm2020/src/exp/ExpressionLocalJpn.mjs +0 -314
  450. package/esm2020/src/exp/GlobalParamsTable.mjs +0 -85
  451. package/esm2020/src/exp/YesNoExp.mjs +0 -36
  452. package/esm2020/src/gui/CreatedFormVector.mjs +0 -23
  453. package/esm2020/src/gui/FormsTable.mjs +0 -66
  454. package/esm2020/src/gui/MgControl.mjs +0 -353
  455. package/esm2020/src/gui/MgForm.mjs +0 -1181
  456. package/esm2020/src/http/HttpManager.mjs +0 -97
  457. package/esm2020/src/http/client/HttpClientAsync.mjs +0 -67
  458. package/esm2020/src/http/client/HttpClientBase.mjs +0 -132
  459. package/esm2020/src/http/client/HttpClientEvents.mjs +0 -39
  460. package/esm2020/src/http/client/HttpClientSync.mjs +0 -42
  461. package/esm2020/src/http/client/HttpUtility.mjs +0 -84
  462. package/esm2020/src/remote/AddUserLocateRemoteDataViewCommand.mjs +0 -18
  463. package/esm2020/src/remote/AddUserRangeRemoteDataViewCommand.mjs +0 -18
  464. package/esm2020/src/remote/AddUserSortRemoteDataViewCommand.mjs +0 -18
  465. package/esm2020/src/remote/RemoteCommandsProcessor.mjs +0 -880
  466. package/esm2020/src/remote/RemoteControlItemsRefreshCommand.mjs +0 -25
  467. package/esm2020/src/remote/RemoteDataViewCommandBase.mjs +0 -24
  468. package/esm2020/src/remote/RemoteDataViewCommandFactory.mjs +0 -61
  469. package/esm2020/src/remote/ResetUserLocateRemoteDataviewCommand.mjs +0 -17
  470. package/esm2020/src/remote/ResetUserSortRemoteDataviewCommand.mjs +0 -16
  471. package/esm2020/src/remote/ServerError.mjs +0 -40
  472. package/esm2020/src/remote/SetTransactionStateRemoteDataViewCommand.mjs +0 -20
  473. package/esm2020/src/rt/Argument.mjs +0 -265
  474. package/esm2020/src/rt/ArgumentsList.mjs +0 -103
  475. package/esm2020/src/rt/Boundary.mjs +0 -152
  476. package/esm2020/src/rt/CompMainPrgTable.mjs +0 -65
  477. package/esm2020/src/rt/DataviewHeaders.mjs +0 -53
  478. package/esm2020/src/rt/DataviewHeadersSaxHandler.mjs +0 -38
  479. package/esm2020/src/rt/ExecutionStack.mjs +0 -94
  480. package/esm2020/src/rt/HandlersTable.mjs +0 -96
  481. package/esm2020/src/rt/LastFocusedManager.mjs +0 -67
  482. package/esm2020/src/rt/Operation.mjs +0 -735
  483. package/esm2020/src/rt/OperationTable.mjs +0 -67
  484. package/esm2020/src/rt/Recompute.mjs +0 -355
  485. package/esm2020/src/rt/RecomputeTable.mjs +0 -63
  486. package/esm2020/src/rt/RemoteDataviewHeader.mjs +0 -108
  487. package/esm2020/src/rt/ResultValue.mjs +0 -12
  488. package/esm2020/src/rt/TableCache.mjs +0 -177
  489. package/esm2020/src/rt/TableCacheManager.mjs +0 -67
  490. package/esm2020/src/rt/Transaction.mjs +0 -53
  491. package/esm2020/src/security/UserDetails.mjs +0 -71
  492. package/esm2020/src/tasks/MGData.mjs +0 -552
  493. package/esm2020/src/tasks/MGDataCollection.mjs +0 -252
  494. package/esm2020/src/tasks/RCTimer.mjs +0 -63
  495. package/esm2020/src/tasks/RemoteTaskService.mjs +0 -45
  496. package/esm2020/src/tasks/Task.mjs +0 -2495
  497. package/esm2020/src/tasks/TaskBase.mjs +0 -87
  498. package/esm2020/src/tasks/TaskServiceBase.mjs +0 -25
  499. package/esm2020/src/tasks/TasksTable.mjs +0 -80
  500. package/esm2020/src/tasks/sort/Sort.mjs +0 -7
  501. package/esm2020/src/tasks/sort/SortCollection.mjs +0 -67
  502. package/esm2020/src/util/ConstUtils.mjs +0 -14
  503. package/esm2020/src/util/FlowMonitorQueue.mjs +0 -453
  504. package/esm2020/src/util/HeapSort.mjs +0 -70
  505. package/esm2020/src/util/MgPriorityBlockingQueue.mjs +0 -74
  506. package/esm2020/src/util/MgPriorityQueue.mjs +0 -66
  507. package/esm2020/src/util/PrmMap.mjs +0 -151
  508. package/esm2020/src/util/ReturnResult.mjs +0 -46
  509. package/esm2020/src/util/ReturnResultBase.mjs +0 -18
  510. package/esm2020/src/util/Scrambler.mjs +0 -89
  511. package/esm2020/src/util/UniqueIDUtils.mjs +0 -12
  512. package/esm2020/src/util/cookie.service.mjs +0 -92
  513. package/fesm2015/magic-xpa-engine.mjs +0 -30835
  514. package/fesm2015/magic-xpa-engine.mjs.map +0 -1
  515. package/fesm2020/magic-xpa-engine.mjs.map +0 -1
@@ -0,0 +1,2497 @@
1
+ import { Debug, HashUtils, List, NNumber, NString, RefParam, Stack, StringBuilder, isNullOrUndefined } from '@magic-xpa/mscorelib';
2
+ import { Constants, InternalInterface, Logger, Logger_LogLevels, StorageAttribute, StrUtil, WindowType, XMLConstants, XmlParser } from '@magic-xpa/utils';
3
+ import { Commands, DataModificationTypes, DisplayConvertor, Events, GuiDataCollection, Helps, Manager, NUM_TYPE, PIC, PropInterface, RecordUtils, RuntimeContextBase, Styles, TaskDefinitionId } from '@magic-xpa/gui';
4
+ import { DataView } from '../data/DataView';
5
+ import { DvCache } from '../data/DvCache';
6
+ import { DataViewCommandType } from '../commands/ClientToServer/DataviewCommand';
7
+ import { CommandsProcessorBase_SendingInstruction } from '../CommandsProcessorBase';
8
+ import { TaskServiceBase } from './TaskServiceBase';
9
+ import { TaskTransactionManager } from '../data/TaskTransactionManager';
10
+ import { DataviewManager } from '../data/DataviewManager';
11
+ import { SortCollection } from './sort/SortCollection';
12
+ import { MgForm } from '../gui/MgForm';
13
+ import { RemoteTaskService } from './RemoteTaskService';
14
+ import { ReturnResult } from '../util/ReturnResult';
15
+ import { RunTimeEvent } from '../event/RunTimeEvent';
16
+ import { CommandFactory } from '../commands/ClientToServer/CommandFactory';
17
+ import { DataviewHeaders } from '../rt/DataviewHeaders';
18
+ import { Transaction } from '../rt/Transaction';
19
+ import { TasksTable } from './TasksTable';
20
+ import { HandlersTable } from '../rt/HandlersTable';
21
+ import { RecomputeTable } from '../rt/RecomputeTable';
22
+ import { ExpTable } from '../exp/ExpTable';
23
+ import { UserEventsTable } from '../event/UserEventsTable';
24
+ import { FormsTable } from '../gui/FormsTable';
25
+ import { FlowMonitorQueue } from '../util/FlowMonitorQueue';
26
+ import { ActionManager } from '../event/ActionManager';
27
+ import { ConstInterface } from '../ConstInterface';
28
+ import { GUIManager } from '../GUIManager';
29
+ import { CommandsProcessorManager } from '../CommandsProcessorManager';
30
+ import { EventSubType } from '../enums';
31
+ import { OpeningTaskDetails, Task_SubformExecModeEnum, TaskBase } from './TaskBase';
32
+ import { LanguageData } from '../env/LanguageData';
33
+ import { Environment } from '../env/Environment';
34
+ import { LastFocusedManager } from '../rt/LastFocusedManager';
35
+ import { GlobalCommandsManager } from '../GlobalCommandsManager';
36
+ import { EventsAllowedType } from '../event/IEventsManager';
37
+ import { AccessHelper } from '../AccessHelper';
38
+ import { MGDataCollection } from './MGDataCollection';
39
+ import { RemoteCommandsProcessor } from "../remote/RemoteCommandsProcessor";
40
+ import { EventHandlerPosition } from '../event/EventHandlerPosition';
41
+ export var Task_Flow;
42
+ (function (Task_Flow) {
43
+ Task_Flow[Task_Flow["NONE"] = 0] = "NONE";
44
+ Task_Flow[Task_Flow["STEP"] = 1] = "STEP";
45
+ Task_Flow[Task_Flow["FAST"] = 2] = "FAST";
46
+ })(Task_Flow || (Task_Flow = {}));
47
+ export var Task_Direction;
48
+ (function (Task_Direction) {
49
+ Task_Direction[Task_Direction["BACK"] = -1] = "BACK";
50
+ Task_Direction[Task_Direction["NONE"] = 0] = "NONE";
51
+ Task_Direction[Task_Direction["FORE"] = 1] = "FORE";
52
+ })(Task_Direction || (Task_Direction = {}));
53
+ export class Task extends TaskBase {
54
+ _dvCache = null;
55
+ _mgData = null;
56
+ _aborting = false;
57
+ _bExecEndTask = false;
58
+ _isStarted = false;
59
+ _evalOldValues = false;
60
+ _inRecordSuffix = false;
61
+ _cancelWasRaised = false;
62
+ _counter = 0;
63
+ _currStartProgLevel = 0;
64
+ _destinationSubform = false;
65
+ _enableZoomHandler = false;
66
+ _firstRecordCycle = false;
67
+ _originalTaskMode = ' ';
68
+ _inCreateLine = false;
69
+ InSelect = false;
70
+ InStartProcess = false;
71
+ _isDestinationCall = false;
72
+ _knownToServer = true;
73
+ _loopStack = null;
74
+ allowRemoteCmdExecution;
75
+ DelayCommandExecution = false;
76
+ _parentTask = null;
77
+ get ParentTask() {
78
+ return this._parentTask;
79
+ }
80
+ ContextTask = null;
81
+ _triggeringTask = null;
82
+ PathParentTask = null;
83
+ _preventControlChange = false;
84
+ _preventRecordSuffix = false;
85
+ _taskPath = null;
86
+ _tryingToCommit = false;
87
+ set TryingToCommit(value) {
88
+ this._tryingToCommit = value;
89
+ }
90
+ get TryingToCommit() {
91
+ return this._tryingToCommit;
92
+ }
93
+ _useLoopStack = false;
94
+ _inProcessingTopMostEndTaskSaved = false;
95
+ InHandleActCancel = false;
96
+ RuntimeSorts = null;
97
+ VewFirst = 0;
98
+ dataViewContent = null;
99
+ PerformParentRecordPrefix = false;
100
+ ModeAsParent = false;
101
+ TaskTransactionManager = null;
102
+ ExecuteClientSubformRefresh = false;
103
+ InCommonHandlerBeforeRP = false;
104
+ _taskService = null;
105
+ get TaskService() {
106
+ if (this._taskService == null)
107
+ this._taskService = new RemoteTaskService();
108
+ return this._taskService;
109
+ }
110
+ static get CommandsProcessor() {
111
+ return CommandsProcessorManager.GetCommandsProcessor();
112
+ }
113
+ hasLocate = false;
114
+ taskDefinitionId = null;
115
+ ArgumentsList = null;
116
+ get LogicalStudioParentTask() {
117
+ if (this.StudioParentTask === null && !super.isMainProg()) {
118
+ return GuiDataCollection.MGDataTable.GetMainProgByCtlIdx(this.ContextID, this._ctlIdx);
119
+ }
120
+ return this.StudioParentTask;
121
+ }
122
+ get KnownToServer() {
123
+ return this._knownToServer;
124
+ }
125
+ ConfirmUpdateNo = false;
126
+ DataSynced = false;
127
+ UniqueSort = null;
128
+ set Transaction(value) {
129
+ this.DataviewManager.CurrentDataviewManager.Transaction = value;
130
+ }
131
+ get Transaction() {
132
+ return this.DataviewManager.CurrentDataviewManager.Transaction;
133
+ }
134
+ RefreshOnVars = null;
135
+ DvPosDescriptor = null;
136
+ SubTasks = null;
137
+ ExpTab = null;
138
+ UserEvtTab = null;
139
+ DataviewHeadersTable = null;
140
+ HandlersTab = null;
141
+ _forms = null;
142
+ Name = null;
143
+ PublicName = null;
144
+ TaskSuffixExecuted = false;
145
+ get TaskDefinitionId() {
146
+ if (this.taskDefinitionId === null) {
147
+ this.taskDefinitionId = new TaskDefinitionId(this._ctlIdx, this.ProgramIsn, this.TaskIsn, this._isPrg);
148
+ }
149
+ return this.taskDefinitionId;
150
+ }
151
+ RetrunValueExp = 0;
152
+ SubformControl = null;
153
+ static StartProgLevel = 0;
154
+ static _idleTimerStarted = false;
155
+ static get IsBlockingBatch() {
156
+ return false;
157
+ }
158
+ constructor(parent) {
159
+ super();
160
+ if (isNullOrUndefined(parent)) {
161
+ this.constructor_0();
162
+ return;
163
+ }
164
+ this.constructor_1(parent);
165
+ }
166
+ constructor_0() {
167
+ this.ActionManager = new ActionManager();
168
+ this.DataView = new DataView(this);
169
+ this._flowMonitor = FlowMonitorQueue.Instance;
170
+ this.ContextTask = this;
171
+ this._dvCache = new DvCache(this);
172
+ this.PerformParentRecordPrefix = true;
173
+ this.DataviewManager = new DataviewManager(this);
174
+ this.allowRemoteCmdExecution = true;
175
+ this.TaskTransactionManager = new TaskTransactionManager(this);
176
+ }
177
+ Init() {
178
+ this.DataView.Init();
179
+ }
180
+ constructor_1(parent) {
181
+ this.constructor_0();
182
+ this.PathParentTask = parent;
183
+ this._parentTask = parent;
184
+ this._triggeringTask = null;
185
+ this.buildTaskPath();
186
+ }
187
+ static CreateTask() {
188
+ let task = new Task();
189
+ task.Init();
190
+ return task;
191
+ }
192
+ isAborting() {
193
+ return this._aborting;
194
+ }
195
+ buildTaskPath() {
196
+ this._taskPath = new List();
197
+ if (this._parentTask._taskPath !== null)
198
+ this._taskPath.AddRange(this._parentTask._taskPath.GetEnumerator());
199
+ this._taskPath.push(this);
200
+ }
201
+ async fillData(mgd, openingTaskDetails) {
202
+ if (!super.isMainProg()) {
203
+ if (this._parentTask === null && openingTaskDetails.CallingTask !== null) {
204
+ this._parentTask = openingTaskDetails.CallingTask;
205
+ this.buildTaskPath();
206
+ openingTaskDetails.CallingTask.addSubTask(this);
207
+ }
208
+ if (this.PathParentTask === null && openingTaskDetails.PathParentTask !== null) {
209
+ this.PathParentTask = openingTaskDetails.PathParentTask;
210
+ }
211
+ }
212
+ if (this._parentTask !== null && this._parentTask.getEnableZoomHandler()) {
213
+ this.setEnableZoomHandler();
214
+ }
215
+ this._mgData = mgd;
216
+ this.fillAttributes();
217
+ this._mgData.addTask(this);
218
+ let parentForm = (this._parentTask !== null) ? this._parentTask.getForm() : null;
219
+ while (await this.initInnerObjects(RuntimeContextBase.Instance.Parser.getNextTag(), parentForm)) {
220
+ }
221
+ this.TaskTransactionManager.PrepareTransactionProperties(this.DataviewManager.RemoteDataviewManager.Transaction, false);
222
+ this.HandleTriggerTask();
223
+ this.HandlePreviouslyActiveTaskId();
224
+ this.CheckAndSetSubForm();
225
+ if (this.IsSubForm) {
226
+ let subFormCtrl = this.getParent().getForm().getSubFormCtrlForTask(this._taskTag);
227
+ if (subFormCtrl !== null) {
228
+ subFormCtrl.setSubformTaskId(this._taskTag);
229
+ }
230
+ if (this.Form !== null) {
231
+ this.Form.setSubFormCtrl(subFormCtrl);
232
+ }
233
+ }
234
+ }
235
+ HandlePreviouslyActiveTaskId() {
236
+ if (this._parentTask !== null && this._parentTask.GetContextTask() !== null && this._mgData !== this._parentTask.getMGData())
237
+ this.PreviouslyActiveTaskId = (this._parentTask.GetContextTask()).getTaskTag();
238
+ else if (this._parentTask !== null)
239
+ this.PreviouslyActiveTaskId = this._parentTask.getTaskTag();
240
+ }
241
+ HandleTriggerTask() {
242
+ this._triggeringTask = this._parentTask;
243
+ }
244
+ FillTaskTables(taskTablesData) {
245
+ if (arguments.length === 1) {
246
+ this.FillTaskTables_0();
247
+ return;
248
+ }
249
+ this.FillTaskTables_1();
250
+ }
251
+ FillTaskTables_0() {
252
+ }
253
+ fillAttributes() {
254
+ let parser = RuntimeContextBase.Instance.Parser;
255
+ let endContext = parser.getXMLdata().indexOf(XMLConstants.TAG_CLOSE, parser.getCurrIndex());
256
+ if (endContext !== -1 && endContext < parser.getXMLdata().length) {
257
+ super.fillAttributes(parser);
258
+ if (super.isMainProg())
259
+ this._mgData = AccessHelper.mgDataTable.getMGData(0);
260
+ }
261
+ else {
262
+ Logger.Instance.WriteExceptionToLogWithMsg("in Task.fillAttributes() out of string bounds");
263
+ }
264
+ }
265
+ setAttribute(attribute, valueStr) {
266
+ let isTagProcessed;
267
+ isTagProcessed = super.setAttribute(attribute, valueStr);
268
+ if (!isTagProcessed) {
269
+ isTagProcessed = true;
270
+ switch (attribute) {
271
+ case ConstInterface.MG_ATTR_REFRESHON:
272
+ if (!(valueStr.trim() === ""))
273
+ this.SetRefreshOnVars(valueStr);
274
+ break;
275
+ case XMLConstants.MG_ATTR_NAME:
276
+ this.Name = valueStr;
277
+ break;
278
+ case ConstInterface.MG_ATTR_DVPOS_DEC:
279
+ if (!(valueStr.trim() === ""))
280
+ this.setDescriptor(valueStr);
281
+ break;
282
+ case ConstInterface.MG_ATTR_HAS_LOCATE:
283
+ if (+valueStr == 1)
284
+ this.hasLocate = true;
285
+ break;
286
+ case ConstInterface.MG_ATTR_AS_PARENT:
287
+ if (+valueStr == 1)
288
+ this.ModeAsParent = true;
289
+ break;
290
+ case ConstInterface.MG_ATTR_TASK_UNIQUE_SORT:
291
+ this.UniqueSort = valueStr[0];
292
+ break;
293
+ case ConstInterface.MG_ATTR_TRANS_ID:
294
+ this.setRemoteTransaction(valueStr);
295
+ break;
296
+ case ConstInterface.MG_ATTR_PUBLIC:
297
+ this.PublicName = XmlParser.unescape(valueStr);
298
+ break;
299
+ case XMLConstants.MG_ATTR_IS_OFFLINE:
300
+ this.IsOffline = XmlParser.getBoolean(valueStr);
301
+ break;
302
+ case XMLConstants.MG_ATTR_RETURN_VALUE_EXP:
303
+ this.RetrunValueExp = XmlParser.getInt(valueStr);
304
+ break;
305
+ case XMLConstants.MG_ATTR_MENUS_FILE_NAME:
306
+ break;
307
+ default:
308
+ isTagProcessed = false;
309
+ break;
310
+ }
311
+ }
312
+ if (!isTagProcessed)
313
+ Logger.Instance.WriteExceptionToLogWithMsg(NString.Format("Unrecognized attribute: '{0}'", attribute));
314
+ return true;
315
+ }
316
+ async initInnerObjects(foundTagName, parentForm) {
317
+ if (foundTagName == null)
318
+ return false;
319
+ let parser = RuntimeContextBase.Instance.Parser;
320
+ switch (foundTagName) {
321
+ case XMLConstants.MG_TAG_HELPTABLE:
322
+ if (this._helpTab == null)
323
+ this._helpTab = new Helps();
324
+ if (Events.ShouldLog(Logger_LogLevels.Development))
325
+ Events.WriteDevToLog(NString.Format("{0} ...", foundTagName));
326
+ this._helpTab.fillData(parser);
327
+ break;
328
+ case XMLConstants.MG_TAG_DVHEADER:
329
+ if (Events.ShouldLog(Logger_LogLevels.Development))
330
+ Events.WriteDevToLog(NString.Format("{0} ...", foundTagName));
331
+ this.DataView.fillHeaderData(parser);
332
+ break;
333
+ case XMLConstants.MG_TAG_PROP:
334
+ this._propTab.fillData(this, 'T', parser);
335
+ break;
336
+ case XMLConstants.MG_TAG_FORM:
337
+ this.Form = this.FormInitData(parentForm);
338
+ break;
339
+ case XMLConstants.MG_ATTR_MENU_CONTENT:
340
+ break;
341
+ case "assemblies":
342
+ let endContext = parser.getXMLdata().indexOf('/assemblies', parser.getCurrIndex());
343
+ parser.setCurrIndex(endContext);
344
+ parser.setCurrIndex2EndOfTag();
345
+ break;
346
+ case XMLConstants.MG_TAG_FORMS:
347
+ this._forms = new FormsTable(this, parentForm);
348
+ Logger.Instance.WriteDevToLog(NString.Format("{0} ...", foundTagName));
349
+ await this._forms.fillData();
350
+ break;
351
+ case XMLConstants.MG_TAG_TASK:
352
+ if (this.SubTasks == null)
353
+ this.SubTasks = new TasksTable();
354
+ let subtask = new Task(this);
355
+ subtask.Init();
356
+ this.SubTasks.addTask(subtask);
357
+ let mgd = this._mgData;
358
+ if (this.isMainProg())
359
+ mgd = AccessHelper.mgDataTable.GetMGDataForStartupProgram();
360
+ await subtask.fillData(mgd, new OpeningTaskDetails());
361
+ break;
362
+ case ConstInterface.MG_TAG_TASKURL:
363
+ await Task.ProcessTaskURL();
364
+ break;
365
+ case ConstInterface.MG_TAG_EXPTABLE:
366
+ if (this.ExpTab == null)
367
+ this.ExpTab = new ExpTable();
368
+ Logger.Instance.WriteDevToLog("goes to exp");
369
+ this.ExpTab.fillData(this, parser);
370
+ break;
371
+ case ConstInterface.MG_TAG_USER_EVENTS:
372
+ if (this.UserEvtTab == null)
373
+ this.UserEvtTab = new UserEventsTable();
374
+ Logger.Instance.WriteDevToLog("goes to user event tab");
375
+ this.UserEvtTab.fillData(this, parser);
376
+ break;
377
+ case ConstInterface.MG_TAG_LINKS:
378
+ this.DataviewHeadersTable = new DataviewHeaders(this);
379
+ this.DataviewHeadersTable.fillData(parser);
380
+ break;
381
+ case ConstInterface.MG_TAG_SORTS:
382
+ this.RuntimeSorts = new SortCollection();
383
+ this.RuntimeSorts.fillData(parser);
384
+ break;
385
+ case ConstInterface.MG_TAG_TASK_TABLES:
386
+ this.FillTaskTables();
387
+ break;
388
+ case XMLConstants.MG_TAG_RECOMPUTE:
389
+ Logger.Instance.WriteDevToLog("goes to recompute");
390
+ this.RecomputeFillData(parser);
391
+ break;
392
+ case ConstInterface.MG_TAG_EVENTHANDLERS:
393
+ Logger.Instance.WriteDevToLog("goes to eventhandlers");
394
+ if (this.HandlersTab == null)
395
+ this.HandlersTab = new HandlersTable();
396
+ this.HandlersTab.fillData(this, parser);
397
+ this.addExpHandlersToMGData();
398
+ break;
399
+ default:
400
+ if (foundTagName === ("/" + XMLConstants.MG_TAG_TASK)) {
401
+ RuntimeContextBase.Instance.Parser.setCurrIndex2EndOfTag();
402
+ return false;
403
+ }
404
+ else {
405
+ Logger.Instance.WriteDevToLog("There is no such tag in Task.initInnerObjects . Enter case for " + foundTagName);
406
+ return false;
407
+ }
408
+ }
409
+ return true;
410
+ }
411
+ RecomputeFillData(parser) {
412
+ let recomputeTable = new RecomputeTable();
413
+ recomputeTable.fillData_1(this.DataView, this, parser);
414
+ }
415
+ FillTaskTables_1() {
416
+ let parser = RuntimeContextBase.Instance.Parser;
417
+ let endContext = parser.getXMLdata().indexOf(ConstInterface.MG_TAG_TASK_TABLES_END, parser.getCurrIndex());
418
+ endContext = parser.getXMLdata().indexOf(XMLConstants.TAG_CLOSE, endContext) + XMLConstants.TAG_CLOSE.length;
419
+ let taskTablesData = parser.getXMLsubstring(endContext);
420
+ this.FillTaskTables(taskTablesData);
421
+ parser.setCurrIndex(endContext);
422
+ }
423
+ addExpHandlersToMGData() {
424
+ let idx = 0;
425
+ for (let i = this.HandlersTab.getSize() - 1; i >= 0; i--) {
426
+ let handler = this.HandlersTab.getHandler(i);
427
+ let evt = handler.getEvent();
428
+ if (evt.getType() === ConstInterface.EVENT_TYPE_EXPRESSION ||
429
+ (evt.getType() === ConstInterface.EVENT_TYPE_USER && evt.getUserEventType() === ConstInterface.EVENT_TYPE_EXPRESSION)) {
430
+ this._mgData.addExpHandler(handler, idx);
431
+ idx++;
432
+ }
433
+ }
434
+ }
435
+ SetRefreshOnVars(variables) {
436
+ let strTok = StrUtil.tokenize(variables, ",");
437
+ let fldNum;
438
+ let intVals = new List();
439
+ let i;
440
+ for (i = 0; i < strTok.length; i++) {
441
+ fldNum = NNumber.Parse(strTok[i]);
442
+ intVals.push(fldNum);
443
+ }
444
+ this.RefreshOnVars = new Array(intVals.length);
445
+ for (i = 0; i < intVals.length; i++) {
446
+ fldNum = intVals.get_Item(i);
447
+ this.RefreshOnVars[i] = fldNum;
448
+ }
449
+ }
450
+ setDataSynced(synced) {
451
+ this.DataSynced = synced;
452
+ }
453
+ getField(fldName) {
454
+ return this.DataView.getFieldByName(fldName);
455
+ }
456
+ getExpById(id) {
457
+ if (this.ExpTab !== null)
458
+ return this.ExpTab.getExpById(id);
459
+ else
460
+ Logger.Instance.WriteExceptionToLogWithMsg("in Task.GetExpById(): no expression table");
461
+ return null;
462
+ }
463
+ getExpObjectById(id) {
464
+ return this.getExpById(id);
465
+ }
466
+ GetExpressionStorage(expId) {
467
+ let result = null;
468
+ if (expId > 0) {
469
+ let expById = this.getExpById(expId);
470
+ Debug.Assert(expById !== null);
471
+ result = expById.GetStorageAttribute();
472
+ }
473
+ return result;
474
+ }
475
+ async CalculateExpression(expId, resType, length) {
476
+ let result = null;
477
+ if (expId > 0) {
478
+ let expById = this.getExpById(expId);
479
+ Debug.Assert(expById !== null);
480
+ result = await expById.evaluateWithResultTypeAndLength(resType, length);
481
+ }
482
+ return result;
483
+ }
484
+ async insertRecordTable(invalidate, parser) {
485
+ if (await this.isCached()) {
486
+ let firstTime = this.DataView.getFirstDv();
487
+ if (!firstTime && invalidate) {
488
+ if (!this.hasLocate) {
489
+ if (this.DataView.IncludesFirst()) {
490
+ if (!this.DataView.getChanged())
491
+ this._dvCache.putInCache(this.DataView.replicate());
492
+ else
493
+ this._dvCache.removeDvFromCache(this.DataView.getDvPosValue(), true);
494
+ }
495
+ }
496
+ else
497
+ this.locatePutInCache();
498
+ }
499
+ }
500
+ await this.DataView.fillData(parser);
501
+ if (invalidate)
502
+ this.DataView.setChanged(false);
503
+ }
504
+ getHandlersTab() {
505
+ return this.HandlersTab;
506
+ }
507
+ async buildXML(message) {
508
+ this.IsAfterRetryBeforeBuildXML = this.getAfterRetry();
509
+ if (this.KnownToServer && !this.IsOffline) {
510
+ message.Append(XMLConstants.START_TAG + XMLConstants.MG_TAG_TASK);
511
+ message.Append(" " + XMLConstants.MG_ATTR_TASKID + "=\"" + this.getTaskTag() + "\"");
512
+ message.Append(" " + ConstInterface.MG_ATTR_TASK_MAINLEVEL + "=\"" + this.getMainLevel() + "\"");
513
+ message.Append(XMLConstants.TAG_CLOSE);
514
+ await this.DataView.buildXML(message);
515
+ if (this.Form != null && this.Form.Opened)
516
+ message.Append(this.Form.GetHiddenControlListXML());
517
+ message.Append("\n </" + XMLConstants.MG_TAG_TASK + XMLConstants.TAG_CLOSE);
518
+ }
519
+ }
520
+ buildXMLForRngs(message, UserRanges, locate) {
521
+ let i;
522
+ let fld;
523
+ let cellAttr = StorageAttribute.SKIP;
524
+ let toBase64 = (Environment.Instance.GetDebugLevel() <= 1);
525
+ message.Append(XMLConstants.TAG_CLOSE);
526
+ for (i = 0; i < UserRanges.length; i++) {
527
+ message.Append(XMLConstants.START_TAG + ConstInterface.USER_RNG);
528
+ let rng = UserRanges.get_Item(i);
529
+ message.Append(" " + XMLConstants.MG_TAG_FLD + "=\"" + rng.veeIdx + "\"");
530
+ fld = this.DataView.getField(rng.veeIdx - 1);
531
+ let fldAttr = fld.getType();
532
+ if (rng.nullMin)
533
+ message.Append(" " + ConstInterface.NULL_MIN_RNG + "=\"1\"");
534
+ if (!rng.discardMin && rng.min != null) {
535
+ let val = RecordUtils.itemValToXML(rng.min, fldAttr, cellAttr, toBase64);
536
+ message.Append(" " + ConstInterface.MIN_RNG + "=\"" + val + "\"");
537
+ }
538
+ if (rng.nullMax)
539
+ message.Append(" " + ConstInterface.NULL_MAX_RNG + "=\"1\"");
540
+ if (!rng.discardMax && rng.max != null) {
541
+ let val = RecordUtils.itemValToXML(rng.max, fldAttr, cellAttr, toBase64);
542
+ message.Append(" " + ConstInterface.MAX_RNG + "=\"" + val + "\"");
543
+ }
544
+ message.Append(XMLConstants.TAG_TERM);
545
+ }
546
+ if (locate)
547
+ message.Append(XMLConstants.END_TAG + ConstInterface.USER_LOCATES + XMLConstants.TAG_CLOSE);
548
+ else
549
+ message.Append(XMLConstants.END_TAG + ConstInterface.USER_RANGES + XMLConstants.TAG_CLOSE);
550
+ }
551
+ buildXMLForSorts(message) {
552
+ if (this.UserSorts != null && this.UserSorts.length > 0) {
553
+ let i;
554
+ for (i = 0; i < this.UserSorts.length; i++) {
555
+ message.Append(XMLConstants.TAG_CLOSE);
556
+ let srt = this.UserSorts.get_Item(i);
557
+ message.Append(XMLConstants.START_TAG + ConstInterface.SORT);
558
+ message.Append(" " + XMLConstants.MG_TAG_FLD + "=\"" + srt.fldIdx + "\"");
559
+ if (srt.dir)
560
+ message.Append(" " + ConstInterface.MG_ATTR_DIR + "=\"1\"");
561
+ message.Append(XMLConstants.TAG_TERM);
562
+ }
563
+ this.UserSorts.Clear();
564
+ this.UserSorts = null;
565
+ message.Append(XMLConstants.END_TAG + ConstInterface.MG_TAG_SORTS + XMLConstants.TAG_CLOSE);
566
+ }
567
+ }
568
+ getUserEvent(idx) {
569
+ Debug.Assert(this.UserEvtTab !== null);
570
+ let retEvent = null;
571
+ if (this.UserEvtTab !== null)
572
+ retEvent = this.UserEvtTab.getEvent(idx);
573
+ return retEvent;
574
+ }
575
+ SetMoveToFirstControl(moveToFirstControl) {
576
+ if (moveToFirstControl || !this.IsSubForm) {
577
+ if (this.Form !== null) {
578
+ let alreadyMoved = this.Form.alreadyMovedToFirstControl();
579
+ if (!alreadyMoved)
580
+ this.Form.MovedToFirstControl = true;
581
+ }
582
+ }
583
+ }
584
+ async Start(moveToFirstControl, callByDestSubForm) {
585
+ let nonInteractiveTask = null;
586
+ if (!this._isStarted) {
587
+ this._isStarted = true;
588
+ this.InitializeExecution();
589
+ this.InStartProcess = true;
590
+ let result = await this.Setup();
591
+ if (!result.Success)
592
+ return null;
593
+ this._inProcessingTopMostEndTaskSaved = AccessHelper.eventsManager.getProcessingTopMostEndTask();
594
+ AccessHelper.eventsManager.setProcessingTopMostEndTask(false);
595
+ await this.EnableActions();
596
+ result = await this.InitializeForm(moveToFirstControl);
597
+ if (!result.Success)
598
+ return null;
599
+ if (!this.IsInteractive && !this._isMainPrg)
600
+ nonInteractiveTask = this;
601
+ this.DataViewWasRetrieved = true;
602
+ let subTasks = this.SubTasks;
603
+ if (this.isMainProg())
604
+ this.SubTasks = null;
605
+ if (this.isMainProg())
606
+ this.SubTasks = subTasks;
607
+ if (!result.Success)
608
+ return null;
609
+ if (this._aborting)
610
+ return null;
611
+ let dataViewCommand = CommandFactory.CreateDataViewCommand(this.getTaskTag(), DataViewCommandType.FirstChunk);
612
+ result = await this.DataviewManager.Execute(dataViewCommand);
613
+ if (!result.Success)
614
+ return null;
615
+ this.ResumeSubformLayout();
616
+ }
617
+ nonInteractiveTask = await this.StartSubTasks(moveToFirstControl, nonInteractiveTask, callByDestSubForm);
618
+ this.InStartProcess = false;
619
+ return nonInteractiveTask;
620
+ }
621
+ InitializeExecution() {
622
+ super.setBrkLevel(ConstInterface.BRK_LEVEL_REC_MAIN, -1);
623
+ this._firstRecordCycle = true;
624
+ this._currStartProgLevel = ((this.IsSubForm && this.getParent().getForm().alreadyMovedToFirstControl())
625
+ ? this.getParent()._currStartProgLevel
626
+ : Task.StartProgLevel);
627
+ }
628
+ async InitializeForm(moveToFirstControl) {
629
+ if (this.Form !== null) {
630
+ this.SetMoveToFirstControl(moveToFirstControl);
631
+ AccessHelper.eventsManager.pushNewExecStacks();
632
+ this.routeParams = this.DataView.GetRouteParams();
633
+ await this.InitForm();
634
+ AccessHelper.eventsManager.popNewExecStacks();
635
+ this.getMGData().StartTimers();
636
+ Commands.beginInvoke();
637
+ }
638
+ return new ReturnResult();
639
+ }
640
+ async StartSubTasks(moveToFirstControl, nonInteractiveTask, callByDestSubForm) {
641
+ if (this.hasSubTasks()) {
642
+ for (let i = 0; i < this.SubTasks.getSize(); i = i + 1) {
643
+ let task = this.SubTasks.getTask(i);
644
+ let tmpNonInteractiveTask = await task.Start(moveToFirstControl, callByDestSubForm);
645
+ if (nonInteractiveTask === null)
646
+ nonInteractiveTask = tmpNonInteractiveTask;
647
+ else if (tmpNonInteractiveTask !== null)
648
+ Debug.Assert(false, "more than 1 non interactive in task.start");
649
+ }
650
+ }
651
+ return nonInteractiveTask;
652
+ }
653
+ async EnableActions() {
654
+ let actList = ActionManager.actEnabled;
655
+ this.ActionManager.enableList(actList, true, false);
656
+ if (this.IsSubForm)
657
+ this.ActionManager.enable(InternalInterface.MG_ACT_POST_REFRESH_BY_PARENT, true);
658
+ await this.enableModes();
659
+ if (await this.checkProp(PropInterface.PROP_TYPE_SELECTION, false)) {
660
+ this.ActionManager.enable(InternalInterface.MG_ACT_SELECT, true);
661
+ }
662
+ let enablePrintdata = await this.checkProp(PropInterface.PROP_TYPE_PRINT_DATA, false);
663
+ this.ActionManager.enable(InternalInterface.MG_ACT_PRINT_DATA, enablePrintdata);
664
+ if (this.getEnableZoomHandler())
665
+ this.ActionManager.enable(InternalInterface.MG_ACT_ZOOM, true);
666
+ }
667
+ async ShowError(text) {
668
+ let mlsTransText = LanguageData.Instance.translate(text);
669
+ let mlsTransTitle = LanguageData.Instance.translate(ConstInterface.ERROR_STRING);
670
+ await GUIManager.Instance.MessageBox(mlsTransTitle, mlsTransText, Styles.MSGBOX_ICON_ERROR | Styles.MSGBOX_BUTTON_OK);
671
+ }
672
+ async EndTaskOnError(result, displayError) {
673
+ if (!result.Success && !this.isAborting()) {
674
+ if (this.InStartProcess) {
675
+ await this.endTask(false, false, false);
676
+ if (displayError)
677
+ await this.ShowError(result.ErrorDescription);
678
+ this.InStartProcess = false;
679
+ return true;
680
+ }
681
+ else {
682
+ if (displayError)
683
+ await this.ShowError(result.ErrorDescription);
684
+ await AccessHelper.eventsManager.handleInternalEventWithTask(this, InternalInterface.MG_ACT_EXIT);
685
+ }
686
+ }
687
+ return false;
688
+ }
689
+ async Setup() {
690
+ let result;
691
+ this.TaskService.InitTaskPrefixExecutedFlag(this);
692
+ this.TaskSuffixExecuted = false;
693
+ TaskServiceBase.CreateFirstRecord(this);
694
+ let dataViewCommand = CommandFactory.CreateDataViewCommand(this.getTaskTag(), DataViewCommandType.Init);
695
+ result = await this.DataviewManager.Execute(dataViewCommand);
696
+ if (!result.Success)
697
+ return result;
698
+ if (result.Success) {
699
+ let commands = GlobalCommandsManager.Instance.getCommandsExecutedAfterTaskStarted();
700
+ for (let cmdIdx = 0; cmdIdx < commands.length; cmdIdx++) {
701
+ let command = (commands.get_Item(cmdIdx));
702
+ if (command.TaskTag === this.getTaskTag()) {
703
+ await command.Execute(null);
704
+ GlobalCommandsManager.Instance.removeCommandsExecutedAfterTaskStarted(command);
705
+ }
706
+ }
707
+ dataViewCommand = CommandFactory.CreateDataViewCommand(this.getTaskTag(), DataViewCommandType.Prepare);
708
+ result = await this.DataviewManager.Execute(dataViewCommand);
709
+ }
710
+ if (result.Success) {
711
+ result = this.TaskService.PrepareTask(this);
712
+ if (!result.Success)
713
+ await this.EndTaskOnError(result, true);
714
+ }
715
+ if (result.Success) {
716
+ dataViewCommand = CommandFactory.CreateDataViewCommand(this.getTaskTag(), DataViewCommandType.InitDataControlViews);
717
+ result = await this.DataviewManager.Execute(dataViewCommand);
718
+ }
719
+ return result;
720
+ }
721
+ async doFirstRecordCycle() {
722
+ if (!this._isMainPrg) {
723
+ AccessHelper.eventsManager.pushNewExecStacks();
724
+ this.SubformExecMode = Task_SubformExecModeEnum.FIRST_TIME;
725
+ await AccessHelper.eventsManager.handleInternalEventWithTaskAndSubformRefresh(this, InternalInterface.MG_ACT_REC_PREFIX, this.IsSubForm);
726
+ if (!AccessHelper.eventsManager.GetStopExecutionFlag()) {
727
+ if (this.IsSubForm) {
728
+ if (this.hasSubTasks())
729
+ for (let i = 0; i < this.SubTasks.getSize(); i++) {
730
+ let subTask = this.SubTasks.getTask(i);
731
+ if (subTask.IsSubForm) {
732
+ subTask.getForm().IgnoreFirstRecordCycle = true;
733
+ await subTask.doFirstRecordCycle();
734
+ }
735
+ }
736
+ await AccessHelper.eventsManager.handleInternalEventWithTask(this, InternalInterface.MG_ACT_REC_SUFFIX);
737
+ }
738
+ }
739
+ this.SubformExecMode = Task_SubformExecModeEnum.SET_FOCUS;
740
+ AccessHelper.eventsManager.popNewExecStacks();
741
+ }
742
+ }
743
+ CheckAndSetSubForm() {
744
+ this.IsSubForm = (!super.isMainProg() && this !== this._mgData.getFirstTask());
745
+ }
746
+ IsRoute() {
747
+ return (this.RouterPath != null);
748
+ }
749
+ async stop() {
750
+ let task;
751
+ if (this._aborting)
752
+ return;
753
+ if (this.hasSubTasks()) {
754
+ while ((task = this.SubTasks.getTask(0)) != null) {
755
+ task.setDestinationSubform(this._destinationSubform);
756
+ await task.stop();
757
+ }
758
+ }
759
+ if (!this._isMainPrg)
760
+ this._aborting = true;
761
+ if (this._parentTask != null) {
762
+ this._parentTask.removeSubTask(this);
763
+ if (this.IsSubForm) {
764
+ let oldTimers = new List(), newTimers = new List();
765
+ let mgd = this.getMGData();
766
+ if (mgd.getTimerHandlers() != null)
767
+ oldTimers = mgd.getTimerHandlers().getTimersVector();
768
+ mgd.removeTimerHandler(this);
769
+ mgd.removeExpressionHandler(this);
770
+ if (mgd.getTimerHandlers() != null)
771
+ newTimers = mgd.getTimerHandlers().getTimersVector();
772
+ mgd.changeTimers(oldTimers, newTimers);
773
+ mgd.removeTask(this);
774
+ GUIManager.Instance.abort(this.getForm());
775
+ }
776
+ }
777
+ this.AbortTransaction();
778
+ if (this.getClickedControl() != null)
779
+ RuntimeContextBase.Instance.CurrentClickedCtrl = null;
780
+ if (this.Form != null)
781
+ this.Form.removeRefsToCtrls();
782
+ if (this.IsSubForm) {
783
+ let subForm = this.Form.getSubFormCtrl();
784
+ subForm.setSubformTaskId(null);
785
+ subForm.initSubformTask();
786
+ if (LastFocusedManager.Instance.getLastFocusedTask() === this)
787
+ LastFocusedManager.Instance.setLastFocusedTask(this._parentTask);
788
+ if (subForm.SubformLoaded)
789
+ await (subForm.getProp(PropInterface.PROP_TYPE_VISIBLE)).RefreshDisplay(true);
790
+ }
791
+ let clearDataViewCommand = CommandFactory.CreateDataViewCommand(this.getTaskTag(), DataViewCommandType.Clear);
792
+ await this.DataviewManager.Execute(clearDataViewCommand);
793
+ }
794
+ abort() {
795
+ this.getMGData().abort();
796
+ }
797
+ hasSubTasks() {
798
+ return this.SubTasks !== null && this.SubTasks.getSize() > 0;
799
+ }
800
+ getTaskDepth(byParentOrder) {
801
+ if (byParentOrder)
802
+ return this.getTaskDepth_(byParentOrder);
803
+ let depth = this.GetContextTask().getTaskDepth_(byParentOrder);
804
+ if (this.isMainProg() && this.getCtlIdx() !== ConstInterface.TOP_LEVEL_CONTAINER)
805
+ depth = depth + 1;
806
+ return depth;
807
+ }
808
+ getTaskDepth_(byParentOrder) {
809
+ let tmpTask = this.getTriggeringTask();
810
+ if (tmpTask == null || byParentOrder)
811
+ if (this._parentTask == null)
812
+ return 1;
813
+ else {
814
+ if (byParentOrder && this.getCtlIdx() !== this._parentTask.getCtlIdx())
815
+ return 2 + this._parentTask.getTaskDepth_(byParentOrder);
816
+ return 1 + this._parentTask.getTaskDepth_(byParentOrder);
817
+ }
818
+ return 1 + (tmpTask).getTaskDepth_(byParentOrder);
819
+ }
820
+ GetTaskAncestor(generation) {
821
+ return this.getTaskAncestor_(generation);
822
+ }
823
+ getTaskAncestor_(generation) {
824
+ let retTask = null;
825
+ if (generation === 0)
826
+ retTask = this;
827
+ else {
828
+ let tmpTask = this.getTriggeringTask();
829
+ if (tmpTask === null)
830
+ tmpTask = this._parentTask;
831
+ if (tmpTask !== null)
832
+ retTask = tmpTask.getTaskAncestor_(--generation);
833
+ }
834
+ return retTask;
835
+ }
836
+ GetTaskDepth() {
837
+ return this.getTaskDepth(false);
838
+ }
839
+ pathContains(task) {
840
+ return this._taskPath.Contains(task);
841
+ }
842
+ SetContextTask(context) {
843
+ this.ContextTask = context;
844
+ }
845
+ GetContextTask() {
846
+ let currRec = (this.DataView.getCurrRec());
847
+ if (this.InStartProcess
848
+ || currRec !== null && (currRec.InCompute || currRec.InRecompute)
849
+ || this.Form !== null && this.Form.inRefreshDisplay())
850
+ return this;
851
+ return this.ContextTask;
852
+ }
853
+ getTriggeringTask() {
854
+ if (this._triggeringTask !== null && this._triggeringTask.getMGData().IsAborting)
855
+ this._triggeringTask = this._parentTask;
856
+ return this._triggeringTask;
857
+ }
858
+ setLastParkedCtrl(ctrl) {
859
+ super.setLastParkedCtrl(ctrl);
860
+ LastFocusedManager.setLastFocusedControl(this, ctrl);
861
+ }
862
+ queryTaskPath() {
863
+ let insertedNames = 0;
864
+ let result = new StringBuilder(7936);
865
+ let treeRoute = new Array(this.getTaskDepth(false));
866
+ this.pathToRoot(treeRoute, false);
867
+ for (let tsk = treeRoute.length - 1; tsk >= 0; tsk--) {
868
+ let currTsk = treeRoute[tsk];
869
+ if (currTsk.isMainProg())
870
+ continue;
871
+ let nameProp = currTsk.getProp(PropInterface.PROP_TYPE_NAME);
872
+ if (nameProp == null)
873
+ continue;
874
+ let name = nameProp.GetComputedValue();
875
+ if (!NString.IsNullOrEmpty(name)) {
876
+ if (insertedNames++ !== 0)
877
+ result.Append(';');
878
+ result.Append(name);
879
+ }
880
+ }
881
+ return result;
882
+ }
883
+ ctl_itm_2_parent_vee(itm) {
884
+ let currTsk;
885
+ let currItm = 0;
886
+ let lastItm = 0;
887
+ let treeRoute = new Array(this.getTaskDepth(true));
888
+ this.pathToRoot(treeRoute, true);
889
+ for (let tsk = treeRoute.length - 1; tsk >= 0; tsk--) {
890
+ currTsk = treeRoute[tsk];
891
+ currItm += currTsk.DataView.GetFieldsTab().getSize();
892
+ if (itm < currItm) {
893
+ itm -= lastItm;
894
+ return currTsk.DataView.getField(itm);
895
+ }
896
+ lastItm = currItm;
897
+ }
898
+ return null;
899
+ }
900
+ GetControlIDFromVarItem(item) {
901
+ let currTask;
902
+ let currItem = 0;
903
+ let lastItem = 0;
904
+ let noOfControlsBeforeCurrTask = 0;
905
+ let treeRoute = new Array(this.getTaskDepth(true));
906
+ this.pathToRoot(treeRoute, true);
907
+ for (let task = treeRoute.length - 1; task >= 0; task--) {
908
+ currTask = treeRoute[task];
909
+ currItem += currTask.DataView.GetFieldsTab().getSize();
910
+ if (item < currItem) {
911
+ item -= lastItem;
912
+ let field = currTask.DataView.getField(item);
913
+ if (field.getCtrl() != null)
914
+ return noOfControlsBeforeCurrTask = noOfControlsBeforeCurrTask + currTask.Form.getControlIdx(field.getCtrl()) + 1;
915
+ return 0;
916
+ }
917
+ if (currTask.Form != null)
918
+ noOfControlsBeforeCurrTask += currTask.Form.getCtrlCount();
919
+ lastItem = currItem;
920
+ }
921
+ return 0;
922
+ }
923
+ GetControlFromControlID(controlID, parent) {
924
+ let control = null;
925
+ parent.value = -1;
926
+ if (controlID >= 0) {
927
+ let currTask = null;
928
+ let callerTask = null;
929
+ let noOfControlsInCurrtask = 0;
930
+ let noOfControlsBeforeCurrTask = 0;
931
+ let controlIdx = 0;
932
+ let treeRoute = new Array(this.getTaskDepth(true));
933
+ this.pathToRoot(treeRoute, true);
934
+ for (let task = treeRoute.length - 1; task >= 0; task--) {
935
+ currTask = treeRoute[task];
936
+ if (currTask.Form != null) {
937
+ noOfControlsInCurrtask = currTask.Form.getCtrlCount();
938
+ if (controlID < (noOfControlsBeforeCurrTask + noOfControlsInCurrtask)) {
939
+ controlIdx = controlID - noOfControlsBeforeCurrTask;
940
+ control = currTask.Form.CtrlTab.getCtrl(controlIdx);
941
+ callerTask = currTask;
942
+ break;
943
+ }
944
+ noOfControlsBeforeCurrTask += noOfControlsInCurrtask;
945
+ }
946
+ }
947
+ if (control != null) {
948
+ parent.value = 0;
949
+ let prevCtlIdx = treeRoute[0].TaskDefinitionId.CtlIndex;
950
+ for (let task = 0; task < treeRoute.length - 1; task++) {
951
+ currTask = treeRoute[task];
952
+ if (prevCtlIdx !== currTask.TaskDefinitionId.CtlIndex)
953
+ parent.value++;
954
+ if (callerTask.TaskDefinitionId.CtlIndex === currTask.TaskDefinitionId.CtlIndex)
955
+ break;
956
+ prevCtlIdx = currTask.TaskDefinitionId.CtlIndex;
957
+ }
958
+ }
959
+ }
960
+ return control;
961
+ }
962
+ ctl_itm_4_parent_vee(parent, vee) {
963
+ let tsk;
964
+ let depth = this.getTaskDepth(true);
965
+ if (parent !== TaskBase.MAIN_PRG_PARENT_ID && depth <= parent)
966
+ return vee;
967
+ let treeRoute = new Array(depth);
968
+ if (vee !== 0) {
969
+ this.pathToRoot(treeRoute, true);
970
+ let indOfParentInTaskTree = this.getIndOfParentInTaskTree(parent, treeRoute);
971
+ let i;
972
+ for (i = treeRoute.length - 1; i > indOfParentInTaskTree; i--) {
973
+ tsk = treeRoute[i];
974
+ vee += tsk.DataView.GetFieldsTab().getSize();
975
+ }
976
+ }
977
+ return vee;
978
+ }
979
+ getIndOfParentInTaskTree(parent, taskTree) {
980
+ let indOfParentInTaskTree = 0;
981
+ if (parent === TaskBase.MAIN_PRG_PARENT_ID) {
982
+ for (let i = 1; i < taskTree.length; i = i + 1) {
983
+ if (taskTree[i].isMainProg() && this._ctlIdx === taskTree[i].getCtlIdx()) {
984
+ indOfParentInTaskTree = i;
985
+ break;
986
+ }
987
+ }
988
+ }
989
+ else
990
+ indOfParentInTaskTree = parent;
991
+ return indOfParentInTaskTree;
992
+ }
993
+ getFieldByName(fldName) {
994
+ return (this.GetContextTask()).getFieldByName_(fldName);
995
+ }
996
+ getFieldByName_(fldName) {
997
+ let tmpTask;
998
+ if (fldName == null)
999
+ return null;
1000
+ let fld = this.getField(fldName);
1001
+ if (fld == null) {
1002
+ tmpTask = this.getTriggeringTask() != null ? this.getTriggeringTask() : this._parentTask;
1003
+ if (tmpTask != null) {
1004
+ if (!this.isMainProg() && this.getCtlIdx() !== tmpTask.getCtlIdx()) {
1005
+ let mainPrg = AccessHelper.mgDataTable.GetMainProgByCtlIdx(-1, this.getCtlIdx());
1006
+ fld = mainPrg.getFieldByName_(fldName);
1007
+ }
1008
+ if (fld == null)
1009
+ fld = tmpTask.getFieldByName_(fldName);
1010
+ }
1011
+ }
1012
+ return fld;
1013
+ }
1014
+ getIndexOfFieldByName(fldName) {
1015
+ let depth = this.getTaskDepth(true);
1016
+ let index = 0;
1017
+ let fld = this.getFieldByName(fldName);
1018
+ let fldTab;
1019
+ if (fld == null)
1020
+ return 0;
1021
+ let treeRoute = new Array(depth);
1022
+ this.pathToRoot(treeRoute, true);
1023
+ for (let curr = depth - 1; curr >= 0; curr--) {
1024
+ let currTask = treeRoute[curr];
1025
+ if (currTask === fld.getTask()) {
1026
+ curr = fld.getId();
1027
+ index += ++curr;
1028
+ break;
1029
+ }
1030
+ fldTab = currTask.DataView.GetFieldsTab();
1031
+ index += fldTab.getSize();
1032
+ }
1033
+ return index;
1034
+ }
1035
+ pathToRoot(path, byParentOrder) {
1036
+ let task = (byParentOrder ? this : this.GetContextTask());
1037
+ for (let i = 0; i < path.length; i++) {
1038
+ path[i] = task;
1039
+ let ctlIdx = task.getCtlIdx();
1040
+ let tmpTask = byParentOrder ? null : task.getTriggeringTask();
1041
+ if (tmpTask != null)
1042
+ task = tmpTask;
1043
+ else {
1044
+ task = task.getParent();
1045
+ if (task == null) {
1046
+ if (!byParentOrder && this.isMainProg() && this.getCtlIdx() !== ConstInterface.TOP_LEVEL_CONTAINER)
1047
+ path[i + 1] = this;
1048
+ break;
1049
+ }
1050
+ if (byParentOrder && ctlIdx !== task.getCtlIdx())
1051
+ path[++i] = AccessHelper.mgDataTable.GetMainProgByCtlIdx(-1, ctlIdx);
1052
+ }
1053
+ }
1054
+ }
1055
+ shouldBeRefreshed() {
1056
+ let dataView = this._parentTask.DataView;
1057
+ let result = false;
1058
+ if (this._parentTask === null || dataView.isPrevCurrRecNull() ||
1059
+ (this.RefreshOnVars !== null && !dataView.currEqualsPrev(this.RefreshOnVars)))
1060
+ result = true;
1061
+ return result;
1062
+ }
1063
+ async CheckRefreshSubTasks() {
1064
+ let ret = false;
1065
+ if (this._enteredRecLevel) {
1066
+ let subformsToRefresh = await this.GetSubformsToRefresh();
1067
+ if (subformsToRefresh.length > 0)
1068
+ ret = true;
1069
+ }
1070
+ return ret;
1071
+ }
1072
+ GetSubTasks() {
1073
+ let subTasks = new List();
1074
+ if (this.hasSubTasks()) {
1075
+ for (let i = 0; i < this.SubTasks.getSize(); i = i + 1)
1076
+ subTasks.push(this.SubTasks.getTask(i));
1077
+ }
1078
+ return subTasks;
1079
+ }
1080
+ async GetSubformsToRefresh() {
1081
+ let subTasks = this.GetSubTasks();
1082
+ let subTasksToRefresh = new List();
1083
+ for (let i = 0; i < subTasks.length; i++) {
1084
+ let subTask = subTasks.get_Item(i);
1085
+ if (await this.ShouldRefreshSubformTask(subTask))
1086
+ subTasksToRefresh.push(subTask);
1087
+ }
1088
+ return subTasksToRefresh;
1089
+ }
1090
+ async ShouldRefreshSubformTask(subTask) {
1091
+ let refresh = false;
1092
+ let subformCtrl = subTask.getForm().getSubFormCtrl();
1093
+ subTask.DoSubformPrefixSuffix = false;
1094
+ if (subformCtrl != null && !subTask.InSelect && subTask.AfterFirstRecordPrefix) {
1095
+ let parentMode = this.getMode();
1096
+ let modeProperty = (parentMode === Constants.TASK_MODE_QUERY ? PropInterface.PROP_TYPE_ALLOW_QUERY
1097
+ : parentMode === Constants.TASK_MODE_MODIFY
1098
+ ? PropInterface.PROP_TYPE_ALLOW_MODIFY
1099
+ : PropInterface.PROP_TYPE_ALLOW_CREATE);
1100
+ if (subTask.ModeAsParent && parentMode !== subTask.getMode() &&
1101
+ this.getLevel() === Constants.TASK_LEVEL_RECORD &&
1102
+ await (subTask.getProp(PropInterface.PROP_TYPE_ALLOW_OPTION)).getValueBoolean() &&
1103
+ await subTask.checkProp(modeProperty, true)) {
1104
+ if (!subformCtrl.isVisible() &&
1105
+ !await subformCtrl.checkProp(PropInterface.PROP_TYPE_REFRESH_WHEN_HIDDEN, false)) {
1106
+ subformCtrl.RefreshOnVisible = true;
1107
+ refresh = false;
1108
+ }
1109
+ else
1110
+ refresh = true;
1111
+ await subTask.SetModeAsParent(parentMode);
1112
+ }
1113
+ else {
1114
+ refresh = await subformCtrl.checkProp(PropInterface.PROP_TYPE_AUTO_REFRESH, true) && subTask.shouldBeRefreshed();
1115
+ if (refresh) {
1116
+ if (!subformCtrl.isVisible() &&
1117
+ !await subformCtrl.checkProp(PropInterface.PROP_TYPE_REFRESH_WHEN_HIDDEN, false)) {
1118
+ subformCtrl.RefreshOnVisible = true;
1119
+ refresh = false;
1120
+ }
1121
+ }
1122
+ }
1123
+ if (refresh)
1124
+ subTask.DoSubformPrefixSuffix = true;
1125
+ }
1126
+ return refresh;
1127
+ }
1128
+ async SetModeAsParent(parentMode) {
1129
+ await this.enableModes();
1130
+ if (parentMode === Constants.TASK_MODE_CREATE) {
1131
+ let cmd = CommandFactory.CreateEventCommand(this.getTaskTag(), InternalInterface.MG_ACT_RTO_CREATE);
1132
+ await this.DataviewManager.Execute(cmd);
1133
+ }
1134
+ else if (this.getMode() === Constants.TASK_MODE_CREATE) {
1135
+ this.setPreventRecordSuffix(true);
1136
+ this.setPreventControlChange(true);
1137
+ await AccessHelper.eventsManager.handleInternalEventWithTask(this, InternalInterface.MG_ACT_RT_REFRESH_VIEW);
1138
+ this.setPreventRecordSuffix(false);
1139
+ this.setPreventControlChange(false);
1140
+ let subTaskDv = this.DataView;
1141
+ if (!subTaskDv.isEmpty() && (subTaskDv.getCurrRec()).getMode() !== DataModificationTypes.Insert)
1142
+ this.setMode(parentMode);
1143
+ else
1144
+ this.setMode(Constants.TASK_MODE_CREATE);
1145
+ await this.getForm().RefreshDisplay(Constants.TASK_REFRESH_CURR_REC);
1146
+ }
1147
+ else
1148
+ this.setMode(parentMode);
1149
+ this.setOriginalTaskMode(parentMode);
1150
+ await this.setCreateDeleteActsEnableState();
1151
+ }
1152
+ async doSubformRecPrefixSuffix() {
1153
+ let subTasks = this.GetSubTasks();
1154
+ for (let i = 0; i < subTasks.length; i++) {
1155
+ let subTask = subTasks.get_Item(i);
1156
+ if (subTask.DoSubformPrefixSuffix) {
1157
+ await AccessHelper.eventsManager.handleInternalEventWithTaskAndSubformRefresh(subTask, InternalInterface.MG_ACT_REC_PREFIX, true);
1158
+ if (!AccessHelper.eventsManager.GetStopExecutionFlag())
1159
+ await AccessHelper.eventsManager.handleInternalEventWithTask(subTask, InternalInterface.MG_ACT_REC_SUFFIX);
1160
+ }
1161
+ }
1162
+ }
1163
+ CleanDoSubformPrefixSuffix() {
1164
+ let subTasks = this.GetSubTasks();
1165
+ for (let i = 0; i < subTasks.length; i++) {
1166
+ let subTask = subTasks.get_Item(i);
1167
+ subTask.DoSubformPrefixSuffix = false;
1168
+ }
1169
+ }
1170
+ mustConfirmInDeleteMode() {
1171
+ let prop = this.getProp(PropInterface.PROP_TYPE_CONFIRM_UPDATE);
1172
+ return !prop.isExpression();
1173
+ }
1174
+ addSubTask(subTask) {
1175
+ if (this.SubTasks === null)
1176
+ this.SubTasks = new TasksTable();
1177
+ this.SubTasks.addTask(subTask);
1178
+ }
1179
+ removeSubTask(subTask) {
1180
+ if (this.SubTasks !== null)
1181
+ this.SubTasks.removeTask(subTask);
1182
+ }
1183
+ setTransactionFailed(val) {
1184
+ this._transactionFailed = val;
1185
+ if (!val)
1186
+ this.TransactionErrorHandlingsRetry = null;
1187
+ }
1188
+ transactionFailed(level) {
1189
+ if (level === ConstInterface.TRANS_NONE ||
1190
+ (this.Transaction != null && this.Transaction.getLevel() === level))
1191
+ return this._transactionFailed;
1192
+ else if (level === ConstInterface.TRANS_NONE ||
1193
+ (this.TransactionErrorHandlingsRetry != null && this.TransactionErrorHandlingsRetry.getLevel() === level))
1194
+ return this._transactionFailed;
1195
+ return false;
1196
+ }
1197
+ setAfterRetry(val) {
1198
+ if (this.Transaction != null)
1199
+ this.Transaction.setAfterRetry(val);
1200
+ else if (this.TransactionErrorHandlingsRetry != null) {
1201
+ if (val === ConstInterface.RECOVERY_NONE)
1202
+ this.TransactionErrorHandlingsRetry = null;
1203
+ else
1204
+ this.TransactionErrorHandlingsRetry.setAfterRetry(val);
1205
+ }
1206
+ }
1207
+ getAfterRetry(recovery) {
1208
+ if (arguments.length === 0) {
1209
+ return this.getAfterRetry_0();
1210
+ }
1211
+ return this.getAfterRetry_1(recovery);
1212
+ }
1213
+ getAfterRetry_0() {
1214
+ if (this.Transaction != null)
1215
+ return this.Transaction.getAfterRetry();
1216
+ else if (this.TransactionErrorHandlingsRetry != null)
1217
+ return this.TransactionErrorHandlingsRetry.getAfterRetry();
1218
+ return false;
1219
+ }
1220
+ getAfterRetry_1(recovery) {
1221
+ if (this.Transaction != null)
1222
+ return this.Transaction.getAfterRetry(recovery);
1223
+ else if (this.TransactionErrorHandlingsRetry != null)
1224
+ return this.TransactionErrorHandlingsRetry.getAfterRetry(recovery);
1225
+ return false;
1226
+ }
1227
+ getExecEndTask() {
1228
+ return this._bExecEndTask;
1229
+ }
1230
+ resetExecEndTask() {
1231
+ this._bExecEndTask = false;
1232
+ }
1233
+ setExecEndTask() {
1234
+ this._bExecEndTask = true;
1235
+ }
1236
+ async evalEndCond(mode) {
1237
+ let endTaskCondProp;
1238
+ let evalEndCondProp = this.getProp(PropInterface.PROP_TYPE_EVAL_END_CONDITION);
1239
+ if (this.InEndTask)
1240
+ return false;
1241
+ if (this._bExecEndTask)
1242
+ return true;
1243
+ if (evalEndCondProp != null && (NString.Compare(await evalEndCondProp.getValue(), ConstInterface.END_COND_EVAL_IMMIDIATE, true) === 0 || ((await evalEndCondProp.getValue()).toLowerCase() === mode.toLowerCase()))) {
1244
+ endTaskCondProp = this.getProp(PropInterface.PROP_TYPE_END_CONDITION);
1245
+ if (endTaskCondProp == null)
1246
+ return false;
1247
+ let endTask = await endTaskCondProp.getValue();
1248
+ if (DisplayConvertor.toBoolean(endTask)) {
1249
+ this._bExecEndTask = true;
1250
+ return true;
1251
+ }
1252
+ return false;
1253
+ }
1254
+ return false;
1255
+ }
1256
+ setTryingToStop(val) {
1257
+ if (this.hasSubTasks()) {
1258
+ for (let i = 0; i < this.SubTasks.getSize(); i = i + 1) {
1259
+ let task = this.SubTasks.getTask(i);
1260
+ task.setTryingToStop(val);
1261
+ }
1262
+ }
1263
+ this.IsTryingToStop = val;
1264
+ }
1265
+ getInRecordSuffix() {
1266
+ return this._inRecordSuffix;
1267
+ }
1268
+ setInRecordSuffix(bValue) {
1269
+ if (bValue !== this._inRecordSuffix) {
1270
+ this._inRecordSuffix = bValue;
1271
+ return true;
1272
+ }
1273
+ return false;
1274
+ }
1275
+ setEvalOldValues(bFlag) {
1276
+ if (bFlag !== this._evalOldValues) {
1277
+ this._evalOldValues = bFlag;
1278
+ return true;
1279
+ }
1280
+ return false;
1281
+ }
1282
+ getEvalOldValues() {
1283
+ return this._evalOldValues;
1284
+ }
1285
+ async endTask(reversibleExit, onlyDescs, dueToVerifyError, subformDestination) {
1286
+ if (isNullOrUndefined(subformDestination))
1287
+ return await this.endTask_1(reversibleExit, onlyDescs, false, dueToVerifyError);
1288
+ else
1289
+ return await this.endTask_1(reversibleExit, onlyDescs, subformDestination, dueToVerifyError);
1290
+ }
1291
+ async endTask_1(reversibleExit, onlyDescs, subformDestination, dueToVerifyError) {
1292
+ let succeeded = true;
1293
+ let closedSubForm = false;
1294
+ let subTask;
1295
+ let mgdTab = AccessHelper.mgDataTable;
1296
+ if ((this.IsSubForm && !subformDestination) && !this._parentTask.InEndTask) {
1297
+ succeeded = await this._parentTask.endTask(reversibleExit, onlyDescs, dueToVerifyError);
1298
+ }
1299
+ else if (!this.isAborting() && !this.InEndTask) {
1300
+ try {
1301
+ this.InEndTask = true;
1302
+ if ((MGDataCollection.Instance.StartupMgData.getFirstTask().InEndTask && MGDataCollection.Instance.StartupMgData.getFirstTask().ClosingFormUI) && AccessHelper.eventsManager.GetStopExecutionFlag()) {
1303
+ let cmd = CommandFactory.CreateUnloadCommand();
1304
+ MGDataCollection.Instance.getMGData(0).CmdsToServer.Add(cmd);
1305
+ await CommandsProcessorManager.GetCommandsProcessor().Execute(CommandsProcessorBase_SendingInstruction.TASKS_AND_COMMANDS);
1306
+ return;
1307
+ }
1308
+ if (!this.IsTryingToStop)
1309
+ this.setTryingToStop(true);
1310
+ let i;
1311
+ if (reversibleExit) {
1312
+ if (this.hasSubTasks()) {
1313
+ if (!RemoteCommandsProcessor.GetInstance().DelayCommandExecution) {
1314
+ let pendingTransactions = true;
1315
+ let clientOperExist = await this.CheckIfClientOperationExistsInSubformTasks(this, InternalInterface.MG_ACT_TASK_SUFFIX);
1316
+ if (!clientOperExist) {
1317
+ clientOperExist = await this.CheckIfClientOperationExistsInSubformTasks(this, InternalInterface.MG_ACT_REC_SUFFIX);
1318
+ if (!clientOperExist)
1319
+ pendingTransactions = this.CheckIfPendingTransactions(this);
1320
+ }
1321
+ if (!clientOperExist && !pendingTransactions) {
1322
+ this.allowRemoteCmdExecution = false;
1323
+ this.SetServerSideTaskSuffix(this);
1324
+ RemoteCommandsProcessor.GetInstance().DelayCommandExecution = true;
1325
+ }
1326
+ }
1327
+ else
1328
+ this.SetServerSideTaskSuffix(this);
1329
+ for (i = 0; i < this.SubTasks.getSize() && succeeded; i++) {
1330
+ subTask = this.SubTasks.getTask(i);
1331
+ closedSubForm = closedSubForm || subTask.IsSubForm;
1332
+ await AccessHelper.eventsManager.handleInternalEventWithTask(subTask, InternalInterface.MG_ACT_EXIT);
1333
+ succeeded = (!AccessHelper.eventsManager.GetStopExecutionFlag() || dueToVerifyError);
1334
+ }
1335
+ }
1336
+ else {
1337
+ if (RemoteCommandsProcessor.GetInstance().DelayCommandExecution)
1338
+ this.SetServerSideTaskSuffix(this);
1339
+ }
1340
+ if (this === mgdTab.StartupMgData.getFirstTask()) {
1341
+ for (i = mgdTab.getSize() - 1; i > 0 && succeeded; i--) {
1342
+ if (mgdTab.getMGData(i) != null) {
1343
+ await AccessHelper.eventsManager.handleInternalEventWithTask(mgdTab.getMGData(i).getFirstTask(), InternalInterface.MG_ACT_EXIT);
1344
+ succeeded = (!AccessHelper.eventsManager.GetStopExecutionFlag() || dueToVerifyError);
1345
+ }
1346
+ }
1347
+ }
1348
+ }
1349
+ if (succeeded) {
1350
+ if (reversibleExit && !dueToVerifyError) {
1351
+ let forceSuffix = await this.checkProp(PropInterface.PROP_TYPE_FORCE_SUFFIX, false);
1352
+ if (!this.IsInteractive && forceSuffix === true && this.getMode() === Constants.TASK_MODE_CREATE)
1353
+ this.setProp(PropInterface.PROP_TYPE_FORCE_SUFFIX, "0");
1354
+ await AccessHelper.eventsManager.handleInternalEventWithTask(this, InternalInterface.MG_ACT_REC_SUFFIX);
1355
+ if (!this.IsInteractive && forceSuffix === true && this.getMode() === Constants.TASK_MODE_CREATE)
1356
+ this.setProp(PropInterface.PROP_TYPE_FORCE_SUFFIX, "1");
1357
+ }
1358
+ succeeded = (!AccessHelper.eventsManager.GetStopExecutionFlag() || dueToVerifyError);
1359
+ if (succeeded && !onlyDescs)
1360
+ this.HandleTransactionInfo();
1361
+ let preTskSuffix = succeeded;
1362
+ if (succeeded && !onlyDescs && reversibleExit && !dueToVerifyError &&
1363
+ (!this.IsSubForm || subformDestination) &&
1364
+ this.TaskPrefixExecuted && !this.TaskSuffixExecuted)
1365
+ succeeded = await this.handleTaskSuffix(true);
1366
+ if (reversibleExit && this.hasSubTasks())
1367
+ for (i = 0; i < this.SubTasks.getSize(); i++) {
1368
+ subTask = this.SubTasks.getTask(i);
1369
+ if (!subTask.IsSubForm)
1370
+ await AccessHelper.eventsManager.handleNonReversibleEvent(subTask, InternalInterface.MG_ACT_EXIT);
1371
+ }
1372
+ if (reversibleExit)
1373
+ succeeded = (!AccessHelper.eventsManager.GetStopExecutionFlag() || dueToVerifyError);
1374
+ if (preTskSuffix)
1375
+ AccessHelper.eventsManager.setStopExecution(false);
1376
+ this.setAfterRetry(ConstInterface.RECOVERY_NONE);
1377
+ if (!this.isAborting() && succeeded && !onlyDescs) {
1378
+ if (reversibleExit) {
1379
+ this.setTransactionFailed(false);
1380
+ await this.TaskTransactionManager.checkAndCommit(false, ConstInterface.TRANS_TASK_PREFIX, false);
1381
+ succeeded = (!AccessHelper.eventsManager.GetStopExecutionFlag() || dueToVerifyError) && !this.isAborting() && !this.transactionFailed(ConstInterface.TRANS_TASK_PREFIX);
1382
+ }
1383
+ this.setAfterRetry(ConstInterface.RECOVERY_NONE);
1384
+ if (succeeded) {
1385
+ if (!this.allowRemoteCmdExecution) {
1386
+ this.allowRemoteCmdExecution = true;
1387
+ RemoteCommandsProcessor.GetInstance().DelayCommandExecution = false;
1388
+ }
1389
+ else if (this.DelayCommandExecution) {
1390
+ this.DelayCommandExecution = false;
1391
+ RemoteCommandsProcessor.GetInstance().DelayCommandExecution = true;
1392
+ }
1393
+ let baseMgd = AccessHelper.mgDataTable.StartupMgData;
1394
+ if (reversibleExit && baseMgd.getFirstTask().getTaskTag() === this.getTaskTag()) {
1395
+ AccessHelper.eventsManager.setProcessingTopMostEndTask(true);
1396
+ await AccessHelper.eventsManager.handleEvents(baseMgd, 0);
1397
+ AccessHelper.eventsManager.setProcessingTopMostEndTask(false);
1398
+ if (this.isAborting()) {
1399
+ RemoteCommandsProcessor.GetInstance().DelayCommandExecution = false;
1400
+ this.DelayCommandExecution = false;
1401
+ this.allowRemoteCmdExecution = true;
1402
+ return true;
1403
+ }
1404
+ }
1405
+ await TaskServiceBase.Exit(this, reversibleExit, subformDestination);
1406
+ if (this._parentTask != null && this._parentTask.isMainProg()) {
1407
+ let mgd = AccessHelper.mgDataTable.getMGData(0);
1408
+ let mainPrgTask = mgd.getMainProg(0);
1409
+ let rootTask = AccessHelper.mgDataTable.StartupMgData.getFirstTask();
1410
+ let endMainPrg = await mainPrgTask.checkProp(PropInterface.PROP_TYPE_END_CONDITION, false);
1411
+ if (this !== rootTask && endMainPrg) {
1412
+ let rtEvt = new RunTimeEvent(rootTask);
1413
+ rtEvt.setInternal(InternalInterface.MG_ACT_CLOSE);
1414
+ rtEvt.setCtrl(null);
1415
+ rtEvt.setArgList(null);
1416
+ AccessHelper.eventsManager.addToTail(rtEvt);
1417
+ }
1418
+ }
1419
+ MgForm.CreatedForms.remove(this.Form);
1420
+ }
1421
+ }
1422
+ }
1423
+ }
1424
+ finally {
1425
+ if (!this.IsSubForm || subformDestination)
1426
+ this.handleFinallyEndTask(succeeded, reversibleExit);
1427
+ }
1428
+ }
1429
+ else if (this.InEndTask)
1430
+ succeeded = false;
1431
+ AccessHelper.eventsManager.setProcessingTopMostEndTask(this._inProcessingTopMostEndTaskSaved);
1432
+ return succeeded;
1433
+ }
1434
+ SetServerSideTaskSuffix(task) {
1435
+ var rtEvt = new RunTimeEvent(task);
1436
+ rtEvt.setInternal(InternalInterface.MG_ACT_TASK_SUFFIX);
1437
+ let handler = null;
1438
+ var evtHanPos = new EventHandlerPosition();
1439
+ evtHanPos.init(rtEvt);
1440
+ handler = evtHanPos.getNext();
1441
+ if (handler != null) {
1442
+ for (let i = 0; i < handler.getOperationTab().getSize(); i++) {
1443
+ let oper = handler.getOperationTab().getOperation(i);
1444
+ oper.setExecOnServer(true);
1445
+ }
1446
+ }
1447
+ if (task.hasSubTasks()) {
1448
+ for (let i = 0; i < task.GetSubTasks().length; i++) {
1449
+ let subTask = task.SubTasks.getTask(i);
1450
+ this.SetServerSideTaskSuffix(subTask);
1451
+ }
1452
+ }
1453
+ }
1454
+ async CheckIfClientOperationExistsInSubformTasks(task, eventCode) {
1455
+ let clientOperationExist = false;
1456
+ var rtEvt = new RunTimeEvent(task);
1457
+ rtEvt.setInternal(eventCode);
1458
+ let handler = null;
1459
+ var evtHanPos = new EventHandlerPosition();
1460
+ evtHanPos.init(rtEvt);
1461
+ handler = evtHanPos.getNext();
1462
+ if (eventCode == InternalInterface.MG_ACT_REC_SUFFIX) {
1463
+ let currRecord = task.DataView.getCurrRec();
1464
+ if (task.DataView.modifiedRecordsNumber() > 0 || (currRecord != null && currRecord.Modified))
1465
+ clientOperationExist = true;
1466
+ if (!clientOperationExist) {
1467
+ let forceSuffix = await task.checkProp(PropInterface.PROP_TYPE_FORCE_SUFFIX, false);
1468
+ if (forceSuffix === true)
1469
+ if (task.IsInteractive || task.getMode() !== Constants.TASK_MODE_CREATE)
1470
+ clientOperationExist = true;
1471
+ }
1472
+ }
1473
+ if (handler != null && !clientOperationExist) {
1474
+ let cnt = handler.getOperationTab().getSize();
1475
+ for (let i = 0; i < cnt; i++) {
1476
+ let oper = handler.getOperationTab().getOperation(i);
1477
+ if (oper.getExecOnClient()) {
1478
+ clientOperationExist = true;
1479
+ break;
1480
+ }
1481
+ else {
1482
+ if (oper.getType() == ConstInterface.MG_OPER_RAISE_EVENT) {
1483
+ if (oper.GetRuntimeEvent().getType() == ConstInterface.EVENT_TYPE_INTERNAL &&
1484
+ oper.GetRuntimeEvent().getInternalCode() === InternalInterface.MG_ACT_RT_REFRESH_VIEW) {
1485
+ clientOperationExist = true;
1486
+ break;
1487
+ }
1488
+ }
1489
+ }
1490
+ }
1491
+ }
1492
+ if (!clientOperationExist && task.hasSubTasks()) {
1493
+ for (let i = 0; (!clientOperationExist && i < task.getSubTasks().getSize()); i++) {
1494
+ let subTask = task.SubTasks.getTask(i);
1495
+ clientOperationExist = await this.CheckIfClientOperationExistsInSubformTasks(subTask, eventCode);
1496
+ }
1497
+ }
1498
+ return clientOperationExist;
1499
+ }
1500
+ CheckIfPendingTransactions(task) {
1501
+ let pendingTransactions = false;
1502
+ let currRecord = task.DataView.getCurrRec();
1503
+ if (task.DataView.modifiedRecordsNumber() > 0 || (currRecord != null && currRecord.Modified))
1504
+ pendingTransactions = true;
1505
+ if (!pendingTransactions && task.hasSubTasks()) {
1506
+ for (let i = 0; (!pendingTransactions && i < task.getSubTasks().getSize()); i++) {
1507
+ let subTask = task.SubTasks.getTask(i);
1508
+ pendingTransactions = this.CheckIfPendingTransactions(subTask);
1509
+ }
1510
+ }
1511
+ return pendingTransactions;
1512
+ }
1513
+ HandleTransactionInfo() {
1514
+ let transaction = this.DataviewManager.RemoteDataviewManager.Transaction;
1515
+ if (transaction !== null && transaction.isOwner(this) && transaction.getLevel() === 'P') {
1516
+ this.DataviewManager.RemoteDataviewManager.Transaction = null;
1517
+ this.DataView.setTransCleared();
1518
+ }
1519
+ }
1520
+ async Exit(reversibleExit, subformDestination) {
1521
+ let cmd = reversibleExit ?
1522
+ CommandFactory.CreateBrowserEscEventCommand(this.getTaskTag(), subformDestination) :
1523
+ CommandFactory.CreateNonReversibleExitCommand(this.getTaskTag(), subformDestination);
1524
+ this._mgData.CmdsToServer.Add(cmd);
1525
+ if (!subformDestination) {
1526
+ try {
1527
+ if (this.getTaskTag() == MGDataCollection.Instance.StartupMgData.getFirstTask().getTaskTag() ||
1528
+ !(MGDataCollection.Instance.StartupMgData.getFirstTask().InEndTask && MGDataCollection.Instance.StartupMgData.getFirstTask().ClosingFormUI))
1529
+ await Task.CommandsProcessor.Execute(CommandsProcessorBase_SendingInstruction.TASKS_AND_COMMANDS);
1530
+ }
1531
+ catch (err) {
1532
+ if (this.isMainProg()) {
1533
+ this._mgData.CmdsToServer.Add(cmd);
1534
+ }
1535
+ else
1536
+ throw err;
1537
+ }
1538
+ }
1539
+ }
1540
+ handleFinallyEndTask(succeeded, reversibleExit) {
1541
+ let subTask;
1542
+ if (this.hasSubTasks()) {
1543
+ for (let i = 0; i < this.SubTasks.getSize(); i++) {
1544
+ subTask = this.SubTasks.getTask(i);
1545
+ subTask.handleFinallyEndTask(succeeded, reversibleExit);
1546
+ }
1547
+ }
1548
+ this.InEndTask = false;
1549
+ if (succeeded)
1550
+ this._isStarted = false;
1551
+ if (!succeeded && reversibleExit && this.IsTryingToStop)
1552
+ this.setTryingToStop(false);
1553
+ }
1554
+ async handleTaskSuffix(withSubTasks) {
1555
+ let succeeded = true;
1556
+ let subTask;
1557
+ if (withSubTasks) {
1558
+ if (this.hasSubTasks()) {
1559
+ for (let i = 0; i < this.SubTasks.getSize() && succeeded; i++) {
1560
+ subTask = this.SubTasks.getTask(i);
1561
+ succeeded = await subTask.handleTaskSuffix(withSubTasks);
1562
+ }
1563
+ }
1564
+ }
1565
+ if (succeeded)
1566
+ await AccessHelper.eventsManager.handleInternalEventWithTask(this, InternalInterface.MG_ACT_TASK_SUFFIX);
1567
+ succeeded = !AccessHelper.eventsManager.GetStopExecutionFlag();
1568
+ this.TaskSuffixExecuted = true;
1569
+ return succeeded;
1570
+ }
1571
+ setInCreateLine(inCreateLine) {
1572
+ this._inCreateLine = inCreateLine;
1573
+ }
1574
+ getInCreateLine() {
1575
+ return this._inCreateLine;
1576
+ }
1577
+ async handleEventOnSlaveTasks(internalEvtCode) {
1578
+ let i;
1579
+ let task = null;
1580
+ let failureTask = null;
1581
+ let mgdTab = AccessHelper.mgDataTable;
1582
+ let triggeredTasks = mgdTab.getTriggeredTasks(this);
1583
+ let orphans = null;
1584
+ let sameTrans;
1585
+ let hasSlaves = false;
1586
+ let isOwner = this.Transaction != null && this.Transaction.isOwner(this);
1587
+ if (isOwner) {
1588
+ AccessHelper.eventsManager.setEventScopeTrans();
1589
+ orphans = new List();
1590
+ mgdTab.startTasksIteration();
1591
+ while ((task = mgdTab.getNextTask()) != null) {
1592
+ sameTrans = task.Transaction != null && this.Transaction.getTransId() === task.Transaction.getTransId();
1593
+ if (task !== this && sameTrans && task.PreviouslyActiveTaskId != null && mgdTab.GetTaskByID(task.PreviouslyActiveTaskId) == null)
1594
+ orphans.push(task);
1595
+ }
1596
+ }
1597
+ let scopeTrans = AccessHelper.eventsManager.isEventScopeTrans();
1598
+ for (i = 0; i < triggeredTasks.length && !AccessHelper.eventsManager.GetStopExecutionFlag(); i++) {
1599
+ task = triggeredTasks.get_Item(i);
1600
+ sameTrans = this.Transaction != null && task.Transaction != null && this.Transaction.getTransId() === task.Transaction.getTransId();
1601
+ if (!task.IsSubForm && (scopeTrans && sameTrans) && task.isStarted()) {
1602
+ if (task.getForm().FormRefreshed && internalEvtCode === InternalInterface.MG_ACT_REC_PREFIX && task.getLevel() === Constants.TASK_LEVEL_TASK)
1603
+ await task.DataView.currRecCompute(false);
1604
+ await AccessHelper.eventsManager.handleInternalEventWithTask(task, internalEvtCode);
1605
+ hasSlaves = true;
1606
+ }
1607
+ }
1608
+ for (; isOwner && i < orphans.length && !AccessHelper.eventsManager.GetStopExecutionFlag(); i++) {
1609
+ task = orphans.get_Item(i);
1610
+ if (task.getForm().FormRefreshed && internalEvtCode === InternalInterface.MG_ACT_REC_PREFIX && task.getLevel() === Constants.TASK_LEVEL_TASK)
1611
+ await task.DataView.currRecCompute(false);
1612
+ await AccessHelper.eventsManager.handleInternalEventWithTask(task, internalEvtCode);
1613
+ hasSlaves = true;
1614
+ }
1615
+ if (hasSlaves && AccessHelper.eventsManager.GetStopExecutionFlag())
1616
+ failureTask = task;
1617
+ if (isOwner)
1618
+ AccessHelper.eventsManager.clearEventScope();
1619
+ return failureTask;
1620
+ }
1621
+ async enableRecordActions() {
1622
+ let dataview = this.DataView;
1623
+ await this.setCreateDeleteActsEnableState();
1624
+ if (dataview.IncludesFirst() || dataview.IsOneWayKey) {
1625
+ if (dataview.isEmptyDataview() || dataview.getCurrRecIdx() === 0) {
1626
+ this.ActionManager.enable(InternalInterface.MG_ACT_TBL_PRVLINE, false);
1627
+ if (dataview.IsOneWayKey)
1628
+ this.ActionManager.enable(InternalInterface.MG_ACT_TBL_BEGTBL, true);
1629
+ else
1630
+ this.ActionManager.enable(InternalInterface.MG_ACT_TBL_BEGTBL, false);
1631
+ if (this.Form.isScreenMode())
1632
+ this.ActionManager.enable(InternalInterface.MG_ACT_TBL_PRVPAGE, false);
1633
+ }
1634
+ else {
1635
+ this.ActionManager.enable(InternalInterface.MG_ACT_TBL_PRVLINE, true);
1636
+ this.ActionManager.enable(InternalInterface.MG_ACT_TBL_BEGTBL, true);
1637
+ if (this.Form.isScreenMode())
1638
+ this.ActionManager.enable(InternalInterface.MG_ACT_TBL_PRVPAGE, true);
1639
+ }
1640
+ if (!this.Form.isScreenMode())
1641
+ if (dataview.isEmptyDataview() || (dataview.getCurrRecIdx() === 0) || (dataview.getTopRecIdx() === 0))
1642
+ this.ActionManager.enable(InternalInterface.MG_ACT_TBL_PRVPAGE, false);
1643
+ else
1644
+ this.ActionManager.enable(InternalInterface.MG_ACT_TBL_PRVPAGE, true);
1645
+ }
1646
+ else {
1647
+ this.ActionManager.enable(InternalInterface.MG_ACT_TBL_BEGTBL, true);
1648
+ this.ActionManager.enable(InternalInterface.MG_ACT_TBL_PRVPAGE, true);
1649
+ this.ActionManager.enable(InternalInterface.MG_ACT_TBL_PRVLINE, true);
1650
+ }
1651
+ if (dataview.IncludesLast()) {
1652
+ if (((this.getMode() === Constants.TASK_MODE_QUERY) || dataview.isEmptyDataview() ||
1653
+ ((this.getMode() === Constants.TASK_MODE_MODIFY) &&
1654
+ (!Environment.Instance.allowCreateInModifyMode(this.getCompIdx()) ||
1655
+ !await this.checkProp(PropInterface.PROP_TYPE_ALLOW_CREATE, true)))) && (dataview.getCurrRecIdx() + 1) === dataview.getSize()) {
1656
+ this.ActionManager.enable(InternalInterface.MG_ACT_TBL_NXTLINE, false);
1657
+ this.ActionManager.enable(InternalInterface.MG_ACT_TBL_ENDTBL, false);
1658
+ if (this.Form.isScreenMode())
1659
+ this.ActionManager.enable(InternalInterface.MG_ACT_TBL_NXTPAGE, false);
1660
+ }
1661
+ else {
1662
+ this.ActionManager.enable(InternalInterface.MG_ACT_TBL_NXTLINE, true);
1663
+ this.ActionManager.enable(InternalInterface.MG_ACT_TBL_ENDTBL, true);
1664
+ if (this.Form.isScreenMode())
1665
+ this.ActionManager.enable(InternalInterface.MG_ACT_TBL_NXTPAGE, true);
1666
+ }
1667
+ if (!this.Form.isScreenMode()) {
1668
+ if (dataview.isEmptyDataview() || ((dataview.getSize() - dataview.getTopRecIdx()) <= this.Form.getRowsInPage()))
1669
+ this.ActionManager.enable(InternalInterface.MG_ACT_TBL_NXTPAGE, false);
1670
+ else
1671
+ this.ActionManager.enable(InternalInterface.MG_ACT_TBL_NXTPAGE, true);
1672
+ }
1673
+ }
1674
+ else {
1675
+ this.ActionManager.enable(InternalInterface.MG_ACT_TBL_NXTLINE, true);
1676
+ this.ActionManager.enable(InternalInterface.MG_ACT_TBL_NXTPAGE, true);
1677
+ this.ActionManager.enable(InternalInterface.MG_ACT_TBL_ENDTBL, true);
1678
+ }
1679
+ if (dataview.isEmptyDataview())
1680
+ this.ActionManager.enable(InternalInterface.MG_ACT_CANCEL, false);
1681
+ else
1682
+ this.ActionManager.enable(InternalInterface.MG_ACT_CANCEL, true);
1683
+ this.ActionManager.enable(InternalInterface.MG_ACT_ENTER_ROW_EDITING, true);
1684
+ this.ActionManager.enable(InternalInterface.MG_ACT_NO_PROG_EXE_RIGHTS, true);
1685
+ }
1686
+ isStarted() {
1687
+ return this._isStarted;
1688
+ }
1689
+ getSubTasks() {
1690
+ return this.SubTasks;
1691
+ }
1692
+ refreshesOn(fldId) {
1693
+ let result = false;
1694
+ for (let i = 0; !result && this.RefreshOnVars !== null && i < this.RefreshOnVars.length; i++) {
1695
+ result = (this.RefreshOnVars[i] === fldId);
1696
+ }
1697
+ return result;
1698
+ }
1699
+ AbortTransaction() {
1700
+ this.DataviewManager.RemoteDataviewManager.Transaction = null;
1701
+ }
1702
+ setPreventRecordSuffix(val) {
1703
+ this._preventRecordSuffix = val;
1704
+ }
1705
+ getPreventRecordSuffix() {
1706
+ return this._preventRecordSuffix;
1707
+ }
1708
+ setPreventControlChange(val) {
1709
+ this._preventControlChange = val;
1710
+ }
1711
+ getPreventControlChange() {
1712
+ return this._preventControlChange;
1713
+ }
1714
+ resetKnownToServer() {
1715
+ this._knownToServer = false;
1716
+ }
1717
+ evaluateDescriptor() {
1718
+ let result = "";
1719
+ let res;
1720
+ if (this.DvPosDescriptor == null)
1721
+ return HashUtils.GetHashCode(result);
1722
+ let first = true;
1723
+ for (let i = 0; i < this.DvPosDescriptor.length; i++) {
1724
+ if (!first)
1725
+ result += ";";
1726
+ let currentCell = this.DvPosDescriptor.get_Item(i);
1727
+ let currentTag = currentCell[0];
1728
+ let currentVeeIdx = NNumber.Parse(currentCell[1]);
1729
+ let currentTask = AccessHelper.mgDataTable.GetTaskByID(currentTag);
1730
+ let currentField = currentTask.DataView.getField(currentVeeIdx);
1731
+ let dispVal = currentField.getDispValue();
1732
+ if (currentField.isNull())
1733
+ dispVal = "";
1734
+ let pic;
1735
+ switch (currentField.getType()) {
1736
+ case StorageAttribute.BOOLEAN:
1737
+ case StorageAttribute.ALPHA:
1738
+ case StorageAttribute.UNICODE:
1739
+ case StorageAttribute.BLOB:
1740
+ case StorageAttribute.BLOB_VECTOR:
1741
+ result += dispVal;
1742
+ break;
1743
+ case StorageAttribute.DATE:
1744
+ case StorageAttribute.TIME:
1745
+ if (dispVal !== "") {
1746
+ pic = new PIC(currentField.getPicture(), currentField.getType(), 0);
1747
+ let conv = DisplayConvertor.Instance;
1748
+ result += conv.mg2disp(dispVal, "", pic, false, this.getCompIdx(), false);
1749
+ }
1750
+ break;
1751
+ case StorageAttribute.NUMERIC:
1752
+ if (dispVal !== "") {
1753
+ res = new NUM_TYPE(dispVal);
1754
+ pic = new PIC(currentField.getPicture(), currentField.getType(), 0);
1755
+ result += res.to_a(pic);
1756
+ }
1757
+ break;
1758
+ }
1759
+ first = false;
1760
+ }
1761
+ let tmpStr2 = StrUtil.stringToHexaDump(result, 4);
1762
+ return HashUtils.GetHashCode(tmpStr2);
1763
+ }
1764
+ setDescriptor(newDesc) {
1765
+ if (!(newDesc.trim() === "")) {
1766
+ let desc = StrUtil.tokenize(newDesc, ";");
1767
+ this.DvPosDescriptor = new List();
1768
+ for (let i = 0; i < desc.length; i = i + 1) {
1769
+ let cell = new Array(2);
1770
+ let tagVeePair = StrUtil.tokenize(desc[i], ",");
1771
+ cell[0] = tagVeePair[0];
1772
+ cell[1] = tagVeePair[1];
1773
+ this.DvPosDescriptor.push(cell);
1774
+ }
1775
+ }
1776
+ }
1777
+ getTaskCache() {
1778
+ return this._dvCache;
1779
+ }
1780
+ async prepareCache(ignoreCurr) {
1781
+ let success = true;
1782
+ if (!ignoreCurr) {
1783
+ if (await this.isCached()) {
1784
+ if (this.DataView.getChanged()) {
1785
+ this._dvCache.removeDvFromCache(this.DataView.getDvPosValue(), true);
1786
+ success = false;
1787
+ }
1788
+ }
1789
+ else {
1790
+ if (this.IsSubForm && !await this.isCached()) {
1791
+ success = false;
1792
+ }
1793
+ }
1794
+ }
1795
+ let curretTask;
1796
+ if (this.hasSubTasks()) {
1797
+ for (let i = 0; i < this.SubTasks.getSize(); i = i + 1) {
1798
+ curretTask = this.SubTasks.getTask(i);
1799
+ if (!await curretTask.prepareCache(false)) {
1800
+ success = false;
1801
+ }
1802
+ }
1803
+ }
1804
+ return success;
1805
+ }
1806
+ async testAndSet(ignoreCurr) {
1807
+ if (!ignoreCurr && await this.isCached()) {
1808
+ let requestedDv = this.evaluateDescriptor();
1809
+ if (requestedDv !== this.DataView.getDvPosValue()) {
1810
+ let fromCache = this._dvCache.getCachedDataView(requestedDv);
1811
+ if (fromCache == null)
1812
+ return false;
1813
+ await this.changeDv(fromCache);
1814
+ }
1815
+ this.DoSubformPrefixSuffix = true;
1816
+ }
1817
+ if (this.hasSubTasks()) {
1818
+ for (let i = 0; i < this.SubTasks.getSize(); i++) {
1819
+ if (!await this.SubTasks.getTask(i).testAndSet(false))
1820
+ return false;
1821
+ }
1822
+ }
1823
+ return true;
1824
+ }
1825
+ async changeDv(fromCache) {
1826
+ let dataview = this.DataView;
1827
+ if (!this.hasLocate) {
1828
+ if (!dataview.getChanged() && dataview.IncludesFirst())
1829
+ this._dvCache.putInCache(dataview.replicate());
1830
+ }
1831
+ else
1832
+ this.locatePutInCache();
1833
+ await dataview.setSameAs(fromCache);
1834
+ dataview.takeFldValsFromCurrRec();
1835
+ this.Form.SetTableItemsCount(0, true);
1836
+ this.Form.setTableItemsCount(false);
1837
+ await this.Form.RefreshDisplay(Constants.TASK_REFRESH_FORM);
1838
+ this.setOriginalTaskMode(this.getMode());
1839
+ }
1840
+ setOriginalTaskMode(originalTaskMode) {
1841
+ this._originalTaskMode = originalTaskMode.charAt(0);
1842
+ }
1843
+ getOriginalTaskMode() {
1844
+ return this._originalTaskMode;
1845
+ }
1846
+ async isCached() {
1847
+ return this.IsSubForm && await this.Form.getSubFormCtrl().checkProp(PropInterface.PROP_TYPE_IS_CACHED, false);
1848
+ }
1849
+ locatePutInCache() {
1850
+ let cached = this._dvCache.getCachedDataView(this.DataView.getDvPosValue());
1851
+ if (cached != null) {
1852
+ if (this.DataView.checkFirst(cached.getLocateFirstRec()) && !this.DataView.getChanged()) {
1853
+ this.DataView.setLocateFirstRec(cached.getLocateFirstRec());
1854
+ this._dvCache.putInCache(this.DataView.replicate());
1855
+ }
1856
+ else
1857
+ this._dvCache.removeDvFromCache(this.DataView.getDvPosValue(), true);
1858
+ }
1859
+ else {
1860
+ if (!this.DataView.getChanged())
1861
+ this._dvCache.putInCache(this.DataView.replicate());
1862
+ }
1863
+ }
1864
+ HasLoacte() {
1865
+ return this.hasLocate;
1866
+ }
1867
+ setRemoteTransaction(transId) {
1868
+ let mgdTab = AccessHelper.mgDataTable;
1869
+ let transTask;
1870
+ let isFind = false;
1871
+ mgdTab.startTasksIteration();
1872
+ while ((transTask = mgdTab.getNextTask()) != null) {
1873
+ if (transTask.DataviewManager.RemoteDataviewManager.Transaction != null &&
1874
+ transTask.DataviewManager.RemoteDataviewManager.Transaction.getTransId() === transId) {
1875
+ isFind = true;
1876
+ break;
1877
+ }
1878
+ }
1879
+ this.DataviewManager.RemoteDataviewManager.Transaction = (isFind ?
1880
+ transTask.DataviewManager.RemoteDataviewManager.Transaction :
1881
+ new Transaction(this, transId));
1882
+ }
1883
+ setTransOwnerTask() {
1884
+ this.Transaction.setOwnerTask(this);
1885
+ this.Transaction.setTransBegin('T');
1886
+ }
1887
+ getLoopCounter() {
1888
+ let result = 0;
1889
+ if (this._useLoopStack && this._loopStack !== null && !(this._loopStack.count() === 0)) {
1890
+ result = this._loopStack.peek();
1891
+ }
1892
+ return result;
1893
+ }
1894
+ enterLoop() {
1895
+ if (this._loopStack === null)
1896
+ this._loopStack = new Stack();
1897
+ this._loopStack.push(0);
1898
+ }
1899
+ leaveLoop() {
1900
+ this.popLoopCounter();
1901
+ }
1902
+ popLoopCounter() {
1903
+ let result = 0;
1904
+ if (this._loopStack !== null && !(this._loopStack.count() === 0))
1905
+ result = this._loopStack.pop();
1906
+ return result;
1907
+ }
1908
+ increaseLoopCounter() {
1909
+ this._loopStack.push(this.popLoopCounter() + 1);
1910
+ }
1911
+ getLoopStackSize() {
1912
+ if (this._loopStack !== null)
1913
+ return this._loopStack.count();
1914
+ return 0;
1915
+ }
1916
+ setUseLoopStack(val) {
1917
+ this._useLoopStack = val;
1918
+ }
1919
+ getDataviewHeaders() {
1920
+ return this.DataviewHeadersTable;
1921
+ }
1922
+ isFirstRecordCycle(Value_) {
1923
+ if (arguments.length === 0) {
1924
+ return this.isFirstRecordCycle_0();
1925
+ }
1926
+ return this.isFirstRecordCycle_1(Value_);
1927
+ }
1928
+ isFirstRecordCycle_0() {
1929
+ return this._firstRecordCycle;
1930
+ }
1931
+ isFirstRecordCycle_1(Value_) {
1932
+ this._firstRecordCycle = Value_;
1933
+ }
1934
+ getPublicName() {
1935
+ return this.PublicName;
1936
+ }
1937
+ async isAllowEvents() {
1938
+ let prop = this.getProp(PropInterface.PROP_TYPE_TASK_PROPERTIES_ALLOW_EVENTS);
1939
+ return await prop.getValueBoolean();
1940
+ }
1941
+ getExternalTaskId() {
1942
+ let taskId = "";
1943
+ let prop = this.getProp(PropInterface.PROP_TYPE_TASK_ID);
1944
+ if (prop != null)
1945
+ taskId = prop.GetComputedValue();
1946
+ return taskId;
1947
+ }
1948
+ isTransactionOwner() {
1949
+ let isTransOwner = false;
1950
+ if (this.Transaction != null && this.Transaction.isOwner(this))
1951
+ isTransOwner = true;
1952
+ return isTransOwner;
1953
+ }
1954
+ isTransactionOnLevel(level) {
1955
+ return this.isTransactionOwner() && this.Transaction.getLevel() === level;
1956
+ }
1957
+ isProgram() {
1958
+ return this._isPrg;
1959
+ }
1960
+ async enableModes() {
1961
+ let enable = await this.checkProp(PropInterface.PROP_TYPE_ALLOW_MODIFY, true);
1962
+ this.ActionManager.enable(InternalInterface.MG_ACT_RTO_MODIFY, enable);
1963
+ enable = await this.checkProp(PropInterface.PROP_TYPE_ALLOW_CREATE, true);
1964
+ this.ActionManager.enable(InternalInterface.MG_ACT_RTO_CREATE, enable);
1965
+ enable = await this.checkProp(PropInterface.PROP_TYPE_ALLOW_QUERY, true);
1966
+ this.ActionManager.enable(InternalInterface.MG_ACT_RTO_QUERY, enable);
1967
+ enable = await this.checkProp(PropInterface.PROP_TYPE_ALLOW_RANGE, true);
1968
+ this.ActionManager.enable(InternalInterface.MG_ACT_RTO_RANGE, enable);
1969
+ enable = await this.checkProp(PropInterface.PROP_TYPE_ALLOW_LOCATE, true);
1970
+ this.ActionManager.enable(InternalInterface.MG_ACT_RTO_LOCATE, enable);
1971
+ this.ActionManager.enable(InternalInterface.MG_ACT_RTO_SEARCH, enable);
1972
+ enable = await this.checkProp(PropInterface.PROP_TYPE_ALLOW_SORT, true);
1973
+ this.ActionManager.enable(InternalInterface.MG_ACT_SORT_RECORDS, enable);
1974
+ enable = await this.checkProp(PropInterface.PROP_TYPE_TASK_PROPERTIES_ALLOW_INDEX, true);
1975
+ this.ActionManager.enable(InternalInterface.MG_ACT_VIEW_BY_KEY, enable);
1976
+ this.ActionManager.enable(InternalInterface.MG_ACT_DUMP_ENVIRONMENT, true);
1977
+ }
1978
+ setEnableZoomHandler() {
1979
+ this._enableZoomHandler = true;
1980
+ }
1981
+ getEnableZoomHandler() {
1982
+ return this._enableZoomHandler;
1983
+ }
1984
+ isDestinationSubform() {
1985
+ return this._destinationSubform;
1986
+ }
1987
+ setDestinationSubform(destinationSubform) {
1988
+ this._destinationSubform = destinationSubform;
1989
+ }
1990
+ getIsDestinationCall() {
1991
+ return this._isDestinationCall;
1992
+ }
1993
+ setIsDestinationCall(isDestinationCall) {
1994
+ this._isDestinationCall = isDestinationCall;
1995
+ }
1996
+ setCancelWasRaised(val) {
1997
+ this._cancelWasRaised = val;
1998
+ }
1999
+ cancelWasRaised() {
2000
+ return this._cancelWasRaised;
2001
+ }
2002
+ enableCreateActs(val) {
2003
+ this.ActionManager.enable(InternalInterface.MG_ACT_CRELINE, val);
2004
+ this.ActionManager.enable(InternalInterface.MG_ACT_CRELINE_ABOVE, (this.getForm().HasTable()) ? val : false);
2005
+ }
2006
+ async setCreateDeleteActsEnableState() {
2007
+ if (!(this.DataView).isEmptyDataview() && await this.checkProp(PropInterface.PROP_TYPE_ALLOW_DELETE, true) &&
2008
+ this.getMode() === Constants.TASK_MODE_MODIFY && this.DataView.HasMainTable)
2009
+ this.ActionManager.enable(InternalInterface.MG_ACT_DELLINE, true);
2010
+ else
2011
+ this.ActionManager.enable(InternalInterface.MG_ACT_DELLINE, false);
2012
+ if ((await this.checkProp(PropInterface.PROP_TYPE_ALLOW_CREATE, true)) &&
2013
+ (this.DataView.HasMainTable &&
2014
+ (this.getMode() === Constants.TASK_MODE_MODIFY && Environment.Instance.allowCreateInModifyMode(this.getCompIdx())) ||
2015
+ (this.getMode() === Constants.TASK_MODE_CREATE)))
2016
+ this.enableCreateActs(true);
2017
+ else
2018
+ this.enableCreateActs(false);
2019
+ }
2020
+ setEmptyDataview(emptyDataview) {
2021
+ this.DataView.setEmptyDataview(emptyDataview);
2022
+ }
2023
+ getName() {
2024
+ return this.Name;
2025
+ }
2026
+ async emptyDataviewOpen(subformRefresh) {
2027
+ if (this.getLevel() === Constants.TASK_LEVEL_TASK) {
2028
+ this.ActionManager.enable(InternalInterface.MG_ACT_EMPTY_DATAVIEW, true);
2029
+ if (this.IsSubForm) {
2030
+ let rtEvnt = AccessHelper.eventsManager.getLastRtEvent();
2031
+ if ((rtEvnt != null && rtEvnt.getInternalCode() == InternalInterface.MG_ACT_RT_REFRESH_VIEW) || subformRefresh) {
2032
+ let rtEvt = new RunTimeEvent(this);
2033
+ rtEvt.setInternal(InternalInterface.MG_ACT_EMPTY_DATAVIEW);
2034
+ rtEvt.SetEventSubType(EventSubType.Normal);
2035
+ await AccessHelper.eventsManager.handleEvent(rtEvt, false);
2036
+ }
2037
+ }
2038
+ else
2039
+ AccessHelper.eventsManager.addInternalEventWithItaskAndCode(this, InternalInterface.MG_ACT_EMPTY_DATAVIEW);
2040
+ this.setLevel(Constants.TASK_LEVEL_RECORD);
2041
+ if (this.SubformExecMode !== Task_SubformExecModeEnum.FIRST_TIME && subformRefresh && await this.CheckRefreshSubTasks()) {
2042
+ await this.DataView.computeSubForms();
2043
+ await this.doSubformRecPrefixSuffix();
2044
+ }
2045
+ await this.enableRecordActions();
2046
+ this.ActionManager.enable(InternalInterface.MG_ACT_RT_REFRESH_RECORD, false);
2047
+ this.ActionManager.enable(InternalInterface.MG_ACT_RT_REFRESH_SCREEN, false);
2048
+ }
2049
+ }
2050
+ emptyDataviewClose() {
2051
+ this.ActionManager.enable(InternalInterface.MG_ACT_EMPTY_DATAVIEW, false);
2052
+ this.setLevel(Constants.TASK_LEVEL_TASK);
2053
+ this.ActionManager.enable(InternalInterface.MG_ACT_RT_REFRESH_RECORD, true);
2054
+ this.ActionManager.enable(InternalInterface.MG_ACT_RT_REFRESH_SCREEN, true);
2055
+ }
2056
+ async SubformRefresh(subformTask, explicitSubformRefresh) {
2057
+ let currTask = LastFocusedManager.Instance.getLastFocusedTask();
2058
+ let isInside = await subformTask.ExecuteNestedRS(currTask);
2059
+ if (AccessHelper.eventsManager.GetStopExecutionFlag())
2060
+ return;
2061
+ if (subformTask.getLevel() !== Constants.TASK_LEVEL_TASK && !AccessHelper.eventsManager.GetStopExecutionFlag()) {
2062
+ AccessHelper.eventsManager.pushNewExecStacks();
2063
+ await AccessHelper.eventsManager.handleInternalEventWithTaskAndSubformRefresh(subformTask, InternalInterface.MG_ACT_REC_SUFFIX, true);
2064
+ AccessHelper.eventsManager.popNewExecStacks();
2065
+ isInside = true;
2066
+ if (AccessHelper.eventsManager.GetStopExecutionFlag())
2067
+ return;
2068
+ }
2069
+ let cmd = CommandFactory.CreateSubformRefreshCommand(this.getTaskTag(), subformTask.getTaskTag(), explicitSubformRefresh);
2070
+ await subformTask.DataviewManager.Execute(cmd);
2071
+ if (subformTask.isAborting())
2072
+ return;
2073
+ if (explicitSubformRefresh) {
2074
+ AccessHelper.eventsManager.pushNewExecStacks();
2075
+ let performParentRecordPrefixOrg = subformTask.PerformParentRecordPrefix;
2076
+ subformTask.PerformParentRecordPrefix = false;
2077
+ await AccessHelper.eventsManager.handleInternalEventWithTaskAndSubformRefresh(subformTask, InternalInterface.MG_ACT_REC_PREFIX, true);
2078
+ subformTask.PerformParentRecordPrefix = performParentRecordPrefixOrg;
2079
+ AccessHelper.eventsManager.popNewExecStacks();
2080
+ if (AccessHelper.eventsManager.GetStopExecutionFlag())
2081
+ return;
2082
+ }
2083
+ if (isInside) {
2084
+ }
2085
+ else {
2086
+ if (!AccessHelper.eventsManager.GetStopExecutionFlag()) {
2087
+ if (explicitSubformRefresh) {
2088
+ await AccessHelper.eventsManager.handleInternalEventWithTask(subformTask, InternalInterface.MG_ACT_REC_SUFFIX);
2089
+ if (currTask != null)
2090
+ currTask.DataView.setPrevCurrRec();
2091
+ subformTask.DoSubformPrefixSuffix = false;
2092
+ }
2093
+ }
2094
+ }
2095
+ }
2096
+ async ExecuteNestedRS(lastTask) {
2097
+ let isExecuteNestedRS = false;
2098
+ if (lastTask == null)
2099
+ return isExecuteNestedRS;
2100
+ if (this.getLevel() !== Constants.TASK_LEVEL_TASK && lastTask.getMgdID() !== this.getMgdID())
2101
+ return isExecuteNestedRS;
2102
+ for (let task = lastTask; task !== this && task.pathContains(this) && task.getLevel() !== Constants.TASK_LEVEL_TASK; task = task.getParent()) {
2103
+ AccessHelper.eventsManager.pushNewExecStacks();
2104
+ await AccessHelper.eventsManager.handleInternalEventWithTask(task, InternalInterface.MG_ACT_REC_SUFFIX);
2105
+ AccessHelper.eventsManager.popNewExecStacks();
2106
+ isExecuteNestedRS = true;
2107
+ }
2108
+ return isExecuteNestedRS;
2109
+ }
2110
+ async execSubformRecSuffix(newTask) {
2111
+ let subfTask;
2112
+ let i, idx = 0;
2113
+ for (i = this._taskPath.length; i > 0; i--) {
2114
+ subfTask = this._taskPath.get_Item(i - 1);
2115
+ if (!newTask._taskPath.Contains(subfTask)) {
2116
+ await AccessHelper.eventsManager.handleInternalEventWithTask(subfTask, InternalInterface.MG_ACT_REC_SUFFIX);
2117
+ if (AccessHelper.eventsManager.GetStopExecutionFlag())
2118
+ break;
2119
+ if (subfTask.getMode() === Constants.TASK_MODE_CREATE && !(subfTask.DataView.getCurrRec()).isNewRec())
2120
+ subfTask.setMode(Constants.TASK_MODE_MODIFY);
2121
+ }
2122
+ else {
2123
+ idx = newTask._taskPath.indexOf(subfTask);
2124
+ break;
2125
+ }
2126
+ }
2127
+ Debug.Assert(i > 0);
2128
+ return idx;
2129
+ }
2130
+ getCounter() {
2131
+ return this._counter;
2132
+ }
2133
+ increaseCounter() {
2134
+ this._counter = this._counter + 1;
2135
+ }
2136
+ setCounter(cnt) {
2137
+ this._counter = cnt;
2138
+ }
2139
+ isCurrentStartProgLevel() {
2140
+ return this._currStartProgLevel === Task.StartProgLevel;
2141
+ }
2142
+ static isMainProgramField(fieldStr) {
2143
+ let Field = XmlParser.getTokens(fieldStr, ',');
2144
+ let mainProgField = false;
2145
+ if (Field.length === 2) {
2146
+ let parent = NNumber.Parse(Field.get_Item(0));
2147
+ if (parent === TaskBase.MAIN_PRG_PARENT_ID)
2148
+ mainProgField = true;
2149
+ }
2150
+ return mainProgField;
2151
+ }
2152
+ getTaskInfo() {
2153
+ let taskName = (this.getProp(PropInterface.PROP_TYPE_NAME)).GetComputedValue();
2154
+ return NString.Format('{0} {1}', this.isProgram() ? 'Program' : 'Subtask', taskName);
2155
+ }
2156
+ toString() {
2157
+ return NString.Format("(task {0}-\"{1}\"{2})", this._taskTag, this.Name, super.isMainProg() ? (" ctl " + this._ctlIdx) : "");
2158
+ }
2159
+ ConstructMgForm(alreadySetParentForm) {
2160
+ let form = new MgForm();
2161
+ let parentForm = (this.ParentTask != null ? this.ParentTask.getForm() : null);
2162
+ while (parentForm != null && !parentForm.getTask().isOpenWin()) {
2163
+ parentForm = parentForm.ParentForm;
2164
+ }
2165
+ form.ParentForm = parentForm;
2166
+ alreadySetParentForm.value = true;
2167
+ return form;
2168
+ }
2169
+ getMgdID() {
2170
+ return this._mgData.GetId();
2171
+ }
2172
+ getMGData() {
2173
+ return this._mgData;
2174
+ }
2175
+ async RefreshDisplay() {
2176
+ if (this.Form !== null && !this.isAborting() && this.isStarted()) {
2177
+ Logger.Instance.WriteDevToLog("Start task.RefreshDisplay()");
2178
+ if (this._refreshType !== Constants.TASK_REFRESH_NONE) {
2179
+ let form = this.Form;
2180
+ let wasRefreshed = await form.RefreshDisplay(Constants.TASK_REFRESH_FORM);
2181
+ if (wasRefreshed) {
2182
+ this._refreshType = Constants.TASK_REFRESH_NONE;
2183
+ }
2184
+ }
2185
+ Logger.Instance.WriteDevToLog("End task.RefreshDisplay()");
2186
+ }
2187
+ }
2188
+ getFieldDisplayValue(fieldDef, value, isNull) {
2189
+ value.value = fieldDef.getDispValue();
2190
+ isNull.value = fieldDef.isNull();
2191
+ }
2192
+ async UpdateFieldValueAndStartRecompute(fieldDef, value, isNull) {
2193
+ if (this.TaskPrefixExecuted) {
2194
+ await fieldDef.setValueAndStartRecompute(value, isNull, true, false, false);
2195
+ }
2196
+ }
2197
+ ShouldNonInteractiveChildBeModal() {
2198
+ return this.ShouldChildBeModal();
2199
+ }
2200
+ ShouldChildBeModal() {
2201
+ let childShouldBehaveAsModal = false;
2202
+ if ((this.Form.ConcreteWindowType === WindowType.Overlay) && this.getForm().Opened)
2203
+ childShouldBehaveAsModal = true;
2204
+ else if (!this.IsInteractive) {
2205
+ childShouldBehaveAsModal = true;
2206
+ }
2207
+ return childShouldBehaveAsModal;
2208
+ }
2209
+ getParent() {
2210
+ return this._parentTask;
2211
+ }
2212
+ isDescendentOf(chkTask) {
2213
+ if (chkTask === this)
2214
+ return true;
2215
+ else if (chkTask === null || this._parentTask === null)
2216
+ return false;
2217
+ return this._parentTask.isDescendentOf(chkTask);
2218
+ }
2219
+ GetSubformModalParentTask() {
2220
+ let currTask = this;
2221
+ while (currTask._parentTask != null && currTask._parentTask.getIsDestinationCall()) {
2222
+ let subformCtrl = (currTask._parentTask.getForm().getSubFormCtrl());
2223
+ if (subformCtrl.IsModal()) {
2224
+ return subformCtrl;
2225
+ }
2226
+ currTask = currTask._parentTask;
2227
+ }
2228
+ return null;
2229
+ }
2230
+ ShouldEvaluatePropertyLocally(propId) {
2231
+ return this.TaskService.ShouldEvaluatePropertyLocally(propId);
2232
+ }
2233
+ EnsureValidForm() {
2234
+ if (this._isMainPrg && this.Form !== null) {
2235
+ if (!this._openWin || !this.Form.isLegalForm) {
2236
+ this.Form = null;
2237
+ }
2238
+ }
2239
+ }
2240
+ async ComputeMainDisplay() {
2241
+ let propMainDisplay = this.getProp(PropInterface.PROP_TYPE_MAIN_DISPLAY);
2242
+ let mainDisplayIndex = await propMainDisplay.getValueInt();
2243
+ mainDisplayIndex = this.GetRealMainDisplayIndexOnCurrentTask(mainDisplayIndex);
2244
+ this._forms.InitFormFromXmlString(mainDisplayIndex);
2245
+ this.EnsureValidForm();
2246
+ }
2247
+ async PrepareTaskForm() {
2248
+ await TaskServiceBase.PreparePropOpenTaskWindow(this);
2249
+ return await RemoteTaskService.PreparePropMainDisplay(this);
2250
+ }
2251
+ FormIsLegal() {
2252
+ let isFormIsLegal = super.isMainProg();
2253
+ return isFormIsLegal || super.getForm().isLegalForm;
2254
+ }
2255
+ GetRealMainDisplayIndexOnDepth(mainDspIdx) {
2256
+ let task = this.LogicalStudioParentTask;
2257
+ while (task != null) {
2258
+ mainDspIdx += task._forms.Count;
2259
+ task = task.LogicalStudioParentTask;
2260
+ }
2261
+ return mainDspIdx;
2262
+ }
2263
+ GetRealMainDisplayIndexOnCurrentTask(mainDspIdx) {
2264
+ if (mainDspIdx > 1) {
2265
+ let task = this.LogicalStudioParentTask;
2266
+ while (task != null) {
2267
+ mainDspIdx -= task._forms.Count;
2268
+ task = task.LogicalStudioParentTask;
2269
+ }
2270
+ }
2271
+ return mainDspIdx;
2272
+ }
2273
+ GetAncestorTaskByTaskDefinitionId(findTaskDefinitionId) {
2274
+ let currentTask = this;
2275
+ if (findTaskDefinitionId.IsMainProgram())
2276
+ return GuiDataCollection.MGDataTable.GetMainProgByCtlIdx(this.ContextID, findTaskDefinitionId.CtlIndex);
2277
+ while (currentTask != null) {
2278
+ if (currentTask.TaskDefinitionId.Equals(findTaskDefinitionId))
2279
+ return currentTask;
2280
+ currentTask = currentTask._parentTask;
2281
+ }
2282
+ return null;
2283
+ }
2284
+ SetDataControlValuesReference(controlId, dcValuesId) {
2285
+ let ctrl = super.getForm().getCtrl(controlId);
2286
+ ctrl.setDcValId(dcValuesId);
2287
+ }
2288
+ DisplayMessageToStatusBar(text) {
2289
+ let taskToVerifyOn = this.GetContextTask();
2290
+ if (taskToVerifyOn.getForm() == null)
2291
+ taskToVerifyOn = LastFocusedManager.Instance.getLastFocusedTask();
2292
+ taskToVerifyOn.WriteToMessagePane(text);
2293
+ }
2294
+ isTableWithAbsolutesScrollbar() {
2295
+ let isTableWithAbsolutesScrollbar = false;
2296
+ if (this.getForm() != null)
2297
+ isTableWithAbsolutesScrollbar = this.getForm().isTableWithAbsoluteScrollbar();
2298
+ return isTableWithAbsolutesScrollbar;
2299
+ }
2300
+ GetTaskDetails() {
2301
+ let names = (this.getProp(PropInterface.PROP_TYPE_NAME)).GetComputedValue();
2302
+ let task = this;
2303
+ while (task.ParentTask !== null && !task.ParentTask.isMainProg()) {
2304
+ task = task.ParentTask;
2305
+ names = (task.getProp(PropInterface.PROP_TYPE_NAME)).GetComputedValue() + "." + names;
2306
+ }
2307
+ return names;
2308
+ }
2309
+ static async ProcessTaskURL() {
2310
+ let xmlData = RuntimeContextBase.Instance.Parser.getXMLdata();
2311
+ let endTaskUrlIdx = xmlData.indexOf(XMLConstants.TAG_CLOSE, RuntimeContextBase.Instance.Parser.getCurrIndex());
2312
+ Debug.Assert(endTaskUrlIdx !== -1 && endTaskUrlIdx < xmlData.length);
2313
+ let tag = RuntimeContextBase.Instance.Parser.getXMLsubstring(endTaskUrlIdx);
2314
+ RuntimeContextBase.Instance.Parser.add2CurrIndex(tag.indexOf(ConstInterface.MG_TAG_TASKURL) + ConstInterface.MG_TAG_TASKURL.length);
2315
+ let tokensVector = XmlParser.getTokens(RuntimeContextBase.Instance.Parser.getXMLsubstring(endTaskUrlIdx), XMLConstants.XML_ATTR_DELIM);
2316
+ let taskCacheURL = tokensVector.get_Item(1);
2317
+ let refListStr = tokensVector.get_Item(3);
2318
+ let taskContentOriginal = "";
2319
+ if (taskCacheURL.trim() != "") {
2320
+ if (taskCacheURL.startsWith("./"))
2321
+ taskCacheURL = NString.Replace(taskCacheURL, './', './assets/cache/');
2322
+ taskContentOriginal = await Task.CommandsProcessor.GetContent(taskCacheURL, true);
2323
+ }
2324
+ let taskContentFinal = new StringBuilder(xmlData.substr(0, RuntimeContextBase.Instance.Parser.getCurrIndex() - (ConstInterface.MG_TAG_TASKURL.length + 1)), taskContentOriginal.length);
2325
+ let reflist = this.getReflist(refListStr, ';', true, -1);
2326
+ let refListIdx = 0;
2327
+ let currIdx = taskContentOriginal.indexOf("[:");
2328
+ let prevIdx = 0;
2329
+ while (currIdx !== -1) {
2330
+ taskContentFinal.Append(taskContentOriginal.substr(prevIdx, currIdx - prevIdx));
2331
+ taskContentFinal.Append(reflist.get_Item(refListIdx++));
2332
+ currIdx += 2;
2333
+ prevIdx = currIdx;
2334
+ currIdx = taskContentOriginal.indexOf("[:", prevIdx);
2335
+ }
2336
+ taskContentFinal.Append(taskContentOriginal.substr(prevIdx));
2337
+ taskContentFinal.Append(xmlData.substr(xmlData.indexOf(XMLConstants.TAG_CLOSE, endTaskUrlIdx + 1) + 1));
2338
+ xmlData = taskContentFinal.ToString();
2339
+ Logger.Instance.WriteDevToLog(NString.Format("{0} -------> {1}", taskCacheURL, xmlData));
2340
+ RuntimeContextBase.Instance.Parser.setXMLdata(xmlData);
2341
+ RuntimeContextBase.Instance.Parser.setCurrIndex(RuntimeContextBase.Instance.Parser.getCurrIndex() - (ConstInterface.MG_TAG_TASKURL.length + 1));
2342
+ }
2343
+ static getReflist(data, delim, trunc, maxTokens) {
2344
+ let currStr = new StringBuilder();
2345
+ let list = new List();
2346
+ let tokensCnt = 0;
2347
+ for (let i = 1; i < data.length; i++) {
2348
+ let curr = data.charAt(i);
2349
+ if (curr !== '\\' && curr !== delim)
2350
+ currStr.Append(curr);
2351
+ else if (curr === delim) {
2352
+ list.push(currStr.ToString());
2353
+ currStr = new StringBuilder();
2354
+ tokensCnt++;
2355
+ if (tokensCnt === maxTokens)
2356
+ break;
2357
+ }
2358
+ else if (curr === '\\') {
2359
+ if (!trunc && data.charAt(i + 1) !== delim)
2360
+ currStr.Append(data.charAt(i));
2361
+ i++;
2362
+ currStr.Append(data.charAt(i));
2363
+ }
2364
+ }
2365
+ list.push(currStr.ToString());
2366
+ return list;
2367
+ }
2368
+ static async StartProgram(callByDestSubForm, moveToFirstControl) {
2369
+ let orgStopExecution = AccessHelper.eventsManager.GetStopExecutionFlag();
2370
+ let nonInteractiveTaskAlreadyExecuted = null;
2371
+ let allowEvents = AccessHelper.eventsManager.getAllowEvents();
2372
+ AccessHelper.eventsManager.setAllowEvents(EventsAllowedType.ALL);
2373
+ Logger.Instance.WriteDevToLog("Start \"startProg\"");
2374
+ Task.StartProgLevel++;
2375
+ AccessHelper.eventsManager.setStopExecution(false);
2376
+ nonInteractiveTaskAlreadyExecuted = await this.ExecuteComponentMainPrograms(callByDestSubForm, moveToFirstControl);
2377
+ let nonInteractiveTaskAlreadyExecutedRef = new RefParam(nonInteractiveTaskAlreadyExecuted);
2378
+ let currentNonInteractiveTaskRef = new RefParam(null);
2379
+ await Task.ExecuteMainProgram(0, callByDestSubForm, moveToFirstControl, nonInteractiveTaskAlreadyExecutedRef, currentNonInteractiveTaskRef, AccessHelper.mgDataTable);
2380
+ nonInteractiveTaskAlreadyExecuted = nonInteractiveTaskAlreadyExecutedRef.value;
2381
+ if (!Task._idleTimerStarted) {
2382
+ GUIManager.Instance.startTimer(AccessHelper.mgDataTable.getMGData(0), Environment.Instance.getIdleTime(0), true);
2383
+ Task._idleTimerStarted = true;
2384
+ }
2385
+ await this.OpenForms(callByDestSubForm);
2386
+ await this.DoFirstRecordCycle();
2387
+ await this.MoveToFirstControls(callByDestSubForm);
2388
+ if (Task.StartProgLevel === 1) {
2389
+ let resetAllowEvents = false;
2390
+ let canExecuteEvents = true;
2391
+ if (nonInteractiveTaskAlreadyExecuted !== null && nonInteractiveTaskAlreadyExecuted.isStarted()) {
2392
+ resetAllowEvents = true;
2393
+ AccessHelper.eventsManager.setNonInteractiveAllowEvents(await nonInteractiveTaskAlreadyExecuted.isAllowEvents());
2394
+ canExecuteEvents = await nonInteractiveTaskAlreadyExecuted.isAllowEvents();
2395
+ }
2396
+ if (LastFocusedManager.Instance.getLastFocusedTask() !== null && canExecuteEvents) {
2397
+ AccessHelper.eventsManager.pushNewExecStacks();
2398
+ await AccessHelper.eventsManager.handleEvents(AccessHelper.mgDataTable.getCurrMGData(), 0);
2399
+ AccessHelper.eventsManager.popNewExecStacks();
2400
+ }
2401
+ if (resetAllowEvents)
2402
+ AccessHelper.eventsManager.setAllowEvents(allowEvents);
2403
+ }
2404
+ Task.StartProgLevel--;
2405
+ Logger.Instance.WriteDevToLog("End \"startProg\"");
2406
+ if (orgStopExecution && !AccessHelper.eventsManager.GetStopExecutionFlag())
2407
+ if (orgStopExecution && !AccessHelper.eventsManager.GetStopExecutionFlag())
2408
+ AccessHelper.eventsManager.setStopExecution(orgStopExecution);
2409
+ return nonInteractiveTaskAlreadyExecuted;
2410
+ }
2411
+ static async ExecuteComponentMainPrograms(callByDestSubForm, moveToFirstControl) {
2412
+ let currentNonInteractiveTask = new RefParam(null);
2413
+ let nonInteractiveTaskAlreadyExecuted = new RefParam(null);
2414
+ let maxCtlIdx = AccessHelper.mgDataTable.getMGData(0).getMaxCtlIdx();
2415
+ for (let i = 1; i <= maxCtlIdx; i = i + 1) {
2416
+ let componentMainProgram = AccessHelper.mgDataTable.GetMainProgByCtlIdx(-1, i);
2417
+ if (componentMainProgram !== null)
2418
+ await Task.ExecuteMainProgram(i, callByDestSubForm, moveToFirstControl, currentNonInteractiveTask, nonInteractiveTaskAlreadyExecuted, AccessHelper.mgDataTable);
2419
+ }
2420
+ return nonInteractiveTaskAlreadyExecuted.value;
2421
+ }
2422
+ static async ExecuteMainProgram(CtlIndex, callByDestSubForm, moveToFirstControl, currentNonInteractiveTask, nonInteractiveTaskAlreadyExecuted, mgDataTable) {
2423
+ let mainProgramTask = mgDataTable.GetMainProgByCtlIdx(-1, CtlIndex);
2424
+ Logger.Instance.WriteDevToLog(NString.Format(" ClientManager.startProg: ctlIdx={0}, task={1}", CtlIndex, mainProgramTask));
2425
+ currentNonInteractiveTask.value = (await mainProgramTask.Start(moveToFirstControl, callByDestSubForm));
2426
+ if (nonInteractiveTaskAlreadyExecuted.value === null)
2427
+ nonInteractiveTaskAlreadyExecuted.value = currentNonInteractiveTask.value;
2428
+ else if (currentNonInteractiveTask.value !== null) {
2429
+ Debug.Assert(false, "more than 1 non interactive tasks in startProg");
2430
+ }
2431
+ }
2432
+ static async OpenForms(callByDestSubForm) {
2433
+ let createdForms = MgForm.CreatedForms;
2434
+ if (createdForms.Count() > 0) {
2435
+ let i = 0;
2436
+ while (i < createdForms.Count()) {
2437
+ let mgForm = createdForms.get(i);
2438
+ let canOpen = false;
2439
+ if (mgForm.isSubForm()) {
2440
+ let opened = mgForm.getSubFormCtrl().getForm().Opened;
2441
+ if (opened) {
2442
+ canOpen = true;
2443
+ }
2444
+ }
2445
+ else {
2446
+ if (mgForm.getTask().isCurrentStartProgLevel()) {
2447
+ canOpen = true;
2448
+ }
2449
+ }
2450
+ if (canOpen) {
2451
+ Manager.OpenForm(mgForm);
2452
+ await Manager.DoFirstRefreshTable(mgForm);
2453
+ }
2454
+ if (mgForm.Opened) {
2455
+ createdForms.remove(mgForm);
2456
+ }
2457
+ else
2458
+ i++;
2459
+ }
2460
+ }
2461
+ }
2462
+ static async DoFirstRecordCycle() {
2463
+ for (let i = 0; i < AccessHelper.mgDataTable.getSize(); i++) {
2464
+ let mgd = AccessHelper.mgDataTable.getMGData(i);
2465
+ if (mgd === null || mgd.IsAborting)
2466
+ continue;
2467
+ for (let j = 0; j < mgd.getTasksCount(); j++) {
2468
+ let task = mgd.getTask(j);
2469
+ if (task !== null) {
2470
+ let mgForm = task.getForm();
2471
+ if (mgForm !== null && task.isCurrentStartProgLevel() && !mgForm.IgnoreFirstRecordCycle) {
2472
+ mgForm.IgnoreFirstRecordCycle = true;
2473
+ await task.doFirstRecordCycle();
2474
+ }
2475
+ }
2476
+ }
2477
+ }
2478
+ }
2479
+ static async MoveToFirstControls(callByDestSubForm) {
2480
+ for (let i = 0; i < AccessHelper.mgDataTable.getSize(); i++) {
2481
+ let mgd = AccessHelper.mgDataTable.getMGData(i);
2482
+ if (mgd === null || mgd.IsAborting)
2483
+ continue;
2484
+ let tasksCount = mgd.getTasksCount();
2485
+ for (let j = 0; j < tasksCount; j++) {
2486
+ let task = mgd.getTask(j);
2487
+ let mgForm = task.getForm();
2488
+ if (task.isCurrentStartProgLevel() && mgForm !== null && mgForm.MovedToFirstControl) {
2489
+ mgForm.MovedToFirstControl = false;
2490
+ if (!callByDestSubForm)
2491
+ await AccessHelper.eventsManager.HandleNonParkableControls(task);
2492
+ }
2493
+ }
2494
+ }
2495
+ }
2496
+ }
2497
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiVGFzay5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2VuZ2luZS9zcmMvdGFza3MvVGFzay50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUMsS0FBSyxFQUFFLFNBQVMsRUFBRSxJQUFJLEVBQUUsT0FBTyxFQUFFLE9BQU8sRUFBRSxRQUFRLEVBQUUsS0FBSyxFQUFFLGFBQWEsRUFBRSxpQkFBaUIsRUFBQyxNQUFNLHNCQUFzQixDQUFDO0FBQ2pJLE9BQU8sRUFDTCxTQUFTLEVBQ1QsaUJBQWlCLEVBQ2pCLE1BQU0sRUFDTixnQkFBZ0IsRUFDaEIsZ0JBQWdCLEVBQ2hCLE9BQU8sRUFFUCxV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heSh0aGlzLmdldFRhc2tEZXB0aCh0cnVlKSk7XHJcblxyXG4gICAgICAvLyB0aGUgcm91dGUgdXAsIHRoZSBpbnNlcnQgKG91ciB0YXNrKSBpcyBbMF0sIGFuZCBleGl0IChyb290KSBpcyBbdHJlZVJvdXRlLmxlbmd0aCAtIDFdXHJcbiAgICAgIHRoaXMucGF0aFRvUm9vdCh0cmVlUm91dGUsIHRydWUpO1xyXG5cclxuICAgICAgZm9yIChsZXQgdGFzazogbnVtYmVyID0gdHJlZVJvdXRlLmxlbmd0aCAtIDE7IHRhc2sgPj0gMDsgdGFzay0tKSB7XHJcblxyXG4gICAgICAgIGN1cnJUYXNrID0gdHJlZVJvdXRlW3Rhc2tdO1xyXG5cclxuICAgICAgICBpZiAoY3VyclRhc2suRm9ybSAhPSBudWxsKSB7XHJcbiAgICAgICAgICBub09mQ29udHJvbHNJbkN1cnJ0YXNrID0gY3VyclRhc2suRm9ybS5nZXRDdHJsQ291bnQoKTtcclxuXHJcbiAgICAgICAgICAvLyBGb3VuZCB0aGUgdGFzayB3aGljaCBjb250YWlucyB0aGUgbmVlZGVkIGNvbnRyb2xcclxuICAgICAgICAgIGlmIChjb250cm9sSUQgPCAobm9PZkNvbnRyb2xzQmVmb3JlQ3VyclRhc2sgKyBub09mQ29udHJvbHNJbkN1cnJ0YXNrKSkge1xyXG4gICAgICAgICAgICAvLyBJZHggb2YgdGhlIGNvbnRyb2wgaW4gY3VycmVudCB0YXNrXHJcbiAgICAgICAgICAgIGNvbnRyb2xJZHggPSBjb250cm9sSUQgLSBub09mQ29udHJvbHNCZWZvcmVDdXJyVGFzaztcclxuICAgICAgICAgICAgY29udHJvbCA9IDxNZ0NvbnRyb2w+Y3VyclRhc2suRm9ybS5DdHJsVGFiLmdldEN0cmwoY29udHJvbElkeCk7XHJcbiAgICAgICAgICAgIGNhbGxlclRhc2sgPSBjdXJyVGFzaztcclxuICAgICAgICAgICAgYnJlYWs7XHJcbiAgICAgICAgICB9XHJcblxyXG4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CAmJiB0aGlzLl9wYXJlbnRUYXNrLmlzTWFpblByb2coKSkge1xyXG4gICAgICAgICAgICAgICAgbGV0IG1nZDogTUdEYXRhID0gQWNjZXNzSGVscGVyLm1nRGF0YVRhYmxlLmdldE1HRGF0YSgwKTtcclxuICAgICAgICAgICAgICAgIGxldCBtYWluUHJnVGFzazogVGFzayA9IG1nZC5nZXRNYWluUHJvZygwKTtcclxuICAgICAgICAgICAgICAgIGxldCByb290VGFzazogVGFzayA9IEFjY2Vzc0hlbHBlci5tZ0RhdGFUYWJsZS5TdGFydHVwTWdEYXRhLmdldEZpcnN0VGFzaygpO1xyXG4gICAgICAgICAgICAgICAgbGV0IGVuZE1haW5Qcmc6IGJvb2xlYW4gPSBhd2FpdCBtYWluUHJnVGFzay5jaGVja1Byb3AoUHJvcEludGVyZmFjZS5QUk9QX1RZUEVfRU5EX0NPTkRJVElPTiwgZmFsc2UpO1xyXG5cclxuICAgICAgICAgICAgICAgIC8vIE5vIG5lZWQgdG8gZW5kIHRoZSByb290IHRhc2sgaWYgd2UgYXJlIGFscmVhZHkgZG9pbmcgaXQuXHJcbiAgICAgICAgICAgICAgICBpZiAodGhpcyAhPT0gcm9vdFRhc2sgJiYgZW5kTWFpblByZykge1xyXG4gICAgICAgICAgICAgICAgICBsZXQgcnRFdnQgPSBuZXcgUnVuVGltZUV2ZW50KHJvb3RUYXNrKTtcclxuICAgICAgICAgICAgICAgICAgcnRFdnQuc2V0SW50ZXJuYWwoSW50ZXJuYWxJbnRlcmZhY2UuTUdfQUNUX0NMT1NFKTtcclxuICAgICAgICAgICAgICAgICAgcnRFdnQuc2V0Q3RybChudWxsKTtcclxuICAgICAgICAgICAgICAgICAgcnRFdnQuc2V0QXJnTGlzdChudWxsKTtcclxuICAgICAgICAgICAgICAgICAgQWNjZXNzSGVscGVyLmV2ZW50c01hbmFnZXIuYWRkVG9UYWlsKHJ0RXZ0KTtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICB9XHJc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