{
	"id": "3377b8a1c1faab49",
	"type": "subflow",
	"name": "OSCAR Body Pose Async ",
	"info": "## Body Pose Invocation asynchronous invocation\nThis example uses the pre-trained classification model by DEEP-Hybrid-DataCloud Body Pose Detection and is prepared to be used with asynchronous invocations.",
	"category": "OSCAR",
	"in": [
		{
			"x": 120,
			"y": 100,
			"wires": [
				{
					"id": "784895af40181d59"
				}
			]
		}
	],
	"out": [
		{
			"x": 1170,
			"y": 320,
			"wires": [
				{
					"id": "db771c6b0dfa6ab7",
					"port": 0
				}
			]
		},
		{
			"x": 1050,
			"y": 260,
			"wires": [
				{
					"id": "01f86ac79675beab",
					"port": 0
				}
			]
		}
	],
	"env": [
		{
			"name": "MinIOConfig",
			"type": "minio-config",
			"value": "",
			"ui": {
				"type": "conf-types"
			}
		},
		{
			"name": "inputBucket",
			"type": "str",
			"value": "",
			"ui": {
				"type": "input",
				"opts": {
					"types": [
						"str"
					]
				}
			}
		},
		{
			"name": "Object",
			"type": "str",
			"value": "",
			"ui": {
				"type": "input",
				"opts": {
					"types": [
						"str"
					]
				}
			}
		},
		{
			"name": "outputBucket",
			"type": "str",
			"value": "",
			"ui": {
				"type": "input",
				"opts": {
					"types": [
						"str"
					]
				}
			}
		},
		{
			"name": "Prefix",
			"type": "str",
			"value": "",
			"ui": {
				"type": "input",
				"opts": {
					"types": [
						"str"
					]
				}
			}
		}
	],
	"meta": {
		"module": "node-red-contrib-oscar-bodypose-async",
		"type": "OSCAR",
		"version": "0.1.1",
		"author": "vicente.rdguezb@gmail.com",
		"desc": "OSCAR Body Pose Async",
		"keywords": "Node-RED",
		"license": "Apache-2.0"
	},
	"color": "#3FADB5",
	"inputLabels": [
		"Image (base64)"
	],
	"outputLabels": [
		"Image",
		"Json"
	],
	"icon": "font-awesome/fa-image",
	"status": {
		"x": 1360,
		"y": 60,
		"wires": [
			{
				"id": "f5eb3b3ffdbd3c39",
				"port": 0
			},
			{
				"id": "d63c15c9522a7be9",
				"port": 0
			},
			{
				"id": "32c97a967848ed30",
				"port": 0
			}
		]
	},
	"flow": [
		{
			"id": "86d3d5c98cf9f075",
			"type": "objects",
			"z": "3377b8a1c1faab49",
			"objects_name": "",
			"host": "${MinIOConfig}",
			"objects_operation": "putObject",
			"objects_bucket": "",
			"objects_object": "",
			"objects_offset": "",
			"objects_length": "",
			"objects_stream": "",
			"objects_size": "",
			"objects_metadata": "",
			"objects_sourceobject": "",
			"objects_conditions": "",
			"objects_objectslist": [],
			"objects_prefix": "",
			"objects_etag": "",
			"objects_datetime": "",
			"x": 650,
			"y": 100,
			"wires": [
				[
					"5fb029ae1091f3fe"
				],
				[]
			]
		},
		{
			"id": "e9a308fb1dd6a12e",
			"type": "function",
			"z": "3377b8a1c1faab49",
			"name": "function 14",
			"func": "msg.stream = msg.image\nmsg.objectName =msg.object_name\nmsg.bucketName=msg.in_bucket\n\nflow.set(\"out_bucket\", msg.out_bucket);\nflow.set(\"prefix\", msg.prefix); \n\nreturn msg;",
			"outputs": 1,
			"noerr": 0,
			"initialize": "",
			"finalize": "",
			"libs": [],
			"x": 470,
			"y": 100,
			"wires": [
				[
					"86d3d5c98cf9f075"
				]
			]
		},
		{
			"id": "85602ae07eb16b22",
			"type": "objects",
			"z": "3377b8a1c1faab49",
			"objects_name": "",
			"host": "${MinIOConfig}",
			"objects_operation": "getObject",
			"objects_bucket": "",
			"objects_object": "",
			"objects_offset": "",
			"objects_length": "",
			"objects_stream": "",
			"objects_size": "",
			"objects_metadata": "",
			"objects_sourceobject": "",
			"objects_conditions": "",
			"objects_objectslist": [],
			"objects_prefix": "",
			"objects_etag": "",
			"objects_datetime": "",
			"x": 170,
			"y": 260,
			"wires": [
				[
					"26b13b84b2da3146"
				],
				[]
			]
		},
		{
			"id": "9737f0232ec830c4",
			"type": "zip",
			"z": "3377b8a1c1faab49",
			"name": "",
			"mode": "decompress",
			"filename": "",
			"compressionlevel": 6,
			"outasstring": false,
			"x": 610,
			"y": 320,
			"wires": [
				[
					"76be1c1bd1dfbe45"
				]
			]
		},
		{
			"id": "26b13b84b2da3146",
			"type": "function",
			"z": "3377b8a1c1faab49",
			"name": "",
			"func": "msg.payload = msg.payload.objectData\nreturn msg;",
			"outputs": 1,
			"timeout": "",
			"noerr": 0,
			"initialize": "",
			"finalize": "",
			"libs": [],
			"x": 380,
			"y": 320,
			"wires": [
				[
					"9737f0232ec830c4",
					"6e6340277ebba07a"
				]
			]
		},
		{
			"id": "01f86ac79675beab",
			"type": "function",
			"z": "3377b8a1c1faab49",
			"name": "Load json",
			"func": "msg.payload = msg.payload[1].payload\nreturn msg;",
			"outputs": 1,
			"timeout": "",
			"noerr": 0,
			"initialize": "",
			"finalize": "",
			"libs": [],
			"x": 780,
			"y": 260,
			"wires": [
				[
					"d63c15c9522a7be9"
				]
			]
		},
		{
			"id": "db771c6b0dfa6ab7",
			"type": "base64",
			"z": "3377b8a1c1faab49",
			"name": "",
			"action": "str",
			"property": "payload",
			"x": 980,
			"y": 320,
			"wires": [
				[
					"d63c15c9522a7be9"
				]
			]
		},
		{
			"id": "1930f6861bbec3d0",
			"type": "notifications",
			"z": "3377b8a1c1faab49",
			"notifications_name": "",
			"host": "${MinIOConfig}",
			"notifications_operation": "listenBucketNotification",
			"notifications_bucket": "",
			"notifications_notificationconfig": "",
			"notifications_prefix": "",
			"notifications_suffix": "",
			"notifications_events": "",
			"notifications_events_object_created_put": true,
			"notifications_events_object_created_post": false,
			"notifications_events_object_created_copy": false,
			"notifications_events_object_created_complete_multipart_upload": false,
			"notifications_events_object_removed_delete": false,
			"notifications_events_object_accessed_get": false,
			"notifications_events_object_accessed_head": false,
			"x": 390,
			"y": 160,
			"wires": [
				[
					"79355388ce0e042b"
				],
				[]
			]
		},
		{
			"id": "79355388ce0e042b",
			"type": "function",
			"z": "3377b8a1c1faab49",
			"name": "function 17",
			"func": "msg.objectName = msg.payload.listenBucketNotification.s3.object.key\nvar out = flow.get(\"out_bucket\")\nmsg.bucketName = out\n\nreturn msg;",
			"outputs": 1,
			"noerr": 0,
			"initialize": "",
			"finalize": "",
			"libs": [],
			"x": 170,
			"y": 220,
			"wires": [
				[
					"85602ae07eb16b22"
				]
			]
		},
		{
			"id": "76be1c1bd1dfbe45",
			"type": "function",
			"z": "3377b8a1c1faab49",
			"name": "load image",
			"func": "msg.payload = msg.payload[0].payload\nreturn msg;",
			"outputs": 1,
			"noerr": 0,
			"initialize": "",
			"finalize": "",
			"libs": [],
			"x": 790,
			"y": 320,
			"wires": [
				[
					"db771c6b0dfa6ab7"
				]
			]
		},
		{
			"id": "6e6340277ebba07a",
			"type": "zip",
			"z": "3377b8a1c1faab49",
			"name": "",
			"mode": "decompress",
			"filename": "",
			"compressionlevel": 6,
			"outasstring": true,
			"x": 610,
			"y": 260,
			"wires": [
				[
					"01f86ac79675beab"
				]
			]
		},
		{
			"id": "784895af40181d59",
			"type": "change",
			"z": "3377b8a1c1faab49",
			"name": "",
			"rules": [
				{
					"t": "set",
					"p": "prefix",
					"pt": "msg",
					"to": "Prefix",
					"tot": "env"
				},
				{
					"t": "set",
					"p": "out_bucket",
					"pt": "msg",
					"to": "outputBucket",
					"tot": "env"
				},
				{
					"t": "set",
					"p": "image",
					"pt": "msg",
					"to": "payload",
					"tot": "msg"
				},
				{
					"t": "set",
					"p": "in_bucket",
					"pt": "msg",
					"to": "inputBucket",
					"tot": "env"
				},
				{
					"t": "set",
					"p": "object_name",
					"pt": "msg",
					"to": "Object",
					"tot": "env"
				}
			],
			"action": "",
			"property": "",
			"from": "",
			"to": "",
			"reg": false,
			"x": 280,
			"y": 100,
			"wires": [
				[
					"e9a308fb1dd6a12e",
					"f5eb3b3ffdbd3c39"
				]
			]
		},
		{
			"id": "5fb029ae1091f3fe",
			"type": "function",
			"z": "3377b8a1c1faab49",
			"name": "function 19",
			"func": "var out = flow.get(\"out_bucket\")\nvar prefix = flow.get(\"prefix\")\nmsg.prefix = prefix\nmsg.bucketName = out\nreturn msg;",
			"outputs": 1,
			"noerr": 0,
			"initialize": "",
			"finalize": "",
			"libs": [],
			"x": 130,
			"y": 160,
			"wires": [
				[
					"1930f6861bbec3d0"
				]
			]
		},
		{
			"id": "f5eb3b3ffdbd3c39",
			"type": "change",
			"z": "3377b8a1c1faab49",
			"name": "Start Service",
			"rules": [
				{
					"t": "delete",
					"p": "payload",
					"pt": "msg"
				},
				{
					"t": "set",
					"p": "payload.text",
					"pt": "msg",
					"to": "Processing....",
					"tot": "str"
				},
				{
					"t": "set",
					"p": "payload.shape",
					"pt": "msg",
					"to": "dot",
					"tot": "str"
				},
				{
					"t": "set",
					"p": "payload.fill",
					"pt": "msg",
					"to": "green",
					"tot": "str"
				}
			],
			"action": "",
			"property": "",
			"from": "",
			"to": "",
			"reg": false,
			"x": 510,
			"y": 40,
			"wires": [
				[]
			]
		},
		{
			"id": "d63c15c9522a7be9",
			"type": "change",
			"z": "3377b8a1c1faab49",
			"name": "End Service",
			"rules": [
				{
					"t": "delete",
					"p": "payload",
					"pt": "msg"
				},
				{
					"t": "set",
					"p": "payload.text",
					"pt": "msg",
					"to": "Finished!",
					"tot": "str"
				},
				{
					"t": "set",
					"p": "payload.shape",
					"pt": "msg",
					"to": "dot",
					"tot": "str"
				},
				{
					"t": "set",
					"p": "payload.fill",
					"pt": "msg",
					"to": "blue",
					"tot": "str"
				}
			],
			"action": "",
			"property": "",
			"from": "",
			"to": "",
			"reg": false,
			"x": 1230,
			"y": 180,
			"wires": [
				[]
			]
		},
		{
			"id": "32c97a967848ed30",
			"type": "change",
			"z": "3377b8a1c1faab49",
			"name": "Error Service",
			"rules": [
				{
					"t": "delete",
					"p": "payload",
					"pt": "msg"
				},
				{
					"t": "set",
					"p": "payload.text",
					"pt": "msg",
					"to": "error.message",
					"tot": "msg"
				},
				{
					"t": "set",
					"p": "payload.shape",
					"pt": "msg",
					"to": "dot",
					"tot": "str"
				},
				{
					"t": "set",
					"p": "payload.fill",
					"pt": "msg",
					"to": "red",
					"tot": "str"
				}
			],
			"action": "",
			"property": "",
			"from": "",
			"to": "",
			"reg": false,
			"x": 1050,
			"y": 20,
			"wires": [
				[]
			]
		},
		{
			"id": "795112d692f5c2d6",
			"type": "catch",
			"z": "3377b8a1c1faab49",
			"name": "",
			"scope": null,
			"uncaught": false,
			"x": 830,
			"y": 80,
			"wires": [
				[
					"32c97a967848ed30"
				]
			]
		},
		{
			"id": "39c987e8fe453498",
			"type": "debug",
			"z": "3377b8a1c1faab49",
			"name": "debug 3",
			"active": true,
			"tosidebar": true,
			"console": false,
			"tostatus": false,
			"complete": "true",
			"targetType": "full",
			"statusVal": "",
			"statusType": "auto",
			"x": 520,
			"y": 600,
			"wires": []
		},
		{
			"id": "040235119e68eaa0",
			"type": "minio-config",
			"z": "3377b8a1c1faab49",
			"name": "MinIO BodyPose",
			"host": "",
			"port": "",
			"useSsl": true
		},
		{
			"id": "9736f71152cc0826",
			"type": "subflow:3377b8a1c1faab49",
			"z": "a089da72d1cede92",
			"name": "",
			"env": [
				{
					"name": "MinIOConfig",
					"value": "a2e3ef4df8747feb",
					"type": "conf-type"
				},
				{
					"name": "Input_Bucket",
					"value": "body-pose-detection-async",
					"type": "str"
				},
				{
					"name": "Output_Bucket",
					"value": "body-pose-detection-async",
					"type": "str"
				},
				{
					"name": "Object_Name",
					"value": "input/images_3.jpeg",
					"type": "str"
				},
				{
					"name": "Input Bucket",
					"value": "ssssss",
					"type": "str"
				},
				{
					"name": "Object Name",
					"value": "456",
					"type": "str"
				},
				{
					"name": "Output Bucket",
					"value": "789",
					"type": "str"
				},
				{
					"name": "Object _Name",
					"value": "hhh",
					"type": "str"
				}
			],
			"x": 690,
			"y": 180,
			"wires": [
				[
					"314873b45b117a5e"
				],
				[
					"048102a96c9f57a6"
				]
			]
		}
	]
}