|
| 1 | +amends |
| 2 | + "https://raw.githubusercontent.com/CollaborativeStateMachines/Cirrina/refs/heads/develop/src/main/resources/pkl/csm/csml.pkl" |
| 3 | +import "arm.pkl" |
| 4 | +import "assemblyController.pkl" |
| 5 | +import "belt.pkl" |
| 6 | +import "jobController.pkl" |
| 7 | +import "messageProcessor.pkl" |
| 8 | +import "monitor.pkl" |
| 9 | +import "serviceTypes.pkl" as ServiceTypes |
| 10 | +import "variables.pkl" as Vars |
| 11 | + |
| 12 | +collaborativeStateMachine { |
| 13 | + stateMachines { |
| 14 | + ["jobControllerFSM"] = jobController.jobControllerFSM |
| 15 | + ["beltFSM"] = belt.beltFsm |
| 16 | + ["armFSM"] = arm.armFSM |
| 17 | + ["messageProcessorFSM"] = messageProcessor.emailProcessorFSM |
| 18 | + ["monitorFSM"] = monitor.monitorFSM |
| 19 | + ["assemblyControllerFSM"] = assemblyController.assemblyControllerFSM |
| 20 | + } |
| 21 | + |
| 22 | + persistent { |
| 23 | + [Vars.vIsJobDone] = "false" |
| 24 | + [Vars.vLogs] = "[...]" |
| 25 | + [Vars.vProductsCompleted] = "0" |
| 26 | + } |
| 27 | +} |
| 28 | + |
| 29 | +instances { |
| 30 | + ["messageProcessor"] { stateMachineName = "messageProcessorFSM" } |
| 31 | + ["jobController"] { stateMachineName = "jobControllerFSM" } |
| 32 | + ["conveyorBelt"] { stateMachineName = "beltFSM" } |
| 33 | + ["arm"] { stateMachineName = "armFSM" } |
| 34 | + ["monitor"] { stateMachineName = "monitorFSM" } |
| 35 | + ["assemblyController"] { stateMachineName = "assemblyControllerFSM" } |
| 36 | +} |
| 37 | + |
| 38 | +bindings { |
| 39 | + new HttpServiceImplementationBinding { |
| 40 | + name = ServiceTypes.stMoveBelt |
| 41 | + `local` = false |
| 42 | + scheme = "http" |
| 43 | + host = "localhost" |
| 44 | + port = 6000 |
| 45 | + endPoint = "/movebelt" |
| 46 | + method = "POST" |
| 47 | + } |
| 48 | + new HttpServiceImplementationBinding { |
| 49 | + name = ServiceTypes.stStopBelt |
| 50 | + `local` = false |
| 51 | + scheme = "http" |
| 52 | + host = "localhost" |
| 53 | + port = 6000 |
| 54 | + endPoint = "/stopbelt" |
| 55 | + method = "POST" |
| 56 | + } |
| 57 | + new HttpServiceImplementationBinding { |
| 58 | + name = ServiceTypes.stTakePhoto |
| 59 | + `local` = false |
| 60 | + scheme = "http" |
| 61 | + host = "localhost" |
| 62 | + port = 6000 |
| 63 | + endPoint = "/takephoto" |
| 64 | + method = "POST" |
| 65 | + } |
| 66 | + new HttpServiceImplementationBinding { |
| 67 | + name = ServiceTypes.stScanPhoto |
| 68 | + `local` = false |
| 69 | + scheme = "http" |
| 70 | + host = "localhost" |
| 71 | + port = 6000 |
| 72 | + endPoint = "/scanphoto" |
| 73 | + method = "POST" |
| 74 | + } |
| 75 | + new HttpServiceImplementationBinding { |
| 76 | + name = ServiceTypes.stPickup |
| 77 | + `local` = false |
| 78 | + scheme = "http" |
| 79 | + host = "localhost" |
| 80 | + port = 6000 |
| 81 | + endPoint = "/pickup" |
| 82 | + method = "POST" |
| 83 | + } |
| 84 | + new HttpServiceImplementationBinding { |
| 85 | + name = ServiceTypes.stAssemble |
| 86 | + `local` = false |
| 87 | + scheme = "http" |
| 88 | + host = "localhost" |
| 89 | + port = 6000 |
| 90 | + endPoint = "/assemble" |
| 91 | + method = "POST" |
| 92 | + } |
| 93 | + new HttpServiceImplementationBinding { |
| 94 | + name = ServiceTypes.stReturnToStart |
| 95 | + `local` = false |
| 96 | + scheme = "http" |
| 97 | + host = "localhost" |
| 98 | + port = 6000 |
| 99 | + endPoint = "/returntostart" |
| 100 | + method = "POST" |
| 101 | + } |
| 102 | + new HttpServiceImplementationBinding { |
| 103 | + name = ServiceTypes.stProcessEmail |
| 104 | + `local` = false |
| 105 | + scheme = "http" |
| 106 | + host = "localhost" |
| 107 | + port = 6000 |
| 108 | + endPoint = "/process/email" |
| 109 | + method = "POST" |
| 110 | + } |
| 111 | + new HttpServiceImplementationBinding { |
| 112 | + name = ServiceTypes.stProcessSms |
| 113 | + `local` = false |
| 114 | + scheme = "http" |
| 115 | + host = "localhost" |
| 116 | + port = 6000 |
| 117 | + endPoint = "/process/sms" |
| 118 | + method = "POST" |
| 119 | + } |
| 120 | + new HttpServiceImplementationBinding { |
| 121 | + name = ServiceTypes.stSendStatistics |
| 122 | + `local` = false |
| 123 | + scheme = "http" |
| 124 | + host = "localhost" |
| 125 | + port = 6000 |
| 126 | + endPoint = "/statistics" |
| 127 | + method = "POST" |
| 128 | + } |
| 129 | + new HttpServiceImplementationBinding { |
| 130 | + name = ServiceTypes.stDiscardObject |
| 131 | + `local` = false |
| 132 | + scheme = "http" |
| 133 | + host = "localhost" |
| 134 | + port = 6000 |
| 135 | + endPoint = "/discardobject" |
| 136 | + method = "POST" |
| 137 | + } |
| 138 | +} |
0 commit comments