ws_workunits_struct.ecm 22 KB

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