@magic-xpa/engine 4.1100.0-dev4110.2 → 4.1100.0-dev4110.202

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