ws_workunits_struct.ecm 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848
  1. /*##############################################################################
  2. HPCC SYSTEMS software Copyright (C) 2012 HPCC Systems®.
  3. Licensed under the Apache License, Version 2.0 (the "License");
  4. you may not use this file except in compliance with the License.
  5. You may obtain a copy of the License at
  6. http://www.apache.org/licenses/LICENSE-2.0
  7. Unless required by applicable law or agreed to in writing, software
  8. distributed under the License is distributed on an "AS IS" BASIS,
  9. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  10. See the License for the specific language governing permissions and
  11. limitations under the License.
  12. ############################################################################## */
  13. #include "xslprocessor.hpp"
  14. // ===========================================================================
  15. EspInclude(common);
  16. //The ESPenum ECLWUActions has to be matched by the ECLWUActionNames[] in ws_workunitsService.cpp.
  17. ESPenum ECLWUActions : string
  18. {
  19. Abort("Abort"),
  20. Delete("Delete"),
  21. EventDeschedule("Deschedule"),
  22. EventReschedule("Reschedule"),
  23. Pause("Pause"),
  24. PauseNow("PauseNow"),
  25. Protect("Protect"),
  26. Unprotect("Unprotect"),
  27. Restore("Restore"),
  28. Resume("Resume"),
  29. SetToFailed("SetToFailed"),
  30. Archive("Archive"),
  31. };
  32. ESPenum EclDefinitionActions : string
  33. {
  34. SyntaxCheck("SyntaxCheck"),
  35. Deploy("Deploy"),
  36. Publish("Publish"),
  37. };
  38. ESPenum ErrorMessageFormat : string
  39. {
  40. XML("xml"),
  41. JSON("json"),
  42. Text("text")
  43. };
  44. ESPenum WUFileType : string
  45. {
  46. XML("XML"),
  47. CPP("cpp"),
  48. DLL("dll"),
  49. Res("res"),
  50. LOG("log"),
  51. WUECL("WUECL"),
  52. ThorLog("ThorLog"),
  53. ThorSlaveLog("ThorSlaveLog"),
  54. EclAgentLog("EclAgentLog"),
  55. ArchiveQuery("ArchiveQuery"),
  56. };
  57. ESPenum WUFileDownloadOption : int
  58. {
  59. OriginalText(0, "OriginalText"),
  60. Attachment(1, "Attachment"),
  61. ZIP(2, "ZIP"),
  62. GZIP(3, "GZIP")
  63. };
  64. ESPenum WUQueryActivationMode : int
  65. {
  66. NoActivate(0, "Do not activate query"),
  67. Activate(1, "Activate query"),
  68. ActivateSuspendPrevious(2, "Activate query, suspend previous"),
  69. ActivateDeletePrevious(3, "Activate query, delete previous")
  70. };
  71. ESPenum WUExceptionSeverity : string
  72. {
  73. INFO("info"),
  74. WARNING("warning"),
  75. ERROR("error"),
  76. ALERT("alert")
  77. };
  78. ESPenum WUQuerySetFilterType : string
  79. {
  80. ALL("All"),
  81. ID("Id"),
  82. NAME("Name"),
  83. ALIAS("Alias"),
  84. STATUS("Status")
  85. };
  86. ESPenum QuerysetImportActivation : string
  87. {
  88. None("None"),
  89. ImportedActive("ActivateImportedActive")
  90. };
  91. ESPenum QuerySetQueryActionTypes : string
  92. {
  93. Suspend("Suspend"),
  94. Unsuspend("Unsuspend"),
  95. ToggleSuspend("ToggleSuspend"),
  96. Activate("Activate"),
  97. Delete("Delete"),
  98. RemoveAllAliases("RemoveAllAliases"),
  99. ResetQueryStats("ResetQueryStats")
  100. };
  101. SCMenum WUINFOType
  102. {
  103. WUGRAPHS,
  104. WUTIMINGS,
  105. WUACTIONS,
  106. WURESULTS
  107. };
  108. ESPStruct [nil_remove] ECLException
  109. {
  110. string Source;
  111. string Severity;
  112. int Code;
  113. string Message;
  114. string FileName;
  115. int LineNo;
  116. int Column;
  117. [min_ver("1.63")] int Activity;
  118. [min_ver("1.69")] string Scope;
  119. [min_ver("1.69")] int Priority;
  120. };
  121. // ===========================================================================
  122. ESPStruct [nil_remove] ECLSchemaItem
  123. {
  124. string ColumnName;
  125. string ColumnType;
  126. int ColumnTypeCode;
  127. bool isConditional(false);
  128. };
  129. // ===========================================================================
  130. ESPStruct [nil_remove] ECLResult
  131. {
  132. string Name;
  133. int Sequence;
  134. string Value;
  135. string Link;
  136. string FileName;
  137. bool IsSupplied;
  138. bool ShowFileContent(true);
  139. int64 Total;
  140. ESParray<ESPstruct ECLSchemaItem> ECLSchemas;
  141. [min_ver("1.39")] string XmlSchema;
  142. };
  143. // ===========================================================================
  144. ESPStruct [nil_remove] ECLTimingData
  145. {
  146. string Name;
  147. int GraphNum;
  148. int SubGraphNum;
  149. int GID;
  150. int Min;
  151. int MS;
  152. };
  153. // ===========================================================================
  154. ESPStruct [nil_remove] ECLGraph
  155. {
  156. string Name;
  157. string Label;
  158. string Type;
  159. bool Running;
  160. [min_ver("1.09")] bool Complete;
  161. [min_ver("1.14")] bool Failed;
  162. int64 RunningId;
  163. [min_ver("1.53")]string WhenStarted;
  164. [min_ver("1.53")]string WhenFinished;
  165. };
  166. // ===========================================================================
  167. ESPStruct [nil_remove] ECLGraphEx
  168. {
  169. string Name;
  170. string Label;
  171. string Type;
  172. string Graph;
  173. bool Running;
  174. int64 RunningId;
  175. [min_ver("1.21")] bool Complete;
  176. [min_ver("1.21")] bool Failed;
  177. };
  178. // ===========================================================================
  179. ESPStruct [nil_remove] ECLSourceFile
  180. {
  181. [min_ver("1.01")] string FileCluster;
  182. string Name;
  183. [min_ver("1.12")] bool IsSuperFile;
  184. [min_ver("1.27")] int Subs;
  185. int Count;
  186. [min_ver("1.27")] ESParray<ESPstruct ECLSourceFile> ECLSourceFiles;
  187. };
  188. // ===========================================================================
  189. ESPStruct [nil_remove] ECLTimer
  190. {
  191. string Name;
  192. string Value;
  193. int count;
  194. [min_ver("1.20")] string GraphName;
  195. [min_ver("1.20")] int SubGraphId;
  196. [min_ver("1.72")] int64 Timestamp;
  197. [min_ver("1.72")] string When;
  198. };
  199. // ===========================================================================
  200. ESPStruct [nil_remove] ECLHelpFile
  201. {
  202. string Name;
  203. string Type;
  204. [min_ver("1.32")] string IPAddress;
  205. [min_ver("1.32")] string Description;
  206. [min_ver("1.43")] int64 FileSize;
  207. [min_ver("1.44")] unsigned PID(0);
  208. [min_ver("1.58")] unsigned minActivityId(0);
  209. [min_ver("1.58")] unsigned maxActivityId(0);
  210. };
  211. // ===========================================================================
  212. ESPStruct [nil_remove] ECLQuery
  213. {
  214. string Text;
  215. string Cpp;
  216. string ResTxt;
  217. string Dll;
  218. string ThorLog;
  219. [min_ver("1.35")] string QueryMainDefinition;
  220. };
  221. // ===========================================================================
  222. ESPStruct [nil_remove] QueryStatsRecord
  223. {
  224. string StartTime;
  225. int64 ElapsedTimeMs;
  226. int64 MemoryUsed;
  227. int64 BytesOut;
  228. int SlavesReplyLen;
  229. bool Failed;
  230. };
  231. // ===========================================================================
  232. ESPStruct [nil_remove] QuerySummaryStats
  233. {
  234. string Endpoint;
  235. string Status;
  236. string StartTime;
  237. string EndTime;
  238. int CountTotal;
  239. int CountFailed;
  240. int AverageSlavesReplyLen;
  241. int64 AverageBytesOut;
  242. int64 SizeAvgPeakMemory;
  243. int64 TimeAvgTotalExecuteMinutes;
  244. int64 TimeMinTotalExecuteMinutes;
  245. int64 TimeMaxTotalExecuteMinutes;
  246. int64 Percentile97;
  247. bool Percentile97Estimate;
  248. };
  249. // ===========================================================================
  250. ESPStruct [nil_remove] QueryStats
  251. {
  252. string ID; //QueryID or Global
  253. ESParray<ESPstruct QuerySummaryStats> AggregateQueryStatsList;
  254. ESParray<ESPstruct QueryStatsRecord> QueryStatsRecordList;
  255. };
  256. // ===========================================================================
  257. ESPStruct [nil_remove] EndpointQueryStats
  258. {
  259. string Endpoint;
  260. string Status;
  261. ESParray<ESPstruct QueryStats> QueryStatsList;
  262. };
  263. // ===========================================================================
  264. ESPStruct [nil_remove] DebugValue
  265. {
  266. string Name;
  267. string Value;
  268. };
  269. ESPStruct [nil_remove] WUActionResult
  270. {
  271. string Wuid;
  272. string Action;
  273. string Result;
  274. };
  275. ESPStruct [nil_remove] ApplicationValue
  276. {
  277. string Application;
  278. string Name;
  279. string Value;
  280. };
  281. ESPStruct [nil_remove] ECLWorkflow
  282. {
  283. string WFID;
  284. string EventName("");
  285. string EventText("");
  286. int Count(-1);
  287. int CountRemaining(-1);
  288. };
  289. ESPStruct [nil_remove] ThorLogInfo
  290. {
  291. string ProcessName;
  292. string ClusterGroup;
  293. string LogDate;
  294. int NumberSlaves;
  295. };
  296. ESPStruct [nil_remove] ECLWorkunitLW
  297. {
  298. string Wuid;
  299. string Owner; //IConstWorkUnitInfo queryUser()
  300. string JobName;
  301. string WuScope;
  302. string ClusterName;
  303. int State;
  304. string StateDesc;
  305. int Action;
  306. string ActionDesc;
  307. int Priority;
  308. string PriorityDesc;
  309. int PriorityLevel;
  310. bool IsProtected;
  311. xsdDateTime DateTimeScheduled;
  312. unsigned TotalClusterTime;
  313. ESParray<ESPstruct ApplicationValue> ApplicationValues;
  314. };
  315. ESPStruct [nil_remove] ECLWorkunit
  316. {
  317. string Wuid;
  318. string Owner;
  319. string Cluster;
  320. [min_ver("1.07")] string RoxieCluster;
  321. string Jobname;
  322. string Queue;
  323. int StateID; //Equiv to workunit::state
  324. string State; //Equiv to workunit::stateDesc
  325. string StateEx;
  326. string Description;
  327. bool Protected;
  328. bool Active;
  329. int Action;
  330. [min_ver("1.33")] string ActionEx;
  331. xsdDateTime DateTimeScheduled;
  332. int PriorityClass;
  333. int PriorityLevel;
  334. string Scope;
  335. string Snapshot;
  336. int ResultLimit;
  337. [min_ver("1.01")] bool Archived;
  338. [min_ver("1.30")] bool IsPausing(false);
  339. [min_ver("1.30")] bool ThorLCR(false);
  340. [min_ver("1.01")] int EventSchedule;
  341. [min_ver("1.02"), depr_ver("1.71")] bool HaveSubGraphTimings;
  342. [min_ver("1.28"), depr_ver("1.53")] string TotalThorTime;
  343. [min_ver("1.53")] string TotalClusterTime;
  344. [min_ver("1.59")] string AbortBy;
  345. [min_ver("1.59")] string AbortTime;
  346. ESPstruct ECLQuery Query;
  347. [min_ver("1.03")] ESParray<ESPstruct ECLHelpFile> Helpers;
  348. ESParray<ESPstruct ECLException> Exceptions;
  349. ESParray<ESPstruct ECLGraph> Graphs;
  350. ESParray<ESPstruct ECLSourceFile> SourceFiles;
  351. ESParray<ESPstruct ECLResult> Results;
  352. ESParray<ESPstruct ECLResult> Variables;
  353. ESParray<ESPstruct ECLTimer> Timers;
  354. ESParray<ESPstruct DebugValue> DebugValues;
  355. ESParray<ESPstruct ApplicationValue> ApplicationValues;
  356. [min_ver("1.01")] ESParray<ESPstruct ECLWorkflow> Workflows;
  357. [min_ver("1.02")] ESParray<ESPstruct ECLTimingData> TimingData;
  358. [min_ver("1.05")] ESParray<string, AllowedCluster> AllowedClusters;
  359. [min_ver("1.17")] int ErrorCount;
  360. [min_ver("1.17")] int WarningCount;
  361. [min_ver("1.17")] int InfoCount;
  362. [min_ver("1.52")] int AlertCount;
  363. [min_ver("1.17")] int GraphCount;
  364. [min_ver("1.17")] int SourceFileCount;
  365. [min_ver("1.17")] int ResultCount;
  366. [min_ver("1.17")] int VariableCount;
  367. [min_ver("1.17")] int TimerCount;
  368. [min_ver("1.17")] bool HasDebugValue;
  369. [min_ver("1.17")] int ApplicationValueCount;
  370. [min_ver("1.22")] string XmlParams;
  371. [min_ver("1.23")] int AccessFlag;
  372. [min_ver("1.24")] int ClusterFlag;
  373. [min_ver("1.29")] string HelpersDesc;
  374. [min_ver("1.29")] string GraphsDesc;
  375. [min_ver("1.29")] string SourceFilesDesc;
  376. [min_ver("1.29")] string ResultsDesc;
  377. [min_ver("1.29")] string VariablesDesc;
  378. [min_ver("1.29")] string TimersDesc;
  379. [min_ver("1.29")] string DebugValuesDesc;
  380. [min_ver("1.29")] string ApplicationValuesDesc;
  381. [min_ver("1.29")] string WorkflowsDesc;
  382. [min_ver("1.31")] bool HasArchiveQuery;
  383. [min_ver("1.38")] ESParray<ESPstruct ThorLogInfo> ThorLogList;
  384. [min_ver("1.47")] ESParray<string, URL> ResourceURLs;
  385. [min_ver("1.50")] int ResultViewCount;
  386. [min_ver("1.50")] int ResourceURLCount;
  387. [min_ver("1.50")] int DebugValueCount;
  388. [min_ver("1.50")] int WorkflowCount;
  389. [min_ver("1.67")] int HelpersCount;
  390. };
  391. ESPStruct [nil_remove] WUECLAttribute
  392. {
  393. string ModuleName;
  394. string AttributeName;
  395. bool IsLocked;
  396. bool IsCheckedOut;
  397. bool IsSandbox;
  398. bool IsOrphaned;
  399. };
  400. // ===========================================================================
  401. ESPStruct NetworkNode
  402. {
  403. int Category;
  404. string id;
  405. };
  406. ESPStruct [nil_remove] ClusterEndpoint
  407. {
  408. string URL;
  409. string Status;
  410. int NumQueryFileToCopy;
  411. };
  412. ESPStruct LogicalFileUpload
  413. {
  414. int Type;
  415. string Source;
  416. string Destination;
  417. string EventTag;
  418. };
  419. // ===========================================================================
  420. ESPStruct [nil_remove] ECLJob
  421. {
  422. string Wuid;
  423. string Graph;
  424. string State;
  425. string StartedDate;
  426. string FinishedDate;
  427. string Cluster;
  428. [min_ver("1.06")] string GraphNum;
  429. [min_ver("1.06")] string SubGraphNum;
  430. [min_ver("1.06")] string NumOfRuns;
  431. [min_ver("1.06")] int Duration;
  432. };
  433. ESPStruct [nil_remove] ThorQueue
  434. {
  435. string DT;
  436. string RunningWUs;
  437. string QueuedWUs;
  438. string WaitingThors;
  439. string ConnectedThors;
  440. string IdledThors;
  441. string RunningWU1;
  442. string RunningWU2;
  443. };
  444. ESPStruct [nil_remove] ResubmittedWU
  445. {
  446. string WUID;
  447. string ParentWUID;
  448. };
  449. ESPStruct WUFileOption
  450. {
  451. ESPenum WUFileType FileType;
  452. string Name; //CPP, ThorLog, and EclAgentLog: required; XML: optional
  453. string IPAddress; //CPP/XML: required; ThorSlaveLog: required for legacy WU
  454. string Description; //CPP/XML: required
  455. string Process; //EclAgentLog and ThorSlaveLog: optional
  456. string LogDate; //ThorSlaveLog: required
  457. string ClusterGroup; //ThorSlaveLog: not required for legacy WU
  458. string PlainText; //XML: optional
  459. int SlaveNumber(1); //ThorSlaveLog: optional
  460. int64 SizeLimit(0);
  461. };
  462. ESPStruct [nil_remove] ScheduledWU
  463. {
  464. string Wuid;
  465. string Cluster("");
  466. string EventName("");
  467. string EventText("");
  468. string JobName("");
  469. [min_ver("1.51")] int StateID;
  470. [min_ver("1.51")] string State("");
  471. [min_ver("1.51")] string Owner("");
  472. };
  473. ESPStruct [nil_remove] ServerInfo
  474. {
  475. string Name("");
  476. string NetAddress("");
  477. };
  478. ESPStruct WULogicalFileCopyInfo
  479. {
  480. bool IsIndex;
  481. string LogicalName;
  482. string DfuCopyWuid;
  483. string DfuCopyError;
  484. ESParray<string> Clusters;
  485. };
  486. ESPStruct WUCopyLogicalClusterFileSections
  487. {
  488. string ClusterName;
  489. ESParray<ESPstruct WULogicalFileCopyInfo> OnCluster;
  490. ESParray<ESPstruct WULogicalFileCopyInfo> NotOnCluster;
  491. ESParray<ESPstruct WULogicalFileCopyInfo> Foreign;
  492. ESParray<ESPstruct WULogicalFileCopyInfo> NotFound;
  493. };
  494. ESPStruct QuerySet
  495. {
  496. string QuerySetName;
  497. };
  498. ESPStruct ClusterQueryState
  499. {
  500. string Cluster;
  501. string State;
  502. [min_ver("1.46")] string Errors;
  503. [min_ver("1.47")] bool MixedNodeStates;
  504. };
  505. ESPStruct [nil_remove] QuerySetQuery
  506. {
  507. string Id;
  508. string Name;
  509. string Wuid;
  510. string Dll;
  511. bool Suspended;
  512. ESParray<ESPstruct ClusterQueryState> Clusters;
  513. string memoryLimit;
  514. nonNegativeInteger timeLimit;
  515. nonNegativeInteger warnTimeLimit;
  516. string priority;
  517. string Comment;
  518. [min_ver("1.45")] string QuerySetId;
  519. [min_ver("1.46")] bool IsLibrary;
  520. [min_ver("1.46")] bool Activated;
  521. [min_ver("1.46")] string PublishedBy;
  522. [min_ver("1.48")] string snapshot;
  523. };
  524. ESPStruct QuerySetAlias
  525. {
  526. string Id;
  527. string Name;
  528. };
  529. ESPStruct [nil_remove] QueryUsingFile
  530. {
  531. string Id;
  532. string Package;
  533. };
  534. ESPStruct [nil_remove] TargetQueriesUsingFile
  535. {
  536. string Target;
  537. string PackageMap;
  538. ESParray<ESPstruct QueryUsingFile> Queries;
  539. };
  540. ESPStruct [nil_remove] FileUsedByQuery
  541. {
  542. string FileName;
  543. int64 FileSize;
  544. unsigned NumberOfParts;
  545. };
  546. ESPStruct QuerySuperFile
  547. {
  548. string Name;
  549. ESParray<string, File> SubFiles;
  550. [min_ver("1.57")] ESParray<ESPstruct QuerySuperFile, SuperFile> SuperFiles;
  551. };
  552. ESPstruct WUQuerySetDetail
  553. {
  554. string QuerySetName;
  555. ESParray<ESPstruct QuerySetQuery> Queries;
  556. ESParray<ESPstruct QuerySetAlias> Aliases;
  557. };
  558. ESPStruct QuerySetQueryClientState
  559. {
  560. string Suspended;
  561. };
  562. ESPStruct QuerySetQueryActionItem
  563. {
  564. string QueryId;
  565. ESPstruct QuerySetQueryClientState ClientState;
  566. };
  567. ESPStruct QuerySetQueryActionResult
  568. {
  569. string QueryId;
  570. bool Suspended;
  571. bool Success;
  572. int Code;
  573. string Message;
  574. };
  575. ESPenum QuerySetAliasActionTypes : string
  576. {
  577. Deactivate("Deactivate")
  578. };
  579. ESPStruct QuerySetAliasActionItem
  580. {
  581. string Name;
  582. };
  583. ESPStruct QuerySetAliasActionResult
  584. {
  585. string Name;
  586. bool Success;
  587. int Code;
  588. string Message;
  589. };
  590. ESPStruct DeploymentFeatures
  591. {
  592. bool UseCompression;
  593. };
  594. ESPStruct [nil_remove] WUStatisticItem
  595. {
  596. string Creator;
  597. string CreatorType;
  598. string Scope;
  599. string ScopeType;
  600. string Description;
  601. string TimeStamp;
  602. string Measure;
  603. string Kind;
  604. string Value;
  605. int64 RawValue;
  606. int64 Count;
  607. int64 Max;
  608. [min_ver("1.62")] string Wuid;
  609. };
  610. ESPStruct [nil_remove] WUArchiveFile
  611. {
  612. string Name;
  613. string Key;
  614. string SourcePath;
  615. string Path; //nested (parent) module names for this <Attribute>
  616. };
  617. ESPStruct [nil_remove] WUArchiveModule
  618. {
  619. string Name;
  620. string FullName;
  621. unsigned Flags;
  622. string Key;
  623. string Plugin;
  624. string SourcePath;
  625. string Version;
  626. string Path; //nested (parent) module names for this <Module>
  627. ESParray<ESPstruct WUArchiveModule, ArchiveModule> ArchiveModules;
  628. ESParray<ESPstruct WUArchiveFile, File> Files;
  629. };
  630. // Request related structures
  631. ESPstruct WUPropertyFilter
  632. {
  633. string Name; // Attribute Name to match
  634. // Match attribute's RawValue
  635. [optional] string ExactValue;
  636. [optional] string MinValue;
  637. [optional] string MaxValue;
  638. };
  639. // Filters that indicates which nodes are explicitly matched
  640. // Scopes can be used at the same time as Ids.
  641. // ScopeTypes cannot be used at the same time as Scopes or Ids.
  642. // PropertyFilters (attributes or statistics) is applied to all matches
  643. ESPStruct WUScopeFilter
  644. {
  645. [optional] integer MaxDepth(9999); // Maximum depth to return matches from (omitted means no limit)
  646. [optional] ESParray<string, Scope> Scopes; // Fully qualified scope (See definition of "Scope" in workunit.hpp)
  647. [optional] ESParray<string, id> Ids; // Return scope with given node id
  648. [optional] ESParray<string, ScopeType> ScopeTypes; // Return scope of a given type
  649. [optional] ESParray<ESPstruct WUPropertyFilter, PropertyFilter> PropertyFilters;
  650. };
  651. // This provides the filter which indicates which nodes are implicitly matched
  652. // Once a match is found, all nested scopes to a depth of depth are implicitly matched, provided they match the nested filter
  653. ESPStruct WUNestedFilter
  654. {
  655. [optional] unsigned Depth(9999); // How many nodes deep relative to matched scope id(s)
  656. // 0 - implies return only the given scope id
  657. // 1 - return only the immediate child of the given scope
  658. // n - return children to 'n' level deep
  659. [optional] ESParray<string, ScopeType> ScopeTypes; // Return scope of a given type
  660. };
  661. // Additional properties that are returned for a scopeType
  662. ESPStruct WUExtraProperties
  663. {
  664. string scopeType; // A type of scope e.g., activity/edge
  665. [optional] ESParray<string, Property> Properties; // a list of properties to return, omitted means none
  666. };
  667. // If measure and attributes are omitted then all matches are returned
  668. // Measure and Attributes/ScopeAttributes are mutually exclusive.
  669. // Measure set to blank or Attributes set to empty will prevent any attributes being returned.
  670. ESPStruct WUPropertiesToReturn
  671. {
  672. bool AllStatistics(false);
  673. bool AllAttributes(false);
  674. bool AllHints(false);
  675. bool AllScopes(false);
  676. bool AllProperties(false);
  677. [min_ver("1.76")] bool AllNotes(false);
  678. [optional] uint64 MinVersion; // Only return properties where the version is later than this version.
  679. [optional] string Measure; // E.g. Time, Num, Size
  680. [optional] ESParray<string, Property> Properties; // a list of properties to return
  681. [optional] ESParray<ESPstruct WUExtraProperties, Extra> ExtraProperties;
  682. };
  683. ESPStruct WUScopeOptions
  684. {
  685. bool IncludeMatchedScopesInResults(true);
  686. bool IncludeScope(true);
  687. bool IncludeId(false);
  688. bool IncludeScopeType(false);
  689. };
  690. // Controls which information is returned for the statistics
  691. ESPStruct WUPropertyOptions
  692. {
  693. bool IncludeName(true);
  694. bool IncludeRawValue(false);
  695. bool IncludeFormatted(true);
  696. bool IncludeMeasure(true);
  697. bool IncludeCreator(false);
  698. bool IncludeCreatorType(false);
  699. };
  700. // ----------------------------------------------------------------------------------
  701. // Response related structures
  702. ESPstruct [nil_remove] WUResponseProperty
  703. {
  704. [optional] string Name; // Name of attribute
  705. [optional] string RawValue; // Value of attribute
  706. [optional] string Formatted; // Formatted value of attribute
  707. [optional] string Measure; // What type is this attribute
  708. [optional] string Creator; // Which engine created it
  709. [optional] string CreatorType; // What type of engine created it.
  710. };
  711. ESPstruct [nil_remove] WUResponseNote
  712. {
  713. [optional] string Source; // Thor, Eclcc, Analyser etc
  714. [optional] string Message;
  715. [optional] nonNegativeInteger ErrorCode;
  716. [optional] string Severity;
  717. [optional] nonNegativeInteger Cost;
  718. };
  719. ESPstruct [nil_remove] WUResponseScope
  720. {
  721. [optional] string ScopeName; // Fully qualified scope (See definition of "Scope" in workunit.hpp)
  722. [optional] string Id; // Node/Graph id
  723. [optional] string ScopeType; // e.g. Activity, Edge
  724. [optional] ESParray<ESPstruct WUResponseProperty, Property> Properties;
  725. [optional, min_ver("1.76")] ESParray<ESPstruct WUResponseNote, Note> Notes;
  726. };
  727. ESPStruct WUQueryConfigResult
  728. {
  729. string QueryId;
  730. };
  731. // ----------------------------------------------------------------------------------
  732. ESPenum WUDetailsAttrValueType : string
  733. {
  734. Single("Single"),
  735. List("List"),
  736. Multi("Multi"),
  737. };
  738. ESPStruct WUDetailsMetaProperty
  739. {
  740. string Name;
  741. ESPenum WUDetailsAttrValueType ValueType;
  742. };
  743. ESPStruct WUDetailsActivityInfo
  744. {
  745. unsigned Kind;
  746. string Name;
  747. boolean IsSink;
  748. boolean IsSource;
  749. };
  750. ESPStruct [nil_remove] WUEclDefinitionActionResult
  751. {
  752. string EclDefinition;
  753. string Action;
  754. string WUID;
  755. string QueryID;
  756. string Result;
  757. };