tutorial.html 7.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171
  1. <!--
  2. This file is part of centurio.work/out/frame.
  3. centurio.work/out/frame is free software: you can redistribute it and/or modify
  4. it under the terms of the GNU General Public License as published by the Free
  5. Software Foundation, either version 3 of the License, or (at your option) any
  6. later version.
  7. centurio.work/out/frame is distributed in the hope that it will be useful, but
  8. WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  9. FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
  10. more details.
  11. You should have received a copy of the GNU General Public License along with
  12. centurio.work/out/frame (file LICENSE in the main directory). If not, see
  13. <http://www.gnu.org/licenses/>.
  14. -->
  15. <!DOCTYPE html>
  16. <html xmlns="http://www.w3.org/1999/xhtml" lang="de" xml:lang="de">
  17. <head>
  18. <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
  19. <title>Frames - Tutorial</title>
  20. <!-- libs, do not modify. When local than load local libs. -->
  21. <script type="text/javascript" src="/js_libs/jquery.min.js"></script>
  22. <script type="text/javascript" src="/js_libs/jquery.browser.js"></script>
  23. <script type="text/javascript" src="/js_libs/jquery.svg.min.js"></script>
  24. <script type="text/javascript" src="/js_libs/jquery.svgdom.min.js"></script>
  25. <script type="text/javascript" src="/js_libs/vkbeautify.js"></script>
  26. <script type="text/javascript" src="/js_libs/util.js"></script>
  27. <script type="text/javascript" src="/js_libs/printf.js"></script>
  28. <script type="text/javascript" src="/js_libs/strftime.min.js"></script>
  29. <script type="text/javascript" src="/js_libs/parsequery.js"></script>
  30. <script type="text/javascript" src="/js_libs/underscore.min.js"></script>
  31. <script type="text/javascript" src="/js_libs/jquery.caret.min.js"></script>
  32. <script type="text/javascript" src="/js_libs/jquery.cookie.js"></script>
  33. <!-- custom stuff, play arround -->
  34. <link class='custom' rel="stylesheet" href="" type="text/css"/>
  35. <script>
  36. if (location.href.match(/\/$/) == null) {
  37. location.href = location.href + '/';
  38. }
  39. </script>
  40. </head>
  41. <body is="x-ui">
  42. <div id="container">
  43. First Steps:<br>
  44. <ul>
  45. <li>define Endpoint: *adapt to your needs*</li>
  46. <ul>
  47. <li>init: https-post://centurio.work/out/frames/</li>
  48. <li>frames: https-put://centurio.work/out/frames/</li>
  49. </ul>
  50. <li>define Data Element: (url where your frame will be reached)</li>
  51. <ul>
  52. <li><a href="https://centurio.evva.com/out/frames/getConfigs">check if frame is not already in use </a></li>
  53. <li>frameID: YourFrameName</a></li>
  54. </ul>
  55. <li>Create Init Activity</li>
  56. <ul>
  57. <li>Create a new "Service Call with Script"</li>
  58. <li>Set the Endpoint to "init"</li>
  59. <li>Set your arguments e.g. width: 10, height:10, languge: de-at and some title</li>
  60. <li>Set the Prepare Code to: "endpoints.init = File.join(endpoints.init,data.frameID)" where data.frameID is the name from the variable we created before</li>
  61. </ul>
  62. <li>Create Frame Activity</li>
  63. <ul>
  64. <li>Create a new "Service Call with Script"</li>
  65. <li>Set the Endpoint to "frames"</li>
  66. <li>Set your argument Type to "Set UI and contion" (default option)
  67. <li>Set your other arguments e.g. DisplacementLeft:0, top:0, width:10, Height:10</li>
  68. <li>In Section "Form Url" click on the button "New Language"</li>
  69. <li>Define the URL that should be displayed</li>
  70. <li>Set the Prepare Code to: "endpoints.frames = File.join(endpoints.frames,data.frameID)" where data.frameID is the name from the variable we created before</li>
  71. </ul>
  72. <li>Execute your Process</li>
  73. <li>Open your frame URL (add the defined name (YourFrameName) to the url currently open in this browser Window</li>
  74. </ul>
  75. Ohter Steps:<br>
  76. <ul>
  77. <li>My new frame site process runs through once and then its done</li>
  78. <ul>
  79. <li>Use an endless loop within your proces engine</li>
  80. <li>Be aware that in case you do not wait for input at some point your loop will run a gazillion times per second!!!</li>
  81. </ul>
  82. <li>Ohhh nooo i forgot the process engine instance that drives my frames application</li>
  83. <ul>
  84. <li>In the case your site is not empty</li>
  85. <ul>
  86. <li>Inspect the site (ctrl+shift+c)</li>
  87. <li>Find one of your iframes</li>
  88. <li>Arguments "name" or "id" will give you the instance ID</li>
  89. </ul>
  90. <li>In the case your site is empty</li>
  91. <ul>
  92. <li>HAHA</li>
  93. <li>Nah its not that bad, look in your process engine and best thing to do is to use the design service next time</li>
  94. </ul>
  95. </ul>
  96. </ul>
  97. There are more Ohter Steps?<br>
  98. <ul>
  99. <li>My Frame needs to Return something to the process engine Step1</li>
  100. <ul>
  101. <li>Create a new "Service Call with Script"</li>
  102. <li>Set the Endpoint to "frames"</li>
  103. <li>Set your argument Type to "Set UI and wait for input"
  104. <li>Set your other arguments e.g. DisplacementLeft:0, top:0, width:10, Height:10</li>
  105. <li>In Section "Form Url" click on the button "New Language"</li>
  106. <li>Define the URL that should be displayed</li>
  107. <li>Set the Prepare Code to: "endpoints.frames = File.join(endpoints.frames,data.frameID)" where data.frameID is the name from the variable we created before</li>
  108. <li>Set the Finalize Code to: "data.yourDataElementName = result</li>
  109. <li>How to return data from your Frame? see Step2 (below)</li>
  110. </ul>
  111. <li>My Frame needs to Return something to the process engine Step2</li>
  112. <ul>
  113. <li>You have some fancy html site that wants to send oodles of data back to centurio</li>
  114. <li>Within your frame call the javascript function parent.sendJson(window.name,yourJsonDataHere)</li>
  115. <li>All you need to change is define "yourJsonDataHere"</li>
  116. </ul>
  117. <li>I want to delete some frames</li>
  118. <ul>
  119. <li>Create a new "Service Call with Script"</li>
  120. <li>Set the Endpoint to "frames"</li>
  121. <li>Set your argument Type to "Set UI and contion" (default option)
  122. <li>Set your other arguments e.g. DisplacementLeft:0, top:0, width:10, Height:10 to match the frames you would like to delete</li>
  123. <li>Set the Prepare Code to: "endpoints.frames = File.join(endpoints.frames,data.frameID)" where data.frameID is the name from the variable we created before</li>
  124. <li>Thats it</li>
  125. </ul>
  126. <li>Do i need to delete a frame in order to create one at that poisiton?</li>
  127. <ul>
  128. <li>Nope, when one frame overlaps one or multiple frames the overlapped ones will be deleted automatically</li>
  129. </ul>
  130. </ul>
  131. I Would like to use the Forms service:<br>
  132. <ul>
  133. <li>Will be described soon ;)</li>
  134. </ul>
  135. Data Handling:<br>
  136. <ul>
  137. <li>Will be described soon ;)</li>
  138. </ul>
  139. Other questions you could have: (note this is not other steps!)<br>
  140. <ul>
  141. <li>I want to do a circular iframe</li>
  142. <ul>
  143. <li>Why?</li>
  144. <li>You have to manage this within your html site</li>
  145. </ul>
  146. </ul>
  147. </div>
  148. </body>
  149. </html>