workflow-stage-state.yaml (12007B)
1 # Example: Workflow recipe, plan, execution, including stage and state usage 2 3 '@context': 4 - https://git.io/vf-examples-jsonld-context 5 - mfg: https://manufacturing.example/ 6 7 '@id': rgh:valueflows/valueflows/master/examples/workflow-stage-state.yaml 8 '@graph': 9 10 # specifications 11 12 - '@id': urn:uuid:3be5259d-10f0-431c-9fec-9c0c15a461d3 13 '@type': ResourceSpecification 14 name: Bucket white 5 gallon 15 unitOfResource: om2:one 16 substitutable: true 17 18 - '@id': urn:uuid:d4d2fd71-34f2-41c3-b1c5-19ad5ed2da58 19 '@type': ResourceSpecification 20 name: Thermoplastic polymer white 21 unitOfResource: om2:kilogram 22 substitutable: true 23 24 - '@id': urn:uuid:c7897c39-7f05-4a5d-a487-80e130a2414a 25 '@type': ResourceSpecification 26 name: Injection molding machine 27 unitOfResource: om2:one 28 unitOfEffort: om2:hour 29 substitutable: true 30 31 - '@id': mfg:27be5cab-d740-4194-9298-1661a69d9d95 32 '@type': ProcessSpecification 33 name: Make injection molded buckets 34 35 - '@id': mfg:6fb358a3-2859-4d6a-a4fa-431603ee70f5 36 '@type': ProcessSpecification 37 name: QT injection molded buckets 38 39 # resources before 40 41 - '@id': mfg:3129ca8b-fcda-45be-bbda-294dc924d3b9 42 '@type': EconomicResource 43 name: Bucket white 5 gallon 44 resourceConformsTo: urn:uuid:3be5259d-10f0-431c-9fec-9c0c15a461d3 45 accountingQuantity: 46 om2:hasUnit: om2:one 47 om2:hasNumericalValue: 320 48 49 - '@id': mfg:6b5bc786-b9ed-4189-b34f-5ef7d10f1f86 50 '@type': EconomicResource 51 name: Thermoplastic polymer white 52 resourceConformsTo: urn:uuid:d4d2fd71-34f2-41c3-b1c5-19ad5ed2da58 53 accountingQuantity: 54 om2:hasUnit: om2:kilogram 55 om2:hasNumericalValue: 2455 56 57 - '@id': mfg:23799c14-c368-4653-a584-83bf9ae8b82a 58 '@type': EconomicResource 59 name: Injection molding maching 60 resourceConformsTo: urn:uuid:c7897c39-7f05-4a5d-a487-80e130a2414a 61 trackingIdentifier: DDE098989099911 62 accountingQuantity: 63 om2:hasUnit: om2:one 64 om2:hasNumericalValue: 1 65 unitOfEffort: om2:hour 66 67 # the recipe (the recipe runs "backwards" from the final product) 68 69 - '@id': mfg:ac9ec98d-db80-44dc-97be-7aa149b2fe5d 70 '@type': RecipeResource 71 resourceConformsTo: urn:uuid:3be5259d-10f0-431c-9fec-9c0c15a461d3 # bucket 72 73 - '@id': mfg:33e8933b-ff73-4a01-964a-ca7a98893083 74 '@type': RecipeFlow 75 recipeOutputOf: mfg:a8356625-bf64-4c16-9099-28aa1b718c4b 76 action: pass 77 recipeFlowResource: mfg:ac9ec98d-db80-44dc-97be-7aa149b2fe5d 78 resourceQuantity: 79 om2:hasUnit: om2:one 80 om2:hasNumericalValue: 500 81 82 - '@id': mfg:a3be5259d-10f0-431c-9fec-9c0c15a461d3 83 '@type': RecipeResource 84 resourceConformsTo: urn:uuid:d4d2fd71-34f2-41c3-b1c5-19ad5ed2da58 # polymer 85 86 - '@id': mfg:54b814ee-62dc-40c1-bb96-f8582aa4f771 87 '@type': RecipeFlow 88 recipeOutputOf: mfg:a8356625-bf64-4c16-9099-28aa1b718c4b 89 action: fail 90 recipeFlowResource: mfg:a3be5259d-10f0-431c-9fec-9c0c15a461d3 91 resourceQuantity: 92 om2:hasUnit: om2:kilogram 93 om2:hasNumericalValue: 0 94 95 - '@id': mfg:a8356625-bf64-4c16-9099-28aa1b718c4b 96 '@type': RecipeProcess 97 name: QT bucket white 5 gallon - minimum run 98 processConformsTo: mfg:6fb358a3-2859-4d6a-a4fa-431603ee70f5 # the process specification 99 time:hasDuration: 100 time:unitType unit:Hour 101 time:numericDuration 1 102 103 - '@id': mfg:2342d456-5d6f-46d5-a7ed-3ac7bfd5a86c 104 '@type': RecipeFlow 105 recipeInputOf: mfg:a8356625-bf64-4c16-9099-28aa1b718c4b 106 action: accept 107 recipeFlowResource: mfg:b75d8f6a-e2df-4e52-b36d-1a22a66f4ead 108 stage: mfg:27be5cab-d740-4194-9298-1661a69d9d95 # 'make' process specification 109 resourceQuantity: 110 om2:hasUnit: om2:one 111 om2:hasNumericalValue: 500 112 113 - '@id': mfg:b75d8f6a-e2df-4e52-b36d-1a22a66f4ead 114 '@type': RecipeResource 115 resourceConformsTo: urn:uuid:3be5259d-10f0-431c-9fec-9c0c15a461d3 # bucket 116 117 - '@id': mfg:33e8933b-ff73-4a01-964a-ca7a98893083 118 '@type': RecipeFlow 119 recipeOutputOf: mfg:e1721a61-cd47-4556-84b9-8b1b81da15bf 120 action: produce 121 recipeFlowResource: mfg:b75d8f6a-e2df-4e52-b36d-1a22a66f4ead 122 resourceQuantity: 123 om2:hasUnit: om2:one 124 om2:hasNumericalValue: 500 125 126 - '@id': mfg:e1721a61-cd47-4556-84b9-8b1b81da15bf 127 '@type': RecipeProcess 128 name: Make bucket white 5 gallon - minimum run 129 processConformsTo: mfg:27be5cab-d740-4194-9298-1661a69d9d95 # the process specification 130 time:hasDuration: 131 time:unitType unit:Hour 132 time:numericDuration 7 133 134 - '@id': mfg:9bd19194-a36d-4a1f-896b-8082887962cb 135 '@type': RecipeFlow 136 recipeInputOf: mfg:e1721a61-cd47-4556-84b9-8b1b81da15bf 137 action: consume 138 recipeFlowResource: mfg:6405b8ad-0ac2-4d58-abdb-0808903c78ad 139 resourceQuantity: 140 om2:hasUnit: om2:kilogram 141 om2:hasNumericalValue: 450 142 143 - '@id': mfg:6405b8ad-0ac2-4d58-abdb-0808903c78ad 144 '@type': RecipeResource 145 resourceConformsTo: urn:uuid:d4d2fd71-34f2-41c3-b1c5-19ad5ed2da58 # polymer 146 147 - '@id': mfg:60f4204e-b8d2-4026-8577-102c3f82c0af 148 '@type': RecipeFlow 149 recipeInputOf: mfg:e1721a61-cd47-4556-84b9-8b1b81da15bf 150 action: use 151 recipeFlowResource: mfg:e02e3f6b-420a-4ba8-89b0-909d7363ce07 152 effortQuantity: 153 om2:hasUnit: om2:hour 154 om2:hasNumericalValue: 5.5 155 156 - '@id': mfg:e02e3f6b-420a-4ba8-89b0-909d7363ce07 157 '@type': RecipeResource 158 resourceConformsTo: urn:uuid:c7897c39-7f05-4a5d-a487-80e130a2414a # injection molding machine 159 160 # the plan (shown running "forwards") 161 162 - '@id': mfg:8e5fe80d-a769-4bd5-89e5-2136d33eab9f 163 '@type': Plan 164 name: Buckets run number 381 165 due: 2019-04-08T17:00:00-5:00 # due 166 167 - '@id': mfg:b52a5815-fae9-43bf-be95-833b95dc0adb 168 '@type': Commitment 169 inputOf: mfg:02b39a30-3e04-4305-9656-7f261aa63c84 170 action: consume 171 provider: https://manufacturing.example/ 172 receiver: https://manufacturing.example/ 173 resourceConformsTo: urn:uuid:d4d2fd71-34f2-41c3-b1c5-19ad5ed2da58 # polymer 174 resourceQuantity: 175 om2:hasUnit: om2:kilogram 176 om2:hasNumericalValue: 900 177 178 - '@id': mfg:52f0e212-3c4f-4d27-b345-5e964c135824 179 '@type': Commitment 180 inputOf: mfg:02b39a30-3e04-4305-9656-7f261aa63c84 181 action: use 182 provider: https://manufacturing.example/ 183 receiver: https://manufacturing.example/ 184 resourceConformsTo: urn:uuid:c7897c39-7f05-4a5d-a487-80e130a2414a # injection molding machine 185 effortQuantity: 186 om2:hasUnit: om2:hour 187 om2:hasNumericalValue: 11 188 189 - '@id': mfg:02b39a30-3e04-4305-9656-7f261aa63c84 190 '@type': Process 191 name: Make bucket white 5 gallon 192 plannedWithin: mfg:8e5fe80d-a769-4bd5-89e5-2136d33eab9f 193 basedOn: mfg:27be5cab-d740-4194-9298-1661a69d9d95 # the process specification 194 time:hasDuration: 195 time:unitType unit:Hour 196 time:numericDuration 14 197 198 - '@id': mfg:a8236bbb-81e0-422d-9861-56d2417db0fb 199 '@type': Commitment 200 outputOf: mfg:02b39a30-3e04-4305-9656-7f261aa63c84 201 action: produce 202 provider: https://manufacturing.example/ 203 receiver: https://manufacturing.example/ 204 resourceConformsTo: urn:uuid:3be5259d-10f0-431c-9fec-9c0c15a461d3 # bucket 205 resourceQuantity: 206 om2:hasUnit: om2:one 207 om2:hasNumericalValue: 1000 208 209 - '@id': mfg:fbff9852-36ca-4364-a943-bc0b49e1cab5 210 '@type': Commitment 211 inputOf: mfg:8baa8ff7-9c1e-4586-ae7b-79d620a3cac9 212 action: accept 213 provider: https://manufacturing.example/ 214 receiver: https://manufacturing.example/ 215 resourceConformsTo: urn:uuid:3be5259d-10f0-431c-9fec-9c0c15a461d3 # bucket 216 stage: mfg:27be5cab-d740-4194-9298-1661a69d9d95 # 'make' process specification 217 resourceQuantity: 218 om2:hasUnit: om2:one 219 om2:hasNumericalValue: 1000 220 221 - '@id': mfg:8baa8ff7-9c1e-4586-ae7b-79d620a3cac9 222 '@type': Process 223 name: QT bucket white 5 gallon 224 plannedWithin: mfg:8e5fe80d-a769-4bd5-89e5-2136d33eab9f 225 basedOn: mfg:6fb358a3-2859-4d6a-a4fa-431603ee70f5 # the process specification 226 time:hasDuration: 227 time:unitType unit:Hour 228 time:numericDuration 14 229 230 - '@id': mfg:21f361a6-2375-46bb-b192-c21b5ba833bf 231 '@type': Commitment 232 independentDemandOf: mfg:8e5fe80d-a769-4bd5-89e5-2136d33eab9f # the plan 233 outputOf: mfg:8baa8ff7-9c1e-4586-ae7b-79d620a3cac9 234 action: pass 235 provider: https://manufacturing.example/ 236 receiver: https://manufacturing.example/ 237 resourceConformsTo: urn:uuid:3be5259d-10f0-431c-9fec-9c0c15a461d3 # bucket 238 resourceQuantity: 239 om2:hasUnit: om2:one 240 om2:hasNumericalValue: 1000 241 242 # manufacture and test the buckets according to plan 243 244 - '@id': mfg:e18c808c-929a-450d-9d0d-3b3f531bc126 245 '@type': EconomicEvent 246 inputOf: mfg:02b39a30-3e04-4305-9656-7f261aa63c84 # planned make process 247 action: consume 248 provider: https://manufacturing.example/ 249 receiver: https://manufacturing.example/ 250 resourceInventoriedAs: mfg:6b5bc786-b9ed-4189-b34f-5ef7d10f1f86 # polymer stock 251 resourceQuantity: 252 om2:hasUnit: om2:kilogram 253 om2:hasNumericalValue: 925 254 255 - '@id': mfg:5d2fe7da-b91b-4dab-91d9-68db80c1feb7 256 '@type': EconomicEvent 257 inputOf: mfg:02b39a30-3e04-4305-9656-7f261aa63c84 # planned make process 258 action: use 259 provider: https://manufacturing.example/ 260 receiver: https://manufacturing.example/ 261 resourceInventoriedAs: mfg:23799c14-c368-4653-a584-83bf9ae8b82a # the machine 262 effortQuantity: 263 om2:hasUnit: om2:hour 264 om2:hasNumericalValue: 10.7 265 266 - '@id': mfg:8791913c-0152-4c32-bb3f-f25d61df736c 267 '@type': EconomicEvent 268 outputOf: mfg:02b39a30-3e04-4305-9656-7f261aa63c84 # planned make process 269 action: produce 270 provider: https://manufacturing.example/ 271 receiver: https://manufacturing.example/ 272 resourceInventoriedAs: mfg:3129ca8b-fcda-45be-bbda-294dc924d3b9 # buckets 273 resourceQuantity: 274 om2:hasUnit: om2:one 275 om2:hasNumericalValue: 1000 276 277 - '@id': mfg:a8236bbb-81e0-422d-9861-56d2417db0fb 278 '@type': EconomicEvent 279 inputOf: mfg:8baa8ff7-9c1e-4586-ae7b-79d620a3cac9 # planned qt process 280 action: accept 281 provider: https://manufacturing.example/ 282 receiver: https://manufacturing.example/ 283 resourceInventoriedAs: mfg:3129ca8b-fcda-45be-bbda-294dc924d3b9 #buckets 284 resourceQuantity: 285 om2:hasUnit: om2:one 286 om2:hasNumericalValue: 1000 287 288 - '@id': mfg:52f0e212-3c4f-4d27-b345-5e964c135824 289 '@type': EconomicEvent 290 outputOf: mfg:8baa8ff7-9c1e-4586-ae7b-79d620a3cac9 # planned qt process 291 action: pass 292 provider: https://manufacturing.example/ 293 receiver: https://manufacturing.example/ 294 resourceInventoriedAs: mfg:3129ca8b-fcda-45be-bbda-294dc924d3b9 # buckets 295 resourceQuantity: 296 om2:hasUnit: om2:one 297 om2:hasNumericalValue: 998 298 299 - '@id': mfg:e1721a61-cd47-4556-84b9-8b1b81da15bf 300 '@type': EconomicEvent 301 outputOf: mfg:8baa8ff7-9c1e-4586-ae7b-79d620a3cac9 # planned qt process 302 action: fail 303 provider: https://manufacturing.example/ 304 receiver: https://manufacturing.example/ 305 resourceInventoriedAs: mfg:6b5bc786-b9ed-4189-b34f-5ef7d10f1f86 # polymer stock 306 resourceQuantity: 307 om2:hasUnit: om2:kilogram 308 om2:hasNumericalValue: 1.8 309 310 # resources after 311 312 - '@id': mfg:3129ca8b-fcda-45be-bbda-294dc924d3b9 313 '@type': EconomicResource 314 name: Bucket white 5 gallon 315 resourceConformsTo: urn:uuid:3be5259d-10f0-431c-9fec-9c0c15a461d3 316 accountingQuantity: 317 om2:hasUnit: om2:one 318 om2:hasNumericalValue: 1318 319 320 - '@id': mfg:6b5bc786-b9ed-4189-b34f-5ef7d10f1f86 321 '@type': EconomicResource 322 name: Thermoplastic polymer white 323 resourceConformsTo: urn:uuid:d4d2fd71-34f2-41c3-b1c5-19ad5ed2da58 324 accountingQuantity: 325 om2:hasUnit: om2:kilogram 326 om2:hasNumericalValue: 1531.8 327 328 - '@id': mfg:23799c14-c368-4653-a584-83bf9ae8b82a 329 '@type': EconomicResource 330 name: Injection molding maching 331 resourceConformsTo: urn:uuid:c7897c39-7f05-4a5d-a487-80e130a2414a 332 trackingIdentifier: DDE098989099911 333 accountingQuantity: 334 om2:hasUnit: om2:one 335 om2:hasNumericalValue: 1 336 unitOfEffort: om2:hour