Browse Source

first real commit

iman 3 years ago
parent
commit
c10bd871fd
59 changed files with 3246 additions and 0 deletions
  1. 2 0
      README.md
  2. 26 0
      archive/con%00.php
  3. 12 0
      archive/contest.php
  4. 15 0
      archive/insertArticle.php
  5. 54 0
      callbacks/04b8ea535e3fd09bc0556d3db610b079.txt
  6. 14 0
      callbacks/DTC_EVENT.txt
  7. 55 0
      callbacks/eaa4d544fd743a1de7906b5cca022ffa.txt
  8. 18 0
      forms/DTC.html
  9. 56 0
      forms/MAB.html
  10. 56 0
      forms/VORMA.html
  11. 18 0
      forms/Vorb.html
  12. 43 0
      forms/finish_production.html
  13. 24 0
      forms/form.js
  14. 23 0
      forms/get_dir.html
  15. 10 0
      forms/login.html
  16. 11 0
      forms/mab.js
  17. 43 0
      forms/machine_param.html
  18. 7 0
      forms/parentMab.html
  19. 43 0
      forms/production.html
  20. 96 0
      forms/report_problems.html
  21. 109 0
      forms/report_problems.html.save
  22. 19 0
      forms/scanData.html
  23. 31 0
      forms/scanTool.html
  24. 117 0
      forms/show_fetched_data.html
  25. 10 0
      forms/sse_events.php
  26. 4 0
      forms/start.html
  27. 24 0
      forms/startProduction.html
  28. 22 0
      forms/startRequest.html
  29. 41 0
      forms/start_production.html
  30. 87 0
      forms/tabs.html
  31. 85 0
      forms/tabsVor.html
  32. 80 0
      forms/toolList.html
  33. 152 0
      processes/archive/mainProcess.xml
  34. 174 0
      processes/mainProcess.xml
  35. 421 0
      processes/production.xml
  36. 104 0
      processes/sa_umbau.xml
  37. 132 0
      processes/umbau.xml
  38. 13 0
      services/change_location.php
  39. 33 0
      services/con%00.php
  40. 4 0
      services/config.php
  41. 15 0
      services/get_actions.php
  42. 41 0
      services/get_data.php
  43. 14 0
      services/get_parameters.php
  44. 27 0
      services/get_tool_events.php
  45. 16 0
      services/get_tool_list.php
  46. 12 0
      services/list_dir.php
  47. 585 0
      services/logs.log
  48. 3 0
      services/phpini.php
  49. 15 0
      services/redirect.php
  50. 43 0
      services/return_cpee.php
  51. 14 0
      services/save_data.php
  52. 12 0
      services/save_finish.php
  53. 20 0
      services/save_report.php
  54. 24 0
      services/save_umbau.php
  55. 27 0
      services/start_instance.php
  56. 25 0
      services/start_request.php
  57. 21 0
      services/toDTC.php
  58. 36 0
      services/tool_config.php
  59. 8 0
      test.php

+ 2 - 0
README.md

@@ -0,0 +1,2 @@
+this repo is just used as a backup for now!
+TBD

+ 26 - 0
archive/con%00.php

@@ -0,0 +1,26 @@
+<?php
+
+  ini_set('display_errors', 1);
+  error_reporting(E_ALL);
+  function StartCon(){ 
+        $db = "(DESCRIPTION =
+        (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.20.211)(PORT = 1521))
+        (CONNECT_DATA =
+          (SERVER = DEDICATED)
+          (SERVICE_NAME = ORCLCDB.localdomain)
+        ))" ;
+        $usr = 'eaton';
+        $pwd = 'eaton';
+        $conn = oci_connect ($usr, $pwd, $db);
+        if (!$conn) {
+                $m = oci_error();
+                echo $m['message'], "\n";
+                exit;
+        }
+       return $conn;
+  }
+  function CloseCon($conn){
+        oci_close($conn);
+  }
+  
+?>

+ 12 - 0
archive/contest.php

@@ -0,0 +1,12 @@
+<?php
+include 'con.php';
+$conn = StartCon();
+
+$sql = 'SELECT * FROM DTC_ACTION'; 
+$stid = oci_parse($conn, $sql);
+oci_execute($stid);
+$nrows = oci_fetch_all($stid, $res);
+echo json_encode($res);
+
+CloseCon($conn); 
+?>

+ 15 - 0
archive/insertArticle.php

@@ -0,0 +1,15 @@
+<?php
+include 'con.php';
+$conn = StartCon();
+
+$ins = oci_parse($conn, "INSERT INTO DTC_ARTICLE VALUES ('FI9457','','Gehäusedeckel','')"); 
+oci_execute($ins);
+
+
+$sql = 'SELECT * FROM DTC_ARTICLE'; 
+$stid = oci_parse($conn, $sql);
+oci_execute($stid);
+$nrows = oci_fetch_all($stid, $res);
+echo json_encode($res);
+CloseCon($conn); 
+?>

File diff suppressed because it is too large
+ 54 - 0
callbacks/04b8ea535e3fd09bc0556d3db610b079.txt


+ 14 - 0
callbacks/DTC_EVENT.txt

@@ -0,0 +1,14 @@
+[
+    {
+        "cbid": "eaa4d544fd743a1de7906b5cca022ffa",
+        "role": "MAB",
+        "task": "Report Problems",
+        "form": "report_problems.html"
+    },
+    {
+        "cbid": "04b8ea535e3fd09bc0556d3db610b079",
+        "role": "VORB",
+        "task": "Fetched Data",
+        "form": "show_fetched_data.html"
+    }
+]

+ 55 - 0
callbacks/eaa4d544fd743a1de7906b5cca022ffa.txt

@@ -0,0 +1,55 @@
+[
+    {
+        "USER": "www-data",
+        "HOME": "\/var\/www",
+        "ORACLE_HOME": "\/opt\/oracle\/instantclient_12_2",
+        "HTTP_CONTENT_LENGTH": "106",
+        "HTTP_CONTENT_TYPE": "application\/x-www-form-urlencoded",
+        "HTTP_CPEE_ATTR_THEME": "default",
+        "HTTP_CPEE_ATTR_MODELTYPE": "CPEE",
+        "HTTP_CPEE_ATTR_INFO": "Production",
+        "HTTP_CPEE_LABEL": "Report Problems",
+        "HTTP_CPEE_ACTIVITY": "a14",
+        "HTTP_CPEE_CALLBACK_ID": "eaa4d544fd743a1de7906b5cca022ffa",
+        "HTTP_CPEE_CALLBACK": "http:\/\/localhost:8298\/65\/callbacks\/eaa4d544fd743a1de7906b5cca022ffa",
+        "HTTP_CPEE_INSTANCE_UUID": "05946ac5-335e-42f2-ba74-347b42ab7417",
+        "HTTP_CPEE_INSTANCE_URL": "http:\/\/localhost:8298\/65",
+        "HTTP_CPEE_INSTANCE": "http:\/\/localhost:8298\/65",
+        "HTTP_CPEE_BASE": "http:\/\/localhost:8298",
+        "HTTP_USER_AGENT": "Typhoeus - https:\/\/github.com\/typhoeus\/typhoeus",
+        "HTTP_ACCEPT": "*\/*",
+        "HTTP_HOST": "192.168.20.133:8080",
+        "REDIRECT_STATUS": "200",
+        "SERVER_NAME": "_",
+        "SERVER_PORT": "80",
+        "SERVER_ADDR": "10.0.2.4",
+        "REMOTE_PORT": "63241",
+        "REMOTE_ADDR": "192.168.20.133",
+        "SERVER_SOFTWARE": "nginx\/1.14.0",
+        "GATEWAY_INTERFACE": "CGI\/1.1",
+        "REQUEST_SCHEME": "http",
+        "SERVER_PROTOCOL": "HTTP\/1.1",
+        "DOCUMENT_ROOT": "\/var\/www",
+        "DOCUMENT_URI": "\/PHP\/services\/get_data.php",
+        "REQUEST_URI": "\/PHP\/services\/get_data.php",
+        "SCRIPT_NAME": "\/PHP\/services\/get_data.php",
+        "CONTENT_LENGTH": "106",
+        "CONTENT_TYPE": "application\/x-www-form-urlencoded",
+        "REQUEST_METHOD": "POST",
+        "QUERY_STRING": "",
+        "SCRIPT_FILENAME": "\/var\/www\/PHP\/services\/get_data.php",
+        "PATH_INFO": "",
+        "FCGI_ROLE": "RESPONDER",
+        "PHP_SELF": "\/PHP\/services\/get_data.php",
+        "REQUEST_TIME_FLOAT": 1600100521.575236,
+        "REQUEST_TIME": 1600100521
+    },
+    {
+        "rolle": "MAB",
+        "form": "http:\/\/192.168.20.133:8080\/PHP\/forms\/report_problems.html",
+        "orderID": "AP123456789",
+        "articleID": "Y7-280945700",
+        "toolID": "P1282",
+        "machineID": "7849"
+    }
+]

+ 18 - 0
forms/DTC.html

@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8"/>
+<link rel="shortcut icon" href="#" />
+<script type="text/javascript">
+var tust = "tust";
+const queryString = window.location.search;
+const urlParams = new URLSearchParams(queryString);
+var workerID = urlParams.get('workerID');
+</script>
+</head>
+	<frameset cols="20%, *" >
+	  <frame src="tabs.html" name="topFrame" scrolling="Yes" noresize="noresize" id="topFrame" title="topFrame" />
+	  <frame src="start.html" name="mainFrame" id="mainFrame" title="mainFrame" />
+	</frameset>
+</html>
+

+ 56 - 0
forms/MAB.html

@@ -0,0 +1,56 @@
+<html>
+<style>
+ul#menu li {
+  display:inline;
+}
+
+ul {
+    display: flex;
+    align-items: stretch; /* Default */
+    justify-content: space-between;
+    width: 50%;
+    margin: 0;
+    padding: 0;
+}
+li {
+    display: block;
+    background-color: #33CCFF;
+    flex: 0 1 auto; /* Default */
+    list-style-type: none;
+}
+.but { 
+            color: black; 
+            padding: 5px 10px; 
+            text-align: center; 
+            display: inline-block; 
+            font-size: 15px; 
+            margin: 10px 40px; 
+            cursor: pointer; 
+            text-decoration:none; 
+            border-radius:10px;
+            padding: 10px 30px;
+} 
+
+li:hover {
+  background-color: #003399;
+}
+
+li:focus {
+  background-color: #003399;
+}
+ 
+</style>
+<p>DTC</p>
+ <form method="GET" action="../services/toDTC.php">
+    <input type="hidden" name="workerID" id="workerID" required>
+    <input type="hidden" name="rolle" id="rolle" value="MAB" required>
+    <input type="submit" name="act" value="Start Production">
+    <input type="submit" name="act" value="View Open Tasks">
+ </form>
+ <script type="text/javascript">
+const queryString = window.location.search;
+const urlParams = new URLSearchParams(queryString);
+const workerID = urlParams.get('workerID');
+document.getElementById("workerID").value = workerID;
+ </script>
+</html>

+ 56 - 0
forms/VORMA.html

@@ -0,0 +1,56 @@
+<html>
+<style>
+ul#menu li {
+  display:inline;
+}
+
+ul {
+    display: flex;
+    align-items: stretch; /* Default */
+    justify-content: space-between;
+    width: 50%;
+    margin: 0;
+    padding: 0;
+}
+li {
+    display: block;
+    background-color: #33CCFF;
+    flex: 0 1 auto; /* Default */
+    list-style-type: none;
+}
+.but { 
+            color: black; 
+            padding: 5px 10px; 
+            text-align: center; 
+            display: inline-block; 
+            font-size: 15px; 
+            margin: 10px 40px; 
+            cursor: pointer; 
+            text-decoration:none; 
+            border-radius:10px;
+            padding: 10px 30px;
+} 
+
+li:hover {
+  background-color: #003399;
+}
+
+li:focus {
+  background-color: #003399;
+}
+ 
+</style>
+<p>DTC</p>
+ <form method="GET" action="../services/toDTC.php">
+    <input type="text" name="workerID" id="workerID" required>
+    <input type="text" name="rolle" id="rolle" value="VORB" required>
+    <input type="submit" name="act" value="New Request">
+    <input type="submit" name="act" value="View Open Requests">
+ </form>
+ <script type="text/javascript">
+const queryString = window.location.search;
+const urlParams = new URLSearchParams(queryString);
+const workerID = urlParams.get('workerID');
+document.getElementById("workerID").value = workerID;
+ </script>
+</html>

+ 18 - 0
forms/Vorb.html

@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8"/>
+<link rel="shortcut icon" href="#" />
+<script type="text/javascript">
+var tust = "tust";
+const queryString = window.location.search;
+const urlParams = new URLSearchParams(queryString);
+var workerID = urlParams.get('workerID');
+</script>
+</head>
+	<frameset cols="25%, 75%" >
+	  <frame src="tabsVor.html" name="topFrame" scrolling="No" noresize="noresize" id="topFrame" title="topFrame" />
+	  <frame src="start.html" name="mainFrame" id="mainFrame" title="mainFrame" />
+	</frameset>
+</html>
+

+ 43 - 0
forms/finish_production.html

@@ -0,0 +1,43 @@
+<html>
+    <head>
+	<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
+    </head> 
+<style>
+table, th, td {
+  border: 1px solid black;
+  border-collapse: collapse;
+}</style>
+<p>Parameters</p>
+ <form method="GET" action="../services/return_cpee.php">
+                  <input type="text" name="id" id="cbid" required>
+                  <input type="text" name="workerID" id="workerID" required>
+                  <input type="text" name="quantity" id="quantity" required>
+                  <textarea rows="4" cols="50" name="comment" id="comment"></textarea>
+		  <input type="submit" value="Finisch Production" onclick="reloaded(rolle);">
+	    </form>
+ <div id="cont"></div>
+<script type="text/javascript" src="form.js"></script>
+<script>
+      var inhalt = "";
+       $.ajax({
+           url: '../callbacks/'+cbid+'.txt',
+           async: false,
+           success: function (data){
+              inhalt = data;
+           }
+       });  
+       inhalt = JSON.parse(inhalt);
+       var params = inhalt[1];
+       var rolle = inhalt[1]['rolle'];
+       var mytable = "<table cellpadding=\"0\" cellspacing=\"0\">";
+       mytable += "<thead><tr><th>Parameter</th><th>Value</th></tr></thead><tbody><tr>";
+       Object.keys(params).forEach(val => {
+                if (val != "form" && val != "rolle"){
+                mytable += "<td>" + val + "</td>";
+                mytable += "<td>" + params[val] + "</td></tr><tr>";}
+	});
+       mytable += "</tr></tbody></table>";
+       var elem = document.getElementById("cont");
+       elem.insertAdjacentHTML( 'beforeend', mytable );
+</script>
+</html>

+ 24 - 0
forms/form.js

@@ -0,0 +1,24 @@
+const queryString = window.location.search;
+const urlParams = new URLSearchParams(queryString);
+const cbid = urlParams.get('cbid');
+document.getElementById("cbid").value = cbid;
+const workerID = urlParams.get('workerID');
+document.getElementById("workerID").value = workerID;
+
+function reloaded(rolle) {       ////change test to reloaded with roles everywhere
+    if (rolle == "MAB"){
+          window.parent.location = "http://192.168.20.133:8080/PHP/forms/DTC.html?workerID=" + workerID;
+    } else if (rolle == "VORB") {
+          window.parent.location = "http://192.168.20.133:8080/PHP/forms/Vorb.html?workerID=" + workerID ;
+    }
+}
+
+function checkTool(toolID_or,rolle){
+       var toolID = document.getElementById('toolID').value;
+       if (toolID != toolID_or && typeof toolID_or != 'undefined' ) {
+             alert("check the tool. it should be "+ toolID_or+" !");
+       } else {reloaded(rolle);}
+}
+
+
+

+ 23 - 0
forms/get_dir.html

@@ -0,0 +1,23 @@
+<!DOCTYPE HTML>
+<html>
+<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
+      <h2> sub dirs </h2>
+      <div id="dirlist"></div>
+<script>
+var test = "";
+$.ajax({
+    url : '../services/list_dir.php', 
+    dataType : 'json',
+    async: false,
+    success : function (data) { 
+       test = data;
+    },
+})
+var a = "";
+for (var i = 0; i < test.length; i++) {
+                    a += "<li>" + test[i]+"</li>";
+             }
+document.write(a);
+</script>
+</html>
+

+ 10 - 0
forms/login.html

@@ -0,0 +1,10 @@
+<!DOCTYPE HTML>
+<html>
+      <h2> Digital Tool Card </h2>
+      <form method="POST" action="../services/redirect.php">
+          <p> Please enter your Worker ID: <p>
+          <p> LOG IN: <input type="text" name="workerID" required></p>
+          <input type="submit" value="Submit">
+      </form>
+</html>
+

+ 11 - 0
forms/mab.js

@@ -0,0 +1,11 @@
+const queryString = window.location.search;
+const urlParams = new URLSearchParams(queryString);
+const cbid = urlParams.get('cbid');
+document.getElementById("cbid").value = cbid;
+const workerID = urlParams.get('workerID');
+document.getElementById("workerID").value = workerID;
+function test(){
+      window.parent.location = "http://192.168.20.133:8080/PHP/forms/DTC.html";
+}
+
+

+ 43 - 0
forms/machine_param.html

@@ -0,0 +1,43 @@
+<html>
+    <head>
+	<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
+    </head> 
+<style>
+table, th, td {
+  border: 1px solid black;
+  border-collapse: collapse;
+}</style>
+<p>Parameters</p>
+ <form method="GET" action="../services/return_cpee.php">
+                  <input type="text" name="id" id="cbid" required>
+                  <input type="text" name="workerID" id="workerID" required>
+		  <input type="submit" value="Next" onclick="reloaded(rolle);">
+	    </form>
+ <div id="cont"></div>
+<script type="text/javascript" src="form.js"></script>
+<script>
+      var inhalt = "";
+       $.ajax({
+           url: '../callbacks/'+cbid+'.txt',
+           async: false,
+           success: function (data){
+              inhalt = data;
+           }
+       });  
+       inhalt = JSON.parse(inhalt);
+       var params = inhalt[1]['params'];
+       params = JSON.parse(params);
+       var rolle = inhalt[1]['rolle'];
+       console.log(rolle);
+       var mytable = "<table cellpadding=\"0\" cellspacing=\"0\">";
+       mytable += "<thead><tr><th>Parameter</th><th>Value</th></tr></thead><tbody><tr>";
+       Object.keys(params).forEach(val => {
+  		//console.log(val, params[val][0]);
+                mytable += "<td>" + val + "</td>";
+                mytable += "<td>" + params[val][0] + "</td></tr><tr>";
+	});
+       mytable += "</tr></tbody></table>";
+       var elem = document.getElementById("cont");
+       elem.insertAdjacentHTML( 'beforeend', mytable );
+</script>
+</html>

+ 7 - 0
forms/parentMab.html

@@ -0,0 +1,7 @@
+<html>
+	<frameset rows="10%, 90%" >
+	  <frame src="MAB.html" name="menu" scrolling="No" noresize="noresize" id="menu" title="menu" />
+	  <frame src="start.html" name="main" id="main" title="main" />
+	</frameset>
+</html>
+

+ 43 - 0
forms/production.html

@@ -0,0 +1,43 @@
+<html>
+    <head>
+	<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
+    </head> 
+<style>
+table, th, td {
+  border: 1px solid black;
+  border-collapse: collapse;
+}</style>
+<p>Production is stated.</p>
+<div id="cont"></div>
+<p>Report the problems occured during production process: </p>
+ <form method="GET" action="../services/return_cpee.php">
+                  <input type="text" name="id" id="cbid" required>
+                  <input type="text" name="workerID" id="workerID" required>
+		  <input type="submit" name="act" value="Report Problems" onclick="reloaded(rolle);">
+                  <input type="submit" name="act" value="Next" onclick="reloaded(rolle);">
+	    </form>
+<script type="text/javascript" src="form.js"></script>
+<script>
+      var inhalt = "";
+       $.ajax({
+           url: '../callbacks/'+cbid+'.txt',
+           async: false,
+           success: function (data){
+              inhalt = data;
+           }
+       });  
+       inhalt = JSON.parse(inhalt);
+       var params = inhalt[1];
+       var rolle = inhalt[1]['rolle'];
+       var mytable = "<table cellpadding=\"0\" cellspacing=\"0\">";
+       mytable += "<thead><tr><th>Parameter</th><th>Value</th></tr></thead><tbody><tr>";
+       Object.keys(params).forEach(val => {
+                if (val != "form" && val != "rolle"){
+                mytable += "<td>" + val + "</td>";
+                mytable += "<td>" + params[val] + "</td></tr><tr>";}
+	});
+       mytable += "</tr></tbody></table>";
+       var elem = document.getElementById("cont");
+       elem.insertAdjacentHTML( 'beforeend', mytable );
+</script>
+</html>

+ 96 - 0
forms/report_problems.html

@@ -0,0 +1,96 @@
+<html>
+      	<head>
+              	<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
+     <style>
+                       	table {
+                          font-family: arial, sans-serif;
+                          border-collapse: collapse;
+                          width: 100%;
+                        }
+
+                        td, th {
+                          border: 1px solid #dddddd;
+                          text-align: left;
+                          padding: 8px;
+                        }
+
+                        tr:nth-child(even) {
+                          background-color: #dddddd;
+                        }
+                button:hover { background-color: blue; }
+                button:focus { background-color: blue; }
+                </style>
+        </head>
+        <body>
+        <h2>Report Problems</h2>
+            <div id="cont"></div>
+                           <div id="actions"></div>
+                          <form method="GET" action="../services/return_cpee.php">
+                                     <input type="text" name="id" id="cbid" required>
+                                     <input type="text" name="workerID" id="workerID" required>
+                                     <br><input type="text" name="action" id="action" required></br>
+                                     <p>New Article ID: <input type="text" name="newAID" id="newAID"></p>
+                                     <p>Quantity: <input type="text" name="quantity" id="quantity"></p>
+                                     <select id="selectNumber" onchange="singleSelectChangeText()"><option>Choose tool part</option></select>
+                                     <input type="text" id="dropdown" name="toolPart" hidden>
+                                     <br><textarea rows="4" cols="50" name="comment" id="comment"></textarea></br>
+                                    <input type="submit" value="Report" onclick="reloaded(rolle);">
+                           </form>
+	    <script type="text/javascript" src="form.js"></script>
+            <script type="text/javascript">
+                var doc = "";
+                $.ajax({
+           		url: '../callbacks/'+ cbid + '.txt',
+           		async: false,
+           		success: function (data){
+                           doc = data;
+           		}
+      		 });     
+                doc = JSON.parse(doc);
+                var params = doc[1];
+                var rolle = params['rolle'];
+                var actions = params['actions'];
+                console.log(params);
+                actions = JSON.parse(actions);
+                var toolPart = actions['toolPart'];
+                toolPart = JSON.parse(toolPart);
+                var actionList = actions['actionList'];
+                actionList = JSON.parse(actionList);
+                console.log(actionList);
+       var mytable = "<table cellpadding=\"0\" cellspacing=\"0\">";
+       mytable += "<thead><tr><th>Parameter</th><th>Value</th></tr></thead><tbody><tr>";
+       Object.keys(params).forEach(val => {
+                if (val != "form" && val != "rolle" && val !="actions"){
+                mytable += "<td>" + val + "</td>";
+                mytable += "<td>" + params[val] + "</td></tr><tr>";}
+	});
+       mytable += "</tr></tbody></table>";
+       var elem = document.getElementById("cont");
+       elem.insertAdjacentHTML( 'beforeend', mytable );
+                  function singleSelectChangeText() {
+                                 var selObj = document.getElementById("selectNumber");
+                                 var selValue = selObj.options[selObj.selectedIndex].text;
+                                 document.getElementById("dropdown").value = selValue;
+                   }
+
+                           var select = document.getElementById("selectNumber");
+                           for(var i = 0; i < toolPart.length; i++) {
+                                   var opt = toolPart[i];
+                                   var el = document.createElement("option");
+                                   el.textContent = opt;
+                                   el.value = opt;
+                                   select.appendChild(el);
+                            }
+                 var myActions = "";
+                 for(var b = 0; b < actionList.length; b++) {
+                 	myActions += "<button id=\""+actionList[b]+"\" onClick=\"do_after(this.id)\">"+actionList[b]+"</button>"; 
+                 } 
+                 var act = document.getElementById("actions");
+       		 act.insertAdjacentHTML( 'beforeend', myActions );
+                 function do_after(id){
+                       document.getElementById("action").value = id;
+                 }
+        </script>
+           </body>
+</html>
+

+ 109 - 0
forms/report_problems.html.save

@@ -0,0 +1,109 @@
+<html>
+      	<head>
+              	<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
+     <style>
+                       	table {
+                          font-family: arial, sans-serif;
+                          border-collapse: collapse;
+                          width: 100%;
+                        }
+
+                        td, th {
+                          border: 1px solid #dddddd;
+                          text-align: left;
+                          padding: 8px;
+                        }
+
+                        tr:nth-child(even) {
+                          background-color: #dddddd;
+                        }
+ #umbau {
+  float:left; 
+  margin-right:40%;
+  width:140px;
+}
+#reinigung { 
+  background-color: white;
+  overflow:hidden;
+  margin:10px;
+  border:2px dashed #ccc;
+  min-height:170px;
+}
+                </style>
+        </head>
+        <body>
+        <h2>Report Problems<h2>
+                           <div>
+                               <div id="umbau">
+                                        <button id="1" onClick="do_after(this.id)">Umbau</button>
+                               </div>
+                               <div id="reinugung">
+                                        <button id="2" onClick="do_after(this.id)">Reinigung</button>
+                               </div>
+                           </div>
+                          <form method="GET" action="../services/return_cpee.php">
+                                     <input type="text" name="id" id="cbid" required>
+                                     <p>Article ID: <input type="text" name="articleID" id="articleID"></p>
+                                     <p id="afterClick"></p>
+                                    <input type="submit" value="Submit" onclick="test();">
+                           </form>
+	    <div id="cont"></div>
+	    <script type="text/javascript" src="form.js"></script>
+            <script type="text/javascript">
+                var doc = "";
+                $.ajax({
+           		url: '../callbacks/'+ cbid + '.txt',
+           		async: false,
+           		success: function (data){
+                           doc = data;
+           		}
+      		 });     
+                doc = JSON.parse(doc);
+                var params = doc[1];
+                var rolle = params['rolle'];
+                var actions = params['actions'];
+                actions = JSON.parse(actions);
+                console.log(actions);
+		
+       var mytable = "<table cellpadding=\"0\" cellspacing=\"0\">";
+       mytable += "<thead><tr><th>Parameter</th><th>Value</th></tr></thead><tbody><tr>";
+       Object.keys(params).forEach(val => {
+                if (val != "form" && val != "rolle" && val !="actions"){
+                mytable += "<td>" + val + "</td>";
+                mytable += "<td>" + params[val] + "</td></tr><tr>";}
+	});
+       mytable += "</tr></tbody></table>";
+       var elem = document.getElementById("cont");
+       elem.insertAdjacentHTML( 'beforeend', mytable );
+                var forminput = "";
+//                document.getElementById("table").innerHTML = mytable;
+//                document.getElementById("toolID").innerHTML = eventList["TOOL_ID"][0];
+//                document.getElementById("article").innerHTML = lastArticle;       
+                  function singleSelectChangeText() {
+                                 var selObj = document.getElementById("selectNumber");
+                                 var selValue = selObj.options[selObj.selectedIndex].text;
+                                 document.getElementById("dropdown").value = selValue;
+                   }
+
+                function do_after(id){
+                      if (id ==1) {                          
+                          forminput = "Article ID: ";
+                          forminput += "<input type=\"text\" name=\"articleID\" id=\"articleID\" required>";
+                          document.getElementById("afterClick").innerHTML = forminput;
+                      } else {
+                           forminput = "<select id=\"selectNumber\" onchange=\"singleSelectChangeText()\"><option>Choose tool part</option></select>";
+                           forminput += "<input type=\"text\" id=\"dropdown\" name=\"toolPart\">";
+                           document.getElementById("afterClick").innerHTML = forminput;
+                           var select = document.getElementById("selectNumber");
+                           for(var i = 0; i < toolPart.length; i++) {
+                                   var opt = toolPart[i];
+                                   var el = document.createElement("option");
+                                   el.textContent = opt;
+                                   el.value = opt;
+                                   select.appendChild(el);
+                            } 
+                      }                        
+              };         
+        </script>
+           </body>
+</html>

+ 19 - 0
forms/scanData.html

@@ -0,0 +1,19 @@
+<!DOCTYPE HTML>
+<html>
+    <head>
+	<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
+    </head> 
+    <div class="form_div">
+	<h3>Scan Data</h3>
+	    <form method="GET" action="../services/return_cpee.php">
+                  <input type="text" name="id" id="cbid" required>
+                  <input type="text" name="workerID" id="workerID" required>
+		  <p> OrderID: <input type="text" name="orderID" required></p>
+                  <p> ArticleID: <input type="text" name="articleID" required></p>
+                  <p> MachineID: <input type="text" name="machineID" required></p>
+		  <input type="submit" value="Submit" onclick="test();">
+	    </form>
+     </div>
+     <script type="text/javascript" src="mab.js"></script>	
+</html>
+

+ 31 - 0
forms/scanTool.html

@@ -0,0 +1,31 @@
+<!DOCTYPE HTML>
+<html>
+    <head>
+        <link rel="shortcut icon" href="#" />
+	<script src="http://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
+    </head> 
+    <div class="form_div">
+	<h3>Scan Data</h3>
+	    <form method="GET" action="../services/return_cpee.php">
+                  <input type="text" name="id" id="cbid" required>
+                  <input type="text" name="workerID" id="workerID" required>
+                  <p> ToolID: <input type="text" name="toolID" id="toolID" required></p>
+		  <input type="submit" value="Submit" onclick="checkTool(toolID_or,rolle);">
+	    </form>
+     </div>
+     <script type="text/javascript" src="form.js"></script>
+     <script type="text/javascript"> 
+       var inhalt = "";
+       $.ajax({
+           url: '../callbacks/'+cbid+'.txt',
+           async: false,
+           success: function (data){
+              inhalt = data;
+           }
+       });  
+       inhalt = JSON.parse(inhalt);
+       toolID_or = inhalt[1]['toolID'];
+       var rolle = inhalt[1]['rolle'];
+     </script>	
+</html>
+

+ 117 - 0
forms/show_fetched_data.html

@@ -0,0 +1,117 @@
+<html>
+      	<head>
+              	<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
+     <style>
+                       	table {
+                          font-family: arial, sans-serif;
+                          border-collapse: collapse;
+                          width: 100%;
+                        }
+
+                        td, th {
+                          border: 1px solid #dddddd;
+                          text-align: left;
+                          padding: 8px;
+                        }
+
+                        tr:nth-child(even) {
+                          background-color: #dddddd;
+                        }
+ #umbau {
+  float:left; 
+  margin-right:40%;
+  width:140px;
+}
+#reinigung { 
+  background-color: white;
+  overflow:hidden;
+  margin:10px;
+  border:2px dashed #ccc;
+  min-height:170px;
+}
+                </style>
+        </head>
+        <body>
+           <h3>The Tool History of <span id="toolID" style="color:red"></span>. Current configuration is <span id="article" style="color:red"></span></h3>
+                           <div id="table"></div>
+                           <div>
+                               <div id="umbau">
+                                        <button id="1" onClick="do_after(this.id)">Umbau</button>
+                               </div>
+                               <div id="reinugung">
+                                        <button id="2" onClick="do_after(this.id)">Reinigung</button>
+                               </div>
+                           </div>
+                          <form method="GET" action="../services/return_cpee.php">
+                                     <input type="text" name="id" id="cbid" required>
+                                     <input type="text" name="workerID" id="workerID" required>
+                                     <input type="text" name="action" id="action" required>
+                                     <p id="afterClick"></p>
+                                    <input type="submit" value="Submit" onclick="reloaded(rolle);">
+                           </form>
+	    <script type="text/javascript" src="form.js"></script>
+            <script type="text/javascript">
+                var doc = "";
+                $.ajax({
+           		url: '../callbacks/'+ cbid + '.txt',
+           		async: false,
+           		success: function (data){
+                           doc = data;
+           		}
+      		 });     
+                doc = JSON.parse(doc);
+                eventList = doc[1]["eventList"];
+                lastArticle = doc[1]["lastArticle"];
+                toolPart = doc[1]["toolPart"];
+                var rolle = doc[1]["rolle"];
+                toolPart = JSON.parse(toolPart);
+                eventList = JSON.parse(eventList);
+                count = eventList["ACTION_ID"].length;
+                var mytable = "<table cellpadding=\"0\" cellspacing=\"0\">";
+                mytable += "<thead><tr><th>Time</th><th>Article</th><th>Action</th><th>Toolpart</th><th>Request</th><th>Issue/Result</th></tr></thead><tbody><tr>";
+                for (var i = 0; i < count; i++) {
+                    mytable += "<td>" + eventList["DATE_TIME"][i] + "</td>";
+                    mytable += "<td>" + eventList["ARTICLE_ID"][i] + "</td>";
+                    mytable += "<td>" + eventList["ACTION_ID"][i] + "</td>";
+                    mytable += "<td>" + eventList["TOOLPART_ID"][i] + "</td>";
+                    mytable += "<td>" + eventList["REQUEST"][i] + "</td>";
+                    mytable += "<td>" + eventList["ISSUE_OR_RESULT_ID"][i] + "</td>";
+                    mytable += "</tr><tr>";
+                }
+                mytable += "</tr></tbody></table>";
+                //document.write(mytable);
+                var forminput = "";
+                document.getElementById("table").innerHTML = mytable;
+                document.getElementById("toolID").innerHTML = eventList["TOOL_ID"][0];
+                document.getElementById("article").innerHTML = lastArticle;       
+                           function singleSelectChangeText() {
+                                 var selObj = document.getElementById("selectNumber");
+                                 var selValue = selObj.options[selObj.selectedIndex].text;
+                                 document.getElementById("dropdown").value = selValue;
+                            }
+
+                function do_after(id){
+                      if (id ==1) {                          
+                          forminput = "Article ID: ";
+                          forminput += "<input type=\"text\" name=\"articleID\" id=\"articleID\" required>";
+                          document.getElementById("afterClick").innerHTML = forminput;
+                          document.getElementById("action").value = 1;
+                      } else {
+                           forminput = "<select id=\"selectNumber\" onchange=\"singleSelectChangeText()\"><option>Choose tool part</option></select>";
+                           forminput += "<input type=\"text\" id=\"dropdown\" name=\"toolPart\">";
+                           document.getElementById("afterClick").innerHTML = forminput;
+                           document.getElementById("action").value = 4;
+                           var select = document.getElementById("selectNumber");
+                           for(var i = 0; i < toolPart.length; i++) {
+                                   var opt = toolPart[i];
+                                   var el = document.createElement("option");
+                                   el.textContent = opt;
+                                   el.value = opt;
+                                   select.appendChild(el);
+                            } 
+                      }                        
+              };         
+        </script>
+           </body>
+</html>
+

+ 10 - 0
forms/sse_events.php

@@ -0,0 +1,10 @@
+<?php
+#header("Cache-Control: no-cache");
+#header("Content-Type: text/event-stream");
+
+#$inp = file_get_contents('../callbacks/DTC_EVENT.txt');
+#echo "data: $inp" . "\n\n";
+#flush();
+
+#sleep(300);
+

+ 4 - 0
forms/start.html

@@ -0,0 +1,4 @@
+<html>
+<p> Select one of the tasks on the left side</p>
+<html>
+

+ 24 - 0
forms/startProduction.html

@@ -0,0 +1,24 @@
+<!DOCTYPE HTML>
+<html>
+    <head>
+        <meta charset="utf-8"/>
+	<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
+    </head> 
+    <div class="form_div">
+	<h3>Start Production</h3>
+	    <form method="GET" action="../services/start_instance.php">
+                  <input type="text" name="workerID" id="workerID">
+		  <p> OrderID: <input type="text" name="orderID" required></p>
+                  <p> ArticleID: <input type="text" name="articleID" required></p>
+                  <p> MachineID: <input type="text" name="machineID" required></p>
+		  <input type="submit" value="Start" onclick="test();">
+	    </form>
+     </div>
+     <script type="text/javascript">
+           const queryString = window.location.search;
+	   const urlParams = new URLSearchParams(queryString);
+           const workerID = urlParams.get('workerID');
+           document.getElementById("workerID").value = workerID;
+     </script>	
+</html>
+

+ 22 - 0
forms/startRequest.html

@@ -0,0 +1,22 @@
+<!DOCTYPE HTML>
+<html>
+    <head>
+        <meta charset="utf-8"/>
+	<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
+    </head> 
+    <div class="form_div">
+	<h3>Enter the Tool</h3>
+	    <form method="GET" action="../services/start_request.php">
+                  <input type="text" name="workerID" id="workerID" required>
+                  <p> Tool ID: <input type="text" name="toolID" required></p>
+		  <input type="submit" value="Start" onclick="test();">
+	    </form>
+     </div>
+     <script type="text/javascript">
+           const queryString = window.location.search;
+	   const urlParams = new URLSearchParams(queryString);
+           const workerID = urlParams.get('workerID');
+           document.getElementById("workerID").value = workerID;
+     </script>	
+</html>
+

+ 41 - 0
forms/start_production.html

@@ -0,0 +1,41 @@
+<html>
+    <head>
+	<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
+    </head> 
+<style>
+table, th, td {
+  border: 1px solid black;
+  border-collapse: collapse;
+}</style>
+<p>Parameters</p>
+ <form method="GET" action="../services/return_cpee.php">
+                  <input type="text" name="id" id="cbid" required>
+                  <input type="text" name="workerID" id="workerID" required>
+		  <input type="submit" value="Start Production" onclick="reloaded(rolle);">
+	    </form>
+ <div id="cont"></div>
+<script type="text/javascript" src="form.js"></script>
+<script>
+      var inhalt = "";
+       $.ajax({
+           url: '../callbacks/'+cbid+'.txt',
+           async: false,
+           success: function (data){
+              inhalt = data;
+           }
+       });  
+       inhalt = JSON.parse(inhalt);
+       var params = inhalt[1];
+       var rolle = inhalt[1]['rolle'];
+       var mytable = "<table cellpadding=\"0\" cellspacing=\"0\">";
+       mytable += "<thead><tr><th>Parameter</th><th>Value</th></tr></thead><tbody><tr>";
+       Object.keys(params).forEach(val => {
+                if (val != "form" && val != "rolle"){
+                mytable += "<td>" + val + "</td>";
+                mytable += "<td>" + params[val] + "</td></tr><tr>";}
+	});
+       mytable += "</tr></tbody></table>";
+       var elem = document.getElementById("cont");
+       elem.insertAdjacentHTML( 'beforeend', mytable );
+</script>
+</html>

+ 87 - 0
forms/tabs.html

@@ -0,0 +1,87 @@
+<html>
+<head>
+<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
+<style>
+* {box-sizing: border-box}
+body {font-family: "Lato", sans-serif;}
+
+.tab button {
+  display: block;
+  background-color: inherit;
+  color: black;
+  padding: 22px 16px;
+  width: 100%;
+  border: none;
+  outline: none;
+  text-align: left;
+  cursor: pointer;
+  transition: 0.3s;
+  font-size: 17px;
+}
+
+.but { 
+            background-color: #33CCFF; 
+            color: black; 
+            padding: 5px 10px; 
+            text-align: center; 
+            display: inline-block; 
+            font-size: 15px; 
+            margin: 10px 40px; 
+            cursor: pointer; 
+            text-decoration:none; 
+            border-radius:10px;
+            padding: 10px 30px;
+} 
+
+a:hover {
+  background-color: #003399;
+}
+
+a:focus {
+  background-color: #003399;
+}
+</style>
+<h2>Tasks</h2>
+<div id='mylist'><div id='cont'></div></div>
+<script type="text/javascript" >
+        var linkList = "";
+        var role = "MAB"; ///read from smth
+        var elem = document.getElementById("cont");
+        $.ajax({
+           url: '../callbacks/DTC_EVENT.txt',
+           async: false,
+           success: function (data){
+              linkList = data;
+           }
+       });     
+      var workerID = window.parent.workerID;
+      linkList = JSON.parse(linkList);
+      createList(elem,linkList, role);
+/*
+//SSE
+	let eventSource = new EventSource('sse_events.php');
+	eventSource.addEventListener("message", function(event) {
+	let data = JSON.parse(event.data);
+        console.log(data);
+	var elem = document.getElementById("cont");
+	elem.parentElement.removeChild(elem); 
+	var innerDiv = document.createElement('div');
+	innerDiv.id = 'cont';
+	document.getElementById('mylist').appendChild(innerDiv);
+        createList(innerDiv,data,role);
+        });
+*/
+      function createList(elem,linkList, role){
+              var mydiv = "";
+      	      for (var i = 0; i < linkList.length; i++) {
+               if (linkList[i]['role'] == role) {
+                    var myLink = linkList[i]['form'] + "?cbid=" + linkList[i]['cbid'] + "&workerID=" + workerID;
+                    mydiv += "<li><a class=\"but\" href="+ myLink +"  target=\"mainFrame\" >" + linkList[i]['task']+ "</a></li>";
+        	}
+             }
+             elem.insertAdjacentHTML( 'beforeend', mydiv );
+      }
+</script>
+</head>
+</html>
+

+ 85 - 0
forms/tabsVor.html

@@ -0,0 +1,85 @@
+<html>
+<meta charset="utf-8"/>
+<head>
+<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
+<style>
+* {box-sizing: border-box}
+body {font-family: "Lato", sans-serif;}
+
+.tab button {
+  display: block;
+  background-color: inherit;
+  color: black;
+  padding: 22px 16px;
+  width: 100%;
+  border: none;
+  outline: none;
+  text-align: left;
+  cursor: pointer;
+  transition: 0.3s;
+  font-size: 17px;
+}
+
+.but { 
+            background-color: #33CCFF; 
+            color: black; 
+            padding: 5px 10px; 
+            text-align: center; 
+            display: inline-block; 
+            font-size: 15px; 
+            margin: 10px 40px; 
+            cursor: pointer; 
+            text-decoration:none; 
+            border-radius:10px;
+            padding: 10px 30px;
+                    
+} 
+
+a:hover{
+  background-color: #003399;
+}
+
+a:active {
+  color: #003399;
+} 
+
+</style>
+<h2>Digital Tool Card</h2>
+<script type="text/javascript">
+	var mydiv = "<div class='tab'>";
+        var linkList = "";
+        $.ajax({
+           url: '../callbacks/DTC_EVENT.txt',
+           async: false,
+           success: function (data){
+              linkList = data;
+           }
+       });     
+      linkList = JSON.parse(linkList);
+      var workerID = window.parent.workerID;
+      console.log(workerID);
+      for (var i = 0; i < linkList.length; i++) {
+               if (linkList[i]['role'] == "VORB") {     
+                    var myLink = linkList[i]['form'] + "?cbid=" + linkList[i]['cbid'] + "&workerID=" + workerID;
+                    console.log(myLink);
+		    mydiv += "<li><a class=\"but\" href="+ myLink +"  target=\"mainFrame\" >" + linkList[i]['task']+ "</a></li>";
+	}}
+      mydiv += "</div>";
+      document.write(mydiv);
+
+      function loadit( element){
+	var tabs=document.getElementById('tabs').getElementsByTagName("a");
+	for (var i=0; i < tabs.length; i++){
+            if(tabs[i].href == element.href) 
+		tabs[i].className="selected";
+	    else
+		tabs[i].className="";
+        }
+      }
+
+</script>
+
+
+</head>
+</html>
+

+ 80 - 0
forms/toolList.html

@@ -0,0 +1,80 @@
+<html>
+      	<head>
+              	<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
+                <style>
+                       	table {
+                          font-family: arial, sans-serif;
+                          border-collapse: collapse;
+                          width: 100%;
+                        }
+
+                        td, th {
+                          border: 1px solid #dddddd;
+                          text-align: left;
+                          padding: 8px;
+                        }
+
+                        tr:nth-child(even) {
+                          background-color: #dddddd;
+                        }
+                </style>
+        </head>
+        <body>
+           <h3>Select The Tool</h3>
+			  <form method="GET" action="../services/return_cpee.php">
+				    <p> Selected tool: <input type="text" name="toolID" id="toolid"></p>
+				     <input type="hidden" name="id" id="cbid" required>
+                                     <input type="text" name="workerID" id="workerID" required>
+				     <input type="submit" name="toolStatus" value="Production" onclick="reloaded(rolle);">
+                                     <input type="submit" name="toolStatus" value="Umbau" onclick="reloaded(rolle);">
+			   </form>
+            <script type="text/javascript" src="mab.js"></script>
+            <script type="text/javascript">
+                var toolList = "";
+                var doc = "";
+                $.ajax({
+           		url: '../callbacks/'+ cbid + '.txt',
+           		async: false,
+           		success: function (data){
+                           doc = data;
+           		}
+      		 });     
+                doc = JSON.parse(doc);
+                toolList = doc[1]['toolList'];
+                var rolle = doc[1]['rolle'];
+                toolList = JSON.parse(toolList);
+                events = JSON.parse(doc[1]['events']);
+                curr_state = events['lastArticles'];
+                eventList = events['dtc'];
+                var mytable = "<table cellpadding=\"0\" cellspacing=\"0\">";
+                mytable += "<thead><tr><th>ToolID</th><th>Last Configuration</th><th>Select</th></tr></thead><tbody><tr>";
+                for (var i = 0; i < toolList.length; i++) {
+                    mytable += "<td>" + toolList[i] + "</td>";
+                    mytable += "<td>" + curr_state[toolList[i]] + "</td>";
+                    mytable += "<td><input type=\'checkbox\' value = " + toolList[i] + " name=\"myCheckbox\" onclick=\"selectOnlyThis(this)\"></td>";
+                    mytable += "</tr><thead><tr><th>Time</th><th>Article</th><th>Action</th><th>Toolpart</th><th>Request</th><th>Issue/Result</th></tr></thead><tr>";
+                    for ( var a = 0; a <5; a++){
+                            mytable += "<td>" + eventList[toolList[i]]["DATE_TIME"][a] + "</td>";
+		            mytable += "<td>" + eventList[toolList[i]]["ARTICLE_ID"][a] + "</td>";
+                	    mytable += "<td>" + eventList[toolList[i]]["ACTION_ID"][a] + "</td>";
+                    	    mytable += "<td>" + eventList[toolList[i]]["TOOLPART_ID"][a] + "</td>";
+                 	    mytable += "<td>" + eventList[toolList[i]]["REQUEST"][a] + "</td>";
+               		    mytable += "<td>" + eventList[toolList[i]]["ISSUE_OR_RESULT_ID"][a] + "</td>";
+               		    mytable += "</tr><tr>";
+
+                    }
+                }
+                mytable += "</tr></tbody></table>";
+                document.write(mytable);
+                function selectOnlyThis(id){
+                  var myCheckbox = document.getElementsByName("myCheckbox");
+                  Array.prototype.forEach.call(myCheckbox,function(el){
+                        el.checked = false;
+                  });
+                  id.checked = true;
+                  document.getElementById("toolid").value = id.value;
+                }
+        </script>
+           </body>
+</html>
+

+ 152 - 0
processes/archive/mainProcess.xml

@@ -0,0 +1,152 @@
+<testset>
+  <dataelements/>
+  <handlerwrapper>DefaultHandlerWrapper</handlerwrapper>
+  <endpoints>
+    <timeout xmlns="http://riddl.org/ns/common-patterns/properties/1.0">http://gruppe.wst.univie.ac.at/~mangler/services/timeout.php</timeout>
+    <get_data xmlns="http://riddl.org/ns/common-patterns/properties/1.0">http://192.168.20.133:8080/PHP/services/get_data.php</get_data>
+    <get_tool_list xmlns="http://riddl.org/ns/common-patterns/properties/1.0">http://192.168.20.133:8080/PHP/services/get_tool_list.php</get_tool_list>
+    <tool_config xmlns="http://riddl.org/ns/common-patterns/properties/1.0">http://192.168.20.133:8080/PHP/services/tool_config.php</tool_config>
+    <start_url xmlns="http://riddl.org/ns/common-patterns/properties/1.0">http://192.168.20.133:9296/url/</start_url>
+  </endpoints>
+  <description>
+    <description xmlns="http://cpee.org/ns/description/1.0">
+      <call id="a2" endpoint="get_tool_list">
+        <parameters>
+          <label>get_tool_list</label>
+          <method>:post</method>
+          <arguments>
+            <articleID>!data.articleID</articleID>
+          </arguments>
+          <sensors/>
+        </parameters>
+        <finalize output="result">data.toolList = result["toolList"];</finalize>
+        <update output="result"/>
+        <_timing>
+          <_timing_min/>
+          <_timing_max/>
+          <_timing_avg/>
+        </_timing>
+        <_notes>
+          <_notes_general/>
+          <_notes_output/>
+          <_attachments/>
+        </_notes>
+      </call>
+      <call id="a6" endpoint="tool_config">
+        <parameters>
+          <label>get_tool_config</label>
+          <method>:post</method>
+          <arguments>
+            <toolList>!data.toolList</toolList>
+          </arguments>
+          <sensors/>
+        </parameters>
+        <finalize output="result">data.events = result</finalize>
+        <update output="result"/>
+        <_timing>
+          <_timing_min/>
+          <_timing_max/>
+          <_timing_avg/>
+        </_timing>
+        <_notes>
+          <_notes_general/>
+          <_notes_output/>
+          <_attachments/>
+        </_notes>
+      </call>
+      <call id="a3" endpoint="get_data">
+        <parameters>
+          <label>Select Tool</label>
+          <method>:post</method>
+          <arguments>
+            <toolList>!data.toolList</toolList>
+            <form>toolList.html</form>
+            <rolle>!data.rolle</rolle>
+            <events>!data.events</events>
+          </arguments>
+          <sensors/>
+        </parameters>
+        <finalize output="result">data.toolID = result["result"]["toolID"]
+data.toolStatus = result["result"]["toolStatus"]</finalize>
+        <update output="result"/>
+        <_timing>
+          <_timing_min/>
+          <_timing_max/>
+          <_timing_avg/>
+        </_timing>
+        <_notes>
+          <_notes_general/>
+          <_notes_output/>
+          <_attachments/>
+        </_notes>
+      </call>
+      <choose mode="exclusive">
+        <alternative condition="data.toolStatus == &quot;Production&quot;">
+          <_probability>
+            <_probability_min/>
+            <_probability_max/>
+            <_probability_avg/>
+          </_probability>
+          <call id="a4" endpoint="start_url">
+            <parameters>
+              <label>Production</label>
+              <method>:post</method>
+              <arguments/>
+              <sensors/>
+              <report>
+                <url/>
+              </report>
+            </parameters>
+            <finalize output="result"/>
+            <update output="result"/>
+            <_timing>
+              <_timing_min/>
+              <_timing_max/>
+              <_timing_avg/>
+            </_timing>
+            <_notes>
+              <_notes_general/>
+              <_notes_output/>
+              <_attachments/>
+            </_notes>
+          </call>
+        </alternative>
+        <otherwise>
+          <call id="a5" endpoint="start_url">
+            <parameters>
+              <label>Umbau</label>
+              <method>:post</method>
+              <arguments/>
+              <sensors/>
+              <report>
+                <url/>
+              </report>
+            </parameters>
+            <finalize output="result">data.smth = "umbau"</finalize>
+            <update output="result"/>
+            <_timing>
+              <_timing_min/>
+              <_timing_max/>
+              <_timing_avg/>
+            </_timing>
+            <_notes>
+              <_notes_general/>
+              <_notes_output/>
+              <_attachments/>
+            </_notes>
+          </call>
+        </otherwise>
+      </choose>
+    </description>
+  </description>
+  <transformation>
+    <description type="copy"/>
+    <dataelements type="none"/>
+    <endpoints type="none"/>
+  </transformation>
+  <attributes>
+    <info xmlns="http://riddl.org/ns/common-patterns/properties/1.0">Production</info>
+    <modeltype xmlns="http://riddl.org/ns/common-patterns/properties/1.0">CPEE</modeltype>
+    <theme xmlns="http://riddl.org/ns/common-patterns/properties/1.0">default</theme>
+  </attributes>
+</testset>

+ 174 - 0
processes/mainProcess.xml

@@ -0,0 +1,174 @@
+<testset>
+  <dataelements/>
+  <handlerwrapper>DefaultHandlerWrapper</handlerwrapper>
+  <endpoints>
+    <timeout xmlns="http://riddl.org/ns/common-patterns/properties/1.0">http://gruppe.wst.univie.ac.at/~mangler/services/timeout.php</timeout>
+    <get_data xmlns="http://riddl.org/ns/common-patterns/properties/1.0">http://192.168.20.133:8080/PHP/services/get_data.php</get_data>
+    <get_tool_list xmlns="http://riddl.org/ns/common-patterns/properties/1.0">http://192.168.20.133:8080/PHP/services/get_tool_list.php</get_tool_list>
+    <tool_config xmlns="http://riddl.org/ns/common-patterns/properties/1.0">http://192.168.20.133:8080/PHP/services/tool_config.php</tool_config>
+    <start_url xmlns="http://riddl.org/ns/common-patterns/properties/1.0">http://192.168.20.133:9296/url/</start_url>
+  </endpoints>
+  <description>
+    <description xmlns="http://cpee.org/ns/description/1.0">
+      <call id="a2" endpoint="get_tool_list">
+        <parameters>
+          <label>get_tool_list</label>
+          <method>:post</method>
+          <arguments>
+            <articleID>!data.articleID</articleID>
+          </arguments>
+          <sensors/>
+        </parameters>
+        <finalize output="result">data.toolList = result["toolList"];</finalize>
+        <update output="result"/>
+        <_timing>
+          <_timing_min/>
+          <_timing_max/>
+          <_timing_avg/>
+        </_timing>
+        <_notes>
+          <_notes_general/>
+          <_notes_output/>
+          <_attachments/>
+        </_notes>
+      </call>
+      <call id="a6" endpoint="tool_config">
+        <parameters>
+          <label>get_tool_config</label>
+          <method>:post</method>
+          <arguments>
+            <toolList>!data.toolList</toolList>
+          </arguments>
+          <sensors/>
+        </parameters>
+        <finalize output="result">data.events = result</finalize>
+        <update output="result"/>
+        <_timing>
+          <_timing_min/>
+          <_timing_max/>
+          <_timing_avg/>
+        </_timing>
+        <_notes>
+          <_notes_general/>
+          <_notes_output/>
+          <_attachments/>
+        </_notes>
+      </call>
+      <call id="a3" endpoint="get_data">
+        <parameters>
+          <label>Select Tool</label>
+          <method>:post</method>
+          <arguments>
+            <toolList>!data.toolList</toolList>
+            <form>toolList.html</form>
+            <rolle>!data.rolle</rolle>
+            <events>!data.events</events>
+          </arguments>
+          <sensors/>
+        </parameters>
+        <finalize output="result">data.toolID = result["result"]["toolID"]
+data.toolStatus = result["result"]["toolStatus"]</finalize>
+        <update output="result"/>
+        <_timing>
+          <_timing_min/>
+          <_timing_max/>
+          <_timing_avg/>
+        </_timing>
+        <_notes>
+          <_notes_general/>
+          <_notes_output/>
+          <_attachments/>
+        </_notes>
+      </call>
+      <choose mode="exclusive">
+        <alternative condition="data.toolStatus == &quot;Production&quot;">
+          <_probability>
+            <_probability_min/>
+            <_probability_max/>
+            <_probability_avg/>
+          </_probability>
+          <call id="a4" endpoint="start_url">
+            <parameters>
+              <label>Production</label>
+              <method>:post</method>
+              <arguments>
+                <behavior>fork_running</behavior>
+                <url>http://192.168.20.133:8080/PHP/processes/production.xml</url>
+                <init>
+                  <orderID>!data.orderID</orderID>
+                  <machineID>!data.machineID</machineID>
+                  <toolID>!data.toolID</toolID>
+                  <articleID>!data.articleID</articleID>
+                  <rolle>!data.rolle</rolle>
+                  <workerID>!data.workerID</workerID>
+                </init>
+                <endpoints/>
+                <stream/>
+              </arguments>
+              <sensors/>
+              <report>
+                <url/>
+              </report>
+            </parameters>
+            <finalize output="result"/>
+            <update output="result"/>
+            <_timing>
+              <_timing_min/>
+              <_timing_max/>
+              <_timing_avg/>
+            </_timing>
+            <_notes>
+              <_notes_general/>
+              <_notes_output/>
+              <_attachments/>
+            </_notes>
+          </call>
+        </alternative>
+        <otherwise>
+          <call id="a5" endpoint="start_url">
+            <parameters>
+              <label>Umbau</label>
+              <method>:post</method>
+              <arguments>
+                <behavior>fork_running</behavior>
+                <url>http://192.168.20.133:8080/PHP/processes/umbau.xml</url>
+                <init>
+                  <rolle>VORB</rolle>
+                  <toolID>!data.toolID</toolID>
+                </init>
+                <endpoints/>
+                <stream/>
+              </arguments>
+              <sensors/>
+              <report>
+                <url/>
+              </report>
+            </parameters>
+            <finalize output="result">data.smth = "umbau"</finalize>
+            <update output="result"/>
+            <_timing>
+              <_timing_min/>
+              <_timing_max/>
+              <_timing_avg/>
+            </_timing>
+            <_notes>
+              <_notes_general/>
+              <_notes_output/>
+              <_attachments/>
+            </_notes>
+          </call>
+        </otherwise>
+      </choose>
+    </description>
+  </description>
+  <transformation>
+    <description type="copy"/>
+    <dataelements type="none"/>
+    <endpoints type="none"/>
+  </transformation>
+  <attributes>
+    <info xmlns="http://riddl.org/ns/common-patterns/properties/1.0">MainProcess</info>
+    <modeltype xmlns="http://riddl.org/ns/common-patterns/properties/1.0">CPEE</modeltype>
+    <theme xmlns="http://riddl.org/ns/common-patterns/properties/1.0">default</theme>
+  </attributes>
+</testset>

+ 421 - 0
processes/production.xml

@@ -0,0 +1,421 @@
+<testset>
+  <dataelements/>
+  <handlerwrapper>DefaultHandlerWrapper</handlerwrapper>
+  <endpoints>
+    <timeout xmlns="http://riddl.org/ns/common-patterns/properties/1.0">http://gruppe.wst.univie.ac.at/~mangler/services/timeout.php</timeout>
+    <change_location xmlns="http://riddl.org/ns/common-patterns/properties/1.0">http://192.168.20.133:8080/PHP/services/change_location.php</change_location>
+    <get_data xmlns="http://riddl.org/ns/common-patterns/properties/1.0">http://192.168.20.133:8080/PHP/services/get_data.php</get_data>
+    <get_parameters xmlns="http://riddl.org/ns/common-patterns/properties/1.0">http://192.168.20.133:8080/PHP/services/get_parameters.php</get_parameters>
+    <save_data xmlns="http://riddl.org/ns/common-patterns/properties/1.0">http://192.168.20.133:8080/PHP/services/save_data.php</save_data>
+    <get_actions xmlns="http://riddl.org/ns/common-patterns/properties/1.0">http://192.168.20.133:8080/PHP/services/get_actions.php</get_actions>
+    <save_finish xmlns="http://riddl.org/ns/common-patterns/properties/1.0">http://192.168.20.133:8080/PHP/services/save_finish.php</save_finish>
+    <save_report xmlns="http://riddl.org/ns/common-patterns/properties/1.0">http://192.168.20.133:8080/PHP/services/save_report.php</save_report>
+  </endpoints>
+  <description>
+    <description xmlns="http://cpee.org/ns/description/1.0">
+      <call id="a1" endpoint="change_location">
+        <parameters>
+          <label>change_location</label>
+          <method>:post</method>
+          <arguments>
+            <toolID>!data.toolID</toolID>
+            <currLoc>!data.currLoc</currLoc>
+          </arguments>
+          <sensors/>
+        </parameters>
+        <finalize output="result"/>
+        <update output="result"/>
+        <_timing>
+          <_timing_min/>
+          <_timing_max/>
+          <_timing_avg/>
+        </_timing>
+        <_notes>
+          <_notes_general/>
+          <_notes_output/>
+          <_attachments/>
+        </_notes>
+      </call>
+      <call id="a3" endpoint="get_data">
+        <parameters>
+          <label>Scan the Tool</label>
+          <method>:post</method>
+          <arguments>
+            <toolID>!data.toolID</toolID>
+            <form>scanTool.html</form>
+            <rolle>!data.rolle</rolle>
+          </arguments>
+          <sensors/>
+        </parameters>
+        <finalize output="result">data.reply = result</finalize>
+        <update output="result"/>
+        <_timing>
+          <_timing_min/>
+          <_timing_max/>
+          <_timing_avg/>
+        </_timing>
+        <_notes>
+          <_notes_general/>
+          <_notes_output/>
+          <_attachments/>
+        </_notes>
+      </call>
+      <call id="a5" endpoint="get_parameters">
+        <parameters>
+          <label>get_parameters</label>
+          <method>:post</method>
+          <arguments>
+            <toolID>!data.toolID</toolID>
+          </arguments>
+          <sensors/>
+        </parameters>
+        <finalize output="result">data.params = result["params"]</finalize>
+        <update output="result"/>
+        <_timing>
+          <_timing_min/>
+          <_timing_max/>
+          <_timing_avg/>
+        </_timing>
+        <_notes>
+          <_notes_general/>
+          <_notes_output/>
+          <_attachments/>
+        </_notes>
+      </call>
+      <call id="a4" endpoint="get_data">
+        <parameters>
+          <label>Maschine Parameters</label>
+          <method>:post</method>
+          <arguments>
+            <rolle>!data.rolle</rolle>
+            <form>machine_param.html</form>
+            <params>!data.params</params>
+          </arguments>
+          <sensors/>
+        </parameters>
+        <finalize output="result">data.reply = result</finalize>
+        <update output="result"/>
+        <_timing>
+          <_timing_min/>
+          <_timing_max/>
+          <_timing_avg/>
+        </_timing>
+        <_notes>
+          <_notes_general/>
+          <_notes_output/>
+          <_attachments/>
+        </_notes>
+      </call>
+      <call id="a7" endpoint="get_data">
+        <parameters>
+          <label>Start Production</label>
+          <method>:post</method>
+          <arguments>
+            <form>start_production.html</form>
+            <orderID>!data.orderID</orderID>
+            <articleID>!data.articleID</articleID>
+            <machineID>!data.machineID</machineID>
+            <toolID>!data.toolID</toolID>
+            <rolle>!data.rolle</rolle>
+          </arguments>
+          <sensors/>
+        </parameters>
+        <finalize output="result">data.reply = result</finalize>
+        <update output="result"/>
+        <_timing>
+          <_timing_min/>
+          <_timing_max/>
+          <_timing_avg/>
+        </_timing>
+        <_notes>
+          <_notes_general/>
+          <_notes_output/>
+          <_attachments/>
+        </_notes>
+      </call>
+      <call id="a8" endpoint="save_data">
+        <parameters>
+          <label>save_data_to_db</label>
+          <method>:post</method>
+          <arguments>
+            <toolID>!data.toolID</toolID>
+            <orderID>!data.orderID</orderID>
+            <machineID>!data.machineID</machineID>
+            <articleID>!data.articleID</articleID>
+            <workerID>!data.workerID</workerID>
+            <actionID>28</actionID>
+          </arguments>
+          <sensors/>
+        </parameters>
+        <finalize output="result"/>
+        <update output="result"/>
+        <_timing>
+          <_timing_min/>
+          <_timing_max/>
+          <_timing_avg/>
+        </_timing>
+        <_notes>
+          <_notes_general/>
+          <_notes_output/>
+          <_attachments/>
+        </_notes>
+      </call>
+      <call id="a9" endpoint="get_data">
+        <parameters>
+          <label>Production</label>
+          <method>:post</method>
+          <arguments>
+            <form>production.html</form>
+            <orderID>!data.orderID</orderID>
+            <machineID>!data.machineID</machineID>
+            <articleID>!data.articleID</articleID>
+            <toolID>!data.toolID</toolID>
+            <rolle>!data.rolle</rolle>
+          </arguments>
+          <sensors/>
+        </parameters>
+        <finalize output="result">data.prodStatus = result["result"]["act"];
+data.reply = result</finalize>
+        <update output="result"/>
+        <_timing>
+          <_timing_min/>
+          <_timing_max/>
+          <_timing_avg/>
+        </_timing>
+        <_notes>
+          <_notes_general/>
+          <_notes_output/>
+          <_attachments/>
+        </_notes>
+      </call>
+      <call id="a17" endpoint="get_data">
+        <parameters>
+          <label>Scan the Tool</label>
+          <method>:post</method>
+          <arguments>
+            <toolID>!data.toolID</toolID>
+            <form>scanTool.html</form>
+            <rolle>!data.rolle</rolle>
+          </arguments>
+          <sensors/>
+          <report>
+            <url/>
+          </report>
+        </parameters>
+        <finalize output="result">data.reply = result</finalize>
+        <update output="result"/>
+        <_timing>
+          <_timing_min/>
+          <_timing_max/>
+          <_timing_avg/>
+        </_timing>
+        <_notes>
+          <_notes_general/>
+          <_notes_output/>
+          <_attachments/>
+        </_notes>
+      </call>
+      <choose mode="exclusive">
+        <alternative condition="data.prodStatus == &quot;Next&quot;">
+          <call id="a12" endpoint="get_data">
+            <parameters>
+              <label>Finish Production</label>
+              <method>:post</method>
+              <arguments>
+                <rolle>!data.rolle</rolle>
+                <form>finish_production.html</form>
+                <orderID>!data.orderID</orderID>
+                <articleID>!data.articleID</articleID>
+                <machineID>!data.machineID</machineID>
+                <toolID>!data.toolID</toolID>
+              </arguments>
+              <sensors/>
+              <report>
+                <url/>
+              </report>
+            </parameters>
+            <finalize output="result">data.reply = result;
+data.workerID = result["result"]["workerID"];
+data.quantity = result["result"]["quantity"];
+data.comment = result["result"]["comment"];</finalize>
+            <update output="result"/>
+            <_timing>
+              <_timing_min/>
+              <_timing_max/>
+              <_timing_avg/>
+            </_timing>
+            <_notes>
+              <_notes_general/>
+              <_notes_output/>
+              <_attachments/>
+            </_notes>
+          </call>
+          <call id="a13" endpoint="save_finish">
+            <parameters>
+              <label>insert into event table</label>
+              <method>:post</method>
+              <arguments>
+                <actionID>29</actionID>
+                <orderID>!data.orderID</orderID>
+                <articleID>!data.articleID</articleID>
+                <machineID>!data.machineID</machineID>
+                <toolID>!data.toolID</toolID>
+                <workerID>!data.workerID</workerID>
+                <quantity>!data.quantity</quantity>
+                <comment>!data.comment</comment>
+              </arguments>
+              <sensors/>
+              <report>
+                <url/>
+              </report>
+            </parameters>
+            <finalize output="result"/>
+            <update output="result"/>
+            <_timing>
+              <_timing_min/>
+              <_timing_max/>
+              <_timing_avg/>
+            </_timing>
+            <_notes>
+              <_notes_general/>
+              <_notes_output/>
+              <_attachments/>
+            </_notes>
+          </call>
+          <_probability>
+            <_probability_min/>
+            <_probability_max/>
+            <_probability_avg/>
+          </_probability>
+        </alternative>
+        <otherwise>
+          <call id="a2" endpoint="get_actions">
+            <parameters>
+              <label>get_actions</label>
+              <method>:post</method>
+              <arguments/>
+              <sensors/>
+              <report>
+                <url/>
+              </report>
+            </parameters>
+            <finalize output="result">data.actions = result</finalize>
+            <update output="result"/>
+            <_timing>
+              <_timing_min/>
+              <_timing_max/>
+              <_timing_avg/>
+            </_timing>
+            <_notes>
+              <_notes_general/>
+              <_notes_output/>
+              <_attachments/>
+            </_notes>
+          </call>
+          <call id="a14" endpoint="get_data">
+            <parameters>
+              <label>Report Problems</label>
+              <method>:post</method>
+              <arguments>
+                <rolle>!data.rolle</rolle>
+                <form>report_problems.html</form>
+                <orderID>!data.orderID</orderID>
+                <articleID>!data.articleID</articleID>
+                <toolID>!data.toolID</toolID>
+                <machineID>!data.machineID</machineID>
+                <actions>!data.actions</actions>
+              </arguments>
+              <sensors/>
+              <report>
+                <url/>
+              </report>
+            </parameters>
+            <finalize output="result">data.reply = result;
+data.workerID = result["result"]["workerID"];
+data.quantity = result["result"]["quantity"];
+data.comment = result["result"]["comment"];
+data.action =  result["result"]["action"];
+data.newAID = result["result"]["newAID"];
+data.toolPart =  result["result"]["toolPart"];</finalize>
+            <update output="result"/>
+            <_timing>
+              <_timing_min/>
+              <_timing_max/>
+              <_timing_avg/>
+            </_timing>
+            <_notes>
+              <_notes_general/>
+              <_notes_output/>
+              <_attachments/>
+            </_notes>
+          </call>
+          <call id="a15" endpoint="save_report">
+            <parameters>
+              <label>insert data in event table</label>
+              <method>:post</method>
+              <arguments>
+                <orderID>!data.orderID</orderID>
+                <machineID>!data.machineID</machineID>
+                <toolID>!data.toolID</toolID>
+                <comment>!data.comment</comment>
+                <quantity>!data.quantity</quantity>
+                <action>!data.action</action>
+                <workerID>!data.workerID</workerID>
+                <toolPart>!data.toolPart</toolPart>
+              </arguments>
+              <sensors/>
+              <report>
+                <url/>
+              </report>
+            </parameters>
+            <finalize output="result"/>
+            <update output="result"/>
+            <_timing>
+              <_timing_min/>
+              <_timing_max/>
+              <_timing_avg/>
+            </_timing>
+            <_notes>
+              <_notes_general/>
+              <_notes_output/>
+              <_attachments/>
+            </_notes>
+          </call>
+          <call id="a16" endpoint="">
+            <parameters>
+              <label>Sub: WZB Prozess1</label>
+              <method>:post</method>
+              <arguments/>
+              <sensors/>
+              <report>
+                <url/>
+              </report>
+            </parameters>
+            <finalize output="result"/>
+            <update output="result"/>
+            <_timing>
+              <_timing_min/>
+              <_timing_max/>
+              <_timing_avg/>
+            </_timing>
+            <_notes>
+              <_notes_general/>
+              <_notes_output/>
+              <_attachments/>
+            </_notes>
+          </call>
+        </otherwise>
+      </choose>
+    </description>
+  </description>
+  <transformation>
+    <description type="copy"/>
+    <dataelements type="none"/>
+    <endpoints type="none"/>
+  </transformation>
+  <attributes>
+    <info xmlns="http://riddl.org/ns/common-patterns/properties/1.0">Production</info>
+    <modeltype xmlns="http://riddl.org/ns/common-patterns/properties/1.0">CPEE</modeltype>
+    <theme xmlns="http://riddl.org/ns/common-patterns/properties/1.0">default</theme>
+  </attributes>
+</testset>

+ 104 - 0
processes/sa_umbau.xml

@@ -0,0 +1,104 @@
+<testset>
+  <dataelements/>
+  <handlerwrapper>DefaultHandlerWrapper</handlerwrapper>
+  <endpoints>
+    <timeout xmlns="http://riddl.org/ns/common-patterns/properties/1.0">http://gruppe.wst.univie.ac.at/~mangler/services/timeout.php</timeout>
+    <action_list xmlns="http://riddl.org/ns/common-patterns/properties/1.0">http://192.168.20.133:8080/PHP/services/get_actions.php</action_list>
+    <get_data xmlns="http://riddl.org/ns/common-patterns/properties/1.0">http://192.168.20.133:8080/PHP/services/get_data.php</get_data>
+    <get_tool_events xmlns="http://riddl.org/ns/common-patterns/properties/1.0">http://192.168.20.133:8080/PHP/services/get_tool_events.php</get_tool_events>
+    <save_umbau xmlns="http://riddl.org/ns/common-patterns/properties/1.0">http://192.168.20.133:8080/PHP/services/save_umbau.php</save_umbau>
+  </endpoints>
+  <description>
+    <description xmlns="http://cpee.org/ns/description/1.0">
+      <call id="a4" endpoint="get_tool_events">
+        <parameters>
+          <label>get data from LC_EVENT</label>
+          <method>:post</method>
+          <arguments>
+            <toolID>!data.toolID</toolID>
+          </arguments>
+          <sensors/>
+        </parameters>
+        <finalize output="result">data.eventList = result;
+data.lastArticle = result["lastArticle"];</finalize>
+        <update output="result"/>
+        <_timing>
+          <_timing_min/>
+          <_timing_max/>
+          <_timing_avg/>
+        </_timing>
+        <_notes>
+          <_notes_general/>
+          <_notes_output/>
+          <_attachments/>
+        </_notes>
+      </call>
+      <call id="a5" endpoint="get_data">
+        <parameters>
+          <label>Create Request</label>
+          <method>:post</method>
+          <arguments>
+            <eventList>!data.eventList["eventList"]</eventList>
+            <form>show_fetched_data.html</form>
+            <rolle>!data.rolle</rolle>
+            <lastArticle>!data.lastArticle</lastArticle>
+            <toolPart>!data.eventList["toolPart"]</toolPart>
+          </arguments>
+          <sensors/>
+          <report>
+            <url/>
+          </report>
+        </parameters>
+        <finalize output="result">data.response = result["result"];</finalize>
+        <update output="result"/>
+        <_timing>
+          <_timing_min/>
+          <_timing_max/>
+          <_timing_avg/>
+        </_timing>
+        <_notes>
+          <_notes_general/>
+          <_notes_output/>
+          <_attachments/>
+        </_notes>
+      </call>
+      <call id="a2" endpoint="save_umbau">
+        <parameters>
+          <label>save_data_to_db</label>
+          <method>:post</method>
+          <arguments>
+            <toolID>!data.toolID</toolID>
+            <response>!data.response</response>
+            <workerID>!data.workerID</workerID>
+          </arguments>
+          <sensors/>
+          <report>
+            <url/>
+          </report>
+        </parameters>
+        <finalize output="result"/>
+        <update output="result"/>
+        <_timing>
+          <_timing_min/>
+          <_timing_max/>
+          <_timing_avg/>
+        </_timing>
+        <_notes>
+          <_notes_general/>
+          <_notes_output/>
+          <_attachments/>
+        </_notes>
+      </call>
+    </description>
+  </description>
+  <transformation>
+    <description type="copy"/>
+    <dataelements type="none"/>
+    <endpoints type="none"/>
+  </transformation>
+  <attributes>
+    <info xmlns="http://riddl.org/ns/common-patterns/properties/1.0">WZUmbauAnfordern</info>
+    <modeltype xmlns="http://riddl.org/ns/common-patterns/properties/1.0">CPEE</modeltype>
+    <theme xmlns="http://riddl.org/ns/common-patterns/properties/1.0">default</theme>
+  </attributes>
+</testset>

+ 132 - 0
processes/umbau.xml

@@ -0,0 +1,132 @@
+<testset>
+  <dataelements>
+    <workerID xmlns="http://riddl.org/ns/common-patterns/properties/1.0">1</workerID>
+  </dataelements>
+  <handlerwrapper>DefaultHandlerWrapper</handlerwrapper>
+  <endpoints>
+    <timeout xmlns="http://riddl.org/ns/common-patterns/properties/1.0">http://gruppe.wst.univie.ac.at/~mangler/services/timeout.php</timeout>
+    <action_list xmlns="http://riddl.org/ns/common-patterns/properties/1.0">http://192.168.20.133:8080/PHP/services/get_actions.php</action_list>
+    <get_data xmlns="http://riddl.org/ns/common-patterns/properties/1.0">http://192.168.20.133:8080/PHP/services/get_data.php</get_data>
+    <get_tool_events xmlns="http://riddl.org/ns/common-patterns/properties/1.0">http://192.168.20.133:8080/PHP/services/get_tool_events.php</get_tool_events>
+    <save_umbau xmlns="http://riddl.org/ns/common-patterns/properties/1.0">http://192.168.20.133:8080/PHP/services/save_umbau.php</save_umbau>
+  </endpoints>
+  <description>
+    <description xmlns="http://cpee.org/ns/description/1.0">
+      <call id="a3" endpoint="get_data">
+        <parameters>
+          <label>Scan the Tool</label>
+          <method>:post</method>
+          <arguments>
+            <rolle>!data.rolle</rolle>
+            <form>scanTool.html</form>
+          </arguments>
+          <sensors/>
+          <report>
+            <url/>
+          </report>
+        </parameters>
+        <finalize output="result">data.toolID=result["result"]["toolID"]</finalize>
+        <update output="result"/>
+        <_timing>
+          <_timing_min/>
+          <_timing_max/>
+          <_timing_avg/>
+        </_timing>
+        <_notes>
+          <_notes_general/>
+          <_notes_output/>
+          <_attachments/>
+        </_notes>
+      </call>
+      <call id="a4" endpoint="get_tool_events">
+        <parameters>
+          <label>get data from LC_EVENT</label>
+          <method>:post</method>
+          <arguments>
+            <toolID>!data.toolID</toolID>
+          </arguments>
+          <sensors/>
+        </parameters>
+        <finalize output="result">data.eventList = result;
+data.lastArticle = result["lastArticle"];</finalize>
+        <update output="result"/>
+        <_timing>
+          <_timing_min/>
+          <_timing_max/>
+          <_timing_avg/>
+        </_timing>
+        <_notes>
+          <_notes_general/>
+          <_notes_output/>
+          <_attachments/>
+        </_notes>
+      </call>
+      <call id="a5" endpoint="get_data">
+        <parameters>
+          <label>Create Request</label>
+          <method>:post</method>
+          <arguments>
+            <eventList>!data.eventList["eventList"]</eventList>
+            <form>show_fetched_data.html</form>
+            <rolle>!data.rolle</rolle>
+            <lastArticle>!data.lastArticle</lastArticle>
+            <toolPart>!data.eventList["toolPart"]</toolPart>
+          </arguments>
+          <sensors/>
+          <report>
+            <url/>
+          </report>
+        </parameters>
+        <finalize output="result">data.response = result["result"];</finalize>
+        <update output="result"/>
+        <_timing>
+          <_timing_min/>
+          <_timing_max/>
+          <_timing_avg/>
+        </_timing>
+        <_notes>
+          <_notes_general/>
+          <_notes_output/>
+          <_attachments/>
+        </_notes>
+      </call>
+      <call id="a2" endpoint="save_umbau">
+        <parameters>
+          <label>save_data_to_db</label>
+          <method>:post</method>
+          <arguments>
+            <toolID>!data.toolID</toolID>
+            <response>!data.response</response>
+            <workerID>!data.workerID</workerID>
+          </arguments>
+          <sensors/>
+          <report>
+            <url/>
+          </report>
+        </parameters>
+        <finalize output="result"/>
+        <update output="result"/>
+        <_timing>
+          <_timing_min/>
+          <_timing_max/>
+          <_timing_avg/>
+        </_timing>
+        <_notes>
+          <_notes_general/>
+          <_notes_output/>
+          <_attachments/>
+        </_notes>
+      </call>
+    </description>
+  </description>
+  <transformation>
+    <description type="copy"/>
+    <dataelements type="none"/>
+    <endpoints type="none"/>
+  </transformation>
+  <attributes>
+    <info xmlns="http://riddl.org/ns/common-patterns/properties/1.0">WZUmbauAnfordern</info>
+    <modeltype xmlns="http://riddl.org/ns/common-patterns/properties/1.0">CPEE</modeltype>
+    <theme xmlns="http://riddl.org/ns/common-patterns/properties/1.0">default</theme>
+  </attributes>
+</testset>

+ 13 - 0
services/change_location.php

@@ -0,0 +1,13 @@
+<?php
+include 'con.php';
+//error handling
+ini_set('display_errors', 1);
+error_reporting(E_ALL);
+
+$toolID = $_POST['toolID'];
+$currLoc = $_POST['currLoc'];
+
+$sql = "UPDATE DTC_TOOL SET CURRENT_LOCATION = '{$currLoc}' WHERE TOOL_ID = '{$toolID}'"; 
+$res = sqlStm($sql);
+?>
+

+ 33 - 0
services/con%00.php

@@ -0,0 +1,33 @@
+<?php
+
+  ini_set('display_errors', 1);
+  error_reporting(E_ALL);
+  function StartCon(){ 
+        $db = "(DESCRIPTION =
+        (ADDRESS = (PROTOCOL = TCP)(HOST = 10.0.2.15)(PORT = 1521))
+        (CONNECT_DATA =
+          (SERVER = DEDICATED)
+          (SERVICE_NAME = ORCLCDB.localdomain)
+        ))" ;
+        $usr = 'eaton';
+        $pwd = 'eaton';
+        $conn = oci_connect ($usr, $pwd, $db);
+        if (!$conn) {
+                $m = oci_error();
+                echo $m['message'], "\n";
+                exit;
+        }
+       return $conn;
+  }
+  function CloseCon($conn){
+        oci_close($conn);
+  }
+  function sqlStm($sql){
+  	$conn = StartCon();
+        $stid = oci_parse($conn, $sql);
+	oci_execute($stid);
+	$nrows = oci_fetch_all($stid, $res);
+        CloseCon($conn);
+	return $res;
+  } 
+?>

+ 4 - 0
services/config.php

@@ -0,0 +1,4 @@
+<?php
+$ip = "http://192.168.20.133:8080/";
+$formLocation = $ip."PHP/forms/";
+?>

+ 15 - 0
services/get_actions.php

@@ -0,0 +1,15 @@
+<?php
+include 'con.php';
+ini_set('display_errors', 1);
+error_reporting(E_ALL);
+
+$sql = "SELECT NAME_DE FROM DTC_ACTION"; 
+$actionList = json_encode(sqlStm($sql)["NAME_DE"]);
+
+$sqlAc = "SELECT NAME_DE FROM DTC_TOOLPART"; 
+$toolPart = json_encode(sqlStm($sqlAc)["NAME_DE"]);
+
+header('Content-Type:application/json');
+echo json_encode( array("actionList" => $actionList,"toolPart"=> $toolPart));
+?>
+

+ 41 - 0
services/get_data.php

@@ -0,0 +1,41 @@
+<?php
+include 'config.php';
+date_default_timezone_set('Europe/Vienna');
+$date = date('d/m/Y h:i:s a', time());
+error_log("    ".$_SERVER['HTTP_CPEE_LABEL'], 3, 'logs.log');
+error_log($date, 3, 'logs.log');
+error_log("\r\n", 3, 'logs.log');
+	$rolle = $_POST['rolle'];
+        $form = $_POST['form'];
+	if (file_exists('../callbacks/DTC_EVENT.txt')) {
+        	$a =1;
+	} else {
+		$rolleFile = fopen("../callbacks/DTC_EVENT.txt", "w");
+		$txt = "[]";
+		fwrite($rolleFile, $txt);
+		fclose($rolleFile);
+	}
+       $filename = $_SERVER['HTTP_CPEE_CALLBACK_ID'];        
+       $task = $_SERVER['HTTP_CPEE_LABEL'];
+       $rolleArray = array('cbid'=> $filename,'role'=>$rolle, 'task'=> $task, 'form'=>$_POST['form']);
+       $inp = file_get_contents('../callbacks/DTC_EVENT.txt');
+       $tempArray = json_decode($inp);
+       array_push($tempArray, $rolleArray);
+       $data = json_encode($tempArray);
+$date = date('d/m/Y h:i:s a', time());
+error_log("save data to file", 3, 'logs.log');
+error_log($date, 3, 'logs.log');
+error_log("\r\n", 3, 'logs.log');
+       file_put_contents('../callbacks/DTC_EVENT.txt', $data);
+
+        $general = [];
+        $general[] =  $_SERVER;
+        $general[] = $_POST;
+        $general[1]["form"] = $formLocation.$form; 
+	$jsonData = json_encode($general, JSON_PRETTY_PRINT);
+	file_put_contents('../callbacks/'.$filename.'.txt', $jsonData);
+
+        header('CPEE_CALLBACK: true');
+	exit;
+?>
+

+ 14 - 0
services/get_parameters.php

@@ -0,0 +1,14 @@
+<?php
+include 'con.php';
+ini_set('display_errors', 1);
+error_reporting(E_ALL);
+
+$toolID = $_POST["toolID"];
+$sql = "SELECT * FROM DTC_SETTING_SHEET WHERE TOOL_ID = '{$toolID}'"; 
+$res = sqlStm($sql);
+$params = json_encode($res);
+//to Centurio
+header('Content-Type:application/json');
+echo json_encode( array("params" => $params));
+?>
+

+ 27 - 0
services/get_tool_events.php

@@ -0,0 +1,27 @@
+<?php
+include 'con.php';
+//error handling
+ini_set('display_errors', 1);
+error_reporting(E_ALL);
+//variables from centurio
+$toolID = $_POST["toolID"];
+//db
+$sql = "SELECT  * FROM (SELECT * FROM DTC_TOOL_LC_EVENT WHERE TOOL_ID = '{$toolID}' ORDER BY DATE_TIME DESC) WHERE ROWNUM <= 5";
+$res = sqlStm($sql);
+$article = $res["ARTICLE_ID"];
+if (!array_filter($article)) {
+    $newsql = "SELECT  * FROM (SELECT * FROM DTC_TOOL_LC_EVENT WHERE TOOL_ID = '{$toolID}' AND ARTICLE_ID IS NOT NULL ORDER BY DATE_TIME DESC ) WHERE ROWNUM <= 1";
+    $res2 = sqlStm($newsql);
+    $lastArticle = $res2["ARTICLE_ID"][0];
+} else {
+    $last = array_filter($article);
+    $lastArticle = end($last);
+}
+$eventList = json_encode($res);
+$sqlAc = "SELECT NAME_DE FROM DTC_TOOLPART"; 
+$toolPart = json_encode(sqlStm($sqlAc)["NAME_DE"]);
+//to centurio
+header('Content-Type:application/json');
+echo json_encode( array("eventList" => $eventList, "lastArticle" => $lastArticle, "toolPart" => $toolPart));
+?>
+

+ 16 - 0
services/get_tool_list.php

@@ -0,0 +1,16 @@
+<?php
+include 'con.php';
+ini_set('display_errors', 1);
+error_reporting(E_ALL);
+//centurio variables
+$article = $_POST['articleID'];
+//db
+$sql = "SELECT TOOL_ID FROM DTC_ARTICLE_TOOL WHERE ARTICLE_ID = '{$article}'";
+$res = sqlStm($sql);
+$toolList = $res["TOOL_ID"];
+$toolList = json_encode($toolList);
+//to centurio
+header('Content-Type:application/json');
+echo json_encode( array("toolList" => $toolList));
+?>
+

+ 12 - 0
services/list_dir.php

@@ -0,0 +1,12 @@
+<?php
+//error handling
+ini_set('display_errors', 1);
+error_reporting(E_ALL);
+
+$dirs = array_filter(glob('../callbacks/*'), 'is_dir');
+foreach($dirs as $dir)
+   $names[] = basename($dir);
+//print_r($names);
+echo json_encode($names);
+?>
+

+ 585 - 0
services/logs.log

@@ -0,0 +1,585 @@
+    Scan the Tool08/09/2020 11:29:20 am
+save data to file08/09/2020 11:29:20 am
+RETURN CPEE08/09/2020 11:29:28 am
+send PUT08/09/2020 11:29:28 am
+    Maschine Parameters08/09/2020 11:29:32 am
+save data to file08/09/2020 11:29:32 am
+RETURN CPEE08/09/2020 11:29:37 am
+send PUT08/09/2020 11:29:37 am
+    Start Production08/09/2020 11:29:41 am
+save data to file08/09/2020 11:29:41 am
+RETURN CPEE08/09/2020 11:34:24 am
+send PUT08/09/2020 11:34:24 am
+    Scan the Tool08/09/2020 11:42:28 am
+save data to file08/09/2020 11:42:28 am
+RETURN CPEE08/09/2020 11:42:35 am
+send PUT08/09/2020 11:42:35 am
+    Maschine Parameters08/09/2020 11:42:38 am
+save data to file08/09/2020 11:42:38 am
+RETURN CPEE08/09/2020 11:47:22 am
+send PUT08/09/2020 11:47:22 am
+RETURN CPEE08/09/2020 11:47:22 am
+send PUT08/09/2020 11:47:22 am
+RETURN CPEE08/09/2020 11:47:22 am
+send PUT08/09/2020 11:47:22 am
+    Start Production08/09/2020 11:49:20 am
+save data to file08/09/2020 11:49:20 am
+RETURN CPEE08/09/2020 11:49:25 am
+send PUT08/09/2020 11:49:25 am
+    Production08/09/2020 11:49:30 am
+save data to file08/09/2020 11:49:30 am
+RETURN CPEE08/09/2020 11:49:35 am
+send PUT08/09/2020 11:49:35 am
+    Scan the Tool08/09/2020 11:49:37 am
+save data to file08/09/2020 11:49:37 am
+RETURN CPEE08/09/2020 11:49:39 am
+send PUT08/09/2020 11:49:39 am
+RETURN CPEE08/09/2020 11:49:44 am
+send PUT08/09/2020 11:49:44 am
+    Scan the Tool08/09/2020 12:55:47 pm
+save data to file08/09/2020 12:55:47 pm
+    Scan the Tool08/09/2020 12:57:26 pm
+save data to file08/09/2020 12:57:26 pm
+    Scan the Tool08/09/2020 12:57:40 pm
+save data to file08/09/2020 12:57:40 pm
+RETURN CPEE08/09/2020 12:57:50 pm
+send PUT08/09/2020 12:57:50 pm
+    Maschine Parameters08/09/2020 12:57:50 pm
+save data to file08/09/2020 12:57:50 pm
+RETURN CPEE08/09/2020 12:58:02 pm
+send PUT08/09/2020 12:58:02 pm
+    Start Production08/09/2020 12:58:02 pm
+save data to file08/09/2020 12:58:02 pm
+RETURN CPEE08/09/2020 12:58:10 pm
+send PUT08/09/2020 12:58:10 pm
+    Production08/09/2020 12:58:10 pm
+save data to file08/09/2020 12:58:10 pm
+RETURN CPEE08/09/2020 03:44:30 pm
+send PUT08/09/2020 03:44:30 pm
+    Scan the Tool08/09/2020 03:44:30 pm
+save data to file08/09/2020 03:44:30 pm
+RETURN CPEE08/09/2020 03:44:45 pm
+send PUT08/09/2020 03:44:45 pm
+    Scan Data10/09/2020 02:22:34 pm
+save data to file10/09/2020 02:22:34 pm
+    Select Tool10/09/2020 02:28:56 pm
+save data to file10/09/2020 02:28:56 pm
+    Select Tool10/09/2020 03:02:44 pm
+save data to file10/09/2020 03:02:44 pm
+    Select Tool10/09/2020 03:09:21 pm
+save data to file10/09/2020 03:09:21 pm
+RETURN CPEE10/09/2020 03:09:44 pm
+send PUT10/09/2020 03:09:44 pm
+    Select Tool10/09/2020 03:17:05 pm
+save data to file10/09/2020 03:17:05 pm
+RETURN CPEE10/09/2020 03:17:24 pm
+send PUT10/09/2020 03:17:24 pm
+    Scan the Tool10/09/2020 04:00:42 pm
+save data to file10/09/2020 04:00:42 pm
+RETURN CPEE10/09/2020 04:00:48 pm
+send PUT10/09/2020 04:00:48 pm
+    Maschine Parameters10/09/2020 04:00:49 pm
+save data to file10/09/2020 04:00:49 pm
+RETURN CPEE10/09/2020 04:00:53 pm
+send PUT10/09/2020 04:00:53 pm
+    Start Production10/09/2020 04:00:53 pm
+save data to file10/09/2020 04:00:53 pm
+RETURN CPEE10/09/2020 04:00:58 pm
+send PUT10/09/2020 04:00:58 pm
+    Production10/09/2020 04:00:58 pm
+save data to file10/09/2020 04:00:58 pm
+RETURN CPEE10/09/2020 04:01:10 pm
+send PUT10/09/2020 04:01:10 pm
+    Scan the Tool10/09/2020 04:01:10 pm
+save data to file10/09/2020 04:01:10 pm
+RETURN CPEE10/09/2020 04:01:49 pm
+send PUT10/09/2020 04:01:49 pm
+    Report Problems10/09/2020 04:01:49 pm
+save data to file10/09/2020 04:01:49 pm
+    Production10/09/2020 04:05:37 pm
+save data to file10/09/2020 04:05:37 pm
+    Start Production10/09/2020 04:06:01 pm
+save data to file10/09/2020 04:06:01 pm
+    Scan the Tool10/09/2020 04:19:15 pm
+save data to file10/09/2020 04:19:15 pm
+RETURN CPEE10/09/2020 04:19:26 pm
+send PUT10/09/2020 04:19:26 pm
+    Maschine Parameters10/09/2020 04:19:26 pm
+save data to file10/09/2020 04:19:26 pm
+RETURN CPEE10/09/2020 04:19:38 pm
+send PUT10/09/2020 04:19:38 pm
+    Start Production10/09/2020 04:19:38 pm
+save data to file10/09/2020 04:19:38 pm
+RETURN CPEE10/09/2020 04:19:43 pm
+send PUT10/09/2020 04:19:43 pm
+    Production10/09/2020 04:19:43 pm
+save data to file10/09/2020 04:19:43 pm
+RETURN CPEE10/09/2020 04:19:50 pm
+send PUT10/09/2020 04:19:50 pm
+    Scan the Tool10/09/2020 04:19:50 pm
+save data to file10/09/2020 04:19:50 pm
+RETURN CPEE10/09/2020 04:19:57 pm
+send PUT10/09/2020 04:19:57 pm
+    Add Commments / Finish Prod10/09/2020 04:19:57 pm
+save data to file10/09/2020 04:19:57 pm
+RETURN CPEE10/09/2020 04:20:20 pm
+send PUT10/09/2020 04:20:20 pm
+    Select Tool11/09/2020 09:48:00 am
+save data to file11/09/2020 09:48:00 am
+RETURN CPEE11/09/2020 09:48:18 am
+send PUT11/09/2020 09:48:18 am
+    Select Tool11/09/2020 09:49:41 am
+save data to file11/09/2020 09:49:41 am
+RETURN CPEE11/09/2020 09:50:03 am
+send PUT11/09/2020 09:50:03 am
+    Select Tool11/09/2020 09:50:37 am
+save data to file11/09/2020 09:50:37 am
+RETURN CPEE11/09/2020 09:50:46 am
+send PUT11/09/2020 09:50:46 am
+    Select Tool11/09/2020 09:53:10 am
+save data to file11/09/2020 09:53:10 am
+RETURN CPEE11/09/2020 09:53:38 am
+send PUT11/09/2020 09:53:38 am
+    Select Tool11/09/2020 10:57:05 am
+save data to file11/09/2020 10:57:05 am
+    Select Tool11/09/2020 11:41:42 am
+save data to file11/09/2020 11:41:42 am
+RETURN CPEE11/09/2020 11:42:18 am
+send PUT11/09/2020 11:42:18 am
+    Scan the Tool11/09/2020 11:42:18 am
+save data to file11/09/2020 11:42:18 am
+RETURN CPEE11/09/2020 11:44:16 am
+send PUT11/09/2020 11:44:16 am
+    Select Tool11/09/2020 11:44:51 am
+save data to file11/09/2020 11:44:51 am
+RETURN CPEE11/09/2020 11:45:16 am
+send PUT11/09/2020 11:45:16 am
+    Scan the Tool11/09/2020 11:45:17 am
+save data to file11/09/2020 11:45:17 am
+    Select Tool11/09/2020 11:46:58 am
+save data to file11/09/2020 11:46:58 am
+RETURN CPEE11/09/2020 11:47:31 am
+send PUT11/09/2020 11:47:31 am
+    Scan the Tool11/09/2020 11:48:18 am
+save data to file11/09/2020 11:48:18 am
+    Select Tool11/09/2020 11:48:35 am
+save data to file11/09/2020 11:48:35 am
+RETURN CPEE11/09/2020 11:50:43 am
+send PUT11/09/2020 11:50:43 am
+    Select Tool11/09/2020 11:51:15 am
+save data to file11/09/2020 11:51:15 am
+RETURN CPEE11/09/2020 11:51:22 am
+send PUT11/09/2020 11:51:22 am
+    Select Tool11/09/2020 11:52:30 am
+save data to file11/09/2020 11:52:30 am
+RETURN CPEE11/09/2020 11:52:37 am
+send PUT11/09/2020 11:52:37 am
+    Select Tool11/09/2020 11:53:16 am
+save data to file11/09/2020 11:53:16 am
+RETURN CPEE11/09/2020 11:53:27 am
+send PUT11/09/2020 11:53:27 am
+    Select Tool11/09/2020 11:53:46 am
+save data to file11/09/2020 11:53:46 am
+RETURN CPEE11/09/2020 11:53:52 am
+send PUT11/09/2020 11:53:52 am
+    Select Tool11/09/2020 11:54:20 am
+save data to file11/09/2020 11:54:20 am
+RETURN CPEE11/09/2020 11:54:35 am
+send PUT11/09/2020 11:54:35 am
+    Scan the Tool11/09/2020 11:54:36 am
+save data to file11/09/2020 11:54:36 am
+RETURN CPEE11/09/2020 12:01:47 pm
+send PUT11/09/2020 12:01:47 pm
+    Fetched Data11/09/2020 12:01:47 pm
+save data to file11/09/2020 12:01:47 pm
+RETURN CPEE11/09/2020 12:01:59 pm
+send PUT11/09/2020 12:01:59 pm
+    Select Tool11/09/2020 12:02:47 pm
+save data to file11/09/2020 12:02:47 pm
+RETURN CPEE11/09/2020 12:03:10 pm
+send PUT11/09/2020 12:03:10 pm
+    Scan the Tool11/09/2020 12:13:27 pm
+save data to file11/09/2020 12:13:27 pm
+    Scan the Tool11/09/2020 12:19:12 pm
+save data to file11/09/2020 12:19:12 pm
+RETURN CPEE11/09/2020 12:44:18 pm
+send PUT11/09/2020 12:44:18 pm
+    Fetched Data11/09/2020 12:44:18 pm
+save data to file11/09/2020 12:44:18 pm
+RETURN CPEE11/09/2020 12:45:03 pm
+send PUT11/09/2020 12:45:03 pm
+    Report Problems11/09/2020 06:23:41 pm
+save data to file11/09/2020 06:23:41 pm
+    Report Problems11/09/2020 06:31:47 pm
+save data to file11/09/2020 06:31:47 pm
+    Report Problems11/09/2020 06:32:44 pm
+save data to file11/09/2020 06:32:44 pm
+    Report Problems11/09/2020 06:35:00 pm
+save data to file11/09/2020 06:35:00 pm
+    Report Problems11/09/2020 06:46:39 pm
+save data to file11/09/2020 06:46:39 pm
+    Report Problems11/09/2020 06:47:41 pm
+save data to file11/09/2020 06:47:41 pm
+    Report Problems11/09/2020 06:58:37 pm
+save data to file11/09/2020 06:58:37 pm
+    Report Problems11/09/2020 07:27:58 pm
+save data to file11/09/2020 07:27:58 pm
+    Scan the Tool11/09/2020 08:10:22 pm
+save data to file11/09/2020 08:10:22 pm
+RETURN CPEE11/09/2020 08:10:29 pm
+send PUT11/09/2020 08:10:29 pm
+    Maschine Parameters11/09/2020 08:10:33 pm
+save data to file11/09/2020 08:10:33 pm
+RETURN CPEE11/09/2020 08:10:39 pm
+send PUT11/09/2020 08:10:39 pm
+    Start Production11/09/2020 08:10:42 pm
+save data to file11/09/2020 08:10:42 pm
+RETURN CPEE11/09/2020 08:10:48 pm
+send PUT11/09/2020 08:10:48 pm
+    Production11/09/2020 08:10:58 pm
+save data to file11/09/2020 08:10:58 pm
+RETURN CPEE11/09/2020 08:11:06 pm
+send PUT11/09/2020 08:11:06 pm
+    Scan the Tool11/09/2020 08:11:09 pm
+save data to file11/09/2020 08:11:09 pm
+RETURN CPEE11/09/2020 08:11:16 pm
+send PUT11/09/2020 08:11:16 pm
+    Report Problems11/09/2020 08:11:24 pm
+save data to file11/09/2020 08:11:24 pm
+RETURN CPEE11/09/2020 08:11:43 pm
+send PUT11/09/2020 08:11:43 pm
+RETURN CPEE11/09/2020 08:15:55 pm
+send PUT11/09/2020 08:15:55 pm
+    Report Problems11/09/2020 08:17:05 pm
+save data to file11/09/2020 08:17:05 pm
+RETURN CPEE11/09/2020 08:19:40 pm
+send PUT11/09/2020 08:19:40 pm
+    Select Tool14/09/2020 11:07:23 am
+save data to file14/09/2020 11:07:23 am
+RETURN CPEE14/09/2020 11:08:36 am
+send PUT14/09/2020 11:08:36 am
+    Scan the Tool14/09/2020 11:08:36 am
+save data to file14/09/2020 11:08:36 am
+RETURN CPEE14/09/2020 11:10:20 am
+send PUT14/09/2020 11:10:20 am
+    Fetched Data14/09/2020 11:10:20 am
+save data to file14/09/2020 11:10:20 am
+RETURN CPEE14/09/2020 11:10:58 am
+send PUT14/09/2020 11:10:58 am
+    Select Tool14/09/2020 11:11:43 am
+save data to file14/09/2020 11:11:43 am
+RETURN CPEE14/09/2020 11:12:26 am
+send PUT14/09/2020 11:12:26 am
+    Scan the Tool14/09/2020 11:12:27 am
+save data to file14/09/2020 11:12:27 am
+RETURN CPEE14/09/2020 11:12:58 am
+send PUT14/09/2020 11:12:58 am
+    Maschine Parameters14/09/2020 11:12:58 am
+save data to file14/09/2020 11:12:58 am
+RETURN CPEE14/09/2020 11:13:13 am
+send PUT14/09/2020 11:13:13 am
+    Start Production14/09/2020 11:13:13 am
+save data to file14/09/2020 11:13:13 am
+RETURN CPEE14/09/2020 11:13:21 am
+send PUT14/09/2020 11:13:21 am
+    Production14/09/2020 11:13:21 am
+save data to file14/09/2020 11:13:21 am
+RETURN CPEE14/09/2020 11:13:35 am
+send PUT14/09/2020 11:13:35 am
+    Scan the Tool14/09/2020 11:13:35 am
+save data to file14/09/2020 11:13:35 am
+RETURN CPEE14/09/2020 11:13:43 am
+send PUT14/09/2020 11:13:43 am
+    Report Problems14/09/2020 11:13:43 am
+save data to file14/09/2020 11:13:43 am
+    Report Problems14/09/2020 11:15:57 am
+save data to file14/09/2020 11:15:57 am
+    Report Problems14/09/2020 11:16:56 am
+save data to file14/09/2020 11:16:56 am
+    Report Problems14/09/2020 11:17:55 am
+save data to file14/09/2020 11:17:55 am
+    Fetched Data14/09/2020 01:02:03 pm
+save data to file14/09/2020 01:02:03 pm
+RETURN CPEE14/09/2020 01:02:26 pm
+send PUT14/09/2020 01:02:26 pm
+{"result":{"id":"7d8446ba1c42b781c0b7b84dadadb9d7","articleID":"Y7-280945700"}}    Fetched Data14/09/2020 01:10:41 pm
+save data to file14/09/2020 01:10:41 pm
+RETURN CPEE14/09/2020 01:10:51 pm
+send PUT14/09/2020 01:10:51 pm
+{"result":{"id":"418d81987b786f9a543a9f3f6f432dbe","action":"1","articleID":"B13"}}    Fetched Data14/09/2020 01:12:53 pm
+save data to file14/09/2020 01:12:53 pm
+RETURN CPEE14/09/2020 01:13:00 pm
+send PUT14/09/2020 01:13:00 pm
+{"id":"cf90fcb5d99cd74b5029175c25163888","action":"1","articleID":"B12"}{"id":"cf90fcb5d99cd74b5029175c25163888","action":"1","articleID":"B12"}{"id":"cf90fcb5d99cd74b5029175c25163888","action":"1","articleID":"B12"}{"id":"cf90fcb5d99cd74b5029175c25163888","action":"1","articleID":"B12"}
+ ActionID: {"id":"cf90fcb5d99cd74b5029175c25163888","action":"1","articleID":"B12"}{"id":"cf90fcb5d99cd74b5029175c25163888","action":"1","articleID":"B12"}
+ ActionID: {{"id":"cf90fcb5d99cd74b5029175c25163888","action":"1","articleID":"B12"}{"id":"cf90fcb5d99cd74b5029175c25163888","action":"1","articleID":"B12"}
+ ActionID: {{"id":"cf90fcb5d99cd74b5029175c25163888","action":"1","articleID":"B12"}
+ ActionID: 
+ ActionID: 1
+ ActionID: Array
+ ActionID: 1    Select Tool14/09/2020 04:34:58 pm
+save data to file14/09/2020 04:34:58 pm
+    Fetched Data14/09/2020 04:36:14 pm
+save data to file14/09/2020 04:36:14 pm
+RETURN CPEE14/09/2020 04:36:42 pm
+send PUT14/09/2020 04:36:42 pm
+    Select Tool14/09/2020 04:37:20 pm
+save data to file14/09/2020 04:37:20 pm
+RETURN CPEE14/09/2020 04:37:47 pm
+send PUT14/09/2020 04:37:47 pm
+    Scan the Tool14/09/2020 04:37:47 pm
+save data to file14/09/2020 04:37:47 pm
+RETURN CPEE14/09/2020 04:38:14 pm
+send PUT14/09/2020 04:38:14 pm
+    Fetched Data14/09/2020 04:38:14 pm
+save data to file14/09/2020 04:38:14 pm
+RETURN CPEE14/09/2020 04:38:42 pm
+send PUT14/09/2020 04:38:42 pm
+    Select Tool14/09/2020 05:56:06 pm
+save data to file14/09/2020 05:56:06 pm
+    Select Tool14/09/2020 06:00:23 pm
+save data to file14/09/2020 06:00:23 pm
+RETURN CPEE14/09/2020 06:04:00 pm
+send PUT14/09/2020 06:04:00 pm
+    Scan the Tool14/09/2020 06:04:01 pm
+save data to file14/09/2020 06:04:01 pm
+RETURN CPEE14/09/2020 06:05:14 pm
+send PUT14/09/2020 06:05:14 pm
+    Scan the Tool14/09/2020 06:05:15 pm
+save data to file14/09/2020 06:05:15 pm
+RETURN CPEE14/09/2020 06:06:11 pm
+send PUT14/09/2020 06:06:11 pm
+    Maschine Parameters14/09/2020 06:06:12 pm
+save data to file14/09/2020 06:06:12 pm
+RETURN CPEE14/09/2020 06:06:16 pm
+send PUT14/09/2020 06:06:16 pm
+RETURN CPEE14/09/2020 06:06:51 pm
+send PUT14/09/2020 06:06:51 pm
+    Start Production14/09/2020 06:06:51 pm
+save data to file14/09/2020 06:06:51 pm
+RETURN CPEE14/09/2020 06:09:03 pm
+send PUT14/09/2020 06:09:03 pm
+    Production14/09/2020 06:09:04 pm
+save data to file14/09/2020 06:09:04 pm
+RETURN CPEE14/09/2020 06:09:16 pm
+send PUT14/09/2020 06:09:16 pm
+    Scan the Tool14/09/2020 06:09:16 pm
+save data to file14/09/2020 06:09:16 pm
+RETURN CPEE14/09/2020 06:10:00 pm
+send PUT14/09/2020 06:10:00 pm
+    Add Commments / Finish Prod14/09/2020 06:10:00 pm
+save data to file14/09/2020 06:10:00 pm
+RETURN CPEE14/09/2020 06:10:03 pm
+send PUT14/09/2020 06:10:03 pm
+RETURN CPEE14/09/2020 06:11:57 pm
+send PUT14/09/2020 06:11:57 pm
+    Scan the Tool14/09/2020 06:12:17 pm
+save data to file14/09/2020 06:12:17 pm
+RETURN CPEE14/09/2020 06:12:23 pm
+send PUT14/09/2020 06:12:23 pm
+    Add Commments / Finish Prod14/09/2020 06:12:29 pm
+save data to file14/09/2020 06:12:29 pm
+    Scan the Tool14/09/2020 06:12:50 pm
+save data to file14/09/2020 06:12:50 pm
+RETURN CPEE14/09/2020 06:12:56 pm
+send PUT14/09/2020 06:12:56 pm
+    Report Problems14/09/2020 06:12:56 pm
+save data to file14/09/2020 06:12:56 pm
+    Select Tool14/09/2020 06:18:53 pm
+save data to file14/09/2020 06:18:53 pm
+RETURN CPEE14/09/2020 06:19:20 pm
+send PUT14/09/2020 06:19:20 pm
+    Scan the Tool14/09/2020 06:19:21 pm
+save data to file14/09/2020 06:19:21 pm
+RETURN CPEE14/09/2020 06:19:48 pm
+send PUT14/09/2020 06:19:48 pm
+    Maschine Parameters14/09/2020 06:19:48 pm
+save data to file14/09/2020 06:19:48 pm
+RETURN CPEE14/09/2020 06:20:01 pm
+send PUT14/09/2020 06:20:01 pm
+    Start Production14/09/2020 06:20:01 pm
+save data to file14/09/2020 06:20:01 pm
+RETURN CPEE14/09/2020 06:20:05 pm
+send PUT14/09/2020 06:20:05 pm
+    Production14/09/2020 06:20:05 pm
+save data to file14/09/2020 06:20:05 pm
+RETURN CPEE14/09/2020 06:20:14 pm
+send PUT14/09/2020 06:20:14 pm
+    Scan the Tool14/09/2020 06:20:14 pm
+save data to file14/09/2020 06:20:14 pm
+RETURN CPEE14/09/2020 06:20:20 pm
+send PUT14/09/2020 06:20:20 pm
+    Finish Prod14/09/2020 06:20:20 pm
+save data to file14/09/2020 06:20:20 pm
+RETURN CPEE14/09/2020 06:20:29 pm
+send PUT14/09/2020 06:20:29 pm
+    Select Tool14/09/2020 06:21:04 pm
+save data to file14/09/2020 06:21:04 pm
+RETURN CPEE14/09/2020 06:21:21 pm
+send PUT14/09/2020 06:21:21 pm
+    Scan the Tool14/09/2020 06:21:22 pm
+save data to file14/09/2020 06:21:22 pm
+RETURN CPEE14/09/2020 06:21:34 pm
+send PUT14/09/2020 06:21:34 pm
+    Maschine Parameters14/09/2020 06:21:34 pm
+save data to file14/09/2020 06:21:34 pm
+RETURN CPEE14/09/2020 06:21:37 pm
+send PUT14/09/2020 06:21:37 pm
+RETURN CPEE14/09/2020 06:21:48 pm
+send PUT14/09/2020 06:21:48 pm
+    Start Production14/09/2020 06:21:48 pm
+save data to file14/09/2020 06:21:48 pm
+RETURN CPEE14/09/2020 06:21:50 pm
+send PUT14/09/2020 06:21:50 pm
+    Production14/09/2020 06:21:50 pm
+save data to file14/09/2020 06:21:50 pm
+RETURN CPEE14/09/2020 06:21:56 pm
+send PUT14/09/2020 06:21:56 pm
+    Scan the Tool14/09/2020 06:21:56 pm
+save data to file14/09/2020 06:21:56 pm
+RETURN CPEE14/09/2020 06:22:01 pm
+send PUT14/09/2020 06:22:01 pm
+    Report Problems14/09/2020 06:22:01 pm
+save data to file14/09/2020 06:22:01 pm
+    Select Tool14/09/2020 06:28:53 pm
+save data to file14/09/2020 06:28:53 pm
+RETURN CPEE14/09/2020 06:29:14 pm
+send PUT14/09/2020 06:29:14 pm
+    Scan the Tool14/09/2020 06:29:14 pm
+save data to file14/09/2020 06:29:14 pm
+RETURN CPEE14/09/2020 06:29:26 pm
+send PUT14/09/2020 06:29:26 pm
+    Maschine Parameters14/09/2020 06:29:26 pm
+save data to file14/09/2020 06:29:26 pm
+RETURN CPEE14/09/2020 06:29:30 pm
+send PUT14/09/2020 06:29:30 pm
+    Start Production14/09/2020 06:29:30 pm
+save data to file14/09/2020 06:29:30 pm
+RETURN CPEE14/09/2020 06:29:33 pm
+send PUT14/09/2020 06:29:33 pm
+    Production14/09/2020 06:29:33 pm
+save data to file14/09/2020 06:29:33 pm
+RETURN CPEE14/09/2020 06:29:43 pm
+send PUT14/09/2020 06:29:43 pm
+    Scan the Tool14/09/2020 06:29:43 pm
+save data to file14/09/2020 06:29:43 pm
+RETURN CPEE14/09/2020 06:29:47 pm
+send PUT14/09/2020 06:29:47 pm
+    Report Problems14/09/2020 06:29:47 pm
+save data to file14/09/2020 06:29:47 pm
+RETURN CPEE14/09/2020 06:30:11 pm
+send PUT14/09/2020 06:30:11 pm
+    Fetched Data14/09/2020 06:36:07 pm
+save data to file14/09/2020 06:36:07 pm
+    Fetched Data14/09/2020 06:37:43 pm
+save data to file14/09/2020 06:37:43 pm
+RETURN CPEE14/09/2020 06:48:30 pm
+send PUT14/09/2020 06:48:30 pm
+    Finish Prod14/09/2020 07:03:38 pm
+save data to file14/09/2020 07:03:38 pm
+RETURN CPEE14/09/2020 07:04:22 pm
+send PUT14/09/2020 07:04:22 pm
+    Finish Prod14/09/2020 07:09:19 pm
+save data to file14/09/2020 07:09:19 pm
+RETURN CPEE14/09/2020 07:09:33 pm
+send PUT14/09/2020 07:09:33 pm
+    Report Problems14/09/2020 07:10:51 pm
+save data to file14/09/2020 07:10:51 pm
+RETURN CPEE14/09/2020 07:17:09 pm
+send PUT14/09/2020 07:17:09 pm
+    Report Problems14/09/2020 07:38:28 pm
+save data to file14/09/2020 07:38:28 pm
+RETURN CPEE14/09/2020 07:39:15 pm
+send PUT14/09/2020 07:39:15 pm
+    Report Problems14/09/2020 07:40:12 pm
+save data to file14/09/2020 07:40:12 pm
+RETURN CPEE14/09/2020 07:40:39 pm
+send PUT14/09/2020 07:40:39 pm
+    Select Tool14/09/2020 07:45:14 pm
+save data to file14/09/2020 07:45:14 pm
+RETURN CPEE14/09/2020 07:45:32 pm
+send PUT14/09/2020 07:45:32 pm
+    Scan the Tool14/09/2020 07:45:33 pm
+save data to file14/09/2020 07:45:33 pm
+RETURN CPEE14/09/2020 07:45:46 pm
+send PUT14/09/2020 07:45:46 pm
+    Maschine Parameters14/09/2020 07:45:46 pm
+save data to file14/09/2020 07:45:46 pm
+RETURN CPEE14/09/2020 07:45:52 pm
+send PUT14/09/2020 07:45:52 pm
+    14/09/2020 07:45:52 pm
+save data to file14/09/2020 07:45:52 pm
+RETURN CPEE14/09/2020 07:46:08 pm
+send PUT14/09/2020 07:46:08 pm
+    Production14/09/2020 07:46:08 pm
+save data to file14/09/2020 07:46:08 pm
+RETURN CPEE14/09/2020 07:46:15 pm
+send PUT14/09/2020 07:46:15 pm
+    Scan the Tool14/09/2020 07:46:16 pm
+save data to file14/09/2020 07:46:16 pm
+RETURN CPEE14/09/2020 07:46:21 pm
+send PUT14/09/2020 07:46:21 pm
+    Report Problems14/09/2020 07:46:21 pm
+save data to file14/09/2020 07:46:21 pm
+RETURN CPEE14/09/2020 07:46:50 pm
+send PUT14/09/2020 07:46:50 pm
+    Select Tool15/09/2020 09:32:28 am
+save data to file15/09/2020 09:32:28 am
+RETURN CPEE15/09/2020 09:37:41 am
+send PUT15/09/2020 09:37:41 am
+    Scan the Tool15/09/2020 09:37:42 am
+save data to file15/09/2020 09:37:42 am
+RETURN CPEE15/09/2020 09:39:31 am
+send PUT15/09/2020 09:39:31 am
+    Maschine Parameters15/09/2020 09:39:32 am
+save data to file15/09/2020 09:39:32 am
+RETURN CPEE15/09/2020 09:44:16 am
+send PUT15/09/2020 09:44:16 am
+    Start Production15/09/2020 09:44:16 am
+save data to file15/09/2020 09:44:16 am
+RETURN CPEE15/09/2020 09:44:33 am
+send PUT15/09/2020 09:44:33 am
+    Production15/09/2020 09:44:34 am
+save data to file15/09/2020 09:44:34 am
+RETURN CPEE15/09/2020 09:48:23 am
+send PUT15/09/2020 09:48:23 am
+    Scan the Tool15/09/2020 09:48:23 am
+save data to file15/09/2020 09:48:23 am
+RETURN CPEE15/09/2020 09:48:37 am
+send PUT15/09/2020 09:48:37 am
+    Finish Production15/09/2020 09:48:37 am
+save data to file15/09/2020 09:48:37 am
+RETURN CPEE15/09/2020 09:49:07 am
+send PUT15/09/2020 09:49:07 am
+    Select Tool15/09/2020 09:53:16 am
+save data to file15/09/2020 09:53:16 am
+RETURN CPEE15/09/2020 09:53:39 am
+send PUT15/09/2020 09:53:39 am
+    Scan the Tool15/09/2020 09:53:40 am
+save data to file15/09/2020 09:53:40 am
+RETURN CPEE15/09/2020 09:53:47 am
+send PUT15/09/2020 09:53:47 am
+    Maschine Parameters15/09/2020 09:53:47 am
+save data to file15/09/2020 09:53:47 am
+RETURN CPEE15/09/2020 09:53:53 am
+send PUT15/09/2020 09:53:53 am
+    Start Production15/09/2020 09:53:53 am
+save data to file15/09/2020 09:53:53 am
+RETURN CPEE15/09/2020 09:53:57 am
+send PUT15/09/2020 09:53:57 am
+    Production15/09/2020 09:53:57 am
+save data to file15/09/2020 09:53:57 am
+RETURN CPEE15/09/2020 09:54:04 am
+send PUT15/09/2020 09:54:04 am
+    Scan the Tool15/09/2020 09:54:04 am
+save data to file15/09/2020 09:54:04 am
+RETURN CPEE15/09/2020 09:54:16 am
+send PUT15/09/2020 09:54:16 am
+    Report Problems15/09/2020 09:54:16 am
+save data to file15/09/2020 09:54:16 am
+RETURN CPEE15/09/2020 09:55:30 am
+send PUT15/09/2020 09:55:30 am
+    Create Request15/09/2020 09:57:36 am
+save data to file15/09/2020 09:57:36 am
+RETURN CPEE15/09/2020 09:58:09 am
+send PUT15/09/2020 09:58:09 am

+ 3 - 0
services/phpini.php

@@ -0,0 +1,3 @@
+<?php
+phpinfo();
+?>

+ 15 - 0
services/redirect.php

@@ -0,0 +1,15 @@
+<?php
+include 'config.php';
+include 'con.php';
+$workerID = $_POST['workerID'];
+#get the role
+$sql = "SELECT ROLE_ID FROM DTC_WORKER_ROLE WHERE WORKER_ID = '{$workerID}'";
+$rolle = sqlStm($sql)['ROLE_ID'][0];
+if ($rolle == 2) {
+header("Location: ".$ip."PHP/forms/MAB.html?workerID=".$workerID);
+} else if ($rolle == 1){
+header("Location: ".$ip."PHP/forms/VORMA.html?workerID=".$workerID);
+}
+#header("Location: http://192.168.20.211:8080/PHP/forms/DTC.html");
+?>
+

+ 43 - 0
services/return_cpee.php

@@ -0,0 +1,43 @@
+<?php
+date_default_timezone_set('Europe/Vienna');
+$date = date('d/m/Y h:i:s a', time());
+error_log("RETURN CPEE", 3, 'logs.log');
+error_log($date, 3, 'logs.log');
+error_log($_GET, 3, 'logs.log');
+error_log("\r\n", 3, 'logs.log');
+	$opts = array('http' =>
+		array(
+		'method'	=> 'PUT',
+		'header'	=> 'Content-type: application/json',
+		'content'	=> json_encode(array(
+                        "result"=>$_GET))
+		)
+	);
+        $filename ='../callbacks/'. $_GET['id'].'.txt';
+        $fContent = file_get_contents($filename);
+        $fin = json_decode($fContent,true);
+        $link = $fin[0]['HTTP_CPEE_CALLBACK'].'/';
+	$context = stream_context_create($opts);
+	$result = file_get_contents($link, false, $context);
+
+error_log("send PUT", 3, 'logs.log');
+error_log($date, 3, 'logs.log');
+error_log("\r\n", 3, 'logs.log');
+
+        print_r($result);
+        # delete file
+        unlink($filename);
+        # delete item in DTC list (in db bool marker 0 or 1)
+       $data = file_get_contents('../callbacks/DTC_EVENT.txt');
+       $dtc = json_decode($data, true);
+       foreach ($dtc as $key => $value) {
+    	  if (in_array($_GET['id'], $value)) {
+             unset($dtc[$key]);
+          }
+        }
+	$dtc = json_encode(array_values($dtc), JSON_PRETTY_PRINT);
+        file_put_contents('../callbacks/DTC_EVENT.txt', $dtc); 
+        header("Location: http://192.168.20.133:8080/PHP/forms/start.html"); 
+	exit;
+?>
+

+ 14 - 0
services/save_data.php

@@ -0,0 +1,14 @@
+<?php
+include 'con.php';
+//error handling
+ini_set('display_errors', 1);
+error_reporting(E_ALL);
+
+
+
+$curr_time = date("d.m.Y h:i:s");
+$sql = "INSERT INTO DTC_TOOL_LC_EVENT (TLC_EVENT_ID,DATE_TIME,TOOL_ID,ACTION_ID,ARTICLE_ID,WORKER_ID,PRODUCTION_ORDER_ID,MACHINE_ID) VALUES (LCSEQ.NEXTVAL,TO_TIMESTAMP('{$curr_time}','DD.MM.YYYY HH:MI:SS'),'{$_POST['toolID']}','{$_POST['actionID']}','{$_POST['articleID']}','{$_POST['workerID']}','{$_POST['orderID']}','{$_POST['machineID']}')"; 
+$res = sqlStm($sql);
+
+?>
+

+ 12 - 0
services/save_finish.php

@@ -0,0 +1,12 @@
+<?php
+include 'con.php';
+//error handling
+ini_set('display_errors', 1);
+error_reporting(E_ALL);
+
+$curr_time = date("d.m.Y h:i:s");
+$sql = "INSERT INTO DTC_TOOL_LC_EVENT (TLC_EVENT_ID,DATE_TIME,TOOL_ID,ACTION_ID,ARTICLE_ID,WORKER_ID,PRODUCTION_ORDER_ID,MACHINE_ID,COMMENTS,PRODUCED_QUANTITY) VALUES (LCSEQ.NEXTVAL,TO_TIMESTAMP('{$curr_time}','DD.MM.YYYY HH:MI:SS'),'{$_POST['toolID']}','{$_POST['actionID']}','{$_POST['articleID']}','{$_POST['workerID']}','{$_POST['orderID']}','{$_POST['machineID']}','{$_POST['comment']}','{$_POST['quantity']}')"; 
+$res = sqlStm($sql);
+
+?>
+

+ 20 - 0
services/save_report.php

@@ -0,0 +1,20 @@
+<?php
+include 'con.php';
+//error handling
+ini_set('display_errors', 1);
+error_reporting(E_ALL);
+
+$action = $_POST['action'];
+$sql1 = "SELECT ACTION_ID FROM DTC_ACTION WHERE NAME_DE = '{$action}'";
+$actionID = sqlStm($sql1)['ACTION_ID'][0];
+$toolPart = $_POST['toolPart'];
+$sql2 = "SELECT TOOLPART_ID FROM DTC_TOOLPART WHERE NAME_DE = '{$toolPart}'";
+$toolPartID = sqlStm($sql2)['TOOLPART_ID'][0];
+$request = 1;
+
+$curr_time = date("d.m.Y h:i:s");
+$sql = "INSERT INTO DTC_TOOL_LC_EVENT (TLC_EVENT_ID,DATE_TIME,TOOL_ID,ACTION_ID,ARTICLE_ID,WORKER_ID,PRODUCTION_ORDER_ID,MACHINE_ID,COMMENTS,PRODUCED_QUANTITY,TOOLPART_ID,REQUEST) VALUES (LCSEQ.NEXTVAL,TO_TIMESTAMP('{$curr_time}','DD.MM.YYYY HH:MI:SS'),'{$_POST['toolID']}','{$actionID}','{$_POST['articleID']}','{$_POST['workerID']}','{$_POST['orderID']}','{$_POST['machineID']}','{$_POST['comment']}','{$_POST['quantity']}','{$toolPartID}','{$request}')"; 
+$res = sqlStm($sql);
+
+?>
+

+ 24 - 0
services/save_umbau.php

@@ -0,0 +1,24 @@
+<?php
+include 'con.php';
+//error handling
+ini_set('display_errors', 1);
+error_reporting(E_ALL);
+
+$curr_time = date("d.m.Y h:i:s");
+$request = 1;
+$toolID = $_POST['toolID'];
+$workerID = $_POST['workerID'];
+$response = $_POST['response'];
+$response = json_decode($response,true);
+$actionID = (int)$response['action'];
+if ($actionID == 1){ //umbau
+$articleID = $response['articleID'];
+$sql = "INSERT INTO DTC_TOOL_LC_EVENT (TLC_EVENT_ID,DATE_TIME,TOOL_ID,ACTION_ID,ARTICLE_ID,WORKER_ID,REQUEST) VALUES (LCSEQ.NEXTVAL,TO_TIMESTAMP('{$curr_time}','DD.MM.YYYY HH:MI:SS'),'{$toolID}','{$actionID}','{$articleID}', '{$workerID}','{$request}')";
+} else {
+$toolPart = $response['toolPart'];
+$sql = "INSERT INTO DTC_TOOL_LC_EVENT (TLC_EVENT_ID,DATE_TIME,TOOL_ID,ACTION_ID,TOOLPART_ID,WORKER_ID,REQUEST) VALUES (LCSEQ.NEXTVAL,TO_TIMESTAMP('{$curr_time}','DD.MM.YYYY HH:MI:SS'),'{$toolID}','{$actionID}','{$toolPart}', '{$workerID}','{$request}')";
+}
+$res = sqlStm($sql);
+
+?>
+

+ 27 - 0
services/start_instance.php

@@ -0,0 +1,27 @@
+<?php
+include 'config.php';
+ini_set('display_errors', 1);
+error_reporting(E_ALL);
+
+$orderID = $_GET['orderID'];
+$machineID = $_GET['machineID'];
+$articleID = $_GET['articleID'];
+$workerID = $_GET['workerID'];
+
+$ch = curl_init();
+curl_setopt($ch, CURLOPT_URL, 'http://localhost:9296/url');
+curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
+curl_setopt($ch, CURLOPT_POST, 1);
+curl_setopt($ch, CURLOPT_POSTFIELDS, 'info=MainProcess&behavior=fork_running&url=http://192.168.20.133:8080/PHP/processes/mainProcess.xml&init={"orderID":"'.$orderID.'","machineID":"'.$machineID.'","articleID":"'.$articleID.'","rolle":"MAB","workerID":"'.$workerID.'"}');
+
+$headers = array();
+$headers[] = 'Content-Type: application/x-www-form-urlencoded';
+curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
+
+$result = curl_exec($ch);
+if (curl_errno($ch)) {
+    echo 'Error:' . curl_error($ch);
+}
+curl_close($ch);
+header("Location: ".$formLocation."DTC.html?workerID=".$workerID);
+?>

+ 25 - 0
services/start_request.php

@@ -0,0 +1,25 @@
+<?php
+include 'config.php';
+ini_set('display_errors', 1);
+error_reporting(E_ALL);
+
+$toolID = $_GET['toolID'];
+$workerID = $_GET['workerID'];
+
+$ch = curl_init();
+curl_setopt($ch, CURLOPT_URL, 'http://localhost:9296/url');
+curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
+curl_setopt($ch, CURLOPT_POST, 1);
+curl_setopt($ch, CURLOPT_POSTFIELDS, 'info=UmbauRequest&behavior=fork_running&url=http://192.168.20.133:8080/PHP/processes/sa_umbau.xml&init={"toolID":"'.$toolID.'","rolle":"VORB","workerID":"'.$workerID.'"}');
+
+$headers = array();
+$headers[] = 'Content-Type: application/x-www-form-urlencoded';
+curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
+
+$result = curl_exec($ch);
+if (curl_errno($ch)) {
+    echo 'Error:' . curl_error($ch);
+}
+curl_close($ch);
+header("Location: ".$formLocation."Vorb.html?workerID=".$workerID);
+?>

+ 21 - 0
services/toDTC.php

@@ -0,0 +1,21 @@
+<?php
+include 'config.php';
+$rolle = $_GET['rolle'];
+$workerID = $_GET['workerID'];
+$act = $_GET['act'];
+if ($rolle == "MAB"){
+	if ($act == "View Open Tasks")	{
+        header("Location: ".$formLocation."DTC.html?workerID=".$workerID);
+	} else {
+	header("Location: ".$formLocation."startProduction.html?workerID=".$workerID);
+	}
+} else if ($rolle == "VORB"){
+       if ($act == "New Request") {
+       header("Location: ".$formLocation."startRequest.html?workerID=".$workerID);
+       } else {
+       header("Location: ".$formLocation."Vorb.html?=".$workerID);
+       }
+}
+
+?>
+

+ 36 - 0
services/tool_config.php

@@ -0,0 +1,36 @@
+<?php
+include 'con.php';
+//error handling
+ini_set('display_errors', 1);
+error_reporting(E_ALL);
+//variables from centurio
+$toolList = $_POST['toolList'];
+$toolList = json_decode($toolList);
+$dtc = [];
+$articles = [];
+//db
+foreach ($toolList as $toolID){
+$sql = "SELECT  * FROM (SELECT * FROM DTC_TOOL_LC_EVENT WHERE TOOL_ID = '{$toolID}' ORDER BY DATE_TIME DESC) WHERE ROWNUM <= 5";
+$res = sqlStm($sql);
+$article = $res["ARTICLE_ID"];
+if (!array_filter($article)) {
+    $newsql = "SELECT  * FROM (SELECT * FROM DTC_TOOL_LC_EVENT WHERE TOOL_ID = '{$toolID}' AND ARTICLE_ID IS NOT NULL ORDER BY DATE_TIME DESC ) WHERE ROWNUM <= 1";
+    $res2 = sqlStm($newsql);
+    $lastArticle = $res2["ARTICLE_ID"][0];
+} else {
+    $last = array_filter($article);
+    $lastArticle = end($last);
+}
+//print_r($res);
+$dtc[$toolID] = $res;
+$articles[$toolID] = $lastArticle;
+}
+
+//print_r($dtc);
+//echo "---------------------------------------------------";
+//print_r($articles); 
+//to centurio
+header('Content-Type:application/json');
+echo json_encode( array("lastArticles" => $articles, "dtc" => $dtc));
+?>
+

+ 8 - 0
test.php

@@ -0,0 +1,8 @@
+<?php
+//error handling
+ini_set('display_errors', 1);
+error_reporting(E_ALL);
+
+$dirs = array_filter(glob('*'), 'is_dir');
+print_r( $dirs);
+?>