diff --git a/README.md b/README.md deleted file mode 100644 index c78588b..0000000 --- a/README.md +++ /dev/null @@ -1,2 +0,0 @@ -# DemoRepo -This for quick and dirty demo setups diff --git a/Untitled Diagram.drawio b/Untitled Diagram.drawio deleted file mode 100644 index 3fbe3be..0000000 --- a/Untitled Diagram.drawio +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/docker-compose-postgis.yml b/docker-compose-postgis.yml deleted file mode 100644 index fc4814f..0000000 --- a/docker-compose-postgis.yml +++ /dev/null @@ -1,15 +0,0 @@ -version: '3' - -services: -# testserver: -# image: testserver -# ports: -# - "8080:8080" - postgres: - image: postgis/postgis - ports: - - "5432:5432" - environment: - POSTGRES_USER: ngb - POSTGRES_PASSWORD: ngb - POSTGRES_DB: ngb diff --git a/fixedfiwaredatamodel.jsonld b/fixedfiwaredatamodel.jsonld deleted file mode 100644 index b624f7e..0000000 --- a/fixedfiwaredatamodel.jsonld +++ /dev/null @@ -1,37 +0,0 @@ -{ - "@context": { - "address": "https://schema.org/address", - "image": "https://schema.org/image", - "fullnessThreshold": "https://uri.fiware.org/ns/data-models#fullnessThreshold", - "status": "https://uri.fiware.org/ns/data-models#status", - "actuationHours": "https://uri.fiware.org/ns/data-models#actuationHours", - "cargoWeight": "https://uri.fiware.org/ns/data-models#cargoWeight", - "category": "https://uri.fiware.org/ns/data-models#category", - "color": "https://uri.fiware.org/ns/data-models#color", - "dataProvider": "https://uri.fiware.org/ns/data-models#dataProvider", - "dateLastCleaning": "https://uri.fiware.org/ns/data-models#dateLastCleaning", - "dateLastEmptying": "https://uri.fiware.org/ns/data-models#dateLastEmptying", - "dateServiceStarted": "https://uri.fiware.org/ns/data-models#dateServiceStarted", - "fillingLevel": "https://uri.fiware.org/ns/data-models#fillingLevel", - "methaneConcentration": "https://uri.fiware.org/ns/data-models#methaneConcentration", - "nextActuationDeadline": "https://uri.fiware.org/ns/data-models#nextActuationDeadline", - "nextCleaningDeadline": "https://uri.fiware.org/ns/data-models#nextCleaningDeadline", - "owner": "https://uri.fiware.org/ns/data-models#owner", - "refDevice": "https://uri.fiware.org/ns/data-models#refDevice", - "refWasteContainer": "https://uri.fiware.org/ns/data-models#refWasteContainer", - "refWasteContainerIsle": "https://uri.fiware.org/ns/data-models#refWasteContainerIsle", - "refWasteContainerModel": "https://uri.fiware.org/ns/data-models#refWasteContainerModel", - "regulation": "https://uri.fiware.org/ns/data-models#regulation", - "responsible": "https://uri.fiware.org/ns/data-models#responsible", - "serialNumber": "https://uri.fiware.org/ns/data-models#serialNumber", - "source": "https://uri.fiware.org/ns/data-models#source", - "storedWasteCode": "https://uri.fiware.org/ns/data-models#storedWasteCode", - "storedWasteKind": "https://uri.fiware.org/ns/data-models#storedWasteKind", - "storedWasteOrigin": "https://uri.fiware.org/ns/data-models#storedWasteOrigin", - "temperature": "https://uri.fiware.org/ns/data-models#temperature", - "features": "https://uri.fiware.org/ns/data-models#features", - "insertHolesNumber": "https://uri.fiware.org/ns/data-models#insertHolesNumber", - "areaServed": "https://schema.org/areaServed", - "availableSince": "https://uri.fiware.org/ns/data-models#availableSince" - } -} diff --git a/fullSetup/NGSILDHL7Flow.json b/fullSetup/NGSILDHL7Flow.json new file mode 100644 index 0000000..930c32d --- /dev/null +++ b/fullSetup/NGSILDHL7Flow.json @@ -0,0 +1 @@ +{"flowContents":{"identifier":"3e06a40c-e274-3903-99d0-9c45b5531e80","instanceIdentifier":"744cc16e-0188-1000-1b7e-e925a1f1b367","name":"NiFi Flow","comments":"","position":{"x":0.0,"y":8.0},"processGroups":[{"identifier":"93491341-5bcf-3f1a-9be2-21eeb11c7437","instanceIdentifier":"78aa1d11-614a-32c1-0567-a4767c98f6c4","name":"NGSI-LD Subscriptions","comments":"","position":{"x":494.0,"y":727.0},"processGroups":[],"remoteProcessGroups":[],"processors":[{"identifier":"27e4e5f8-585a-35b1-a830-be0f3cf20252","instanceIdentifier":"ffe2504f-220b-3a76-d38f-c8668b6997e0","name":"EvaluateJsonPath","comments":"","position":{"x":1240.0,"y":280.0},"type":"org.apache.nifi.processors.standard.EvaluateJsonPath","bundle":{"group":"org.apache.nifi","artifact":"nifi-standard-nar","version":"1.21.0"},"properties":{"Destination":"flowfile-content","Return Type":"auto-detect","Null Value Representation":"empty string","JsonPaths":"$.data","Path Not Found Behavior":"ignore"},"propertyDescriptors":{"Destination":{"name":"Destination","displayName":"Destination","identifiesControllerService":false,"sensitive":false},"Return Type":{"name":"Return Type","displayName":"Return Type","identifiesControllerService":false,"sensitive":false},"Null Value Representation":{"name":"Null Value Representation","displayName":"Null Value Representation","identifiesControllerService":false,"sensitive":false},"JsonPaths":{"name":"JsonPaths","displayName":"JsonPaths","identifiesControllerService":false,"sensitive":false},"Path Not Found Behavior":{"name":"Path Not Found Behavior","displayName":"Path Not Found Behavior","identifiesControllerService":false,"sensitive":false}},"style":{},"schedulingPeriod":"0 sec","schedulingStrategy":"TIMER_DRIVEN","executionNode":"ALL","penaltyDuration":"30 sec","yieldDuration":"1 sec","bulletinLevel":"WARN","runDurationMillis":0,"concurrentlySchedulableTaskCount":1,"autoTerminatedRelationships":["failure","unmatched"],"scheduledState":"ENABLED","retryCount":10,"retriedRelationships":[],"backoffMechanism":"PENALIZE_FLOWFILE","maxBackoffPeriod":"10 mins","componentType":"PROCESSOR","groupIdentifier":"93491341-5bcf-3f1a-9be2-21eeb11c7437"},{"identifier":"5082c2a8-e27c-3b27-9e5c-76b3f19e8786","instanceIdentifier":"6e08028b-0786-324a-039b-718c38066555","name":"SplitContent","comments":"","position":{"x":264.0,"y":432.0},"type":"org.apache.nifi.processors.standard.SplitContent","bundle":{"group":"org.apache.nifi","artifact":"nifi-standard-nar","version":"1.21.0"},"properties":{"Byte Sequence Location":"Trailing","Keep Byte Sequence":"false","Byte Sequence Format":"Text","Byte Sequence":","},"propertyDescriptors":{"Byte Sequence Location":{"name":"Byte Sequence Location","displayName":"Byte Sequence Location","identifiesControllerService":false,"sensitive":false},"Keep Byte Sequence":{"name":"Keep Byte Sequence","displayName":"Keep Byte Sequence","identifiesControllerService":false,"sensitive":false},"Byte Sequence Format":{"name":"Byte Sequence Format","displayName":"Byte Sequence Format","identifiesControllerService":false,"sensitive":false},"Byte Sequence":{"name":"Byte Sequence","displayName":"Byte Sequence","identifiesControllerService":false,"sensitive":false}},"style":{},"schedulingPeriod":"0 sec","schedulingStrategy":"TIMER_DRIVEN","executionNode":"ALL","penaltyDuration":"30 sec","yieldDuration":"1 sec","bulletinLevel":"WARN","runDurationMillis":0,"concurrentlySchedulableTaskCount":1,"autoTerminatedRelationships":["original"],"scheduledState":"ENABLED","retryCount":10,"retriedRelationships":[],"backoffMechanism":"PENALIZE_FLOWFILE","maxBackoffPeriod":"10 mins","componentType":"PROCESSOR","groupIdentifier":"93491341-5bcf-3f1a-9be2-21eeb11c7437"},{"identifier":"7d97f867-c218-3d56-ae3e-38a1f5cbefda","instanceIdentifier":"b9611d46-31d6-3916-de20-0e1dc68d8d4f","name":"ReplaceText","comments":"","position":{"x":272.0,"y":608.0},"type":"org.apache.nifi.processors.standard.ReplaceText","bundle":{"group":"org.apache.nifi","artifact":"nifi-standard-nar","version":"1.21.0"},"properties":{"Regular Expression":"([^ ]+)","Replacement Value":"{\"type\":\"$1\"}","Evaluation Mode":"Line-by-Line","Text to Prepend":null,"Line-by-Line Evaluation Mode":"All","Character Set":"UTF-8","Maximum Buffer Size":"1 MB","Replacement Strategy":"Regex Replace","Text to Append":null},"propertyDescriptors":{"Regular Expression":{"name":"Regular Expression","displayName":"Search Value","identifiesControllerService":false,"sensitive":false},"Replacement Value":{"name":"Replacement Value","displayName":"Replacement Value","identifiesControllerService":false,"sensitive":false},"Evaluation Mode":{"name":"Evaluation Mode","displayName":"Evaluation Mode","identifiesControllerService":false,"sensitive":false},"Text to Prepend":{"name":"Text to Prepend","displayName":"Text to Prepend","identifiesControllerService":false,"sensitive":false},"Line-by-Line Evaluation Mode":{"name":"Line-by-Line Evaluation Mode","displayName":"Line-by-Line Evaluation Mode","identifiesControllerService":false,"sensitive":false},"Character Set":{"name":"Character Set","displayName":"Character Set","identifiesControllerService":false,"sensitive":false},"Maximum Buffer Size":{"name":"Maximum Buffer Size","displayName":"Maximum Buffer Size","identifiesControllerService":false,"sensitive":false},"Replacement Strategy":{"name":"Replacement Strategy","displayName":"Replacement Strategy","identifiesControllerService":false,"sensitive":false},"Text to Append":{"name":"Text to Append","displayName":"Text to Append","identifiesControllerService":false,"sensitive":false}},"style":{},"schedulingPeriod":"0 sec","schedulingStrategy":"TIMER_DRIVEN","executionNode":"ALL","penaltyDuration":"30 sec","yieldDuration":"1 sec","bulletinLevel":"WARN","runDurationMillis":25,"concurrentlySchedulableTaskCount":1,"autoTerminatedRelationships":["failure"],"scheduledState":"ENABLED","retryCount":10,"retriedRelationships":[],"backoffMechanism":"PENALIZE_FLOWFILE","maxBackoffPeriod":"10 mins","componentType":"PROCESSOR","groupIdentifier":"93491341-5bcf-3f1a-9be2-21eeb11c7437"},{"identifier":"e8f81b8c-95ea-3799-bc06-c63b76d2d791","instanceIdentifier":"cbac66ca-50ef-3dc5-849c-2d50f00d58a5","name":"MergeContent","comments":"","position":{"x":336.0,"y":768.0},"type":"org.apache.nifi.processors.standard.MergeContent","bundle":{"group":"org.apache.nifi","artifact":"nifi-standard-nar","version":"1.21.0"},"properties":{"Keep Path":"false","Maximum Group Size":null,"Merge Strategy":"Bin-Packing Algorithm","Attribute Strategy":"Keep All Unique Attributes","Compression Level":"1","Maximum Number of Entries":"1000","Minimum Group Size":"0 B","Maximum number of Bins":"5","Tar Modified Time":"${file.lastModifiedTime}","Delimiter Strategy":"Text","Merge Format":"Binary Concatenation","Footer File":null,"Max Bin Age":null,"Demarcator File":",","Correlation Attribute Name":null,"Header File":null,"mergecontent-metadata-strategy":"Do Not Merge Uncommon Metadata","Minimum Number of Entries":"2"},"propertyDescriptors":{"Keep Path":{"name":"Keep Path","displayName":"Keep Path","identifiesControllerService":false,"sensitive":false},"Maximum Group Size":{"name":"Maximum Group Size","displayName":"Maximum Group Size","identifiesControllerService":false,"sensitive":false},"Merge Strategy":{"name":"Merge Strategy","displayName":"Merge Strategy","identifiesControllerService":false,"sensitive":false},"Attribute Strategy":{"name":"Attribute Strategy","displayName":"Attribute Strategy","identifiesControllerService":false,"sensitive":false},"Compression Level":{"name":"Compression Level","displayName":"Compression Level","identifiesControllerService":false,"sensitive":false},"Maximum Number of Entries":{"name":"Maximum Number of Entries","displayName":"Maximum Number of Entries","identifiesControllerService":false,"sensitive":false},"Minimum Group Size":{"name":"Minimum Group Size","displayName":"Minimum Group Size","identifiesControllerService":false,"sensitive":false},"Maximum number of Bins":{"name":"Maximum number of Bins","displayName":"Maximum number of Bins","identifiesControllerService":false,"sensitive":false},"Tar Modified Time":{"name":"Tar Modified Time","displayName":"Tar Modified Time","identifiesControllerService":false,"sensitive":false},"Delimiter Strategy":{"name":"Delimiter Strategy","displayName":"Delimiter Strategy","identifiesControllerService":false,"sensitive":false},"Merge Format":{"name":"Merge Format","displayName":"Merge Format","identifiesControllerService":false,"sensitive":false},"Footer File":{"name":"Footer File","displayName":"Footer","identifiesControllerService":false,"sensitive":false,"resourceDefinition":{"cardinality":"SINGLE","resourceTypes":["TEXT","FILE"]}},"Max Bin Age":{"name":"Max Bin Age","displayName":"Max Bin Age","identifiesControllerService":false,"sensitive":false},"Demarcator File":{"name":"Demarcator File","displayName":"Demarcator","identifiesControllerService":false,"sensitive":false,"resourceDefinition":{"cardinality":"SINGLE","resourceTypes":["TEXT","FILE"]}},"Correlation Attribute Name":{"name":"Correlation Attribute Name","displayName":"Correlation Attribute Name","identifiesControllerService":false,"sensitive":false},"Header File":{"name":"Header File","displayName":"Header","identifiesControllerService":false,"sensitive":false,"resourceDefinition":{"cardinality":"SINGLE","resourceTypes":["TEXT","FILE"]}},"mergecontent-metadata-strategy":{"name":"mergecontent-metadata-strategy","displayName":"Metadata Strategy","identifiesControllerService":false,"sensitive":false},"Minimum Number of Entries":{"name":"Minimum Number of Entries","displayName":"Minimum Number of Entries","identifiesControllerService":false,"sensitive":false}},"style":{},"schedulingPeriod":"0 sec","schedulingStrategy":"TIMER_DRIVEN","executionNode":"ALL","penaltyDuration":"30 sec","yieldDuration":"1 sec","bulletinLevel":"WARN","runDurationMillis":0,"concurrentlySchedulableTaskCount":1,"autoTerminatedRelationships":["original","failure"],"scheduledState":"ENABLED","retryCount":10,"retriedRelationships":[],"backoffMechanism":"PENALIZE_FLOWFILE","maxBackoffPeriod":"10 mins","componentType":"PROCESSOR","groupIdentifier":"93491341-5bcf-3f1a-9be2-21eeb11c7437"},{"identifier":"f10ef940-3e17-3703-b8ed-8131eb50e532","instanceIdentifier":"cf401dfe-28b4-3f91-22ca-1779ff6c68f7","name":"ReplaceText","comments":"","position":{"x":1064.0,"y":728.0},"type":"org.apache.nifi.processors.standard.ReplaceText","bundle":{"group":"org.apache.nifi","artifact":"nifi-standard-nar","version":"1.21.0"},"properties":{"Regular Expression":"([^ ]+)","Replacement Value":"{\n\t\"@context\": \"${AT_CONTEXT}\",\n\t\"id\": \"myspecial_sub_id:1234567\",\n\t\"type\": \"Subscription\",\n\t\"entities\": [\n\t\t$1\n\t],\n\t\"notification\": {\n\t\t\"endpoint\": {\n\t\t\t\"uri\": \"${NOTIFICATION_HOST}:${NOTIFICATION_PORT}/${NOTIFICATION_PATH}\",\n\t\t\t\"accept\": \"application/json\"\n\t\t}\n\t}\n}","Evaluation Mode":"Line-by-Line","Text to Prepend":null,"Line-by-Line Evaluation Mode":"All","Character Set":"UTF-8","Maximum Buffer Size":"1 MB","Replacement Strategy":"Regex Replace","Text to Append":null},"propertyDescriptors":{"Regular Expression":{"name":"Regular Expression","displayName":"Search Value","identifiesControllerService":false,"sensitive":false},"Replacement Value":{"name":"Replacement Value","displayName":"Replacement Value","identifiesControllerService":false,"sensitive":false},"Evaluation Mode":{"name":"Evaluation Mode","displayName":"Evaluation Mode","identifiesControllerService":false,"sensitive":false},"Text to Prepend":{"name":"Text to Prepend","displayName":"Text to Prepend","identifiesControllerService":false,"sensitive":false},"Line-by-Line Evaluation Mode":{"name":"Line-by-Line Evaluation Mode","displayName":"Line-by-Line Evaluation Mode","identifiesControllerService":false,"sensitive":false},"Character Set":{"name":"Character Set","displayName":"Character Set","identifiesControllerService":false,"sensitive":false},"Maximum Buffer Size":{"name":"Maximum Buffer Size","displayName":"Maximum Buffer Size","identifiesControllerService":false,"sensitive":false},"Replacement Strategy":{"name":"Replacement Strategy","displayName":"Replacement Strategy","identifiesControllerService":false,"sensitive":false},"Text to Append":{"name":"Text to Append","displayName":"Text to Append","identifiesControllerService":false,"sensitive":false}},"style":{},"schedulingPeriod":"0 sec","schedulingStrategy":"TIMER_DRIVEN","executionNode":"ALL","penaltyDuration":"30 sec","yieldDuration":"1 sec","bulletinLevel":"WARN","runDurationMillis":25,"concurrentlySchedulableTaskCount":1,"autoTerminatedRelationships":["failure"],"scheduledState":"ENABLED","retryCount":10,"retriedRelationships":[],"backoffMechanism":"PENALIZE_FLOWFILE","maxBackoffPeriod":"10 mins","componentType":"PROCESSOR","groupIdentifier":"93491341-5bcf-3f1a-9be2-21eeb11c7437"},{"identifier":"620bf838-a2db-3460-adf5-807f3e18cd21","instanceIdentifier":"77c3751c-ddcf-3230-cb96-f4062d091299","name":"ListenHTTP","comments":"","position":{"x":896.0,"y":480.0},"type":"org.apache.nifi.processors.standard.ListenHTTP","bundle":{"group":"org.apache.nifi","artifact":"nifi-standard-nar","version":"1.21.0"},"properties":{"authorized-issuer-dn-pattern":".*","multipart-request-max-size":"1 MB","record-writer":null,"HTTP Protocols":"HTTP_1_1","HTTP Headers to receive as Attributes (Regex)":null,"health-check-port":null,"Authorized DN Pattern":".*","max-thread-pool-size":"200","Base Path":"${NOTIFICATION_PATH}","multipart-read-buffer-size":"512 KB","SSL Context Service":null,"Max Unconfirmed Flowfile Time":"60 secs","Max Data to Receive per Second":null,"client-authentication":"AUTO","Return Code":"200","record-reader":null,"Listening Port":"${NOTIFICATION_PORT}"},"propertyDescriptors":{"authorized-issuer-dn-pattern":{"name":"authorized-issuer-dn-pattern","displayName":"Authorized Issuer DN Pattern","identifiesControllerService":false,"sensitive":false},"multipart-request-max-size":{"name":"multipart-request-max-size","displayName":"Multipart Request Max Size","identifiesControllerService":false,"sensitive":false},"record-writer":{"name":"record-writer","displayName":"Record Writer","identifiesControllerService":true,"sensitive":false},"HTTP Protocols":{"name":"HTTP Protocols","displayName":"HTTP Protocols","identifiesControllerService":false,"sensitive":false},"HTTP Headers to receive as Attributes (Regex)":{"name":"HTTP Headers to receive as Attributes (Regex)","displayName":"HTTP Headers to receive as Attributes (Regex)","identifiesControllerService":false,"sensitive":false},"health-check-port":{"name":"health-check-port","displayName":"Listening Port for Health Check Requests","identifiesControllerService":false,"sensitive":false},"Authorized DN Pattern":{"name":"Authorized DN Pattern","displayName":"Authorized Subject DN Pattern","identifiesControllerService":false,"sensitive":false},"max-thread-pool-size":{"name":"max-thread-pool-size","displayName":"Maximum Thread Pool Size","identifiesControllerService":false,"sensitive":false},"Base Path":{"name":"Base Path","displayName":"Base Path","identifiesControllerService":false,"sensitive":false},"multipart-read-buffer-size":{"name":"multipart-read-buffer-size","displayName":"Multipart Read Buffer Size","identifiesControllerService":false,"sensitive":false},"SSL Context Service":{"name":"SSL Context Service","displayName":"SSL Context Service","identifiesControllerService":true,"sensitive":false},"Max Unconfirmed Flowfile Time":{"name":"Max Unconfirmed Flowfile Time","displayName":"Max Unconfirmed Flowfile Time","identifiesControllerService":false,"sensitive":false},"Max Data to Receive per Second":{"name":"Max Data to Receive per Second","displayName":"Max Data to Receive per Second","identifiesControllerService":false,"sensitive":false},"client-authentication":{"name":"client-authentication","displayName":"Client Authentication","identifiesControllerService":false,"sensitive":false},"Return Code":{"name":"Return Code","displayName":"Return Code","identifiesControllerService":false,"sensitive":false},"record-reader":{"name":"record-reader","displayName":"Record Reader","identifiesControllerService":true,"sensitive":false},"Listening Port":{"name":"Listening Port","displayName":"Listening Port","identifiesControllerService":false,"sensitive":false}},"style":{},"schedulingPeriod":"0 sec","schedulingStrategy":"TIMER_DRIVEN","executionNode":"ALL","penaltyDuration":"30 sec","yieldDuration":"1 sec","bulletinLevel":"WARN","runDurationMillis":0,"concurrentlySchedulableTaskCount":1,"autoTerminatedRelationships":[],"scheduledState":"ENABLED","retryCount":10,"retriedRelationships":[],"backoffMechanism":"PENALIZE_FLOWFILE","maxBackoffPeriod":"10 mins","componentType":"PROCESSOR","groupIdentifier":"93491341-5bcf-3f1a-9be2-21eeb11c7437"},{"identifier":"1882950a-d3ae-37cd-97e0-bbfa5d644a92","instanceIdentifier":"5e81be0d-d4b5-3f14-c6a5-0c07d7e86584","name":"InvokeHTTP","comments":"","position":{"x":736.0,"y":184.0},"type":"org.apache.nifi.processors.standard.InvokeHTTP","bundle":{"group":"org.apache.nifi","artifact":"nifi-standard-nar","version":"1.21.0"},"properties":{"Proxy Host":null,"Attributes to Send":null,"use-etag":"false","proxy-configuration-service":null,"Proxy Type":"http","cookie-strategy":"DISABLED","Connection Timeout":"5 secs","send-message-body":"true","set-form-filename":"true","Always Output Response":"false","etag-max-cache-size":"10MB","Content-Encoding":"DISABLED","disable-http2":"False","idle-timeout":"5 mins","Put Response Body In Attribute":null,"Use Chunked Encoding":"false","Follow Redirects":"True","Remote URL":"${NGSILD_HOST}/ngsi-ld/v1/subscriptions","form-body-form-name":null,"Content-Type":"application/ld+json","flow-file-naming-strategy":"RANDOM","max-idle-connections":"5","invokehttp-proxy-user":null,"Read Timeout":"15 secs","Max Length To Put In Attribute":"256","ignore-response-content":"false","Proxy Port":null,"SSL Context Service":null,"Digest Authentication":"false","HTTP Method":"POST","Add Response Headers to Request":"false","oauth2-access-token-provider":null,"Basic Authentication Username":null,"Include Date Header":"True","Penalize on \"No Retry\"":"false","Useragent":null},"propertyDescriptors":{"Proxy Host":{"name":"Proxy Host","displayName":"Proxy Host","identifiesControllerService":false,"sensitive":false},"Attributes to Send":{"name":"Attributes to Send","displayName":"Request Header Attributes Pattern","identifiesControllerService":false,"sensitive":false},"use-etag":{"name":"use-etag","displayName":"Response Cache Enabled","identifiesControllerService":false,"sensitive":false},"proxy-configuration-service":{"name":"proxy-configuration-service","displayName":"Proxy Configuration Service","identifiesControllerService":true,"sensitive":false},"Proxy Type":{"name":"Proxy Type","displayName":"Proxy Type","identifiesControllerService":false,"sensitive":false},"Basic Authentication Password":{"name":"Basic Authentication Password","displayName":"Request Password","identifiesControllerService":false,"sensitive":true},"cookie-strategy":{"name":"cookie-strategy","displayName":"Response Cookie Strategy","identifiesControllerService":false,"sensitive":false},"Connection Timeout":{"name":"Connection Timeout","displayName":"Socket Connect Timeout","identifiesControllerService":false,"sensitive":false},"send-message-body":{"name":"send-message-body","displayName":"Request Body Enabled","identifiesControllerService":false,"sensitive":false},"set-form-filename":{"name":"set-form-filename","displayName":"Request Multipart Form-Data Filename Enabled","identifiesControllerService":false,"sensitive":false},"Always Output Response":{"name":"Always Output Response","displayName":"Response Generation Required","identifiesControllerService":false,"sensitive":false},"etag-max-cache-size":{"name":"etag-max-cache-size","displayName":"Response Cache Size","identifiesControllerService":false,"sensitive":false},"Content-Encoding":{"name":"Content-Encoding","displayName":"Request Content-Encoding","identifiesControllerService":false,"sensitive":false},"disable-http2":{"name":"disable-http2","displayName":"HTTP/2 Disabled","identifiesControllerService":false,"sensitive":false},"idle-timeout":{"name":"idle-timeout","displayName":"Socket Idle Timeout","identifiesControllerService":false,"sensitive":false},"Put Response Body In Attribute":{"name":"Put Response Body In Attribute","displayName":"Response Body Attribute Name","identifiesControllerService":false,"sensitive":false},"Use Chunked Encoding":{"name":"Use Chunked Encoding","displayName":"Request Chunked Transfer-Encoding Enabled","identifiesControllerService":false,"sensitive":false},"Follow Redirects":{"name":"Follow Redirects","displayName":"Response Redirects Enabled","identifiesControllerService":false,"sensitive":false},"Remote URL":{"name":"Remote URL","displayName":"HTTP URL","identifiesControllerService":false,"sensitive":false},"form-body-form-name":{"name":"form-body-form-name","displayName":"Request Multipart Form-Data Name","identifiesControllerService":false,"sensitive":false},"Content-Type":{"name":"Content-Type","displayName":"Request Content-Type","identifiesControllerService":false,"sensitive":false},"flow-file-naming-strategy":{"name":"flow-file-naming-strategy","displayName":"Response FlowFile Naming Strategy","identifiesControllerService":false,"sensitive":false},"max-idle-connections":{"name":"max-idle-connections","displayName":"Socket Idle Connections","identifiesControllerService":false,"sensitive":false},"invokehttp-proxy-user":{"name":"invokehttp-proxy-user","displayName":"Proxy Username","identifiesControllerService":false,"sensitive":false},"Read Timeout":{"name":"Read Timeout","displayName":"Socket Read Timeout","identifiesControllerService":false,"sensitive":false},"Max Length To Put In Attribute":{"name":"Max Length To Put In Attribute","displayName":"Response Body Attribute Size","identifiesControllerService":false,"sensitive":false},"invokehttp-proxy-password":{"name":"invokehttp-proxy-password","displayName":"Proxy Password","identifiesControllerService":false,"sensitive":true},"ignore-response-content":{"name":"ignore-response-content","displayName":"Response Body Ignored","identifiesControllerService":false,"sensitive":false},"Proxy Port":{"name":"Proxy Port","displayName":"Proxy Port","identifiesControllerService":false,"sensitive":false},"SSL Context Service":{"name":"SSL Context Service","displayName":"SSL Context Service","identifiesControllerService":true,"sensitive":false},"Digest Authentication":{"name":"Digest Authentication","displayName":"Request Digest Authentication Enabled","identifiesControllerService":false,"sensitive":false},"HTTP Method":{"name":"HTTP Method","displayName":"HTTP Method","identifiesControllerService":false,"sensitive":false},"Add Response Headers to Request":{"name":"Add Response Headers to Request","displayName":"Response Header Request Attributes Enabled","identifiesControllerService":false,"sensitive":false},"oauth2-access-token-provider":{"name":"oauth2-access-token-provider","displayName":"Request OAuth2 Access Token Provider","identifiesControllerService":true,"sensitive":false},"Basic Authentication Username":{"name":"Basic Authentication Username","displayName":"Request Username","identifiesControllerService":false,"sensitive":false},"Include Date Header":{"name":"Include Date Header","displayName":"Request Date Header Enabled","identifiesControllerService":false,"sensitive":false},"Penalize on \"No Retry\"":{"name":"Penalize on \"No Retry\"","displayName":"Request Failure Penalization Enabled","identifiesControllerService":false,"sensitive":false},"Useragent":{"name":"Useragent","displayName":"Request User-Agent","identifiesControllerService":false,"sensitive":false}},"style":{},"schedulingPeriod":"0 sec","schedulingStrategy":"TIMER_DRIVEN","executionNode":"ALL","penaltyDuration":"30 sec","yieldDuration":"1 sec","bulletinLevel":"WARN","runDurationMillis":0,"concurrentlySchedulableTaskCount":1,"autoTerminatedRelationships":[],"scheduledState":"ENABLED","retryCount":10,"retriedRelationships":[],"backoffMechanism":"PENALIZE_FLOWFILE","maxBackoffPeriod":"10 mins","componentType":"PROCESSOR","groupIdentifier":"93491341-5bcf-3f1a-9be2-21eeb11c7437"},{"identifier":"9d42a62b-b252-329c-b503-e614f090bbb3","instanceIdentifier":"8581cfac-bd3b-30e0-c122-52989998cf01","name":"GenerateFlowFile","comments":"","position":{"x":232.0,"y":200.0},"type":"org.apache.nifi.processors.standard.GenerateFlowFile","bundle":{"group":"org.apache.nifi","artifact":"nifi-standard-nar","version":"1.21.0"},"properties":{"character-set":"UTF-8","File Size":"0B","mime-type":null,"generate-ff-custom-text":"${ENTITY_TYPES}","Batch Size":"1","Unique FlowFiles":"false","Data Format":"Text"},"propertyDescriptors":{"character-set":{"name":"character-set","displayName":"Character Set","identifiesControllerService":false,"sensitive":false},"File Size":{"name":"File Size","displayName":"File Size","identifiesControllerService":false,"sensitive":false},"mime-type":{"name":"mime-type","displayName":"Mime Type","identifiesControllerService":false,"sensitive":false},"generate-ff-custom-text":{"name":"generate-ff-custom-text","displayName":"Custom Text","identifiesControllerService":false,"sensitive":false},"Batch Size":{"name":"Batch Size","displayName":"Batch Size","identifiesControllerService":false,"sensitive":false},"Unique FlowFiles":{"name":"Unique FlowFiles","displayName":"Unique FlowFiles","identifiesControllerService":false,"sensitive":false},"Data Format":{"name":"Data Format","displayName":"Data Format","identifiesControllerService":false,"sensitive":false}},"style":{},"schedulingPeriod":"1 min","schedulingStrategy":"TIMER_DRIVEN","executionNode":"ALL","penaltyDuration":"30 sec","yieldDuration":"1 sec","bulletinLevel":"WARN","runDurationMillis":0,"concurrentlySchedulableTaskCount":1,"autoTerminatedRelationships":[],"scheduledState":"ENABLED","retryCount":10,"retriedRelationships":[],"backoffMechanism":"PENALIZE_FLOWFILE","maxBackoffPeriod":"10 mins","componentType":"PROCESSOR","groupIdentifier":"93491341-5bcf-3f1a-9be2-21eeb11c7437"},{"identifier":"2d9d6ccc-a121-3c91-b674-26a4cea2d280","instanceIdentifier":"a165af73-251d-3a32-6bf0-082340e192ec","name":"LogMessage","comments":"","position":{"x":1280.0,"y":-8.0},"type":"org.apache.nifi.processors.standard.LogMessage","bundle":{"group":"org.apache.nifi","artifact":"nifi-standard-nar","version":"1.21.0"},"properties":{"log-message":null,"log-level":"info","log-prefix":null},"propertyDescriptors":{"log-message":{"name":"log-message","displayName":"Log message","identifiesControllerService":false,"sensitive":false},"log-level":{"name":"log-level","displayName":"Log Level","identifiesControllerService":false,"sensitive":false},"log-prefix":{"name":"log-prefix","displayName":"Log prefix","identifiesControllerService":false,"sensitive":false}},"style":{},"schedulingPeriod":"0 sec","schedulingStrategy":"TIMER_DRIVEN","executionNode":"ALL","penaltyDuration":"30 sec","yieldDuration":"1 sec","bulletinLevel":"WARN","runDurationMillis":25,"concurrentlySchedulableTaskCount":1,"autoTerminatedRelationships":["success"],"scheduledState":"ENABLED","retryCount":10,"retriedRelationships":[],"backoffMechanism":"PENALIZE_FLOWFILE","maxBackoffPeriod":"10 mins","componentType":"PROCESSOR","groupIdentifier":"93491341-5bcf-3f1a-9be2-21eeb11c7437"}],"inputPorts":[],"outputPorts":[{"identifier":"00c06b2e-8245-316d-a97b-72fbba2f0412","instanceIdentifier":"aa42b4b7-8818-3128-496d-51edba4f0467","name":"NGSI-LD Notification Data","position":{"x":1464.0,"y":656.0},"type":"OUTPUT_PORT","concurrentlySchedulableTaskCount":1,"scheduledState":"ENABLED","allowRemoteAccess":false,"componentType":"OUTPUT_PORT","groupIdentifier":"93491341-5bcf-3f1a-9be2-21eeb11c7437"}],"connections":[{"identifier":"5059ad9c-ece9-3534-94c9-d465869bf283","instanceIdentifier":"95fcd17e-28aa-3c7d-94c4-8d520fed5885","name":"","source":{"id":"620bf838-a2db-3460-adf5-807f3e18cd21","type":"PROCESSOR","groupId":"93491341-5bcf-3f1a-9be2-21eeb11c7437","name":"ListenHTTP","comments":"","instanceIdentifier":"77c3751c-ddcf-3230-cb96-f4062d091299"},"destination":{"id":"27e4e5f8-585a-35b1-a830-be0f3cf20252","type":"PROCESSOR","groupId":"93491341-5bcf-3f1a-9be2-21eeb11c7437","name":"EvaluateJsonPath","comments":"","instanceIdentifier":"ffe2504f-220b-3a76-d38f-c8668b6997e0"},"labelIndex":1,"zIndex":0,"selectedRelationships":["success"],"backPressureObjectThreshold":10000,"backPressureDataSizeThreshold":"1 GB","flowFileExpiration":"0 sec","prioritizers":[],"bends":[],"loadBalanceStrategy":"DO_NOT_LOAD_BALANCE","partitioningAttribute":"","loadBalanceCompression":"DO_NOT_COMPRESS","componentType":"CONNECTION","groupIdentifier":"93491341-5bcf-3f1a-9be2-21eeb11c7437"},{"identifier":"8ab9ba9e-f58a-302b-89c1-69e01e9b88a3","instanceIdentifier":"7694f647-0ccd-371a-2be6-233cf1ff6078","name":"","source":{"id":"27e4e5f8-585a-35b1-a830-be0f3cf20252","type":"PROCESSOR","groupId":"93491341-5bcf-3f1a-9be2-21eeb11c7437","name":"EvaluateJsonPath","comments":"","instanceIdentifier":"ffe2504f-220b-3a76-d38f-c8668b6997e0"},"destination":{"id":"00c06b2e-8245-316d-a97b-72fbba2f0412","type":"OUTPUT_PORT","groupId":"93491341-5bcf-3f1a-9be2-21eeb11c7437","name":"NGSI-LD Notification Data","instanceIdentifier":"aa42b4b7-8818-3128-496d-51edba4f0467"},"labelIndex":1,"zIndex":0,"selectedRelationships":["matched"],"backPressureObjectThreshold":10000,"backPressureDataSizeThreshold":"1 GB","flowFileExpiration":"0 sec","prioritizers":[],"bends":[],"loadBalanceStrategy":"DO_NOT_LOAD_BALANCE","partitioningAttribute":"","loadBalanceCompression":"DO_NOT_COMPRESS","componentType":"CONNECTION","groupIdentifier":"93491341-5bcf-3f1a-9be2-21eeb11c7437"},{"identifier":"b80f3ec5-87fc-32d0-807c-abed3e445ce5","instanceIdentifier":"8d8321e7-efa4-3c0c-9505-15520bbd5334","name":"","source":{"id":"7d97f867-c218-3d56-ae3e-38a1f5cbefda","type":"PROCESSOR","groupId":"93491341-5bcf-3f1a-9be2-21eeb11c7437","name":"ReplaceText","comments":"","instanceIdentifier":"b9611d46-31d6-3916-de20-0e1dc68d8d4f"},"destination":{"id":"e8f81b8c-95ea-3799-bc06-c63b76d2d791","type":"PROCESSOR","groupId":"93491341-5bcf-3f1a-9be2-21eeb11c7437","name":"MergeContent","comments":"","instanceIdentifier":"cbac66ca-50ef-3dc5-849c-2d50f00d58a5"},"labelIndex":1,"zIndex":0,"selectedRelationships":["success"],"backPressureObjectThreshold":10000,"backPressureDataSizeThreshold":"1 GB","flowFileExpiration":"0 sec","prioritizers":[],"bends":[],"loadBalanceStrategy":"DO_NOT_LOAD_BALANCE","partitioningAttribute":"","loadBalanceCompression":"DO_NOT_COMPRESS","componentType":"CONNECTION","groupIdentifier":"93491341-5bcf-3f1a-9be2-21eeb11c7437"},{"identifier":"448e93b5-6177-3d7b-9a15-512f8a9d8424","instanceIdentifier":"9b7350cb-deb2-35b4-e803-a40b6bf34e38","name":"","source":{"id":"9d42a62b-b252-329c-b503-e614f090bbb3","type":"PROCESSOR","groupId":"93491341-5bcf-3f1a-9be2-21eeb11c7437","name":"GenerateFlowFile","comments":"","instanceIdentifier":"8581cfac-bd3b-30e0-c122-52989998cf01"},"destination":{"id":"5082c2a8-e27c-3b27-9e5c-76b3f19e8786","type":"PROCESSOR","groupId":"93491341-5bcf-3f1a-9be2-21eeb11c7437","name":"SplitContent","comments":"","instanceIdentifier":"6e08028b-0786-324a-039b-718c38066555"},"labelIndex":1,"zIndex":0,"selectedRelationships":["success"],"backPressureObjectThreshold":10000,"backPressureDataSizeThreshold":"1 GB","flowFileExpiration":"0 sec","prioritizers":[],"bends":[],"loadBalanceStrategy":"DO_NOT_LOAD_BALANCE","partitioningAttribute":"","loadBalanceCompression":"DO_NOT_COMPRESS","componentType":"CONNECTION","groupIdentifier":"93491341-5bcf-3f1a-9be2-21eeb11c7437"},{"identifier":"521cc49f-a98c-3b41-bd16-8971c224f718","instanceIdentifier":"6991b169-8076-3db2-c3c4-242e57314823","name":"","source":{"id":"5082c2a8-e27c-3b27-9e5c-76b3f19e8786","type":"PROCESSOR","groupId":"93491341-5bcf-3f1a-9be2-21eeb11c7437","name":"SplitContent","comments":"","instanceIdentifier":"6e08028b-0786-324a-039b-718c38066555"},"destination":{"id":"7d97f867-c218-3d56-ae3e-38a1f5cbefda","type":"PROCESSOR","groupId":"93491341-5bcf-3f1a-9be2-21eeb11c7437","name":"ReplaceText","comments":"","instanceIdentifier":"b9611d46-31d6-3916-de20-0e1dc68d8d4f"},"labelIndex":1,"zIndex":0,"selectedRelationships":["splits"],"backPressureObjectThreshold":10000,"backPressureDataSizeThreshold":"1 GB","flowFileExpiration":"0 sec","prioritizers":[],"bends":[],"loadBalanceStrategy":"DO_NOT_LOAD_BALANCE","partitioningAttribute":"","loadBalanceCompression":"DO_NOT_COMPRESS","componentType":"CONNECTION","groupIdentifier":"93491341-5bcf-3f1a-9be2-21eeb11c7437"},{"identifier":"eef6d023-01bf-36dc-9004-41acd6dfd4aa","instanceIdentifier":"b3658409-905a-3800-09c0-eaa7d1745b52","name":"","source":{"id":"1882950a-d3ae-37cd-97e0-bbfa5d644a92","type":"PROCESSOR","groupId":"93491341-5bcf-3f1a-9be2-21eeb11c7437","name":"InvokeHTTP","comments":"","instanceIdentifier":"5e81be0d-d4b5-3f14-c6a5-0c07d7e86584"},"destination":{"id":"2d9d6ccc-a121-3c91-b674-26a4cea2d280","type":"PROCESSOR","groupId":"93491341-5bcf-3f1a-9be2-21eeb11c7437","name":"LogMessage","comments":"","instanceIdentifier":"a165af73-251d-3a32-6bf0-082340e192ec"},"labelIndex":1,"zIndex":0,"selectedRelationships":["Response","No Retry","Retry","Original","Failure"],"backPressureObjectThreshold":10000,"backPressureDataSizeThreshold":"1 GB","flowFileExpiration":"0 sec","prioritizers":[],"bends":[],"loadBalanceStrategy":"DO_NOT_LOAD_BALANCE","partitioningAttribute":"","loadBalanceCompression":"DO_NOT_COMPRESS","componentType":"CONNECTION","groupIdentifier":"93491341-5bcf-3f1a-9be2-21eeb11c7437"},{"identifier":"2064fc94-5e87-3ea8-9f7d-5224b9daa0f6","instanceIdentifier":"f4e13a8e-25ad-3f3d-a5d5-24d732bc9ea6","name":"","source":{"id":"e8f81b8c-95ea-3799-bc06-c63b76d2d791","type":"PROCESSOR","groupId":"93491341-5bcf-3f1a-9be2-21eeb11c7437","name":"MergeContent","comments":"","instanceIdentifier":"cbac66ca-50ef-3dc5-849c-2d50f00d58a5"},"destination":{"id":"f10ef940-3e17-3703-b8ed-8131eb50e532","type":"PROCESSOR","groupId":"93491341-5bcf-3f1a-9be2-21eeb11c7437","name":"ReplaceText","comments":"","instanceIdentifier":"cf401dfe-28b4-3f91-22ca-1779ff6c68f7"},"labelIndex":1,"zIndex":0,"selectedRelationships":["merged"],"backPressureObjectThreshold":10000,"backPressureDataSizeThreshold":"1 GB","flowFileExpiration":"0 sec","prioritizers":[],"bends":[],"loadBalanceStrategy":"DO_NOT_LOAD_BALANCE","partitioningAttribute":"","loadBalanceCompression":"DO_NOT_COMPRESS","componentType":"CONNECTION","groupIdentifier":"93491341-5bcf-3f1a-9be2-21eeb11c7437"},{"identifier":"984769e7-ec6a-34ca-97b6-c4f667e8bcdd","instanceIdentifier":"11069320-776c-3f7e-f038-0043ac86eb68","name":"","source":{"id":"f10ef940-3e17-3703-b8ed-8131eb50e532","type":"PROCESSOR","groupId":"93491341-5bcf-3f1a-9be2-21eeb11c7437","name":"ReplaceText","comments":"","instanceIdentifier":"cf401dfe-28b4-3f91-22ca-1779ff6c68f7"},"destination":{"id":"1882950a-d3ae-37cd-97e0-bbfa5d644a92","type":"PROCESSOR","groupId":"93491341-5bcf-3f1a-9be2-21eeb11c7437","name":"InvokeHTTP","comments":"","instanceIdentifier":"5e81be0d-d4b5-3f14-c6a5-0c07d7e86584"},"labelIndex":1,"zIndex":0,"selectedRelationships":["success"],"backPressureObjectThreshold":10000,"backPressureDataSizeThreshold":"1 GB","flowFileExpiration":"0 sec","prioritizers":[],"bends":[],"loadBalanceStrategy":"DO_NOT_LOAD_BALANCE","partitioningAttribute":"","loadBalanceCompression":"DO_NOT_COMPRESS","componentType":"CONNECTION","groupIdentifier":"93491341-5bcf-3f1a-9be2-21eeb11c7437"}],"labels":[],"funnels":[],"controllerServices":[],"variables":{},"defaultFlowFileExpiration":"0 sec","defaultBackPressureObjectThreshold":10000,"defaultBackPressureDataSizeThreshold":"1 GB","componentType":"PROCESS_GROUP","flowFileConcurrency":"UNBOUNDED","flowFileOutboundPolicy":"STREAM_WHEN_AVAILABLE","groupIdentifier":"3e06a40c-e274-3903-99d0-9c45b5531e80"},{"identifier":"3d4a75a2-18f7-3432-b0ef-fa8f31ca6fb8","instanceIdentifier":"12526f06-a771-3706-136e-8cabcf70b101","name":"NGSI-LD continuous Temporal Query ","comments":"","position":{"x":606.0,"y":967.0},"processGroups":[],"remoteProcessGroups":[],"processors":[{"identifier":"289764b0-4b54-3d6f-a6ba-6511cc398fc8","instanceIdentifier":"8ccd4af5-1f5b-37e4-0d5c-825978f6a84a","name":"GenerateFlowFile","comments":"","position":{"x":128.0,"y":0.0},"type":"org.apache.nifi.processors.standard.GenerateFlowFile","bundle":{"group":"org.apache.nifi","artifact":"nifi-standard-nar","version":"1.21.0"},"properties":{"character-set":"UTF-8","File Size":"0B","mime-type":null,"generate-ff-custom-text":"${ENTITY_TYPES}","Batch Size":"1","Unique FlowFiles":"false","Data Format":"Text"},"propertyDescriptors":{"character-set":{"name":"character-set","displayName":"Character Set","identifiesControllerService":false,"sensitive":false},"File Size":{"name":"File Size","displayName":"File Size","identifiesControllerService":false,"sensitive":false},"mime-type":{"name":"mime-type","displayName":"Mime Type","identifiesControllerService":false,"sensitive":false},"generate-ff-custom-text":{"name":"generate-ff-custom-text","displayName":"Custom Text","identifiesControllerService":false,"sensitive":false},"Batch Size":{"name":"Batch Size","displayName":"Batch Size","identifiesControllerService":false,"sensitive":false},"Unique FlowFiles":{"name":"Unique FlowFiles","displayName":"Unique FlowFiles","identifiesControllerService":false,"sensitive":false},"Data Format":{"name":"Data Format","displayName":"Data Format","identifiesControllerService":false,"sensitive":false}},"style":{},"schedulingPeriod":"10 sec","schedulingStrategy":"TIMER_DRIVEN","executionNode":"ALL","penaltyDuration":"30 sec","yieldDuration":"1 sec","bulletinLevel":"WARN","runDurationMillis":0,"concurrentlySchedulableTaskCount":1,"autoTerminatedRelationships":[],"scheduledState":"ENABLED","retryCount":10,"retriedRelationships":[],"backoffMechanism":"PENALIZE_FLOWFILE","maxBackoffPeriod":"10 mins","componentType":"PROCESSOR","groupIdentifier":"3d4a75a2-18f7-3432-b0ef-fa8f31ca6fb8"},{"identifier":"3a35ae06-e813-3e9c-a06f-35e859e6917b","instanceIdentifier":"285f24f5-75f6-33d6-d0db-11fcbfb22c4e","name":"SplitContent","comments":"","position":{"x":440.0,"y":320.0},"type":"org.apache.nifi.processors.standard.SplitContent","bundle":{"group":"org.apache.nifi","artifact":"nifi-standard-nar","version":"1.21.0"},"properties":{"Byte Sequence Location":"Trailing","Keep Byte Sequence":"false","Byte Sequence Format":"Text","Byte Sequence":","},"propertyDescriptors":{"Byte Sequence Location":{"name":"Byte Sequence Location","displayName":"Byte Sequence Location","identifiesControllerService":false,"sensitive":false},"Keep Byte Sequence":{"name":"Keep Byte Sequence","displayName":"Keep Byte Sequence","identifiesControllerService":false,"sensitive":false},"Byte Sequence Format":{"name":"Byte Sequence Format","displayName":"Byte Sequence Format","identifiesControllerService":false,"sensitive":false},"Byte Sequence":{"name":"Byte Sequence","displayName":"Byte Sequence","identifiesControllerService":false,"sensitive":false}},"style":{},"schedulingPeriod":"0 sec","schedulingStrategy":"TIMER_DRIVEN","executionNode":"ALL","penaltyDuration":"30 sec","yieldDuration":"1 sec","bulletinLevel":"WARN","runDurationMillis":0,"concurrentlySchedulableTaskCount":1,"autoTerminatedRelationships":["original"],"scheduledState":"ENABLED","retryCount":10,"retriedRelationships":[],"backoffMechanism":"PENALIZE_FLOWFILE","maxBackoffPeriod":"10 mins","componentType":"PROCESSOR","groupIdentifier":"3d4a75a2-18f7-3432-b0ef-fa8f31ca6fb8"},{"identifier":"e70882d7-5bb2-3f36-8666-7cdc64c0cfab","instanceIdentifier":"c1ffcc9a-c8f8-3176-d8d1-7bbc8395f2cc","name":"ExtractText","comments":"","position":{"x":904.0,"y":528.0},"type":"org.apache.nifi.processors.standard.ExtractText","bundle":{"group":"org.apache.nifi","artifact":"nifi-standard-nar","version":"1.21.0"},"properties":{"Enable Unicode Predefined Character Classes":"false","Permit Whitespace and Comments in Pattern":"false","Enable Unicode-aware Case Folding":"false","Enable DOTALL Mode":"false","Enable Unix Lines Mode":"false","extract-text-enable-named-groups":"false","Maximum Buffer Size":"1 MB","Enable Canonical Equivalence":"false","callType":"(.*)","Enable Case-insensitive Matching":"false","Enable Multiline Mode":"false","Maximum Capture Group Length":"1024","Enable Literal Parsing of the Pattern":"false","Character Set":"UTF-8","Include Capture Group 0":"true","extract-text-enable-repeating-capture-group":"false"},"propertyDescriptors":{"Enable Unicode Predefined Character Classes":{"name":"Enable Unicode Predefined Character Classes","displayName":"Enable Unicode Predefined Character Classes","identifiesControllerService":false,"sensitive":false},"Permit Whitespace and Comments in Pattern":{"name":"Permit Whitespace and Comments in Pattern","displayName":"Permit Whitespace and Comments in Pattern","identifiesControllerService":false,"sensitive":false},"Enable Unicode-aware Case Folding":{"name":"Enable Unicode-aware Case Folding","displayName":"Enable Unicode-aware Case Folding","identifiesControllerService":false,"sensitive":false},"Enable DOTALL Mode":{"name":"Enable DOTALL Mode","displayName":"Enable DOTALL Mode","identifiesControllerService":false,"sensitive":false},"Enable Unix Lines Mode":{"name":"Enable Unix Lines Mode","displayName":"Enable Unix Lines Mode","identifiesControllerService":false,"sensitive":false},"extract-text-enable-named-groups":{"name":"extract-text-enable-named-groups","displayName":"Enable named group support","identifiesControllerService":false,"sensitive":false},"Maximum Buffer Size":{"name":"Maximum Buffer Size","displayName":"Maximum Buffer Size","identifiesControllerService":false,"sensitive":false},"Enable Canonical Equivalence":{"name":"Enable Canonical Equivalence","displayName":"Enable Canonical Equivalence","identifiesControllerService":false,"sensitive":false},"callType":{"name":"callType","displayName":"callType","identifiesControllerService":false,"sensitive":false},"Enable Case-insensitive Matching":{"name":"Enable Case-insensitive Matching","displayName":"Enable Case-insensitive Matching","identifiesControllerService":false,"sensitive":false},"Enable Multiline Mode":{"name":"Enable Multiline Mode","displayName":"Enable Multiline Mode","identifiesControllerService":false,"sensitive":false},"Maximum Capture Group Length":{"name":"Maximum Capture Group Length","displayName":"Maximum Capture Group Length","identifiesControllerService":false,"sensitive":false},"Enable Literal Parsing of the Pattern":{"name":"Enable Literal Parsing of the Pattern","displayName":"Enable Literal Parsing of the Pattern","identifiesControllerService":false,"sensitive":false},"Character Set":{"name":"Character Set","displayName":"Character Set","identifiesControllerService":false,"sensitive":false},"Include Capture Group 0":{"name":"Include Capture Group 0","displayName":"Include Capture Group 0","identifiesControllerService":false,"sensitive":false},"extract-text-enable-repeating-capture-group":{"name":"extract-text-enable-repeating-capture-group","displayName":"Enable repeating capture group","identifiesControllerService":false,"sensitive":false}},"style":{},"schedulingPeriod":"0 sec","schedulingStrategy":"TIMER_DRIVEN","executionNode":"ALL","penaltyDuration":"30 sec","yieldDuration":"1 sec","bulletinLevel":"WARN","runDurationMillis":0,"concurrentlySchedulableTaskCount":1,"autoTerminatedRelationships":["unmatched"],"scheduledState":"ENABLED","retryCount":10,"retriedRelationships":[],"backoffMechanism":"PENALIZE_FLOWFILE","maxBackoffPeriod":"10 mins","componentType":"PROCESSOR","groupIdentifier":"3d4a75a2-18f7-3432-b0ef-fa8f31ca6fb8"},{"identifier":"72d0db0d-c388-3ad8-a5eb-d22903025c21","instanceIdentifier":"08122f07-6105-35d4-ffd7-bedafef7e1f4","name":"Get Temporal Entities","comments":"","position":{"x":1224.0,"y":336.0},"type":"org.apache.nifi.processors.standard.InvokeHTTP","bundle":{"group":"org.apache.nifi","artifact":"nifi-standard-nar","version":"1.21.0"},"properties":{"Proxy Host":null,"Attributes to Send":null,"use-etag":"false","proxy-configuration-service":null,"Proxy Type":"http","cookie-strategy":"DISABLED","Connection Timeout":"5 secs","send-message-body":"true","set-form-filename":"true","Always Output Response":"false","etag-max-cache-size":"10MB","Content-Encoding":"DISABLED","disable-http2":"False","idle-timeout":"5 mins","Put Response Body In Attribute":null,"Use Chunked Encoding":"false","Follow Redirects":"True","Remote URL":"${NGSILD_HOST}/ngsi-ld/v1/temporal/entities?type=${callType}&timerel=after&timeAt=${now():minus(1800000):format(\"yyyy-MM-dd'T'HH:mm:ss'Z'\")}&timeproperty=modifiedAt","form-body-form-name":null,"Content-Type":"${mime.type}","flow-file-naming-strategy":"RANDOM","max-idle-connections":"5","Accept":"application/json","invokehttp-proxy-user":null,"Read Timeout":"15 secs","Max Length To Put In Attribute":"256","ignore-response-content":"false","Proxy Port":null,"SSL Context Service":null,"Digest Authentication":"false","HTTP Method":"GET","Add Response Headers to Request":"false","oauth2-access-token-provider":null,"Basic Authentication Username":null,"Include Date Header":"True","Penalize on \"No Retry\"":"false","Link":"<${AT_CONTEXT}>; rel=\"http://www.w3.org/ns/json-ld#context\"; type=\"application/ld+json\"","Useragent":null},"propertyDescriptors":{"Proxy Host":{"name":"Proxy Host","displayName":"Proxy Host","identifiesControllerService":false,"sensitive":false},"Attributes to Send":{"name":"Attributes to Send","displayName":"Request Header Attributes Pattern","identifiesControllerService":false,"sensitive":false},"use-etag":{"name":"use-etag","displayName":"Response Cache Enabled","identifiesControllerService":false,"sensitive":false},"proxy-configuration-service":{"name":"proxy-configuration-service","displayName":"Proxy Configuration Service","identifiesControllerService":true,"sensitive":false},"Proxy Type":{"name":"Proxy Type","displayName":"Proxy Type","identifiesControllerService":false,"sensitive":false},"Basic Authentication Password":{"name":"Basic Authentication Password","displayName":"Request Password","identifiesControllerService":false,"sensitive":true},"cookie-strategy":{"name":"cookie-strategy","displayName":"Response Cookie Strategy","identifiesControllerService":false,"sensitive":false},"Connection Timeout":{"name":"Connection Timeout","displayName":"Socket Connect Timeout","identifiesControllerService":false,"sensitive":false},"send-message-body":{"name":"send-message-body","displayName":"Request Body Enabled","identifiesControllerService":false,"sensitive":false},"set-form-filename":{"name":"set-form-filename","displayName":"Request Multipart Form-Data Filename Enabled","identifiesControllerService":false,"sensitive":false},"Always Output Response":{"name":"Always Output Response","displayName":"Response Generation Required","identifiesControllerService":false,"sensitive":false},"etag-max-cache-size":{"name":"etag-max-cache-size","displayName":"Response Cache Size","identifiesControllerService":false,"sensitive":false},"Content-Encoding":{"name":"Content-Encoding","displayName":"Request Content-Encoding","identifiesControllerService":false,"sensitive":false},"disable-http2":{"name":"disable-http2","displayName":"HTTP/2 Disabled","identifiesControllerService":false,"sensitive":false},"idle-timeout":{"name":"idle-timeout","displayName":"Socket Idle Timeout","identifiesControllerService":false,"sensitive":false},"Put Response Body In Attribute":{"name":"Put Response Body In Attribute","displayName":"Response Body Attribute Name","identifiesControllerService":false,"sensitive":false},"Use Chunked Encoding":{"name":"Use Chunked Encoding","displayName":"Request Chunked Transfer-Encoding Enabled","identifiesControllerService":false,"sensitive":false},"Follow Redirects":{"name":"Follow Redirects","displayName":"Response Redirects Enabled","identifiesControllerService":false,"sensitive":false},"Remote URL":{"name":"Remote URL","displayName":"HTTP URL","identifiesControllerService":false,"sensitive":false},"form-body-form-name":{"name":"form-body-form-name","displayName":"Request Multipart Form-Data Name","identifiesControllerService":false,"sensitive":false},"Content-Type":{"name":"Content-Type","displayName":"Request Content-Type","identifiesControllerService":false,"sensitive":false},"flow-file-naming-strategy":{"name":"flow-file-naming-strategy","displayName":"Response FlowFile Naming Strategy","identifiesControllerService":false,"sensitive":false},"max-idle-connections":{"name":"max-idle-connections","displayName":"Socket Idle Connections","identifiesControllerService":false,"sensitive":false},"Accept":{"name":"Accept","displayName":"Accept","identifiesControllerService":false,"sensitive":false},"invokehttp-proxy-user":{"name":"invokehttp-proxy-user","displayName":"Proxy Username","identifiesControllerService":false,"sensitive":false},"Read Timeout":{"name":"Read Timeout","displayName":"Socket Read Timeout","identifiesControllerService":false,"sensitive":false},"Max Length To Put In Attribute":{"name":"Max Length To Put In Attribute","displayName":"Response Body Attribute Size","identifiesControllerService":false,"sensitive":false},"invokehttp-proxy-password":{"name":"invokehttp-proxy-password","displayName":"Proxy Password","identifiesControllerService":false,"sensitive":true},"ignore-response-content":{"name":"ignore-response-content","displayName":"Response Body Ignored","identifiesControllerService":false,"sensitive":false},"Proxy Port":{"name":"Proxy Port","displayName":"Proxy Port","identifiesControllerService":false,"sensitive":false},"SSL Context Service":{"name":"SSL Context Service","displayName":"SSL Context Service","identifiesControllerService":true,"sensitive":false},"Digest Authentication":{"name":"Digest Authentication","displayName":"Request Digest Authentication Enabled","identifiesControllerService":false,"sensitive":false},"HTTP Method":{"name":"HTTP Method","displayName":"HTTP Method","identifiesControllerService":false,"sensitive":false},"Add Response Headers to Request":{"name":"Add Response Headers to Request","displayName":"Response Header Request Attributes Enabled","identifiesControllerService":false,"sensitive":false},"oauth2-access-token-provider":{"name":"oauth2-access-token-provider","displayName":"Request OAuth2 Access Token Provider","identifiesControllerService":true,"sensitive":false},"Basic Authentication Username":{"name":"Basic Authentication Username","displayName":"Request Username","identifiesControllerService":false,"sensitive":false},"Include Date Header":{"name":"Include Date Header","displayName":"Request Date Header Enabled","identifiesControllerService":false,"sensitive":false},"Penalize on \"No Retry\"":{"name":"Penalize on \"No Retry\"","displayName":"Request Failure Penalization Enabled","identifiesControllerService":false,"sensitive":false},"Link":{"name":"Link","displayName":"Link","identifiesControllerService":false,"sensitive":false},"Useragent":{"name":"Useragent","displayName":"Request User-Agent","identifiesControllerService":false,"sensitive":false}},"style":{},"schedulingPeriod":"0 sec","schedulingStrategy":"TIMER_DRIVEN","executionNode":"ALL","penaltyDuration":"30 sec","yieldDuration":"1 sec","bulletinLevel":"WARN","runDurationMillis":0,"concurrentlySchedulableTaskCount":4,"autoTerminatedRelationships":["No Retry","Retry","Original","Failure"],"scheduledState":"ENABLED","retryCount":10,"retriedRelationships":[],"backoffMechanism":"PENALIZE_FLOWFILE","maxBackoffPeriod":"10 mins","componentType":"PROCESSOR","groupIdentifier":"3d4a75a2-18f7-3432-b0ef-fa8f31ca6fb8"}],"inputPorts":[],"outputPorts":[{"identifier":"b44f3c5d-9031-3a3e-a7e7-e1a6290adfa5","instanceIdentifier":"123763bf-1f63-322c-effd-2e1d6aaa713c","name":"Temporal Entities","position":{"x":1359.0,"y":640.0},"type":"OUTPUT_PORT","concurrentlySchedulableTaskCount":1,"scheduledState":"ENABLED","allowRemoteAccess":false,"componentType":"OUTPUT_PORT","groupIdentifier":"3d4a75a2-18f7-3432-b0ef-fa8f31ca6fb8"}],"connections":[{"identifier":"ec2bac80-c735-3cc0-b25b-c604bee1f665","instanceIdentifier":"9be4a124-bdfe-3dc1-249c-8c2af4ed9aa8","name":"","source":{"id":"3a35ae06-e813-3e9c-a06f-35e859e6917b","type":"PROCESSOR","groupId":"3d4a75a2-18f7-3432-b0ef-fa8f31ca6fb8","name":"SplitContent","comments":"","instanceIdentifier":"285f24f5-75f6-33d6-d0db-11fcbfb22c4e"},"destination":{"id":"e70882d7-5bb2-3f36-8666-7cdc64c0cfab","type":"PROCESSOR","groupId":"3d4a75a2-18f7-3432-b0ef-fa8f31ca6fb8","name":"ExtractText","comments":"","instanceIdentifier":"c1ffcc9a-c8f8-3176-d8d1-7bbc8395f2cc"},"labelIndex":1,"zIndex":0,"selectedRelationships":["splits"],"backPressureObjectThreshold":10000,"backPressureDataSizeThreshold":"1 GB","flowFileExpiration":"0 sec","prioritizers":[],"bends":[],"loadBalanceStrategy":"DO_NOT_LOAD_BALANCE","partitioningAttribute":"","loadBalanceCompression":"DO_NOT_COMPRESS","componentType":"CONNECTION","groupIdentifier":"3d4a75a2-18f7-3432-b0ef-fa8f31ca6fb8"},{"identifier":"9f89d7db-43e4-3c3c-92a3-92073c43e0a2","instanceIdentifier":"e52c1d79-cbba-31ae-131a-8b808821cc09","name":"","source":{"id":"289764b0-4b54-3d6f-a6ba-6511cc398fc8","type":"PROCESSOR","groupId":"3d4a75a2-18f7-3432-b0ef-fa8f31ca6fb8","name":"GenerateFlowFile","comments":"","instanceIdentifier":"8ccd4af5-1f5b-37e4-0d5c-825978f6a84a"},"destination":{"id":"3a35ae06-e813-3e9c-a06f-35e859e6917b","type":"PROCESSOR","groupId":"3d4a75a2-18f7-3432-b0ef-fa8f31ca6fb8","name":"SplitContent","comments":"","instanceIdentifier":"285f24f5-75f6-33d6-d0db-11fcbfb22c4e"},"labelIndex":1,"zIndex":0,"selectedRelationships":["success"],"backPressureObjectThreshold":10000,"backPressureDataSizeThreshold":"1 GB","flowFileExpiration":"0 sec","prioritizers":[],"bends":[],"loadBalanceStrategy":"DO_NOT_LOAD_BALANCE","partitioningAttribute":"","loadBalanceCompression":"DO_NOT_COMPRESS","componentType":"CONNECTION","groupIdentifier":"3d4a75a2-18f7-3432-b0ef-fa8f31ca6fb8"},{"identifier":"8a3b5d07-1c05-32db-af76-450a23ad8821","instanceIdentifier":"eb242f18-f6ec-3c89-2d21-d6a3989d22cc","name":"","source":{"id":"e70882d7-5bb2-3f36-8666-7cdc64c0cfab","type":"PROCESSOR","groupId":"3d4a75a2-18f7-3432-b0ef-fa8f31ca6fb8","name":"ExtractText","comments":"","instanceIdentifier":"c1ffcc9a-c8f8-3176-d8d1-7bbc8395f2cc"},"destination":{"id":"72d0db0d-c388-3ad8-a5eb-d22903025c21","type":"PROCESSOR","groupId":"3d4a75a2-18f7-3432-b0ef-fa8f31ca6fb8","name":"Get Temporal Entities","comments":"","instanceIdentifier":"08122f07-6105-35d4-ffd7-bedafef7e1f4"},"labelIndex":1,"zIndex":0,"selectedRelationships":["matched"],"backPressureObjectThreshold":10000,"backPressureDataSizeThreshold":"1 GB","flowFileExpiration":"0 sec","prioritizers":[],"bends":[],"loadBalanceStrategy":"DO_NOT_LOAD_BALANCE","partitioningAttribute":"","loadBalanceCompression":"DO_NOT_COMPRESS","componentType":"CONNECTION","groupIdentifier":"3d4a75a2-18f7-3432-b0ef-fa8f31ca6fb8"},{"identifier":"5fb243ff-018c-3a57-bdf2-c0446fbb84f3","instanceIdentifier":"0a9f1c7b-40a3-347b-4d86-a03dd263caae","name":"","source":{"id":"72d0db0d-c388-3ad8-a5eb-d22903025c21","type":"PROCESSOR","groupId":"3d4a75a2-18f7-3432-b0ef-fa8f31ca6fb8","name":"Get Temporal Entities","comments":"","instanceIdentifier":"08122f07-6105-35d4-ffd7-bedafef7e1f4"},"destination":{"id":"b44f3c5d-9031-3a3e-a7e7-e1a6290adfa5","type":"OUTPUT_PORT","groupId":"3d4a75a2-18f7-3432-b0ef-fa8f31ca6fb8","name":"Temporal Entities","instanceIdentifier":"123763bf-1f63-322c-effd-2e1d6aaa713c"},"labelIndex":1,"zIndex":0,"selectedRelationships":["Response"],"backPressureObjectThreshold":10000,"backPressureDataSizeThreshold":"1 GB","flowFileExpiration":"0 sec","prioritizers":[],"bends":[],"loadBalanceStrategy":"DO_NOT_LOAD_BALANCE","partitioningAttribute":"","loadBalanceCompression":"DO_NOT_COMPRESS","componentType":"CONNECTION","groupIdentifier":"3d4a75a2-18f7-3432-b0ef-fa8f31ca6fb8"}],"labels":[],"funnels":[],"controllerServices":[],"variables":{},"defaultFlowFileExpiration":"0 sec","defaultBackPressureObjectThreshold":10000,"defaultBackPressureDataSizeThreshold":"1 GB","componentType":"PROCESS_GROUP","flowFileConcurrency":"UNBOUNDED","flowFileOutboundPolicy":"STREAM_WHEN_AVAILABLE","groupIdentifier":"3e06a40c-e274-3903-99d0-9c45b5531e80"}],"remoteProcessGroups":[],"processors":[{"identifier":"d83461a2-4bfa-366b-a557-3d03db37a25e","instanceIdentifier":"27ea53ae-3ea1-39d6-c0b2-6d15ba2545b4","name":"LogMessage","comments":"","position":{"x":1118.0,"y":959.0},"type":"org.apache.nifi.processors.standard.LogMessage","bundle":{"group":"org.apache.nifi","artifact":"nifi-standard-nar","version":"1.21.0"},"properties":{"log-message":null,"log-level":"info","log-prefix":null},"propertyDescriptors":{"log-message":{"name":"log-message","displayName":"Log message","identifiesControllerService":false,"sensitive":false},"log-level":{"name":"log-level","displayName":"Log Level","identifiesControllerService":false,"sensitive":false},"log-prefix":{"name":"log-prefix","displayName":"Log prefix","identifiesControllerService":false,"sensitive":false}},"style":{},"schedulingPeriod":"0 sec","schedulingStrategy":"TIMER_DRIVEN","executionNode":"ALL","penaltyDuration":"30 sec","yieldDuration":"1 sec","bulletinLevel":"WARN","runDurationMillis":25,"concurrentlySchedulableTaskCount":1,"autoTerminatedRelationships":["success"],"scheduledState":"ENABLED","retryCount":10,"retriedRelationships":[],"backoffMechanism":"PENALIZE_FLOWFILE","maxBackoffPeriod":"10 mins","componentType":"PROCESSOR","groupIdentifier":"3e06a40c-e274-3903-99d0-9c45b5531e80"},{"identifier":"c4f7a560-0d0d-3536-a195-0928f3ac2365","instanceIdentifier":"75e9ff9a-0188-1000-cd58-0e58dae99bcd","name":"Make ND","comments":"","position":{"x":3407.717950590265,"y":719.738274311672},"type":"org.apache.nifi.processors.script.ExecuteScript","bundle":{"group":"org.apache.nifi","artifact":"nifi-scripting-nar","version":"1.21.0"},"properties":{"Script File":null,"Script Engine":"python","Script Body":"import json\nimport java.io\nfrom org.apache.commons.io import IOUtils\nfrom java.nio.charset import StandardCharsets\nfrom org.apache.nifi.processor.io import StreamCallback\nfrom org.apache.nifi.processors.script import ExecuteScript\nfrom org.python.core.util import StringUtil\n\nclass PutEntitiesInOneArray(StreamCallback):\n def __init__(self):\n pass\n\n def process(self, inputStream, outputStream):\n # Read input stream as JSON object\n text = IOUtils.toString(inputStream, StandardCharsets.UTF_8)\n outputStream.write(bytearray(text.replace(\"@@@@@\", \"\\n\").encode('utf-8'))) \n\nflowFile = session.get()\nif (flowFile != None):\n flowfilenamebase = flowFile.getAttribute('filename').split('.')[0] + '_translated.json'\n# try:\n flowFile = session.write(flowFile, PutEntitiesInOneArray())\n flowFile = session.putAttribute(flowFile, \"filename\", flowfilenamebase)\n session.transfer(flowFile, REL_SUCCESS)\n# except Exception as e:\n# # Write error message to NiFi log\n# log.error(str(e))\n# log.error(\"Failed to process JSON file\")\n# # Transfer flow file to failure relationship\n# session.transfer(flowFile, REL_FAILURE)\nsession.commit()","Module Directory":null},"propertyDescriptors":{"Script File":{"name":"Script File","displayName":"Script File","identifiesControllerService":false,"sensitive":false,"resourceDefinition":{"cardinality":"SINGLE","resourceTypes":["FILE"]}},"Script Engine":{"name":"Script Engine","displayName":"Script Engine","identifiesControllerService":false,"sensitive":false},"Script Body":{"name":"Script Body","displayName":"Script Body","identifiesControllerService":false,"sensitive":false},"Module Directory":{"name":"Module Directory","displayName":"Module Directory","identifiesControllerService":false,"sensitive":false,"resourceDefinition":{"cardinality":"MULTIPLE","resourceTypes":["DIRECTORY","FILE"]}}},"style":{},"schedulingPeriod":"0 sec","schedulingStrategy":"TIMER_DRIVEN","executionNode":"ALL","penaltyDuration":"30 sec","yieldDuration":"1 sec","bulletinLevel":"WARN","runDurationMillis":0,"concurrentlySchedulableTaskCount":1,"autoTerminatedRelationships":["failure"],"scheduledState":"ENABLED","retryCount":10,"retriedRelationships":[],"backoffMechanism":"PENALIZE_FLOWFILE","maxBackoffPeriod":"10 mins","componentType":"PROCESSOR","groupIdentifier":"3e06a40c-e274-3903-99d0-9c45b5531e80"},{"identifier":"c095766a-273e-3b1a-b6eb-dcfaeb124893","instanceIdentifier":"34efc500-2a8d-3b30-bb24-175f653966d4","name":"LogMessage","comments":"","position":{"x":1438.0,"y":471.0},"type":"org.apache.nifi.processors.standard.LogMessage","bundle":{"group":"org.apache.nifi","artifact":"nifi-standard-nar","version":"1.21.0"},"properties":{"log-message":null,"log-level":"info","log-prefix":null},"propertyDescriptors":{"log-message":{"name":"log-message","displayName":"Log message","identifiesControllerService":false,"sensitive":false},"log-level":{"name":"log-level","displayName":"Log Level","identifiesControllerService":false,"sensitive":false},"log-prefix":{"name":"log-prefix","displayName":"Log prefix","identifiesControllerService":false,"sensitive":false}},"style":{},"schedulingPeriod":"0 sec","schedulingStrategy":"TIMER_DRIVEN","executionNode":"ALL","penaltyDuration":"30 sec","yieldDuration":"1 sec","bulletinLevel":"WARN","runDurationMillis":25,"concurrentlySchedulableTaskCount":1,"autoTerminatedRelationships":["success"],"scheduledState":"ENABLED","retryCount":10,"retriedRelationships":[],"backoffMechanism":"PENALIZE_FLOWFILE","maxBackoffPeriod":"10 mins","componentType":"PROCESSOR","groupIdentifier":"3e06a40c-e274-3903-99d0-9c45b5531e80"},{"identifier":"5c9d21bd-ae1c-394a-b53c-5fe9cdb4e81d","instanceIdentifier":"67b1a677-96f9-386a-db11-377a1f12f951","name":"EvaluateJsonPath","comments":"","position":{"x":1462.0,"y":687.0},"type":"org.apache.nifi.processors.standard.EvaluateJsonPath","bundle":{"group":"org.apache.nifi","artifact":"nifi-standard-nar","version":"1.21.0"},"properties":{"Destination":"flowfile-attribute","fhir.id":"$.id","Return Type":"json","Null Value Representation":"empty string","fhir.resourceType":"$.resourceType","Path Not Found Behavior":"ignore"},"propertyDescriptors":{"Destination":{"name":"Destination","displayName":"Destination","identifiesControllerService":false,"sensitive":false},"fhir.id":{"name":"fhir.id","displayName":"fhir.id","identifiesControllerService":false,"sensitive":false},"Return Type":{"name":"Return Type","displayName":"Return Type","identifiesControllerService":false,"sensitive":false},"Null Value Representation":{"name":"Null Value Representation","displayName":"Null Value Representation","identifiesControllerService":false,"sensitive":false},"fhir.resourceType":{"name":"fhir.resourceType","displayName":"fhir.resourceType","identifiesControllerService":false,"sensitive":false},"Path Not Found Behavior":{"name":"Path Not Found Behavior","displayName":"Path Not Found Behavior","identifiesControllerService":false,"sensitive":false}},"style":{},"schedulingPeriod":"0 sec","schedulingStrategy":"TIMER_DRIVEN","executionNode":"ALL","penaltyDuration":"30 sec","yieldDuration":"1 sec","bulletinLevel":"WARN","runDurationMillis":0,"concurrentlySchedulableTaskCount":1,"autoTerminatedRelationships":["failure","unmatched"],"scheduledState":"ENABLED","retryCount":10,"retriedRelationships":[],"backoffMechanism":"PENALIZE_FLOWFILE","maxBackoffPeriod":"10 mins","componentType":"PROCESSOR","groupIdentifier":"3e06a40c-e274-3903-99d0-9c45b5531e80"},{"identifier":"67dc7b8e-46c2-396a-a160-c6e0694175ad","instanceIdentifier":"3f4fd0d7-599a-3922-7e19-fd3aba33e97b","name":"MergeContent","comments":"","position":{"x":2808.0,"y":608.0},"type":"org.apache.nifi.processors.standard.MergeContent","bundle":{"group":"org.apache.nifi","artifact":"nifi-standard-nar","version":"1.21.0"},"properties":{"Keep Path":"false","Maximum Group Size":null,"Merge Strategy":"Bin-Packing Algorithm","Attribute Strategy":"Keep All Unique Attributes","Compression Level":"1","Maximum Number of Entries":"1000","Minimum Group Size":"0 B","Maximum number of Bins":"5","Tar Modified Time":"${file.lastModifiedTime}","Delimiter Strategy":"Text","Merge Format":"Binary Concatenation","Footer File":null,"Max Bin Age":null,"Demarcator File":"@@@@@","Correlation Attribute Name":null,"Header File":null,"mergecontent-metadata-strategy":"Do Not Merge Uncommon Metadata","Minimum Number of Entries":"1"},"propertyDescriptors":{"Keep Path":{"name":"Keep Path","displayName":"Keep Path","identifiesControllerService":false,"sensitive":false},"Maximum Group Size":{"name":"Maximum Group Size","displayName":"Maximum Group Size","identifiesControllerService":false,"sensitive":false},"Merge Strategy":{"name":"Merge Strategy","displayName":"Merge Strategy","identifiesControllerService":false,"sensitive":false},"Attribute Strategy":{"name":"Attribute Strategy","displayName":"Attribute Strategy","identifiesControllerService":false,"sensitive":false},"Compression Level":{"name":"Compression Level","displayName":"Compression Level","identifiesControllerService":false,"sensitive":false},"Maximum Number of Entries":{"name":"Maximum Number of Entries","displayName":"Maximum Number of Entries","identifiesControllerService":false,"sensitive":false},"Minimum Group Size":{"name":"Minimum Group Size","displayName":"Minimum Group Size","identifiesControllerService":false,"sensitive":false},"Maximum number of Bins":{"name":"Maximum number of Bins","displayName":"Maximum number of Bins","identifiesControllerService":false,"sensitive":false},"Tar Modified Time":{"name":"Tar Modified Time","displayName":"Tar Modified Time","identifiesControllerService":false,"sensitive":false},"Delimiter Strategy":{"name":"Delimiter Strategy","displayName":"Delimiter Strategy","identifiesControllerService":false,"sensitive":false},"Merge Format":{"name":"Merge Format","displayName":"Merge Format","identifiesControllerService":false,"sensitive":false},"Footer File":{"name":"Footer File","displayName":"Footer","identifiesControllerService":false,"sensitive":false,"resourceDefinition":{"cardinality":"SINGLE","resourceTypes":["TEXT","FILE"]}},"Max Bin Age":{"name":"Max Bin Age","displayName":"Max Bin Age","identifiesControllerService":false,"sensitive":false},"Demarcator File":{"name":"Demarcator File","displayName":"Demarcator","identifiesControllerService":false,"sensitive":false,"resourceDefinition":{"cardinality":"SINGLE","resourceTypes":["TEXT","FILE"]}},"Correlation Attribute Name":{"name":"Correlation Attribute Name","displayName":"Correlation Attribute Name","identifiesControllerService":false,"sensitive":false},"Header File":{"name":"Header File","displayName":"Header","identifiesControllerService":false,"sensitive":false,"resourceDefinition":{"cardinality":"SINGLE","resourceTypes":["TEXT","FILE"]}},"mergecontent-metadata-strategy":{"name":"mergecontent-metadata-strategy","displayName":"Metadata Strategy","identifiesControllerService":false,"sensitive":false},"Minimum Number of Entries":{"name":"Minimum Number of Entries","displayName":"Minimum Number of Entries","identifiesControllerService":false,"sensitive":false}},"style":{},"schedulingPeriod":"0 sec","schedulingStrategy":"TIMER_DRIVEN","executionNode":"ALL","penaltyDuration":"30 sec","yieldDuration":"1 sec","bulletinLevel":"WARN","runDurationMillis":0,"concurrentlySchedulableTaskCount":1,"autoTerminatedRelationships":["original","failure"],"scheduledState":"ENABLED","retryCount":10,"retriedRelationships":[],"backoffMechanism":"PENALIZE_FLOWFILE","maxBackoffPeriod":"10 mins","componentType":"PROCESSOR","groupIdentifier":"3e06a40c-e274-3903-99d0-9c45b5531e80"},{"identifier":"6864420d-9c3b-3e97-bb16-d9bcd04c95bc","instanceIdentifier":"3ba97192-327c-380b-31a0-a8547b0fff6a","name":"Get Single Entities","comments":"","position":{"x":1670.0,"y":1031.0},"type":"org.apache.nifi.processors.script.ExecuteScript","bundle":{"group":"org.apache.nifi","artifact":"nifi-scripting-nar","version":"1.21.0"},"properties":{"Script File":null,"Script Engine":"python","Script Body":"import json\nimport java.io\nfrom org.apache.commons.io import IOUtils\nfrom java.nio.charset import StandardCharsets\nfrom org.apache.nifi.processor.io import StreamCallback\nfrom org.apache.nifi.processors.script import ExecuteScript\nfrom org.python.core.util import StringUtil\n\nclass TransformJSON(StreamCallback):\n def __init__(self):\n pass\n\n def process(self, inputStream, outputStream):\n text = IOUtils.toString(inputStream, StandardCharsets.UTF_8)\n entity = json.loads(text)\n template = {'id': entity['id'], 'type': entity['type']}\n tmpList = []\n for attrsKey, attrsValue in entity.items():\n if attrsKey in ['id', 'type', 'modifiedAt', 'createdAt', 'observedAt']:\n continue\n for i in range(len(attrsValue)):\n if len(tmpList) == i:\n tmpEntity = template.copy()\n tmpList.append(tmpEntity)\n else:\n tmpEntity = tmpList[i]\n if type(attrsValue) == dict:\n tmpEntity[attrsKey] = attrsValue\n else:\n tmpEntity[attrsKey] = attrsValue[i]\n if 'observedAt' in tmpEntity[attrsKey].keys():\n del tmpEntity[attrsKey]['observedAt']\n if 'instanceId' in tmpEntity[attrsKey].keys():\n del tmpEntity[attrsKey]['instanceId']\n outputStream.write(bytearray(json.dumps(tmpList, indent=4).encode('utf-8'))) \n\nflowFile = session.get()\nif (flowFile != None):\n flowfilenamebase = flowFile.getAttribute('filename').split('.')[0] + '_translated.json'\n flowFile = session.write(flowFile, TransformJSON())\n flowFile = session.putAttribute(flowFile, \"filename\", flowfilenamebase)\n session.transfer(flowFile, REL_SUCCESS)\nsession.commit()","Module Directory":null},"propertyDescriptors":{"Script File":{"name":"Script File","displayName":"Script File","identifiesControllerService":false,"sensitive":false,"resourceDefinition":{"cardinality":"SINGLE","resourceTypes":["FILE"]}},"Script Engine":{"name":"Script Engine","displayName":"Script Engine","identifiesControllerService":false,"sensitive":false},"Script Body":{"name":"Script Body","displayName":"Script Body","identifiesControllerService":false,"sensitive":false},"Module Directory":{"name":"Module Directory","displayName":"Module Directory","identifiesControllerService":false,"sensitive":false,"resourceDefinition":{"cardinality":"MULTIPLE","resourceTypes":["DIRECTORY","FILE"]}}},"style":{},"schedulingPeriod":"0 sec","schedulingStrategy":"TIMER_DRIVEN","executionNode":"ALL","penaltyDuration":"30 sec","yieldDuration":"1 sec","bulletinLevel":"WARN","runDurationMillis":0,"concurrentlySchedulableTaskCount":1,"autoTerminatedRelationships":[],"scheduledState":"ENABLED","retryCount":10,"retriedRelationships":[],"backoffMechanism":"PENALIZE_FLOWFILE","maxBackoffPeriod":"10 mins","componentType":"PROCESSOR","groupIdentifier":"3e06a40c-e274-3903-99d0-9c45b5531e80"},{"identifier":"02135b05-548b-37f2-b5e2-5432f2fc1cac","instanceIdentifier":"c58e4e34-800b-35d8-2ce4-ff157e442c13","name":"ExecuteScript","comments":"","position":{"x":2771.5,"y":1015.75},"type":"org.apache.nifi.processors.script.ExecuteScript","bundle":{"group":"org.apache.nifi","artifact":"nifi-scripting-nar","version":"1.21.0"},"properties":{"Script File":null,"Script Engine":"python","Script Body":"import json\nimport java.io\nfrom org.apache.commons.io import IOUtils\nfrom java.nio.charset import StandardCharsets\nfrom org.apache.nifi.processor.io import StreamCallback\nfrom org.apache.nifi.processors.script import ExecuteScript\nfrom org.python.core.util import StringUtil\n\nclass PutEntitiesInOneArray(StreamCallback):\n def __init__(self):\n pass\n\n def process(self, inputStream, outputStream):\n # Read input stream as JSON object\n text = IOUtils.toString(inputStream, StandardCharsets.UTF_8)\n entities = json.loads(text)\n result = []\n for entity in entities:\n result.extend(entity)\n outputStream.write(bytearray(json.dumps(result, indent=4).encode('utf-8'))) \n\nflowFile = session.get()\nif (flowFile != None):\n flowfilenamebase = flowFile.getAttribute('filename').split('.')[0] + '_translated.json'\n# try:\n flowFile = session.write(flowFile, PutEntitiesInOneArray())\n flowFile = session.putAttribute(flowFile, \"filename\", flowfilenamebase)\n session.transfer(flowFile, REL_SUCCESS)\n# except Exception as e:\n# # Write error message to NiFi log\n# log.error(str(e))\n# log.error(\"Failed to process JSON file\")\n# # Transfer flow file to failure relationship\n# session.transfer(flowFile, REL_FAILURE)\nsession.commit()","Module Directory":null},"propertyDescriptors":{"Script File":{"name":"Script File","displayName":"Script File","identifiesControllerService":false,"sensitive":false,"resourceDefinition":{"cardinality":"SINGLE","resourceTypes":["FILE"]}},"Script Engine":{"name":"Script Engine","displayName":"Script Engine","identifiesControllerService":false,"sensitive":false},"Script Body":{"name":"Script Body","displayName":"Script Body","identifiesControllerService":false,"sensitive":false},"Module Directory":{"name":"Module Directory","displayName":"Module Directory","identifiesControllerService":false,"sensitive":false,"resourceDefinition":{"cardinality":"MULTIPLE","resourceTypes":["DIRECTORY","FILE"]}}},"style":{},"schedulingPeriod":"0 sec","schedulingStrategy":"TIMER_DRIVEN","executionNode":"ALL","penaltyDuration":"30 sec","yieldDuration":"1 sec","bulletinLevel":"WARN","runDurationMillis":0,"concurrentlySchedulableTaskCount":1,"autoTerminatedRelationships":["failure"],"scheduledState":"ENABLED","retryCount":10,"retriedRelationships":[],"backoffMechanism":"PENALIZE_FLOWFILE","maxBackoffPeriod":"10 mins","componentType":"PROCESSOR","groupIdentifier":"3e06a40c-e274-3903-99d0-9c45b5531e80"},{"identifier":"bc7e6072-e3e0-342c-9e88-14a19647c8f4","instanceIdentifier":"36945014-35ba-37bf-8a94-e7594e2be0c1","name":"MergeContent","comments":"","position":{"x":2286.0,"y":1370.5},"type":"org.apache.nifi.processors.standard.MergeContent","bundle":{"group":"org.apache.nifi","artifact":"nifi-standard-nar","version":"1.21.0"},"properties":{"Keep Path":"false","Maximum Group Size":null,"Merge Strategy":"Bin-Packing Algorithm","Attribute Strategy":"Keep All Unique Attributes","Compression Level":"1","Maximum Number of Entries":"1000","Minimum Group Size":"100 KB","Maximum number of Bins":"10","Tar Modified Time":"${file.lastModifiedTime}","Delimiter Strategy":"Text","Merge Format":"Binary Concatenation","Footer File":"]","Max Bin Age":"180 sec","Demarcator File":",","Correlation Attribute Name":null,"Header File":"[","mergecontent-metadata-strategy":"Do Not Merge Uncommon Metadata","Minimum Number of Entries":"10"},"propertyDescriptors":{"Keep Path":{"name":"Keep Path","displayName":"Keep Path","identifiesControllerService":false,"sensitive":false},"Maximum Group Size":{"name":"Maximum Group Size","displayName":"Maximum Group Size","identifiesControllerService":false,"sensitive":false},"Merge Strategy":{"name":"Merge Strategy","displayName":"Merge Strategy","identifiesControllerService":false,"sensitive":false},"Attribute Strategy":{"name":"Attribute Strategy","displayName":"Attribute Strategy","identifiesControllerService":false,"sensitive":false},"Compression Level":{"name":"Compression Level","displayName":"Compression Level","identifiesControllerService":false,"sensitive":false},"Maximum Number of Entries":{"name":"Maximum Number of Entries","displayName":"Maximum Number of Entries","identifiesControllerService":false,"sensitive":false},"Minimum Group Size":{"name":"Minimum Group Size","displayName":"Minimum Group Size","identifiesControllerService":false,"sensitive":false},"Maximum number of Bins":{"name":"Maximum number of Bins","displayName":"Maximum number of Bins","identifiesControllerService":false,"sensitive":false},"Tar Modified Time":{"name":"Tar Modified Time","displayName":"Tar Modified Time","identifiesControllerService":false,"sensitive":false},"Delimiter Strategy":{"name":"Delimiter Strategy","displayName":"Delimiter Strategy","identifiesControllerService":false,"sensitive":false},"Merge Format":{"name":"Merge Format","displayName":"Merge Format","identifiesControllerService":false,"sensitive":false},"Footer File":{"name":"Footer File","displayName":"Footer","identifiesControllerService":false,"sensitive":false,"resourceDefinition":{"cardinality":"SINGLE","resourceTypes":["TEXT","FILE"]}},"Max Bin Age":{"name":"Max Bin Age","displayName":"Max Bin Age","identifiesControllerService":false,"sensitive":false},"Demarcator File":{"name":"Demarcator File","displayName":"Demarcator","identifiesControllerService":false,"sensitive":false,"resourceDefinition":{"cardinality":"SINGLE","resourceTypes":["TEXT","FILE"]}},"Correlation Attribute Name":{"name":"Correlation Attribute Name","displayName":"Correlation Attribute Name","identifiesControllerService":false,"sensitive":false},"Header File":{"name":"Header File","displayName":"Header","identifiesControllerService":false,"sensitive":false,"resourceDefinition":{"cardinality":"SINGLE","resourceTypes":["TEXT","FILE"]}},"mergecontent-metadata-strategy":{"name":"mergecontent-metadata-strategy","displayName":"Metadata Strategy","identifiesControllerService":false,"sensitive":false},"Minimum Number of Entries":{"name":"Minimum Number of Entries","displayName":"Minimum Number of Entries","identifiesControllerService":false,"sensitive":false}},"style":{},"schedulingPeriod":"0 sec","schedulingStrategy":"TIMER_DRIVEN","executionNode":"ALL","penaltyDuration":"30 sec","yieldDuration":"1 sec","bulletinLevel":"WARN","runDurationMillis":0,"concurrentlySchedulableTaskCount":1,"autoTerminatedRelationships":["original","failure"],"scheduledState":"ENABLED","retryCount":10,"retriedRelationships":[],"backoffMechanism":"PENALIZE_FLOWFILE","maxBackoffPeriod":"10 mins","componentType":"PROCESSOR","groupIdentifier":"3e06a40c-e274-3903-99d0-9c45b5531e80"},{"identifier":"a2ff60ef-c2f5-39fd-9c77-fe0fd60d7188","instanceIdentifier":"b7e47680-cd4f-3db3-8909-28f272f5f0c3","name":"SplitJson","comments":"","position":{"x":1086.0,"y":1215.0},"type":"org.apache.nifi.processors.standard.SplitJson","bundle":{"group":"org.apache.nifi","artifact":"nifi-standard-nar","version":"1.21.0"},"properties":{"Null Value Representation":"empty string","JsonPath Expression":"$[*]"},"propertyDescriptors":{"Null Value Representation":{"name":"Null Value Representation","displayName":"Null Value Representation","identifiesControllerService":false,"sensitive":false},"JsonPath Expression":{"name":"JsonPath Expression","displayName":"JsonPath Expression","identifiesControllerService":false,"sensitive":false}},"style":{},"schedulingPeriod":"0 sec","schedulingStrategy":"TIMER_DRIVEN","executionNode":"ALL","penaltyDuration":"30 sec","yieldDuration":"1 sec","bulletinLevel":"WARN","runDurationMillis":0,"concurrentlySchedulableTaskCount":1,"autoTerminatedRelationships":["original","failure"],"scheduledState":"ENABLED","retryCount":10,"retriedRelationships":[],"backoffMechanism":"PENALIZE_FLOWFILE","maxBackoffPeriod":"10 mins","componentType":"PROCESSOR","groupIdentifier":"3e06a40c-e274-3903-99d0-9c45b5531e80"},{"identifier":"4c31aa1b-cb10-3d48-bdc3-ce139af2365f","instanceIdentifier":"4857e29b-a7b3-3067-8e2c-e9bd1ee86056","name":"SplitJson","comments":"","position":{"x":2112.0,"y":648.0},"type":"org.apache.nifi.processors.standard.SplitJson","bundle":{"group":"org.apache.nifi","artifact":"nifi-standard-nar","version":"1.21.0"},"properties":{"Null Value Representation":"empty string","JsonPath Expression":"$[*]"},"propertyDescriptors":{"Null Value Representation":{"name":"Null Value Representation","displayName":"Null Value Representation","identifiesControllerService":false,"sensitive":false},"JsonPath Expression":{"name":"JsonPath Expression","displayName":"JsonPath Expression","identifiesControllerService":false,"sensitive":false}},"style":{},"schedulingPeriod":"0 sec","schedulingStrategy":"TIMER_DRIVEN","executionNode":"ALL","penaltyDuration":"30 sec","yieldDuration":"1 sec","bulletinLevel":"WARN","runDurationMillis":0,"concurrentlySchedulableTaskCount":1,"autoTerminatedRelationships":["original","failure"],"scheduledState":"ENABLED","retryCount":10,"retriedRelationships":[],"backoffMechanism":"PENALIZE_FLOWFILE","maxBackoffPeriod":"10 mins","componentType":"PROCESSOR","groupIdentifier":"3e06a40c-e274-3903-99d0-9c45b5531e80"},{"identifier":"c40376cf-394f-3197-906d-d02057723fd6","instanceIdentifier":"fbd9be40-1e52-3a97-58d9-1ea590a9781f","name":"Call FHIR endpoint","comments":"","position":{"x":1878.0,"y":471.0},"type":"org.apache.nifi.processors.standard.InvokeHTTP","bundle":{"group":"org.apache.nifi","artifact":"nifi-standard-nar","version":"1.21.0"},"properties":{"Proxy Host":null,"Attributes to Send":null,"use-etag":"false","proxy-configuration-service":null,"Proxy Type":"http","cookie-strategy":"DISABLED","Connection Timeout":"5 secs","send-message-body":"true","set-form-filename":"true","Always Output Response":"false","etag-max-cache-size":"10MB","Content-Encoding":"DISABLED","disable-http2":"False","idle-timeout":"5 mins","Put Response Body In Attribute":null,"Use Chunked Encoding":"false","Follow Redirects":"True","Remote URL":"${HL7_HOST}/${fhir.resourceType}/${fhir.id}\n","form-body-form-name":null,"Content-Type":"application/fhir+json","flow-file-naming-strategy":"RANDOM","max-idle-connections":"5","invokehttp-proxy-user":null,"Read Timeout":"15 secs","Max Length To Put In Attribute":"256","ignore-response-content":"false","Proxy Port":null,"SSL Context Service":null,"Digest Authentication":"false","HTTP Method":"POST","Add Response Headers to Request":"false","oauth2-access-token-provider":null,"Basic Authentication Username":null,"Include Date Header":"True","Penalize on \"No Retry\"":"false","Useragent":null},"propertyDescriptors":{"Proxy Host":{"name":"Proxy Host","displayName":"Proxy Host","identifiesControllerService":false,"sensitive":false},"Attributes to Send":{"name":"Attributes to Send","displayName":"Request Header Attributes Pattern","identifiesControllerService":false,"sensitive":false},"use-etag":{"name":"use-etag","displayName":"Response Cache Enabled","identifiesControllerService":false,"sensitive":false},"proxy-configuration-service":{"name":"proxy-configuration-service","displayName":"Proxy Configuration Service","identifiesControllerService":true,"sensitive":false},"Proxy Type":{"name":"Proxy Type","displayName":"Proxy Type","identifiesControllerService":false,"sensitive":false},"Basic Authentication Password":{"name":"Basic Authentication Password","displayName":"Request Password","identifiesControllerService":false,"sensitive":true},"cookie-strategy":{"name":"cookie-strategy","displayName":"Response Cookie Strategy","identifiesControllerService":false,"sensitive":false},"Connection Timeout":{"name":"Connection Timeout","displayName":"Socket Connect Timeout","identifiesControllerService":false,"sensitive":false},"send-message-body":{"name":"send-message-body","displayName":"Request Body Enabled","identifiesControllerService":false,"sensitive":false},"set-form-filename":{"name":"set-form-filename","displayName":"Request Multipart Form-Data Filename Enabled","identifiesControllerService":false,"sensitive":false},"Always Output Response":{"name":"Always Output Response","displayName":"Response Generation Required","identifiesControllerService":false,"sensitive":false},"etag-max-cache-size":{"name":"etag-max-cache-size","displayName":"Response Cache Size","identifiesControllerService":false,"sensitive":false},"Content-Encoding":{"name":"Content-Encoding","displayName":"Request Content-Encoding","identifiesControllerService":false,"sensitive":false},"disable-http2":{"name":"disable-http2","displayName":"HTTP/2 Disabled","identifiesControllerService":false,"sensitive":false},"idle-timeout":{"name":"idle-timeout","displayName":"Socket Idle Timeout","identifiesControllerService":false,"sensitive":false},"Put Response Body In Attribute":{"name":"Put Response Body In Attribute","displayName":"Response Body Attribute Name","identifiesControllerService":false,"sensitive":false},"Use Chunked Encoding":{"name":"Use Chunked Encoding","displayName":"Request Chunked Transfer-Encoding Enabled","identifiesControllerService":false,"sensitive":false},"Follow Redirects":{"name":"Follow Redirects","displayName":"Response Redirects Enabled","identifiesControllerService":false,"sensitive":false},"Remote URL":{"name":"Remote URL","displayName":"HTTP URL","identifiesControllerService":false,"sensitive":false},"form-body-form-name":{"name":"form-body-form-name","displayName":"Request Multipart Form-Data Name","identifiesControllerService":false,"sensitive":false},"Content-Type":{"name":"Content-Type","displayName":"Request Content-Type","identifiesControllerService":false,"sensitive":false},"flow-file-naming-strategy":{"name":"flow-file-naming-strategy","displayName":"Response FlowFile Naming Strategy","identifiesControllerService":false,"sensitive":false},"max-idle-connections":{"name":"max-idle-connections","displayName":"Socket Idle Connections","identifiesControllerService":false,"sensitive":false},"invokehttp-proxy-user":{"name":"invokehttp-proxy-user","displayName":"Proxy Username","identifiesControllerService":false,"sensitive":false},"Read Timeout":{"name":"Read Timeout","displayName":"Socket Read Timeout","identifiesControllerService":false,"sensitive":false},"Max Length To Put In Attribute":{"name":"Max Length To Put In Attribute","displayName":"Response Body Attribute Size","identifiesControllerService":false,"sensitive":false},"invokehttp-proxy-password":{"name":"invokehttp-proxy-password","displayName":"Proxy Password","identifiesControllerService":false,"sensitive":true},"ignore-response-content":{"name":"ignore-response-content","displayName":"Response Body Ignored","identifiesControllerService":false,"sensitive":false},"Proxy Port":{"name":"Proxy Port","displayName":"Proxy Port","identifiesControllerService":false,"sensitive":false},"SSL Context Service":{"name":"SSL Context Service","displayName":"SSL Context Service","identifiesControllerService":true,"sensitive":false},"Digest Authentication":{"name":"Digest Authentication","displayName":"Request Digest Authentication Enabled","identifiesControllerService":false,"sensitive":false},"HTTP Method":{"name":"HTTP Method","displayName":"HTTP Method","identifiesControllerService":false,"sensitive":false},"Add Response Headers to Request":{"name":"Add Response Headers to Request","displayName":"Response Header Request Attributes Enabled","identifiesControllerService":false,"sensitive":false},"oauth2-access-token-provider":{"name":"oauth2-access-token-provider","displayName":"Request OAuth2 Access Token Provider","identifiesControllerService":true,"sensitive":false},"Basic Authentication Username":{"name":"Basic Authentication Username","displayName":"Request Username","identifiesControllerService":false,"sensitive":false},"Include Date Header":{"name":"Include Date Header","displayName":"Request Date Header Enabled","identifiesControllerService":false,"sensitive":false},"Penalize on \"No Retry\"":{"name":"Penalize on \"No Retry\"","displayName":"Request Failure Penalization Enabled","identifiesControllerService":false,"sensitive":false},"Useragent":{"name":"Useragent","displayName":"Request User-Agent","identifiesControllerService":false,"sensitive":false}},"style":{},"schedulingPeriod":"0 sec","schedulingStrategy":"TIMER_DRIVEN","executionNode":"ALL","penaltyDuration":"30 sec","yieldDuration":"1 sec","bulletinLevel":"WARN","runDurationMillis":0,"concurrentlySchedulableTaskCount":1,"autoTerminatedRelationships":[],"scheduledState":"ENABLED","retryCount":10,"retriedRelationships":[],"backoffMechanism":"PENALIZE_FLOWFILE","maxBackoffPeriod":"10 mins","componentType":"PROCESSOR","groupIdentifier":"3e06a40c-e274-3903-99d0-9c45b5531e80"},{"identifier":"4546e1db-11b6-351e-83ef-44da3e693086","instanceIdentifier":"5c6c8b37-6aa0-3087-9f76-dd0c39bc13ae","name":"PutFile","comments":"","position":{"x":3392.0,"y":368.0},"type":"org.apache.nifi.processors.standard.PutFile","bundle":{"group":"org.apache.nifi","artifact":"nifi-standard-nar","version":"1.21.0"},"properties":{"Group":null,"Owner":null,"Create Missing Directories":"true","Permissions":null,"Maximum File Count":null,"Last Modified Time":null,"Directory":"/home/nifi/download","Conflict Resolution Strategy":"fail"},"propertyDescriptors":{"Group":{"name":"Group","displayName":"Group","identifiesControllerService":false,"sensitive":false},"Owner":{"name":"Owner","displayName":"Owner","identifiesControllerService":false,"sensitive":false},"Create Missing Directories":{"name":"Create Missing Directories","displayName":"Create Missing Directories","identifiesControllerService":false,"sensitive":false},"Permissions":{"name":"Permissions","displayName":"Permissions","identifiesControllerService":false,"sensitive":false},"Maximum File Count":{"name":"Maximum File Count","displayName":"Maximum File Count","identifiesControllerService":false,"sensitive":false},"Last Modified Time":{"name":"Last Modified Time","displayName":"Last Modified Time","identifiesControllerService":false,"sensitive":false},"Directory":{"name":"Directory","displayName":"Directory","identifiesControllerService":false,"sensitive":false},"Conflict Resolution Strategy":{"name":"Conflict Resolution Strategy","displayName":"Conflict Resolution Strategy","identifiesControllerService":false,"sensitive":false}},"style":{},"schedulingPeriod":"0 sec","schedulingStrategy":"TIMER_DRIVEN","executionNode":"ALL","penaltyDuration":"30 sec","yieldDuration":"1 sec","bulletinLevel":"WARN","runDurationMillis":0,"concurrentlySchedulableTaskCount":1,"autoTerminatedRelationships":["success","failure"],"scheduledState":"ENABLED","retryCount":10,"retriedRelationships":[],"backoffMechanism":"PENALIZE_FLOWFILE","maxBackoffPeriod":"10 mins","componentType":"PROCESSOR","groupIdentifier":"3e06a40c-e274-3903-99d0-9c45b5531e80"},{"identifier":"285d89c3-2669-3dc6-bf70-cf91fe1d651b","instanceIdentifier":"a8d0d810-706b-3569-0d1f-3c75e5d389a8","name":"NGSI-LD to HL7 FHIR","comments":"","position":{"x":2054.0,"y":895.0},"type":"org.apache.nifi.processors.script.ExecuteScript","bundle":{"group":"org.apache.nifi","artifact":"nifi-scripting-nar","version":"1.21.0"},"properties":{"Script File":null,"Script Engine":"python","Script Body":"import json\nimport java.io\nfrom org.apache.commons.io import IOUtils\nfrom java.nio.charset import StandardCharsets\nfrom org.apache.nifi.processor.io import StreamCallback\nfrom org.apache.nifi.processors.script import ExecuteScript\nfrom org.python.core.util import StringUtil\n\nclass PutEntitiesInOneArray(StreamCallback):\n def __init__(self):\n pass\n\n def getAttribute(self, value):\n if type(value) == list:\n result = []\n for entry in value:\n result.append(self.getAttribute(entry))\n elif type(value) == dict:\n result = {}\n for key, value in value.items():\n if key in ['type', 'createdAt', 'observedAt', 'modifiedAt']:\n continue\n if key in ['value', 'object']:\n result['value'] = value\n else:\n result[key] = self.getAttribute(value)\n if len(result) == 1:\n result = result['value']\n else:\n if type(result['value']) == list:\n tmp = result['value']\n del result['value']\n tmp.append(result)\n result = tmp\n elif type(result['value']) == dict:\n tmp = result['value']\n del result['value']\n tmp.update(result)\n result = tmp\n else:\n result = value\n return result\n def process(self, inputStream, outputStream):\n # Read input stream as JSON object\n text = IOUtils.toString(inputStream, StandardCharsets.UTF_8)\n entities = json.loads(text)\n result = []\n for entity in entities:\n newEntity = {}\n for key, value in entity.items():\n if key in ['id', 'type']:\n newEntity[key] = value\n continue\n if key in ['observedAt', 'modifiedAt', 'createdAt']:\n continue\n newEntity[key] = self.getAttribute(value)\n result.append(newEntity) \n \n outputStream.write(bytearray(json.dumps(result, indent=4).encode('utf-8'))) \n\nflowFile = session.get()\nif (flowFile != None):\n flowfilenamebase = flowFile.getAttribute('filename').split('.')[0] + '_translated.json'\n# try:\n flowFile = session.write(flowFile, PutEntitiesInOneArray())\n flowFile = session.putAttribute(flowFile, \"filename\", flowfilenamebase)\n session.transfer(flowFile, REL_SUCCESS)\n# except Exception as e:\n# # Write error message to NiFi log\n# log.error(str(e))\n# log.error(\"Failed to process JSON file\")\n# # Transfer flow file to failure relationship\n# session.transfer(flowFile, REL_FAILURE)\nsession.commit()","Module Directory":null},"propertyDescriptors":{"Script File":{"name":"Script File","displayName":"Script File","identifiesControllerService":false,"sensitive":false,"resourceDefinition":{"cardinality":"SINGLE","resourceTypes":["FILE"]}},"Script Engine":{"name":"Script Engine","displayName":"Script Engine","identifiesControllerService":false,"sensitive":false},"Script Body":{"name":"Script Body","displayName":"Script Body","identifiesControllerService":false,"sensitive":false},"Module Directory":{"name":"Module Directory","displayName":"Module Directory","identifiesControllerService":false,"sensitive":false,"resourceDefinition":{"cardinality":"MULTIPLE","resourceTypes":["DIRECTORY","FILE"]}}},"style":{},"schedulingPeriod":"0 sec","schedulingStrategy":"TIMER_DRIVEN","executionNode":"ALL","penaltyDuration":"30 sec","yieldDuration":"1 sec","bulletinLevel":"WARN","runDurationMillis":0,"concurrentlySchedulableTaskCount":1,"autoTerminatedRelationships":["failure"],"scheduledState":"ENABLED","retryCount":10,"retriedRelationships":[],"backoffMechanism":"PENALIZE_FLOWFILE","maxBackoffPeriod":"10 mins","componentType":"PROCESSOR","groupIdentifier":"3e06a40c-e274-3903-99d0-9c45b5531e80"}],"inputPorts":[],"outputPorts":[],"connections":[{"identifier":"57503fba-3217-3582-993f-83fcea78d73f","instanceIdentifier":"8a619ccc-6b0e-36ef-d28c-f65d47585d1a","name":"","source":{"id":"4c31aa1b-cb10-3d48-bdc3-ce139af2365f","type":"PROCESSOR","groupId":"3e06a40c-e274-3903-99d0-9c45b5531e80","name":"SplitJson","comments":"","instanceIdentifier":"4857e29b-a7b3-3067-8e2c-e9bd1ee86056"},"destination":{"id":"67dc7b8e-46c2-396a-a160-c6e0694175ad","type":"PROCESSOR","groupId":"3e06a40c-e274-3903-99d0-9c45b5531e80","name":"MergeContent","comments":"","instanceIdentifier":"3f4fd0d7-599a-3922-7e19-fd3aba33e97b"},"labelIndex":1,"zIndex":0,"selectedRelationships":["split"],"backPressureObjectThreshold":10000,"backPressureDataSizeThreshold":"1 GB","flowFileExpiration":"0 sec","prioritizers":[],"bends":[],"loadBalanceStrategy":"DO_NOT_LOAD_BALANCE","partitioningAttribute":"","loadBalanceCompression":"DO_NOT_COMPRESS","componentType":"CONNECTION","groupIdentifier":"3e06a40c-e274-3903-99d0-9c45b5531e80"},{"identifier":"559928a8-1282-3761-b9a0-2614e01ecadf","instanceIdentifier":"2ecfe5e0-014b-395f-de26-4b2c6d67b550","name":"","source":{"id":"6864420d-9c3b-3e97-bb16-d9bcd04c95bc","type":"PROCESSOR","groupId":"3e06a40c-e274-3903-99d0-9c45b5531e80","name":"Get Single Entities","comments":"","instanceIdentifier":"3ba97192-327c-380b-31a0-a8547b0fff6a"},"destination":{"id":"d83461a2-4bfa-366b-a557-3d03db37a25e","type":"PROCESSOR","groupId":"3e06a40c-e274-3903-99d0-9c45b5531e80","name":"LogMessage","comments":"","instanceIdentifier":"27ea53ae-3ea1-39d6-c0b2-6d15ba2545b4"},"labelIndex":1,"zIndex":0,"selectedRelationships":["failure"],"backPressureObjectThreshold":10000,"backPressureDataSizeThreshold":"1 GB","flowFileExpiration":"0 sec","prioritizers":[],"bends":[],"loadBalanceStrategy":"DO_NOT_LOAD_BALANCE","partitioningAttribute":"","loadBalanceCompression":"DO_NOT_COMPRESS","componentType":"CONNECTION","groupIdentifier":"3e06a40c-e274-3903-99d0-9c45b5531e80"},{"identifier":"2d9f4579-c187-32f1-82dc-41c936cc5d55","instanceIdentifier":"c4479451-95c8-3ba6-582d-a8aa5b311b28","name":"","source":{"id":"4c31aa1b-cb10-3d48-bdc3-ce139af2365f","type":"PROCESSOR","groupId":"3e06a40c-e274-3903-99d0-9c45b5531e80","name":"SplitJson","comments":"","instanceIdentifier":"4857e29b-a7b3-3067-8e2c-e9bd1ee86056"},"destination":{"id":"5c9d21bd-ae1c-394a-b53c-5fe9cdb4e81d","type":"PROCESSOR","groupId":"3e06a40c-e274-3903-99d0-9c45b5531e80","name":"EvaluateJsonPath","comments":"","instanceIdentifier":"67b1a677-96f9-386a-db11-377a1f12f951"},"labelIndex":1,"zIndex":0,"selectedRelationships":["split"],"backPressureObjectThreshold":10000,"backPressureDataSizeThreshold":"1 GB","flowFileExpiration":"0 sec","prioritizers":[],"bends":[],"loadBalanceStrategy":"DO_NOT_LOAD_BALANCE","partitioningAttribute":"","loadBalanceCompression":"DO_NOT_COMPRESS","componentType":"CONNECTION","groupIdentifier":"3e06a40c-e274-3903-99d0-9c45b5531e80"},{"identifier":"f10f582f-0979-3519-a7f9-db5a1207e47a","instanceIdentifier":"3146074a-e6e2-35e2-fb45-24a991ce23fa","name":"","source":{"id":"c40376cf-394f-3197-906d-d02057723fd6","type":"PROCESSOR","groupId":"3e06a40c-e274-3903-99d0-9c45b5531e80","name":"Call FHIR endpoint","comments":"","instanceIdentifier":"fbd9be40-1e52-3a97-58d9-1ea590a9781f"},"destination":{"id":"c095766a-273e-3b1a-b6eb-dcfaeb124893","type":"PROCESSOR","groupId":"3e06a40c-e274-3903-99d0-9c45b5531e80","name":"LogMessage","comments":"","instanceIdentifier":"34efc500-2a8d-3b30-bb24-175f653966d4"},"labelIndex":1,"zIndex":0,"selectedRelationships":["Response","No Retry","Retry","Original","Failure"],"backPressureObjectThreshold":10000,"backPressureDataSizeThreshold":"1 GB","flowFileExpiration":"0 sec","prioritizers":[],"bends":[],"loadBalanceStrategy":"DO_NOT_LOAD_BALANCE","partitioningAttribute":"","loadBalanceCompression":"DO_NOT_COMPRESS","componentType":"CONNECTION","groupIdentifier":"3e06a40c-e274-3903-99d0-9c45b5531e80"},{"identifier":"38c05b85-5f11-3f7f-80d6-c6b41a7fd75e","instanceIdentifier":"909b94a0-7e56-3fe9-c822-f5910da8ea5a","name":"","source":{"id":"bc7e6072-e3e0-342c-9e88-14a19647c8f4","type":"PROCESSOR","groupId":"3e06a40c-e274-3903-99d0-9c45b5531e80","name":"MergeContent","comments":"","instanceIdentifier":"36945014-35ba-37bf-8a94-e7594e2be0c1"},"destination":{"id":"02135b05-548b-37f2-b5e2-5432f2fc1cac","type":"PROCESSOR","groupId":"3e06a40c-e274-3903-99d0-9c45b5531e80","name":"ExecuteScript","comments":"","instanceIdentifier":"c58e4e34-800b-35d8-2ce4-ff157e442c13"},"labelIndex":1,"zIndex":0,"selectedRelationships":["merged"],"backPressureObjectThreshold":10000,"backPressureDataSizeThreshold":"1 GB","flowFileExpiration":"0 sec","prioritizers":[],"bends":[],"loadBalanceStrategy":"DO_NOT_LOAD_BALANCE","partitioningAttribute":"","loadBalanceCompression":"DO_NOT_COMPRESS","componentType":"CONNECTION","groupIdentifier":"3e06a40c-e274-3903-99d0-9c45b5531e80"},{"identifier":"044fe185-8789-3c80-b927-49da787a4971","instanceIdentifier":"75ec7c90-0188-1000-3240-b9839a21e9a6","name":"","source":{"id":"c4f7a560-0d0d-3536-a195-0928f3ac2365","type":"PROCESSOR","groupId":"3e06a40c-e274-3903-99d0-9c45b5531e80","name":"Make ND","comments":"","instanceIdentifier":"75e9ff9a-0188-1000-cd58-0e58dae99bcd"},"destination":{"id":"4546e1db-11b6-351e-83ef-44da3e693086","type":"PROCESSOR","groupId":"3e06a40c-e274-3903-99d0-9c45b5531e80","name":"PutFile","comments":"","instanceIdentifier":"5c6c8b37-6aa0-3087-9f76-dd0c39bc13ae"},"labelIndex":1,"zIndex":0,"selectedRelationships":["success"],"backPressureObjectThreshold":10000,"backPressureDataSizeThreshold":"1 GB","flowFileExpiration":"0 sec","prioritizers":[],"bends":[],"loadBalanceStrategy":"DO_NOT_LOAD_BALANCE","partitioningAttribute":"","loadBalanceCompression":"DO_NOT_COMPRESS","componentType":"CONNECTION","groupIdentifier":"3e06a40c-e274-3903-99d0-9c45b5531e80"},{"identifier":"d952c0da-248f-36b9-ae66-58a81f1e222e","instanceIdentifier":"aabfa23a-8fcc-3674-dcb6-b953f66c2bbd","name":"","source":{"id":"02135b05-548b-37f2-b5e2-5432f2fc1cac","type":"PROCESSOR","groupId":"3e06a40c-e274-3903-99d0-9c45b5531e80","name":"ExecuteScript","comments":"","instanceIdentifier":"c58e4e34-800b-35d8-2ce4-ff157e442c13"},"destination":{"id":"285d89c3-2669-3dc6-bf70-cf91fe1d651b","type":"PROCESSOR","groupId":"3e06a40c-e274-3903-99d0-9c45b5531e80","name":"NGSI-LD to HL7 FHIR","comments":"","instanceIdentifier":"a8d0d810-706b-3569-0d1f-3c75e5d389a8"},"labelIndex":1,"zIndex":0,"selectedRelationships":["success"],"backPressureObjectThreshold":10000,"backPressureDataSizeThreshold":"1 GB","flowFileExpiration":"0 sec","prioritizers":[],"bends":[],"loadBalanceStrategy":"DO_NOT_LOAD_BALANCE","partitioningAttribute":"","loadBalanceCompression":"DO_NOT_COMPRESS","componentType":"CONNECTION","groupIdentifier":"3e06a40c-e274-3903-99d0-9c45b5531e80"},{"identifier":"e1ebafe5-9639-32a8-a7f6-7431948a7e40","instanceIdentifier":"ec17af03-012c-3b94-6a5f-1c84cd84db37","name":"","source":{"id":"b44f3c5d-9031-3a3e-a7e7-e1a6290adfa5","type":"OUTPUT_PORT","groupId":"3d4a75a2-18f7-3432-b0ef-fa8f31ca6fb8","name":"Temporal Entities","instanceIdentifier":"123763bf-1f63-322c-effd-2e1d6aaa713c"},"destination":{"id":"a2ff60ef-c2f5-39fd-9c77-fe0fd60d7188","type":"PROCESSOR","groupId":"3e06a40c-e274-3903-99d0-9c45b5531e80","name":"SplitJson","comments":"","instanceIdentifier":"b7e47680-cd4f-3db3-8909-28f272f5f0c3"},"labelIndex":1,"zIndex":0,"selectedRelationships":[""],"backPressureObjectThreshold":10000,"backPressureDataSizeThreshold":"1 GB","flowFileExpiration":"0 sec","prioritizers":[],"bends":[],"loadBalanceStrategy":"DO_NOT_LOAD_BALANCE","partitioningAttribute":"","loadBalanceCompression":"DO_NOT_COMPRESS","componentType":"CONNECTION","groupIdentifier":"3e06a40c-e274-3903-99d0-9c45b5531e80"},{"identifier":"97865dec-8d71-32be-a945-079949480b3e","instanceIdentifier":"75e25104-0188-1000-3835-62ac5650ab98","name":"","source":{"id":"67dc7b8e-46c2-396a-a160-c6e0694175ad","type":"PROCESSOR","groupId":"3e06a40c-e274-3903-99d0-9c45b5531e80","name":"MergeContent","comments":"","instanceIdentifier":"3f4fd0d7-599a-3922-7e19-fd3aba33e97b"},"destination":{"id":"c4f7a560-0d0d-3536-a195-0928f3ac2365","type":"PROCESSOR","groupId":"3e06a40c-e274-3903-99d0-9c45b5531e80","name":"Make ND","comments":"","instanceIdentifier":"75e9ff9a-0188-1000-cd58-0e58dae99bcd"},"labelIndex":1,"zIndex":0,"selectedRelationships":["merged"],"backPressureObjectThreshold":10000,"backPressureDataSizeThreshold":"1 GB","flowFileExpiration":"0 sec","prioritizers":[],"bends":[],"loadBalanceStrategy":"DO_NOT_LOAD_BALANCE","partitioningAttribute":"","loadBalanceCompression":"DO_NOT_COMPRESS","componentType":"CONNECTION","groupIdentifier":"3e06a40c-e274-3903-99d0-9c45b5531e80"},{"identifier":"44914c43-a3f5-3677-aaf3-fbd262635323","instanceIdentifier":"66279c63-71cb-3bc5-1e72-56bd141490e4","name":"","source":{"id":"285d89c3-2669-3dc6-bf70-cf91fe1d651b","type":"PROCESSOR","groupId":"3e06a40c-e274-3903-99d0-9c45b5531e80","name":"NGSI-LD to HL7 FHIR","comments":"","instanceIdentifier":"a8d0d810-706b-3569-0d1f-3c75e5d389a8"},"destination":{"id":"4c31aa1b-cb10-3d48-bdc3-ce139af2365f","type":"PROCESSOR","groupId":"3e06a40c-e274-3903-99d0-9c45b5531e80","name":"SplitJson","comments":"","instanceIdentifier":"4857e29b-a7b3-3067-8e2c-e9bd1ee86056"},"labelIndex":1,"zIndex":0,"selectedRelationships":["success"],"backPressureObjectThreshold":10000,"backPressureDataSizeThreshold":"1 GB","flowFileExpiration":"0 sec","prioritizers":[],"bends":[],"loadBalanceStrategy":"DO_NOT_LOAD_BALANCE","partitioningAttribute":"","loadBalanceCompression":"DO_NOT_COMPRESS","componentType":"CONNECTION","groupIdentifier":"3e06a40c-e274-3903-99d0-9c45b5531e80"},{"identifier":"104da2d5-95a1-3c6a-b260-d54b7d12bf89","instanceIdentifier":"d4d44b8a-f8e7-3c03-1fb7-acb08c522a54","name":"","source":{"id":"a2ff60ef-c2f5-39fd-9c77-fe0fd60d7188","type":"PROCESSOR","groupId":"3e06a40c-e274-3903-99d0-9c45b5531e80","name":"SplitJson","comments":"","instanceIdentifier":"b7e47680-cd4f-3db3-8909-28f272f5f0c3"},"destination":{"id":"6864420d-9c3b-3e97-bb16-d9bcd04c95bc","type":"PROCESSOR","groupId":"3e06a40c-e274-3903-99d0-9c45b5531e80","name":"Get Single Entities","comments":"","instanceIdentifier":"3ba97192-327c-380b-31a0-a8547b0fff6a"},"labelIndex":1,"zIndex":0,"selectedRelationships":["split"],"backPressureObjectThreshold":10000,"backPressureDataSizeThreshold":"1 GB","flowFileExpiration":"0 sec","prioritizers":[],"bends":[],"loadBalanceStrategy":"DO_NOT_LOAD_BALANCE","partitioningAttribute":"","loadBalanceCompression":"DO_NOT_COMPRESS","componentType":"CONNECTION","groupIdentifier":"3e06a40c-e274-3903-99d0-9c45b5531e80"},{"identifier":"f2c0b9b4-a173-3eb2-a7ec-3b2bb98f26eb","instanceIdentifier":"aac5900e-a2e0-362b-4c59-e43b15272771","name":"","source":{"id":"5c9d21bd-ae1c-394a-b53c-5fe9cdb4e81d","type":"PROCESSOR","groupId":"3e06a40c-e274-3903-99d0-9c45b5531e80","name":"EvaluateJsonPath","comments":"","instanceIdentifier":"67b1a677-96f9-386a-db11-377a1f12f951"},"destination":{"id":"c40376cf-394f-3197-906d-d02057723fd6","type":"PROCESSOR","groupId":"3e06a40c-e274-3903-99d0-9c45b5531e80","name":"Call FHIR endpoint","comments":"","instanceIdentifier":"fbd9be40-1e52-3a97-58d9-1ea590a9781f"},"labelIndex":1,"zIndex":0,"selectedRelationships":["matched"],"backPressureObjectThreshold":10000,"backPressureDataSizeThreshold":"1 GB","flowFileExpiration":"0 sec","prioritizers":[],"bends":[],"loadBalanceStrategy":"DO_NOT_LOAD_BALANCE","partitioningAttribute":"","loadBalanceCompression":"DO_NOT_COMPRESS","componentType":"CONNECTION","groupIdentifier":"3e06a40c-e274-3903-99d0-9c45b5531e80"},{"identifier":"9e995a06-4b64-3a25-ac1e-6817aec991c6","instanceIdentifier":"b6abe8a9-4361-3624-fce3-a05cfbe1023d","name":"","source":{"id":"6864420d-9c3b-3e97-bb16-d9bcd04c95bc","type":"PROCESSOR","groupId":"3e06a40c-e274-3903-99d0-9c45b5531e80","name":"Get Single Entities","comments":"","instanceIdentifier":"3ba97192-327c-380b-31a0-a8547b0fff6a"},"destination":{"id":"bc7e6072-e3e0-342c-9e88-14a19647c8f4","type":"PROCESSOR","groupId":"3e06a40c-e274-3903-99d0-9c45b5531e80","name":"MergeContent","comments":"","instanceIdentifier":"36945014-35ba-37bf-8a94-e7594e2be0c1"},"labelIndex":1,"zIndex":0,"selectedRelationships":["success"],"backPressureObjectThreshold":10000,"backPressureDataSizeThreshold":"1 GB","flowFileExpiration":"0 sec","prioritizers":[],"bends":[],"loadBalanceStrategy":"DO_NOT_LOAD_BALANCE","partitioningAttribute":"","loadBalanceCompression":"DO_NOT_COMPRESS","componentType":"CONNECTION","groupIdentifier":"3e06a40c-e274-3903-99d0-9c45b5531e80"},{"identifier":"e30962c7-6445-3237-8b8b-253a6aaa0e0e","instanceIdentifier":"0dc56f12-3f87-3254-9b52-94ca0de09d86","name":"","source":{"id":"00c06b2e-8245-316d-a97b-72fbba2f0412","type":"OUTPUT_PORT","groupId":"93491341-5bcf-3f1a-9be2-21eeb11c7437","name":"NGSI-LD Notification Data","instanceIdentifier":"aa42b4b7-8818-3128-496d-51edba4f0467"},"destination":{"id":"285d89c3-2669-3dc6-bf70-cf91fe1d651b","type":"PROCESSOR","groupId":"3e06a40c-e274-3903-99d0-9c45b5531e80","name":"NGSI-LD to HL7 FHIR","comments":"","instanceIdentifier":"a8d0d810-706b-3569-0d1f-3c75e5d389a8"},"labelIndex":1,"zIndex":0,"selectedRelationships":[""],"backPressureObjectThreshold":10000,"backPressureDataSizeThreshold":"1 GB","flowFileExpiration":"0 sec","prioritizers":[],"bends":[],"loadBalanceStrategy":"DO_NOT_LOAD_BALANCE","partitioningAttribute":"","loadBalanceCompression":"DO_NOT_COMPRESS","componentType":"CONNECTION","groupIdentifier":"3e06a40c-e274-3903-99d0-9c45b5531e80"}],"labels":[],"funnels":[],"controllerServices":[],"variables":{},"defaultFlowFileExpiration":"0 sec","defaultBackPressureObjectThreshold":10000,"defaultBackPressureDataSizeThreshold":"1 GB","componentType":"PROCESS_GROUP","flowFileConcurrency":"UNBOUNDED","flowFileOutboundPolicy":"STREAM_WHEN_AVAILABLE"},"externalControllerServices":{},"parameterContexts":{},"flowEncodingVersion":"1.0","parameterProviders":{},"latest":false} \ No newline at end of file diff --git a/fullSetup/docker-compose.yml b/fullSetup/docker-compose.yml new file mode 100644 index 0000000..fc62fa1 --- /dev/null +++ b/fullSetup/docker-compose.yml @@ -0,0 +1,103 @@ +version: '3' + +services: +# testserver: +# image: testserver +# ports: +# - "55551:55551" + nifireg: + image: apache/nifi-registry + ports: + - "18080:18080" + nifi: + image: apache/nifi + ports: + - "8443:8443" + - "8080:8080" + environment: + ENTITY_TYPES: Medication,Patient + AT_CONTEXT: https://fiware.github.io/data-models/context.jsonld + NGSILD_HOST: http://scorpio:9090 + NOTIFICATION_PATH: notify + NOTIFICATION_PORT: 4444 + NOTIFICATION_HOST: http://nifi + HL7_HOST: http://testserver:55551 + TEMP_INTERVAL: 20 + NIFI_REG: http://nifireg:18080 + MY_HOST: http://nifi:8080 + ########## JVM ########## + + # -Xms + # The initial JVM heap size. + #NIFI_JVM_HEAP_INIT: 512m + + # -Xmx + # The maximum JVM heap size. + #NIFI_JVM_HEAP_MAX: 512m + + # -Xdebug + # The JVM Debugger can be enabled by setting this environment variable to any value. + #NIFI_JVM_DEBUGGER: '' + + + + ########## Web ########## + + # nifi.web.http.host + NIFI_WEB_HTTP_HOST: '0.0.0.0' + + # nifi.web.http.port + # HTTP Port + NIFI_WEB_HTTP_PORT: 8080 + volumes: + - ./NGSILDHL7Flow.json:/home/nifi/NGSILDHL7Flow.json + - ./loadtemplate.sh:/home/nifi/loadtemplate.sh + - ./download:/home/nifi/download + entrypoint: ["bash", "/home/nifi/loadtemplate.sh"] + zookeeper: + image: zookeeper + ports: + - "2181" + logging: + driver: none + kafka: + image: bitnami/kafka + ports: + - "9092" + environment: + KAFKA_ADVERTISED_HOST_NAME: kafka + KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181 + KAFKA_ADVERTISED_PORT: 9092 + KAFKA_LOG_RETENTION_MS: 10000 + KAFKA_LOG_RETENTION_CHECK_INTERVAL_MS: 5000 + ALLOW_PLAINTEXT_LISTENER: "yes" + volumes: + - /var/run/docker.sock:/var/run/docker.sock + depends_on: + - zookeeper +# logging: +# driver: none + postgres: + image: postgis/postgis + ports: + - "5432" + environment: + POSTGRES_USER: ngb + POSTGRES_PASSWORD: ngb + POSTGRES_DB: ngb + logging: + driver: none +# volumes: +# - /var/lib/docker/volumes/b089a32ad3162e1f7152fe9a87bdb10f4340f02372ae802c65ea870ccefb863f/_data:/var/lib/postgresql/data + scorpio: +# image: scorpiobroker/scorpio:scorpio-aaio-no-eureka_1.1.0-SNAPSHOT + image: scorpiobroker/all-in-one-runner:java-kafka-3.0.11 + ports: + - "9090:9090" +# environment: +# SPRING_SECURITY_MODE: deactivated +# SPRING_SECURITY_OAUTH2_RESOURCESERVER_JWT_JWT-SET-URI: http://localhost:1234/realms/scorpio/protocol/openid-connect/certs +# SPRING_SECURITY_OAUTH2_RESOURCESERVER_JWT_ISSUER-URI: http://localhost:1234/realms/scorpio + depends_on: + - postgres + - kafka diff --git a/fullSetup/loadtemplate.sh b/fullSetup/loadtemplate.sh new file mode 100644 index 0000000..460ce22 --- /dev/null +++ b/fullSetup/loadtemplate.sh @@ -0,0 +1,48 @@ +#!/bin/bash + +touch bla.temp +/opt/nifi/scripts/start.sh & +pid=$! +if [[ ! -f "created" ]]; then +while true; do + curl -s --head http://localhost:8080/nifi | head -n 1 | grep "HTTP/1.[01] [23].." > /dev/null + if [ $? -eq 0 ]; then + echo "NIFI Website is up." + break + else + echo "NIFI Website is down." + sleep 5 + fi +done +# Set the nifi cli path +NIFI_CLI=/opt/nifi/nifi-toolkit-current/bin/cli.sh + +# Set the nifi url +NIFI_URL=http://localhost:8080/nifi + +REG_CLIENT_EXISTS=$($NIFI_CLI nifi get-reg-client-id -rcn regclient1|grep -c regclient1) +if [ $REG_CLIENT_EXISTS -gt 0 ]; then +echo "Creating reg client" +$NIFI_CLI nifi create-reg-client -u ${MY_HOST} --registryClientUrl ${NIFI_REG} --registryClientName regclient1 +fi +echo "checking bucket" +BUCKETS_EXISTS=$($NIFI_CLI registry list-buckets -u ${NIFI_REG}| grep -c "MyBucket") + + + + +if [ $BUCKETS_EXISTS -lt 1 ]; then +echo "bucket does not exist" +$NIFI_CLI registry create-bucket -u ${NIFI_REG} --bucketName MyBucket +BUCKET_ID=$($NIFI_CLI registry list-buckets -u ${NIFI_REG}|grep MyBucket|awk '{print $3}') +$NIFI_CLI registry create-flow -u ${NIFI_REG} --bucketIdentifier $BUCKET_ID --flowName MyFlow +FLOWID=$($NIFI_CLI registry list-flows -u ${NIFI_REG} --bucketIdentifier=$BUCKET_ID|grep MyFlow|awk '{print $3}') +$NIFI_CLI registry import-flow-version -u ${NIFI_REG} -f $FLOWID -i /home/nifi/NGSILDHL7Flow.json +$NIFI_CLI nifi pg-import --bucketIdentifier $BUCKET_ID --flowIdentifier $FLOWID --flowVersion 1 +fi +PG_ID=$($NIFI_CLI nifi pg-list|grep 1|awk '{print $4}') +$NIFI_CLI nifi pg-enable-services --processGroupId $PG_ID +$NIFI_CLI nifi pg-start --processGroupId $PG_ID +touch created +fi +wait $pid diff --git a/sub2LiveSystem/NGSILDHL7Flow.json b/sub2LiveSystem/NGSILDHL7Flow.json new file mode 100644 index 0000000..ad12ad2 --- /dev/null +++ b/sub2LiveSystem/NGSILDHL7Flow.json @@ -0,0 +1 @@ +{"flowContents":{"identifier":"3e06a40c-e274-3903-99d0-9c45b5531e80","instanceIdentifier":"744cc16e-0188-1000-1b7e-e925a1f1b367","name":"NiFi Flow","comments":"","position":{"x":0.0,"y":8.0},"processGroups":[{"identifier":"eebaea83-90d9-315c-a799-37198083f54e","instanceIdentifier":"9cc92fc1-2311-3682-e59a-ca55464bf6f1","name":"NGSI-LD Subscriptions","comments":"","position":{"x":2018.2122400232342,"y":1177.2718375035558},"processGroups":[],"remoteProcessGroups":[],"processors":[{"identifier":"5082c2a8-e27c-3b27-9e5c-76b3f19e8786","instanceIdentifier":"e937f196-7187-330e-75a4-0189a695ca61","name":"SplitContent","comments":"","position":{"x":264.0,"y":432.0},"type":"org.apache.nifi.processors.standard.SplitContent","bundle":{"group":"org.apache.nifi","artifact":"nifi-standard-nar","version":"1.21.0"},"properties":{"Byte Sequence Location":"Trailing","Keep Byte Sequence":"false","Byte Sequence Format":"Text","Byte Sequence":","},"propertyDescriptors":{"Byte Sequence Location":{"name":"Byte Sequence Location","displayName":"Byte Sequence Location","identifiesControllerService":false,"sensitive":false},"Keep Byte Sequence":{"name":"Keep Byte Sequence","displayName":"Keep Byte Sequence","identifiesControllerService":false,"sensitive":false},"Byte Sequence Format":{"name":"Byte Sequence Format","displayName":"Byte Sequence Format","identifiesControllerService":false,"sensitive":false},"Byte Sequence":{"name":"Byte Sequence","displayName":"Byte Sequence","identifiesControllerService":false,"sensitive":false}},"style":{},"schedulingPeriod":"0 sec","schedulingStrategy":"TIMER_DRIVEN","executionNode":"ALL","penaltyDuration":"30 sec","yieldDuration":"1 sec","bulletinLevel":"WARN","runDurationMillis":0,"concurrentlySchedulableTaskCount":1,"autoTerminatedRelationships":["original"],"scheduledState":"ENABLED","retryCount":10,"retriedRelationships":[],"backoffMechanism":"PENALIZE_FLOWFILE","maxBackoffPeriod":"10 mins","componentType":"PROCESSOR","groupIdentifier":"eebaea83-90d9-315c-a799-37198083f54e"},{"identifier":"27e4e5f8-585a-35b1-a830-be0f3cf20252","instanceIdentifier":"f748a32a-b653-38ca-c63e-2a88479529bf","name":"EvaluateJsonPath","comments":"","position":{"x":1240.0,"y":280.0},"type":"org.apache.nifi.processors.standard.EvaluateJsonPath","bundle":{"group":"org.apache.nifi","artifact":"nifi-standard-nar","version":"1.21.0"},"properties":{"Destination":"flowfile-content","Return Type":"auto-detect","Null Value Representation":"empty string","JsonPaths":"$.data","Path Not Found Behavior":"ignore"},"propertyDescriptors":{"Destination":{"name":"Destination","displayName":"Destination","identifiesControllerService":false,"sensitive":false},"Return Type":{"name":"Return Type","displayName":"Return Type","identifiesControllerService":false,"sensitive":false},"Null Value Representation":{"name":"Null Value Representation","displayName":"Null Value Representation","identifiesControllerService":false,"sensitive":false},"JsonPaths":{"name":"JsonPaths","displayName":"JsonPaths","identifiesControllerService":false,"sensitive":false},"Path Not Found Behavior":{"name":"Path Not Found Behavior","displayName":"Path Not Found Behavior","identifiesControllerService":false,"sensitive":false}},"style":{},"schedulingPeriod":"0 sec","schedulingStrategy":"TIMER_DRIVEN","executionNode":"ALL","penaltyDuration":"30 sec","yieldDuration":"1 sec","bulletinLevel":"WARN","runDurationMillis":0,"concurrentlySchedulableTaskCount":1,"autoTerminatedRelationships":["failure","unmatched"],"scheduledState":"ENABLED","retryCount":10,"retriedRelationships":[],"backoffMechanism":"PENALIZE_FLOWFILE","maxBackoffPeriod":"10 mins","componentType":"PROCESSOR","groupIdentifier":"eebaea83-90d9-315c-a799-37198083f54e"},{"identifier":"7d97f867-c218-3d56-ae3e-38a1f5cbefda","instanceIdentifier":"d4c17f3e-f4f5-38a0-33a7-f844e1d3540b","name":"ReplaceText","comments":"","position":{"x":272.0,"y":608.0},"type":"org.apache.nifi.processors.standard.ReplaceText","bundle":{"group":"org.apache.nifi","artifact":"nifi-standard-nar","version":"1.21.0"},"properties":{"Regular Expression":"([^ ]+)","Replacement Value":"{\"type\":\"$1\"}","Evaluation Mode":"Line-by-Line","Text to Prepend":null,"Line-by-Line Evaluation Mode":"All","Character Set":"UTF-8","Maximum Buffer Size":"1 MB","Replacement Strategy":"Regex Replace","Text to Append":null},"propertyDescriptors":{"Regular Expression":{"name":"Regular Expression","displayName":"Search Value","identifiesControllerService":false,"sensitive":false},"Replacement Value":{"name":"Replacement Value","displayName":"Replacement Value","identifiesControllerService":false,"sensitive":false},"Evaluation Mode":{"name":"Evaluation Mode","displayName":"Evaluation Mode","identifiesControllerService":false,"sensitive":false},"Text to Prepend":{"name":"Text to Prepend","displayName":"Text to Prepend","identifiesControllerService":false,"sensitive":false},"Line-by-Line Evaluation Mode":{"name":"Line-by-Line Evaluation Mode","displayName":"Line-by-Line Evaluation Mode","identifiesControllerService":false,"sensitive":false},"Character Set":{"name":"Character Set","displayName":"Character Set","identifiesControllerService":false,"sensitive":false},"Maximum Buffer Size":{"name":"Maximum Buffer Size","displayName":"Maximum Buffer Size","identifiesControllerService":false,"sensitive":false},"Replacement Strategy":{"name":"Replacement Strategy","displayName":"Replacement Strategy","identifiesControllerService":false,"sensitive":false},"Text to Append":{"name":"Text to Append","displayName":"Text to Append","identifiesControllerService":false,"sensitive":false}},"style":{},"schedulingPeriod":"0 sec","schedulingStrategy":"TIMER_DRIVEN","executionNode":"ALL","penaltyDuration":"30 sec","yieldDuration":"1 sec","bulletinLevel":"WARN","runDurationMillis":25,"concurrentlySchedulableTaskCount":1,"autoTerminatedRelationships":["failure"],"scheduledState":"ENABLED","retryCount":10,"retriedRelationships":[],"backoffMechanism":"PENALIZE_FLOWFILE","maxBackoffPeriod":"10 mins","componentType":"PROCESSOR","groupIdentifier":"eebaea83-90d9-315c-a799-37198083f54e"},{"identifier":"e8f81b8c-95ea-3799-bc06-c63b76d2d791","instanceIdentifier":"bedbba7d-633d-3167-c5a1-b75a9dec306f","name":"MergeContent","comments":"","position":{"x":336.0,"y":768.0},"type":"org.apache.nifi.processors.standard.MergeContent","bundle":{"group":"org.apache.nifi","artifact":"nifi-standard-nar","version":"1.21.0"},"properties":{"Keep Path":"false","Maximum Group Size":null,"Merge Strategy":"Bin-Packing Algorithm","Attribute Strategy":"Keep All Unique Attributes","Compression Level":"1","Maximum Number of Entries":"1000","Minimum Group Size":"0 B","Maximum number of Bins":"5","Tar Modified Time":"${file.lastModifiedTime}","Delimiter Strategy":"Text","Merge Format":"Binary Concatenation","Footer File":null,"Max Bin Age":null,"Demarcator File":",","Correlation Attribute Name":null,"Header File":null,"mergecontent-metadata-strategy":"Do Not Merge Uncommon Metadata","Minimum Number of Entries":"2"},"propertyDescriptors":{"Keep Path":{"name":"Keep Path","displayName":"Keep Path","identifiesControllerService":false,"sensitive":false},"Maximum Group Size":{"name":"Maximum Group Size","displayName":"Maximum Group Size","identifiesControllerService":false,"sensitive":false},"Merge Strategy":{"name":"Merge Strategy","displayName":"Merge Strategy","identifiesControllerService":false,"sensitive":false},"Attribute Strategy":{"name":"Attribute Strategy","displayName":"Attribute Strategy","identifiesControllerService":false,"sensitive":false},"Compression Level":{"name":"Compression Level","displayName":"Compression Level","identifiesControllerService":false,"sensitive":false},"Maximum Number of Entries":{"name":"Maximum Number of Entries","displayName":"Maximum Number of Entries","identifiesControllerService":false,"sensitive":false},"Minimum Group Size":{"name":"Minimum Group Size","displayName":"Minimum Group Size","identifiesControllerService":false,"sensitive":false},"Maximum number of Bins":{"name":"Maximum number of Bins","displayName":"Maximum number of Bins","identifiesControllerService":false,"sensitive":false},"Tar Modified Time":{"name":"Tar Modified Time","displayName":"Tar Modified Time","identifiesControllerService":false,"sensitive":false},"Delimiter Strategy":{"name":"Delimiter Strategy","displayName":"Delimiter Strategy","identifiesControllerService":false,"sensitive":false},"Merge Format":{"name":"Merge Format","displayName":"Merge Format","identifiesControllerService":false,"sensitive":false},"Footer File":{"name":"Footer File","displayName":"Footer","identifiesControllerService":false,"sensitive":false,"resourceDefinition":{"cardinality":"SINGLE","resourceTypes":["TEXT","FILE"]}},"Max Bin Age":{"name":"Max Bin Age","displayName":"Max Bin Age","identifiesControllerService":false,"sensitive":false},"Demarcator File":{"name":"Demarcator File","displayName":"Demarcator","identifiesControllerService":false,"sensitive":false,"resourceDefinition":{"cardinality":"SINGLE","resourceTypes":["TEXT","FILE"]}},"Correlation Attribute Name":{"name":"Correlation Attribute Name","displayName":"Correlation Attribute Name","identifiesControllerService":false,"sensitive":false},"Header File":{"name":"Header File","displayName":"Header","identifiesControllerService":false,"sensitive":false,"resourceDefinition":{"cardinality":"SINGLE","resourceTypes":["TEXT","FILE"]}},"mergecontent-metadata-strategy":{"name":"mergecontent-metadata-strategy","displayName":"Metadata Strategy","identifiesControllerService":false,"sensitive":false},"Minimum Number of Entries":{"name":"Minimum Number of Entries","displayName":"Minimum Number of Entries","identifiesControllerService":false,"sensitive":false}},"style":{},"schedulingPeriod":"0 sec","schedulingStrategy":"TIMER_DRIVEN","executionNode":"ALL","penaltyDuration":"30 sec","yieldDuration":"1 sec","bulletinLevel":"WARN","runDurationMillis":0,"concurrentlySchedulableTaskCount":1,"autoTerminatedRelationships":["original","failure"],"scheduledState":"ENABLED","retryCount":10,"retriedRelationships":[],"backoffMechanism":"PENALIZE_FLOWFILE","maxBackoffPeriod":"10 mins","componentType":"PROCESSOR","groupIdentifier":"eebaea83-90d9-315c-a799-37198083f54e"},{"identifier":"f10ef940-3e17-3703-b8ed-8131eb50e532","instanceIdentifier":"a4da93f1-2b1c-3c8c-9659-bf52d20c1a8c","name":"ReplaceText","comments":"","position":{"x":1064.0,"y":728.0},"type":"org.apache.nifi.processors.standard.ReplaceText","bundle":{"group":"org.apache.nifi","artifact":"nifi-standard-nar","version":"1.21.0"},"properties":{"Regular Expression":"([^ ]+)","Replacement Value":"{\n\t\"@context\": \"${AT_CONTEXT}\",\n\t\"id\": \"myspecial_sub_id:1234567\",\n\t\"type\": \"Subscription\",\n\t\"entities\": [\n\t\t$1\n\t],\n\t\"notification\": {\n\t\t\"endpoint\": {\n\t\t\t\"uri\": \"${NOTIFICATION_HOST}:${NOTIFICATION_PORT}/${NOTIFICATION_PATH}\",\n\t\t\t\"accept\": \"application/json\"\n\t\t}\n\t}\n}","Evaluation Mode":"Line-by-Line","Text to Prepend":null,"Line-by-Line Evaluation Mode":"All","Character Set":"UTF-8","Maximum Buffer Size":"1 MB","Replacement Strategy":"Regex Replace","Text to Append":null},"propertyDescriptors":{"Regular Expression":{"name":"Regular Expression","displayName":"Search Value","identifiesControllerService":false,"sensitive":false},"Replacement Value":{"name":"Replacement Value","displayName":"Replacement Value","identifiesControllerService":false,"sensitive":false},"Evaluation Mode":{"name":"Evaluation Mode","displayName":"Evaluation Mode","identifiesControllerService":false,"sensitive":false},"Text to Prepend":{"name":"Text to Prepend","displayName":"Text to Prepend","identifiesControllerService":false,"sensitive":false},"Line-by-Line Evaluation Mode":{"name":"Line-by-Line Evaluation Mode","displayName":"Line-by-Line Evaluation Mode","identifiesControllerService":false,"sensitive":false},"Character Set":{"name":"Character Set","displayName":"Character Set","identifiesControllerService":false,"sensitive":false},"Maximum Buffer Size":{"name":"Maximum Buffer Size","displayName":"Maximum Buffer Size","identifiesControllerService":false,"sensitive":false},"Replacement Strategy":{"name":"Replacement Strategy","displayName":"Replacement Strategy","identifiesControllerService":false,"sensitive":false},"Text to Append":{"name":"Text to Append","displayName":"Text to Append","identifiesControllerService":false,"sensitive":false}},"style":{},"schedulingPeriod":"0 sec","schedulingStrategy":"TIMER_DRIVEN","executionNode":"ALL","penaltyDuration":"30 sec","yieldDuration":"1 sec","bulletinLevel":"WARN","runDurationMillis":25,"concurrentlySchedulableTaskCount":1,"autoTerminatedRelationships":["failure"],"scheduledState":"ENABLED","retryCount":10,"retriedRelationships":[],"backoffMechanism":"PENALIZE_FLOWFILE","maxBackoffPeriod":"10 mins","componentType":"PROCESSOR","groupIdentifier":"eebaea83-90d9-315c-a799-37198083f54e"},{"identifier":"9d42a62b-b252-329c-b503-e614f090bbb3","instanceIdentifier":"b61f62f8-cc18-3767-4a33-bac736e27129","name":"GenerateFlowFile","comments":"","position":{"x":232.0,"y":200.0},"type":"org.apache.nifi.processors.standard.GenerateFlowFile","bundle":{"group":"org.apache.nifi","artifact":"nifi-standard-nar","version":"1.21.0"},"properties":{"character-set":"UTF-8","File Size":"0B","mime-type":null,"generate-ff-custom-text":"${ENTITY_TYPES}","Batch Size":"1","Unique FlowFiles":"false","Data Format":"Text"},"propertyDescriptors":{"character-set":{"name":"character-set","displayName":"Character Set","identifiesControllerService":false,"sensitive":false},"File Size":{"name":"File Size","displayName":"File Size","identifiesControllerService":false,"sensitive":false},"mime-type":{"name":"mime-type","displayName":"Mime Type","identifiesControllerService":false,"sensitive":false},"generate-ff-custom-text":{"name":"generate-ff-custom-text","displayName":"Custom Text","identifiesControllerService":false,"sensitive":false},"Batch Size":{"name":"Batch Size","displayName":"Batch Size","identifiesControllerService":false,"sensitive":false},"Unique FlowFiles":{"name":"Unique FlowFiles","displayName":"Unique FlowFiles","identifiesControllerService":false,"sensitive":false},"Data Format":{"name":"Data Format","displayName":"Data Format","identifiesControllerService":false,"sensitive":false}},"style":{},"schedulingPeriod":"1 min","schedulingStrategy":"TIMER_DRIVEN","executionNode":"ALL","penaltyDuration":"30 sec","yieldDuration":"1 sec","bulletinLevel":"WARN","runDurationMillis":0,"concurrentlySchedulableTaskCount":1,"autoTerminatedRelationships":[],"scheduledState":"ENABLED","retryCount":10,"retriedRelationships":[],"backoffMechanism":"PENALIZE_FLOWFILE","maxBackoffPeriod":"10 mins","componentType":"PROCESSOR","groupIdentifier":"eebaea83-90d9-315c-a799-37198083f54e"},{"identifier":"620bf838-a2db-3460-adf5-807f3e18cd21","instanceIdentifier":"b627482b-122b-379f-b889-0fd288f291c8","name":"ListenHTTP","comments":"","position":{"x":896.0,"y":480.0},"type":"org.apache.nifi.processors.standard.ListenHTTP","bundle":{"group":"org.apache.nifi","artifact":"nifi-standard-nar","version":"1.21.0"},"properties":{"authorized-issuer-dn-pattern":".*","multipart-request-max-size":"1 MB","record-writer":null,"HTTP Protocols":"HTTP_1_1","HTTP Headers to receive as Attributes (Regex)":null,"health-check-port":null,"Authorized DN Pattern":".*","max-thread-pool-size":"200","Base Path":"${NOTIFICATION_PATH}","multipart-read-buffer-size":"512 KB","SSL Context Service":null,"Max Unconfirmed Flowfile Time":"60 secs","Max Data to Receive per Second":null,"client-authentication":"AUTO","Return Code":"200","record-reader":null,"Listening Port":"${NOTIFICATION_PORT}"},"propertyDescriptors":{"authorized-issuer-dn-pattern":{"name":"authorized-issuer-dn-pattern","displayName":"Authorized Issuer DN Pattern","identifiesControllerService":false,"sensitive":false},"multipart-request-max-size":{"name":"multipart-request-max-size","displayName":"Multipart Request Max Size","identifiesControllerService":false,"sensitive":false},"record-writer":{"name":"record-writer","displayName":"Record Writer","identifiesControllerService":true,"sensitive":false},"HTTP Protocols":{"name":"HTTP Protocols","displayName":"HTTP Protocols","identifiesControllerService":false,"sensitive":false},"HTTP Headers to receive as Attributes (Regex)":{"name":"HTTP Headers to receive as Attributes (Regex)","displayName":"HTTP Headers to receive as Attributes (Regex)","identifiesControllerService":false,"sensitive":false},"health-check-port":{"name":"health-check-port","displayName":"Listening Port for Health Check Requests","identifiesControllerService":false,"sensitive":false},"Authorized DN Pattern":{"name":"Authorized DN Pattern","displayName":"Authorized Subject DN Pattern","identifiesControllerService":false,"sensitive":false},"max-thread-pool-size":{"name":"max-thread-pool-size","displayName":"Maximum Thread Pool Size","identifiesControllerService":false,"sensitive":false},"Base Path":{"name":"Base Path","displayName":"Base Path","identifiesControllerService":false,"sensitive":false},"multipart-read-buffer-size":{"name":"multipart-read-buffer-size","displayName":"Multipart Read Buffer Size","identifiesControllerService":false,"sensitive":false},"SSL Context Service":{"name":"SSL Context Service","displayName":"SSL Context Service","identifiesControllerService":true,"sensitive":false},"Max Unconfirmed Flowfile Time":{"name":"Max Unconfirmed Flowfile Time","displayName":"Max Unconfirmed Flowfile Time","identifiesControllerService":false,"sensitive":false},"Max Data to Receive per Second":{"name":"Max Data to Receive per Second","displayName":"Max Data to Receive per Second","identifiesControllerService":false,"sensitive":false},"client-authentication":{"name":"client-authentication","displayName":"Client Authentication","identifiesControllerService":false,"sensitive":false},"Return Code":{"name":"Return Code","displayName":"Return Code","identifiesControllerService":false,"sensitive":false},"record-reader":{"name":"record-reader","displayName":"Record Reader","identifiesControllerService":true,"sensitive":false},"Listening Port":{"name":"Listening Port","displayName":"Listening Port","identifiesControllerService":false,"sensitive":false}},"style":{},"schedulingPeriod":"0 sec","schedulingStrategy":"TIMER_DRIVEN","executionNode":"ALL","penaltyDuration":"30 sec","yieldDuration":"1 sec","bulletinLevel":"WARN","runDurationMillis":0,"concurrentlySchedulableTaskCount":1,"autoTerminatedRelationships":[],"scheduledState":"ENABLED","retryCount":10,"retriedRelationships":[],"backoffMechanism":"PENALIZE_FLOWFILE","maxBackoffPeriod":"10 mins","componentType":"PROCESSOR","groupIdentifier":"eebaea83-90d9-315c-a799-37198083f54e"},{"identifier":"1882950a-d3ae-37cd-97e0-bbfa5d644a92","instanceIdentifier":"dfa53240-73d2-366b-209e-16fc16c00ac3","name":"InvokeHTTP","comments":"","position":{"x":736.0,"y":184.0},"type":"org.apache.nifi.processors.standard.InvokeHTTP","bundle":{"group":"org.apache.nifi","artifact":"nifi-standard-nar","version":"1.21.0"},"properties":{"Proxy Host":null,"Attributes to Send":null,"use-etag":"false","proxy-configuration-service":null,"Proxy Type":"http","cookie-strategy":"DISABLED","Connection Timeout":"5 secs","send-message-body":"true","set-form-filename":"true","Always Output Response":"false","etag-max-cache-size":"10MB","Content-Encoding":"DISABLED","disable-http2":"False","idle-timeout":"5 mins","Put Response Body In Attribute":null,"Use Chunked Encoding":"false","Follow Redirects":"True","Remote URL":"${NGSILD_HOST}/ngsi-ld/v1/subscriptions","form-body-form-name":null,"Content-Type":"application/ld+json","flow-file-naming-strategy":"RANDOM","max-idle-connections":"5","invokehttp-proxy-user":null,"Read Timeout":"15 secs","Max Length To Put In Attribute":"256","ignore-response-content":"false","Proxy Port":null,"SSL Context Service":null,"Digest Authentication":"false","HTTP Method":"POST","Add Response Headers to Request":"false","oauth2-access-token-provider":null,"Basic Authentication Username":null,"Include Date Header":"True","Penalize on \"No Retry\"":"false","Useragent":null},"propertyDescriptors":{"Proxy Host":{"name":"Proxy Host","displayName":"Proxy Host","identifiesControllerService":false,"sensitive":false},"Attributes to Send":{"name":"Attributes to Send","displayName":"Request Header Attributes Pattern","identifiesControllerService":false,"sensitive":false},"use-etag":{"name":"use-etag","displayName":"Response Cache Enabled","identifiesControllerService":false,"sensitive":false},"proxy-configuration-service":{"name":"proxy-configuration-service","displayName":"Proxy Configuration Service","identifiesControllerService":true,"sensitive":false},"Proxy Type":{"name":"Proxy Type","displayName":"Proxy Type","identifiesControllerService":false,"sensitive":false},"Basic Authentication Password":{"name":"Basic Authentication Password","displayName":"Request Password","identifiesControllerService":false,"sensitive":true},"cookie-strategy":{"name":"cookie-strategy","displayName":"Response Cookie Strategy","identifiesControllerService":false,"sensitive":false},"Connection Timeout":{"name":"Connection Timeout","displayName":"Socket Connect Timeout","identifiesControllerService":false,"sensitive":false},"send-message-body":{"name":"send-message-body","displayName":"Request Body Enabled","identifiesControllerService":false,"sensitive":false},"set-form-filename":{"name":"set-form-filename","displayName":"Request Multipart Form-Data Filename Enabled","identifiesControllerService":false,"sensitive":false},"Always Output Response":{"name":"Always Output Response","displayName":"Response Generation Required","identifiesControllerService":false,"sensitive":false},"etag-max-cache-size":{"name":"etag-max-cache-size","displayName":"Response Cache Size","identifiesControllerService":false,"sensitive":false},"Content-Encoding":{"name":"Content-Encoding","displayName":"Request Content-Encoding","identifiesControllerService":false,"sensitive":false},"disable-http2":{"name":"disable-http2","displayName":"HTTP/2 Disabled","identifiesControllerService":false,"sensitive":false},"idle-timeout":{"name":"idle-timeout","displayName":"Socket Idle Timeout","identifiesControllerService":false,"sensitive":false},"Put Response Body In Attribute":{"name":"Put Response Body In Attribute","displayName":"Response Body Attribute Name","identifiesControllerService":false,"sensitive":false},"Use Chunked Encoding":{"name":"Use Chunked Encoding","displayName":"Request Chunked Transfer-Encoding Enabled","identifiesControllerService":false,"sensitive":false},"Follow Redirects":{"name":"Follow Redirects","displayName":"Response Redirects Enabled","identifiesControllerService":false,"sensitive":false},"Remote URL":{"name":"Remote URL","displayName":"HTTP URL","identifiesControllerService":false,"sensitive":false},"form-body-form-name":{"name":"form-body-form-name","displayName":"Request Multipart Form-Data Name","identifiesControllerService":false,"sensitive":false},"Content-Type":{"name":"Content-Type","displayName":"Request Content-Type","identifiesControllerService":false,"sensitive":false},"flow-file-naming-strategy":{"name":"flow-file-naming-strategy","displayName":"Response FlowFile Naming Strategy","identifiesControllerService":false,"sensitive":false},"max-idle-connections":{"name":"max-idle-connections","displayName":"Socket Idle Connections","identifiesControllerService":false,"sensitive":false},"invokehttp-proxy-user":{"name":"invokehttp-proxy-user","displayName":"Proxy Username","identifiesControllerService":false,"sensitive":false},"Read Timeout":{"name":"Read Timeout","displayName":"Socket Read Timeout","identifiesControllerService":false,"sensitive":false},"Max Length To Put In Attribute":{"name":"Max Length To Put In Attribute","displayName":"Response Body Attribute Size","identifiesControllerService":false,"sensitive":false},"invokehttp-proxy-password":{"name":"invokehttp-proxy-password","displayName":"Proxy Password","identifiesControllerService":false,"sensitive":true},"ignore-response-content":{"name":"ignore-response-content","displayName":"Response Body Ignored","identifiesControllerService":false,"sensitive":false},"Proxy Port":{"name":"Proxy Port","displayName":"Proxy Port","identifiesControllerService":false,"sensitive":false},"SSL Context Service":{"name":"SSL Context Service","displayName":"SSL Context Service","identifiesControllerService":true,"sensitive":false},"Digest Authentication":{"name":"Digest Authentication","displayName":"Request Digest Authentication Enabled","identifiesControllerService":false,"sensitive":false},"HTTP Method":{"name":"HTTP Method","displayName":"HTTP Method","identifiesControllerService":false,"sensitive":false},"Add Response Headers to Request":{"name":"Add Response Headers to Request","displayName":"Response Header Request Attributes Enabled","identifiesControllerService":false,"sensitive":false},"oauth2-access-token-provider":{"name":"oauth2-access-token-provider","displayName":"Request OAuth2 Access Token Provider","identifiesControllerService":true,"sensitive":false},"Basic Authentication Username":{"name":"Basic Authentication Username","displayName":"Request Username","identifiesControllerService":false,"sensitive":false},"Include Date Header":{"name":"Include Date Header","displayName":"Request Date Header Enabled","identifiesControllerService":false,"sensitive":false},"Penalize on \"No Retry\"":{"name":"Penalize on \"No Retry\"","displayName":"Request Failure Penalization Enabled","identifiesControllerService":false,"sensitive":false},"Useragent":{"name":"Useragent","displayName":"Request User-Agent","identifiesControllerService":false,"sensitive":false}},"style":{},"schedulingPeriod":"0 sec","schedulingStrategy":"TIMER_DRIVEN","executionNode":"ALL","penaltyDuration":"30 sec","yieldDuration":"1 sec","bulletinLevel":"WARN","runDurationMillis":0,"concurrentlySchedulableTaskCount":1,"autoTerminatedRelationships":[],"scheduledState":"ENABLED","retryCount":10,"retriedRelationships":[],"backoffMechanism":"PENALIZE_FLOWFILE","maxBackoffPeriod":"10 mins","componentType":"PROCESSOR","groupIdentifier":"eebaea83-90d9-315c-a799-37198083f54e"},{"identifier":"2d9d6ccc-a121-3c91-b674-26a4cea2d280","instanceIdentifier":"669e3070-5c5a-315b-204a-be6c063629b8","name":"LogMessage","comments":"","position":{"x":1280.0,"y":-8.0},"type":"org.apache.nifi.processors.standard.LogMessage","bundle":{"group":"org.apache.nifi","artifact":"nifi-standard-nar","version":"1.21.0"},"properties":{"log-message":null,"log-level":"info","log-prefix":null},"propertyDescriptors":{"log-message":{"name":"log-message","displayName":"Log message","identifiesControllerService":false,"sensitive":false},"log-level":{"name":"log-level","displayName":"Log Level","identifiesControllerService":false,"sensitive":false},"log-prefix":{"name":"log-prefix","displayName":"Log prefix","identifiesControllerService":false,"sensitive":false}},"style":{},"schedulingPeriod":"0 sec","schedulingStrategy":"TIMER_DRIVEN","executionNode":"ALL","penaltyDuration":"30 sec","yieldDuration":"1 sec","bulletinLevel":"WARN","runDurationMillis":25,"concurrentlySchedulableTaskCount":1,"autoTerminatedRelationships":["success"],"scheduledState":"ENABLED","retryCount":10,"retriedRelationships":[],"backoffMechanism":"PENALIZE_FLOWFILE","maxBackoffPeriod":"10 mins","componentType":"PROCESSOR","groupIdentifier":"eebaea83-90d9-315c-a799-37198083f54e"}],"inputPorts":[],"outputPorts":[{"identifier":"00c06b2e-8245-316d-a97b-72fbba2f0412","instanceIdentifier":"454f7679-d420-3b0a-ea1b-1f4d347fd493","name":"NGSI-LD Notification Data","position":{"x":1464.0,"y":656.0},"type":"OUTPUT_PORT","concurrentlySchedulableTaskCount":1,"scheduledState":"ENABLED","allowRemoteAccess":false,"componentType":"OUTPUT_PORT","groupIdentifier":"eebaea83-90d9-315c-a799-37198083f54e"}],"connections":[{"identifier":"5059ad9c-ece9-3534-94c9-d465869bf283","instanceIdentifier":"a282ec18-ac52-3ee8-697a-a26e4dcc6d7a","name":"","source":{"id":"620bf838-a2db-3460-adf5-807f3e18cd21","type":"PROCESSOR","groupId":"eebaea83-90d9-315c-a799-37198083f54e","name":"ListenHTTP","comments":"","instanceIdentifier":"b627482b-122b-379f-b889-0fd288f291c8"},"destination":{"id":"27e4e5f8-585a-35b1-a830-be0f3cf20252","type":"PROCESSOR","groupId":"eebaea83-90d9-315c-a799-37198083f54e","name":"EvaluateJsonPath","comments":"","instanceIdentifier":"f748a32a-b653-38ca-c63e-2a88479529bf"},"labelIndex":1,"zIndex":0,"selectedRelationships":["success"],"backPressureObjectThreshold":10000,"backPressureDataSizeThreshold":"1 GB","flowFileExpiration":"0 sec","prioritizers":[],"bends":[],"loadBalanceStrategy":"DO_NOT_LOAD_BALANCE","partitioningAttribute":"","loadBalanceCompression":"DO_NOT_COMPRESS","componentType":"CONNECTION","groupIdentifier":"eebaea83-90d9-315c-a799-37198083f54e"},{"identifier":"8ab9ba9e-f58a-302b-89c1-69e01e9b88a3","instanceIdentifier":"26e9ad6d-d654-3c5f-0c08-b8c76d0a527f","name":"","source":{"id":"27e4e5f8-585a-35b1-a830-be0f3cf20252","type":"PROCESSOR","groupId":"eebaea83-90d9-315c-a799-37198083f54e","name":"EvaluateJsonPath","comments":"","instanceIdentifier":"f748a32a-b653-38ca-c63e-2a88479529bf"},"destination":{"id":"00c06b2e-8245-316d-a97b-72fbba2f0412","type":"OUTPUT_PORT","groupId":"eebaea83-90d9-315c-a799-37198083f54e","name":"NGSI-LD Notification Data","instanceIdentifier":"454f7679-d420-3b0a-ea1b-1f4d347fd493"},"labelIndex":1,"zIndex":0,"selectedRelationships":["matched"],"backPressureObjectThreshold":10000,"backPressureDataSizeThreshold":"1 GB","flowFileExpiration":"0 sec","prioritizers":[],"bends":[],"loadBalanceStrategy":"DO_NOT_LOAD_BALANCE","partitioningAttribute":"","loadBalanceCompression":"DO_NOT_COMPRESS","componentType":"CONNECTION","groupIdentifier":"eebaea83-90d9-315c-a799-37198083f54e"},{"identifier":"521cc49f-a98c-3b41-bd16-8971c224f718","instanceIdentifier":"3b1863c3-6e1f-3ff2-81a3-fa04d0e4c96f","name":"","source":{"id":"5082c2a8-e27c-3b27-9e5c-76b3f19e8786","type":"PROCESSOR","groupId":"eebaea83-90d9-315c-a799-37198083f54e","name":"SplitContent","comments":"","instanceIdentifier":"e937f196-7187-330e-75a4-0189a695ca61"},"destination":{"id":"7d97f867-c218-3d56-ae3e-38a1f5cbefda","type":"PROCESSOR","groupId":"eebaea83-90d9-315c-a799-37198083f54e","name":"ReplaceText","comments":"","instanceIdentifier":"d4c17f3e-f4f5-38a0-33a7-f844e1d3540b"},"labelIndex":1,"zIndex":0,"selectedRelationships":["splits"],"backPressureObjectThreshold":10000,"backPressureDataSizeThreshold":"1 GB","flowFileExpiration":"0 sec","prioritizers":[],"bends":[],"loadBalanceStrategy":"DO_NOT_LOAD_BALANCE","partitioningAttribute":"","loadBalanceCompression":"DO_NOT_COMPRESS","componentType":"CONNECTION","groupIdentifier":"eebaea83-90d9-315c-a799-37198083f54e"},{"identifier":"448e93b5-6177-3d7b-9a15-512f8a9d8424","instanceIdentifier":"0477013e-4392-3adb-9654-f65a45e5e2ab","name":"","source":{"id":"9d42a62b-b252-329c-b503-e614f090bbb3","type":"PROCESSOR","groupId":"eebaea83-90d9-315c-a799-37198083f54e","name":"GenerateFlowFile","comments":"","instanceIdentifier":"b61f62f8-cc18-3767-4a33-bac736e27129"},"destination":{"id":"5082c2a8-e27c-3b27-9e5c-76b3f19e8786","type":"PROCESSOR","groupId":"eebaea83-90d9-315c-a799-37198083f54e","name":"SplitContent","comments":"","instanceIdentifier":"e937f196-7187-330e-75a4-0189a695ca61"},"labelIndex":1,"zIndex":0,"selectedRelationships":["success"],"backPressureObjectThreshold":10000,"backPressureDataSizeThreshold":"1 GB","flowFileExpiration":"0 sec","prioritizers":[],"bends":[],"loadBalanceStrategy":"DO_NOT_LOAD_BALANCE","partitioningAttribute":"","loadBalanceCompression":"DO_NOT_COMPRESS","componentType":"CONNECTION","groupIdentifier":"eebaea83-90d9-315c-a799-37198083f54e"},{"identifier":"b80f3ec5-87fc-32d0-807c-abed3e445ce5","instanceIdentifier":"b87f58a5-75fe-36a2-b98b-fe69f6b63fa6","name":"","source":{"id":"7d97f867-c218-3d56-ae3e-38a1f5cbefda","type":"PROCESSOR","groupId":"eebaea83-90d9-315c-a799-37198083f54e","name":"ReplaceText","comments":"","instanceIdentifier":"d4c17f3e-f4f5-38a0-33a7-f844e1d3540b"},"destination":{"id":"e8f81b8c-95ea-3799-bc06-c63b76d2d791","type":"PROCESSOR","groupId":"eebaea83-90d9-315c-a799-37198083f54e","name":"MergeContent","comments":"","instanceIdentifier":"bedbba7d-633d-3167-c5a1-b75a9dec306f"},"labelIndex":1,"zIndex":0,"selectedRelationships":["success"],"backPressureObjectThreshold":10000,"backPressureDataSizeThreshold":"1 GB","flowFileExpiration":"0 sec","prioritizers":[],"bends":[],"loadBalanceStrategy":"DO_NOT_LOAD_BALANCE","partitioningAttribute":"","loadBalanceCompression":"DO_NOT_COMPRESS","componentType":"CONNECTION","groupIdentifier":"eebaea83-90d9-315c-a799-37198083f54e"},{"identifier":"eef6d023-01bf-36dc-9004-41acd6dfd4aa","instanceIdentifier":"594f7535-fda8-37fc-bb5b-201b7e7c99e2","name":"","source":{"id":"1882950a-d3ae-37cd-97e0-bbfa5d644a92","type":"PROCESSOR","groupId":"eebaea83-90d9-315c-a799-37198083f54e","name":"InvokeHTTP","comments":"","instanceIdentifier":"dfa53240-73d2-366b-209e-16fc16c00ac3"},"destination":{"id":"2d9d6ccc-a121-3c91-b674-26a4cea2d280","type":"PROCESSOR","groupId":"eebaea83-90d9-315c-a799-37198083f54e","name":"LogMessage","comments":"","instanceIdentifier":"669e3070-5c5a-315b-204a-be6c063629b8"},"labelIndex":1,"zIndex":0,"selectedRelationships":["Response","No Retry","Retry","Original","Failure"],"backPressureObjectThreshold":10000,"backPressureDataSizeThreshold":"1 GB","flowFileExpiration":"0 sec","prioritizers":[],"bends":[],"loadBalanceStrategy":"DO_NOT_LOAD_BALANCE","partitioningAttribute":"","loadBalanceCompression":"DO_NOT_COMPRESS","componentType":"CONNECTION","groupIdentifier":"eebaea83-90d9-315c-a799-37198083f54e"},{"identifier":"2064fc94-5e87-3ea8-9f7d-5224b9daa0f6","instanceIdentifier":"db96fff9-b27a-395c-d8f3-0165a91b0086","name":"","source":{"id":"e8f81b8c-95ea-3799-bc06-c63b76d2d791","type":"PROCESSOR","groupId":"eebaea83-90d9-315c-a799-37198083f54e","name":"MergeContent","comments":"","instanceIdentifier":"bedbba7d-633d-3167-c5a1-b75a9dec306f"},"destination":{"id":"f10ef940-3e17-3703-b8ed-8131eb50e532","type":"PROCESSOR","groupId":"eebaea83-90d9-315c-a799-37198083f54e","name":"ReplaceText","comments":"","instanceIdentifier":"a4da93f1-2b1c-3c8c-9659-bf52d20c1a8c"},"labelIndex":1,"zIndex":0,"selectedRelationships":["merged"],"backPressureObjectThreshold":10000,"backPressureDataSizeThreshold":"1 GB","flowFileExpiration":"0 sec","prioritizers":[],"bends":[],"loadBalanceStrategy":"DO_NOT_LOAD_BALANCE","partitioningAttribute":"","loadBalanceCompression":"DO_NOT_COMPRESS","componentType":"CONNECTION","groupIdentifier":"eebaea83-90d9-315c-a799-37198083f54e"},{"identifier":"984769e7-ec6a-34ca-97b6-c4f667e8bcdd","instanceIdentifier":"3ae00de7-ff78-3656-d943-561515b43c54","name":"","source":{"id":"f10ef940-3e17-3703-b8ed-8131eb50e532","type":"PROCESSOR","groupId":"eebaea83-90d9-315c-a799-37198083f54e","name":"ReplaceText","comments":"","instanceIdentifier":"a4da93f1-2b1c-3c8c-9659-bf52d20c1a8c"},"destination":{"id":"1882950a-d3ae-37cd-97e0-bbfa5d644a92","type":"PROCESSOR","groupId":"eebaea83-90d9-315c-a799-37198083f54e","name":"InvokeHTTP","comments":"","instanceIdentifier":"dfa53240-73d2-366b-209e-16fc16c00ac3"},"labelIndex":1,"zIndex":0,"selectedRelationships":["success"],"backPressureObjectThreshold":10000,"backPressureDataSizeThreshold":"1 GB","flowFileExpiration":"0 sec","prioritizers":[],"bends":[],"loadBalanceStrategy":"DO_NOT_LOAD_BALANCE","partitioningAttribute":"","loadBalanceCompression":"DO_NOT_COMPRESS","componentType":"CONNECTION","groupIdentifier":"eebaea83-90d9-315c-a799-37198083f54e"}],"labels":[],"funnels":[],"controllerServices":[],"variables":{},"defaultFlowFileExpiration":"0 sec","defaultBackPressureObjectThreshold":10000,"defaultBackPressureDataSizeThreshold":"1 GB","componentType":"PROCESS_GROUP","flowFileConcurrency":"UNBOUNDED","flowFileOutboundPolicy":"STREAM_WHEN_AVAILABLE","groupIdentifier":"3e06a40c-e274-3903-99d0-9c45b5531e80"}],"remoteProcessGroups":[],"processors":[{"identifier":"1624c8f8-f0d7-3cb0-a266-47e273d5c46f","instanceIdentifier":"de03bce6-3c9b-3f86-ffa5-7704e854a6fd","name":"LogMessage","comments":"","position":{"x":2962.2122400232342,"y":921.2718375035558},"type":"org.apache.nifi.processors.standard.LogMessage","bundle":{"group":"org.apache.nifi","artifact":"nifi-standard-nar","version":"1.21.0"},"properties":{"log-message":null,"log-level":"info","log-prefix":null},"propertyDescriptors":{"log-message":{"name":"log-message","displayName":"Log message","identifiesControllerService":false,"sensitive":false},"log-level":{"name":"log-level","displayName":"Log Level","identifiesControllerService":false,"sensitive":false},"log-prefix":{"name":"log-prefix","displayName":"Log prefix","identifiesControllerService":false,"sensitive":false}},"style":{},"schedulingPeriod":"0 sec","schedulingStrategy":"TIMER_DRIVEN","executionNode":"ALL","penaltyDuration":"30 sec","yieldDuration":"1 sec","bulletinLevel":"WARN","runDurationMillis":25,"concurrentlySchedulableTaskCount":1,"autoTerminatedRelationships":["success"],"scheduledState":"ENABLED","retryCount":10,"retriedRelationships":[],"backoffMechanism":"PENALIZE_FLOWFILE","maxBackoffPeriod":"10 mins","componentType":"PROCESSOR","groupIdentifier":"3e06a40c-e274-3903-99d0-9c45b5531e80"},{"identifier":"faca17c3-94ea-34c7-9ae8-45200b4b6b05","instanceIdentifier":"d0a811d6-0e12-3031-35eb-e35b62b0afe3","name":"Call FHIR endpoint","comments":"","position":{"x":3402.2122400232342,"y":921.2718375035558},"type":"org.apache.nifi.processors.standard.InvokeHTTP","bundle":{"group":"org.apache.nifi","artifact":"nifi-standard-nar","version":"1.21.0"},"properties":{"Proxy Host":null,"Attributes to Send":null,"use-etag":"false","proxy-configuration-service":null,"Proxy Type":"http","cookie-strategy":"DISABLED","Connection Timeout":"5 secs","send-message-body":"true","set-form-filename":"true","Always Output Response":"false","etag-max-cache-size":"10MB","Content-Encoding":"DISABLED","disable-http2":"False","idle-timeout":"5 mins","Put Response Body In Attribute":null,"Use Chunked Encoding":"false","Follow Redirects":"True","Remote URL":"${HL7_HOST}/${fhir.resourceType}/${fhir.id}\n","form-body-form-name":null,"Content-Type":"application/fhir+json","flow-file-naming-strategy":"RANDOM","max-idle-connections":"5","invokehttp-proxy-user":null,"Read Timeout":"15 secs","Max Length To Put In Attribute":"256","ignore-response-content":"false","Proxy Port":null,"SSL Context Service":null,"Digest Authentication":"false","HTTP Method":"POST","Add Response Headers to Request":"false","oauth2-access-token-provider":null,"Basic Authentication Username":null,"Include Date Header":"True","Penalize on \"No Retry\"":"false","Useragent":null},"propertyDescriptors":{"Proxy Host":{"name":"Proxy Host","displayName":"Proxy Host","identifiesControllerService":false,"sensitive":false},"Attributes to Send":{"name":"Attributes to Send","displayName":"Request Header Attributes Pattern","identifiesControllerService":false,"sensitive":false},"use-etag":{"name":"use-etag","displayName":"Response Cache Enabled","identifiesControllerService":false,"sensitive":false},"proxy-configuration-service":{"name":"proxy-configuration-service","displayName":"Proxy Configuration Service","identifiesControllerService":true,"sensitive":false},"Proxy Type":{"name":"Proxy Type","displayName":"Proxy Type","identifiesControllerService":false,"sensitive":false},"Basic Authentication Password":{"name":"Basic Authentication Password","displayName":"Request Password","identifiesControllerService":false,"sensitive":true},"cookie-strategy":{"name":"cookie-strategy","displayName":"Response Cookie Strategy","identifiesControllerService":false,"sensitive":false},"Connection Timeout":{"name":"Connection Timeout","displayName":"Socket Connect Timeout","identifiesControllerService":false,"sensitive":false},"send-message-body":{"name":"send-message-body","displayName":"Request Body Enabled","identifiesControllerService":false,"sensitive":false},"set-form-filename":{"name":"set-form-filename","displayName":"Request Multipart Form-Data Filename Enabled","identifiesControllerService":false,"sensitive":false},"Always Output Response":{"name":"Always Output Response","displayName":"Response Generation Required","identifiesControllerService":false,"sensitive":false},"etag-max-cache-size":{"name":"etag-max-cache-size","displayName":"Response Cache Size","identifiesControllerService":false,"sensitive":false},"Content-Encoding":{"name":"Content-Encoding","displayName":"Request Content-Encoding","identifiesControllerService":false,"sensitive":false},"disable-http2":{"name":"disable-http2","displayName":"HTTP/2 Disabled","identifiesControllerService":false,"sensitive":false},"idle-timeout":{"name":"idle-timeout","displayName":"Socket Idle Timeout","identifiesControllerService":false,"sensitive":false},"Put Response Body In Attribute":{"name":"Put Response Body In Attribute","displayName":"Response Body Attribute Name","identifiesControllerService":false,"sensitive":false},"Use Chunked Encoding":{"name":"Use Chunked Encoding","displayName":"Request Chunked Transfer-Encoding Enabled","identifiesControllerService":false,"sensitive":false},"Follow Redirects":{"name":"Follow Redirects","displayName":"Response Redirects Enabled","identifiesControllerService":false,"sensitive":false},"Remote URL":{"name":"Remote URL","displayName":"HTTP URL","identifiesControllerService":false,"sensitive":false},"form-body-form-name":{"name":"form-body-form-name","displayName":"Request Multipart Form-Data Name","identifiesControllerService":false,"sensitive":false},"Content-Type":{"name":"Content-Type","displayName":"Request Content-Type","identifiesControllerService":false,"sensitive":false},"flow-file-naming-strategy":{"name":"flow-file-naming-strategy","displayName":"Response FlowFile Naming Strategy","identifiesControllerService":false,"sensitive":false},"max-idle-connections":{"name":"max-idle-connections","displayName":"Socket Idle Connections","identifiesControllerService":false,"sensitive":false},"invokehttp-proxy-user":{"name":"invokehttp-proxy-user","displayName":"Proxy Username","identifiesControllerService":false,"sensitive":false},"Read Timeout":{"name":"Read Timeout","displayName":"Socket Read Timeout","identifiesControllerService":false,"sensitive":false},"Max Length To Put In Attribute":{"name":"Max Length To Put In Attribute","displayName":"Response Body Attribute Size","identifiesControllerService":false,"sensitive":false},"invokehttp-proxy-password":{"name":"invokehttp-proxy-password","displayName":"Proxy Password","identifiesControllerService":false,"sensitive":true},"ignore-response-content":{"name":"ignore-response-content","displayName":"Response Body Ignored","identifiesControllerService":false,"sensitive":false},"Proxy Port":{"name":"Proxy Port","displayName":"Proxy Port","identifiesControllerService":false,"sensitive":false},"SSL Context Service":{"name":"SSL Context Service","displayName":"SSL Context Service","identifiesControllerService":true,"sensitive":false},"Digest Authentication":{"name":"Digest Authentication","displayName":"Request Digest Authentication Enabled","identifiesControllerService":false,"sensitive":false},"HTTP Method":{"name":"HTTP Method","displayName":"HTTP Method","identifiesControllerService":false,"sensitive":false},"Add Response Headers to Request":{"name":"Add Response Headers to Request","displayName":"Response Header Request Attributes Enabled","identifiesControllerService":false,"sensitive":false},"oauth2-access-token-provider":{"name":"oauth2-access-token-provider","displayName":"Request OAuth2 Access Token Provider","identifiesControllerService":true,"sensitive":false},"Basic Authentication Username":{"name":"Basic Authentication Username","displayName":"Request Username","identifiesControllerService":false,"sensitive":false},"Include Date Header":{"name":"Include Date Header","displayName":"Request Date Header Enabled","identifiesControllerService":false,"sensitive":false},"Penalize on \"No Retry\"":{"name":"Penalize on \"No Retry\"","displayName":"Request Failure Penalization Enabled","identifiesControllerService":false,"sensitive":false},"Useragent":{"name":"Useragent","displayName":"Request User-Agent","identifiesControllerService":false,"sensitive":false}},"style":{},"schedulingPeriod":"0 sec","schedulingStrategy":"TIMER_DRIVEN","executionNode":"ALL","penaltyDuration":"30 sec","yieldDuration":"1 sec","bulletinLevel":"WARN","runDurationMillis":0,"concurrentlySchedulableTaskCount":1,"autoTerminatedRelationships":[],"scheduledState":"ENABLED","retryCount":10,"retriedRelationships":[],"backoffMechanism":"PENALIZE_FLOWFILE","maxBackoffPeriod":"10 mins","componentType":"PROCESSOR","groupIdentifier":"3e06a40c-e274-3903-99d0-9c45b5531e80"},{"identifier":"7a712f3b-c18a-3ba7-b6ea-a0d96a2848c9","instanceIdentifier":"115a416b-8087-3a1f-6f9d-73d88dbe75ca","name":"SplitJson","comments":"","position":{"x":3636.2122400232342,"y":1098.2718375035558},"type":"org.apache.nifi.processors.standard.SplitJson","bundle":{"group":"org.apache.nifi","artifact":"nifi-standard-nar","version":"1.21.0"},"properties":{"Null Value Representation":"empty string","JsonPath Expression":"$[*]"},"propertyDescriptors":{"Null Value Representation":{"name":"Null Value Representation","displayName":"Null Value Representation","identifiesControllerService":false,"sensitive":false},"JsonPath Expression":{"name":"JsonPath Expression","displayName":"JsonPath Expression","identifiesControllerService":false,"sensitive":false}},"style":{},"schedulingPeriod":"0 sec","schedulingStrategy":"TIMER_DRIVEN","executionNode":"ALL","penaltyDuration":"30 sec","yieldDuration":"1 sec","bulletinLevel":"WARN","runDurationMillis":0,"concurrentlySchedulableTaskCount":1,"autoTerminatedRelationships":["original","failure"],"scheduledState":"ENABLED","retryCount":10,"retriedRelationships":[],"backoffMechanism":"PENALIZE_FLOWFILE","maxBackoffPeriod":"10 mins","componentType":"PROCESSOR","groupIdentifier":"3e06a40c-e274-3903-99d0-9c45b5531e80"},{"identifier":"358e48bc-6bd6-30c4-9c9f-9982daca413b","instanceIdentifier":"fbfdad46-079b-3730-6404-117ad68b44f1","name":"EvaluateJsonPath","comments":"","position":{"x":2986.2122400232342,"y":1137.2718375035558},"type":"org.apache.nifi.processors.standard.EvaluateJsonPath","bundle":{"group":"org.apache.nifi","artifact":"nifi-standard-nar","version":"1.21.0"},"properties":{"Destination":"flowfile-attribute","fhir.id":"$.id","Return Type":"json","Null Value Representation":"empty string","fhir.resourceType":"$.resourceType","Path Not Found Behavior":"ignore"},"propertyDescriptors":{"Destination":{"name":"Destination","displayName":"Destination","identifiesControllerService":false,"sensitive":false},"fhir.id":{"name":"fhir.id","displayName":"fhir.id","identifiesControllerService":false,"sensitive":false},"Return Type":{"name":"Return Type","displayName":"Return Type","identifiesControllerService":false,"sensitive":false},"Null Value Representation":{"name":"Null Value Representation","displayName":"Null Value Representation","identifiesControllerService":false,"sensitive":false},"fhir.resourceType":{"name":"fhir.resourceType","displayName":"fhir.resourceType","identifiesControllerService":false,"sensitive":false},"Path Not Found Behavior":{"name":"Path Not Found Behavior","displayName":"Path Not Found Behavior","identifiesControllerService":false,"sensitive":false}},"style":{},"schedulingPeriod":"0 sec","schedulingStrategy":"TIMER_DRIVEN","executionNode":"ALL","penaltyDuration":"30 sec","yieldDuration":"1 sec","bulletinLevel":"WARN","runDurationMillis":0,"concurrentlySchedulableTaskCount":1,"autoTerminatedRelationships":["failure","unmatched"],"scheduledState":"ENABLED","retryCount":10,"retriedRelationships":[],"backoffMechanism":"PENALIZE_FLOWFILE","maxBackoffPeriod":"10 mins","componentType":"PROCESSOR","groupIdentifier":"3e06a40c-e274-3903-99d0-9c45b5531e80"},{"identifier":"62995212-fc42-333a-93a5-18185d3605b8","instanceIdentifier":"76ad72a9-b9d6-35bf-302e-97cc1501de66","name":"NGSI-LD to HL7 FHIR","comments":"","position":{"x":3578.2122400232342,"y":1345.2718375035558},"type":"org.apache.nifi.processors.script.ExecuteScript","bundle":{"group":"org.apache.nifi","artifact":"nifi-scripting-nar","version":"1.21.0"},"properties":{"Script File":null,"Script Engine":"python","Script Body":"import json\nimport java.io\nfrom org.apache.commons.io import IOUtils\nfrom java.nio.charset import StandardCharsets\nfrom org.apache.nifi.processor.io import StreamCallback\nfrom org.apache.nifi.processors.script import ExecuteScript\nfrom org.python.core.util import StringUtil\n\nclass PutEntitiesInOneArray(StreamCallback):\n def __init__(self):\n pass\n\n def getAttribute(self, value):\n if type(value) == list:\n result = []\n for entry in value:\n result.append(self.getAttribute(entry))\n elif type(value) == dict:\n result = {}\n for key, value in value.items():\n if key in ['type', 'createdAt', 'observedAt', 'modifiedAt']:\n continue\n if key in ['value', 'object']:\n result['value'] = value\n else:\n result[key] = self.getAttribute(value)\n if len(result) == 1:\n result = result['value']\n else:\n if type(result['value']) == list:\n tmp = result['value']\n del result['value']\n tmp.append(result)\n result = tmp\n elif type(result['value']) == dict:\n tmp = result['value']\n del result['value']\n tmp.update(result)\n result = tmp\n else:\n result = value\n return result\n def process(self, inputStream, outputStream):\n # Read input stream as JSON object\n text = IOUtils.toString(inputStream, StandardCharsets.UTF_8)\n entities = json.loads(text)\n result = []\n for entity in entities:\n newEntity = {}\n for key, value in entity.items():\n if key in ['id', 'type']:\n newEntity[key] = value\n continue\n if key in ['observedAt', 'modifiedAt', 'createdAt']:\n continue\n newEntity[key] = self.getAttribute(value)\n result.append(newEntity) \n \n outputStream.write(bytearray(json.dumps(result, indent=4).encode('utf-8'))) \n\nflowFile = session.get()\nif (flowFile != None):\n flowfilenamebase = flowFile.getAttribute('filename').split('.')[0] + '_translated.json'\n# try:\n flowFile = session.write(flowFile, PutEntitiesInOneArray())\n flowFile = session.putAttribute(flowFile, \"filename\", flowfilenamebase)\n session.transfer(flowFile, REL_SUCCESS)\n# except Exception as e:\n# # Write error message to NiFi log\n# log.error(str(e))\n# log.error(\"Failed to process JSON file\")\n# # Transfer flow file to failure relationship\n# session.transfer(flowFile, REL_FAILURE)\nsession.commit()","Module Directory":null},"propertyDescriptors":{"Script File":{"name":"Script File","displayName":"Script File","identifiesControllerService":false,"sensitive":false,"resourceDefinition":{"cardinality":"SINGLE","resourceTypes":["FILE"]}},"Script Engine":{"name":"Script Engine","displayName":"Script Engine","identifiesControllerService":false,"sensitive":false},"Script Body":{"name":"Script Body","displayName":"Script Body","identifiesControllerService":false,"sensitive":false},"Module Directory":{"name":"Module Directory","displayName":"Module Directory","identifiesControllerService":false,"sensitive":false,"resourceDefinition":{"cardinality":"MULTIPLE","resourceTypes":["DIRECTORY","FILE"]}}},"style":{},"schedulingPeriod":"0 sec","schedulingStrategy":"TIMER_DRIVEN","executionNode":"ALL","penaltyDuration":"30 sec","yieldDuration":"1 sec","bulletinLevel":"WARN","runDurationMillis":0,"concurrentlySchedulableTaskCount":1,"autoTerminatedRelationships":["failure"],"scheduledState":"ENABLED","retryCount":10,"retriedRelationships":[],"backoffMechanism":"PENALIZE_FLOWFILE","maxBackoffPeriod":"10 mins","componentType":"PROCESSOR","groupIdentifier":"3e06a40c-e274-3903-99d0-9c45b5531e80"}],"inputPorts":[],"outputPorts":[],"connections":[{"identifier":"a458bdef-b5c0-3b69-beaf-6812234a0bcc","instanceIdentifier":"d502218c-1a0f-3afe-9dea-171bdd891cc8","name":"","source":{"id":"62995212-fc42-333a-93a5-18185d3605b8","type":"PROCESSOR","groupId":"3e06a40c-e274-3903-99d0-9c45b5531e80","name":"NGSI-LD to HL7 FHIR","comments":"","instanceIdentifier":"76ad72a9-b9d6-35bf-302e-97cc1501de66"},"destination":{"id":"7a712f3b-c18a-3ba7-b6ea-a0d96a2848c9","type":"PROCESSOR","groupId":"3e06a40c-e274-3903-99d0-9c45b5531e80","name":"SplitJson","comments":"","instanceIdentifier":"115a416b-8087-3a1f-6f9d-73d88dbe75ca"},"labelIndex":1,"zIndex":0,"selectedRelationships":["success"],"backPressureObjectThreshold":10000,"backPressureDataSizeThreshold":"1 GB","flowFileExpiration":"0 sec","prioritizers":[],"bends":[],"loadBalanceStrategy":"DO_NOT_LOAD_BALANCE","partitioningAttribute":"","loadBalanceCompression":"DO_NOT_COMPRESS","componentType":"CONNECTION","groupIdentifier":"3e06a40c-e274-3903-99d0-9c45b5531e80"},{"identifier":"e47ab698-e9f1-3360-8edb-d2e6e6cdac89","instanceIdentifier":"cb6fbcea-2610-3d96-7b89-23f456008ab4","name":"","source":{"id":"7a712f3b-c18a-3ba7-b6ea-a0d96a2848c9","type":"PROCESSOR","groupId":"3e06a40c-e274-3903-99d0-9c45b5531e80","name":"SplitJson","comments":"","instanceIdentifier":"115a416b-8087-3a1f-6f9d-73d88dbe75ca"},"destination":{"id":"358e48bc-6bd6-30c4-9c9f-9982daca413b","type":"PROCESSOR","groupId":"3e06a40c-e274-3903-99d0-9c45b5531e80","name":"EvaluateJsonPath","comments":"","instanceIdentifier":"fbfdad46-079b-3730-6404-117ad68b44f1"},"labelIndex":1,"zIndex":0,"selectedRelationships":["split"],"backPressureObjectThreshold":10000,"backPressureDataSizeThreshold":"1 GB","flowFileExpiration":"0 sec","prioritizers":[],"bends":[],"loadBalanceStrategy":"DO_NOT_LOAD_BALANCE","partitioningAttribute":"","loadBalanceCompression":"DO_NOT_COMPRESS","componentType":"CONNECTION","groupIdentifier":"3e06a40c-e274-3903-99d0-9c45b5531e80"},{"identifier":"3929ffc0-a1c3-3f72-9f9e-d233ddad1bd5","instanceIdentifier":"97d61576-833d-308b-69ab-5be44fd584ab","name":"","source":{"id":"00c06b2e-8245-316d-a97b-72fbba2f0412","type":"OUTPUT_PORT","groupId":"eebaea83-90d9-315c-a799-37198083f54e","name":"NGSI-LD Notification Data","instanceIdentifier":"454f7679-d420-3b0a-ea1b-1f4d347fd493"},"destination":{"id":"62995212-fc42-333a-93a5-18185d3605b8","type":"PROCESSOR","groupId":"3e06a40c-e274-3903-99d0-9c45b5531e80","name":"NGSI-LD to HL7 FHIR","comments":"","instanceIdentifier":"76ad72a9-b9d6-35bf-302e-97cc1501de66"},"labelIndex":1,"zIndex":0,"selectedRelationships":[""],"backPressureObjectThreshold":10000,"backPressureDataSizeThreshold":"1 GB","flowFileExpiration":"0 sec","prioritizers":[],"bends":[],"loadBalanceStrategy":"DO_NOT_LOAD_BALANCE","partitioningAttribute":"","loadBalanceCompression":"DO_NOT_COMPRESS","componentType":"CONNECTION","groupIdentifier":"3e06a40c-e274-3903-99d0-9c45b5531e80"},{"identifier":"521cf5eb-9b92-37c1-b0f9-ce9024af27eb","instanceIdentifier":"f10bc1ba-07a0-3b91-fc5d-0d702d24a3db","name":"","source":{"id":"358e48bc-6bd6-30c4-9c9f-9982daca413b","type":"PROCESSOR","groupId":"3e06a40c-e274-3903-99d0-9c45b5531e80","name":"EvaluateJsonPath","comments":"","instanceIdentifier":"fbfdad46-079b-3730-6404-117ad68b44f1"},"destination":{"id":"faca17c3-94ea-34c7-9ae8-45200b4b6b05","type":"PROCESSOR","groupId":"3e06a40c-e274-3903-99d0-9c45b5531e80","name":"Call FHIR endpoint","comments":"","instanceIdentifier":"d0a811d6-0e12-3031-35eb-e35b62b0afe3"},"labelIndex":1,"zIndex":0,"selectedRelationships":["matched"],"backPressureObjectThreshold":10000,"backPressureDataSizeThreshold":"1 GB","flowFileExpiration":"0 sec","prioritizers":[],"bends":[],"loadBalanceStrategy":"DO_NOT_LOAD_BALANCE","partitioningAttribute":"","loadBalanceCompression":"DO_NOT_COMPRESS","componentType":"CONNECTION","groupIdentifier":"3e06a40c-e274-3903-99d0-9c45b5531e80"},{"identifier":"a181c8c8-d1cb-3437-87ae-c8e95406f7c7","instanceIdentifier":"264d52c3-8ccd-3c2f-1b42-2b71e88cb386","name":"","source":{"id":"faca17c3-94ea-34c7-9ae8-45200b4b6b05","type":"PROCESSOR","groupId":"3e06a40c-e274-3903-99d0-9c45b5531e80","name":"Call FHIR endpoint","comments":"","instanceIdentifier":"d0a811d6-0e12-3031-35eb-e35b62b0afe3"},"destination":{"id":"1624c8f8-f0d7-3cb0-a266-47e273d5c46f","type":"PROCESSOR","groupId":"3e06a40c-e274-3903-99d0-9c45b5531e80","name":"LogMessage","comments":"","instanceIdentifier":"de03bce6-3c9b-3f86-ffa5-7704e854a6fd"},"labelIndex":1,"zIndex":0,"selectedRelationships":["Response","No Retry","Retry","Original","Failure"],"backPressureObjectThreshold":10000,"backPressureDataSizeThreshold":"1 GB","flowFileExpiration":"0 sec","prioritizers":[],"bends":[],"loadBalanceStrategy":"DO_NOT_LOAD_BALANCE","partitioningAttribute":"","loadBalanceCompression":"DO_NOT_COMPRESS","componentType":"CONNECTION","groupIdentifier":"3e06a40c-e274-3903-99d0-9c45b5531e80"}],"labels":[],"funnels":[],"controllerServices":[],"variables":{},"defaultFlowFileExpiration":"0 sec","defaultBackPressureObjectThreshold":10000,"defaultBackPressureDataSizeThreshold":"1 GB","componentType":"PROCESS_GROUP","flowFileConcurrency":"UNBOUNDED","flowFileOutboundPolicy":"STREAM_WHEN_AVAILABLE"},"externalControllerServices":{},"parameterContexts":{},"flowEncodingVersion":"1.0","parameterProviders":{},"latest":false} \ No newline at end of file diff --git a/sub2LiveSystem/docker-compose.yml b/sub2LiveSystem/docker-compose.yml new file mode 100644 index 0000000..fc62fa1 --- /dev/null +++ b/sub2LiveSystem/docker-compose.yml @@ -0,0 +1,103 @@ +version: '3' + +services: +# testserver: +# image: testserver +# ports: +# - "55551:55551" + nifireg: + image: apache/nifi-registry + ports: + - "18080:18080" + nifi: + image: apache/nifi + ports: + - "8443:8443" + - "8080:8080" + environment: + ENTITY_TYPES: Medication,Patient + AT_CONTEXT: https://fiware.github.io/data-models/context.jsonld + NGSILD_HOST: http://scorpio:9090 + NOTIFICATION_PATH: notify + NOTIFICATION_PORT: 4444 + NOTIFICATION_HOST: http://nifi + HL7_HOST: http://testserver:55551 + TEMP_INTERVAL: 20 + NIFI_REG: http://nifireg:18080 + MY_HOST: http://nifi:8080 + ########## JVM ########## + + # -Xms + # The initial JVM heap size. + #NIFI_JVM_HEAP_INIT: 512m + + # -Xmx + # The maximum JVM heap size. + #NIFI_JVM_HEAP_MAX: 512m + + # -Xdebug + # The JVM Debugger can be enabled by setting this environment variable to any value. + #NIFI_JVM_DEBUGGER: '' + + + + ########## Web ########## + + # nifi.web.http.host + NIFI_WEB_HTTP_HOST: '0.0.0.0' + + # nifi.web.http.port + # HTTP Port + NIFI_WEB_HTTP_PORT: 8080 + volumes: + - ./NGSILDHL7Flow.json:/home/nifi/NGSILDHL7Flow.json + - ./loadtemplate.sh:/home/nifi/loadtemplate.sh + - ./download:/home/nifi/download + entrypoint: ["bash", "/home/nifi/loadtemplate.sh"] + zookeeper: + image: zookeeper + ports: + - "2181" + logging: + driver: none + kafka: + image: bitnami/kafka + ports: + - "9092" + environment: + KAFKA_ADVERTISED_HOST_NAME: kafka + KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181 + KAFKA_ADVERTISED_PORT: 9092 + KAFKA_LOG_RETENTION_MS: 10000 + KAFKA_LOG_RETENTION_CHECK_INTERVAL_MS: 5000 + ALLOW_PLAINTEXT_LISTENER: "yes" + volumes: + - /var/run/docker.sock:/var/run/docker.sock + depends_on: + - zookeeper +# logging: +# driver: none + postgres: + image: postgis/postgis + ports: + - "5432" + environment: + POSTGRES_USER: ngb + POSTGRES_PASSWORD: ngb + POSTGRES_DB: ngb + logging: + driver: none +# volumes: +# - /var/lib/docker/volumes/b089a32ad3162e1f7152fe9a87bdb10f4340f02372ae802c65ea870ccefb863f/_data:/var/lib/postgresql/data + scorpio: +# image: scorpiobroker/scorpio:scorpio-aaio-no-eureka_1.1.0-SNAPSHOT + image: scorpiobroker/all-in-one-runner:java-kafka-3.0.11 + ports: + - "9090:9090" +# environment: +# SPRING_SECURITY_MODE: deactivated +# SPRING_SECURITY_OAUTH2_RESOURCESERVER_JWT_JWT-SET-URI: http://localhost:1234/realms/scorpio/protocol/openid-connect/certs +# SPRING_SECURITY_OAUTH2_RESOURCESERVER_JWT_ISSUER-URI: http://localhost:1234/realms/scorpio + depends_on: + - postgres + - kafka diff --git a/sub2LiveSystem/loadtemplate.sh b/sub2LiveSystem/loadtemplate.sh new file mode 100644 index 0000000..460ce22 --- /dev/null +++ b/sub2LiveSystem/loadtemplate.sh @@ -0,0 +1,48 @@ +#!/bin/bash + +touch bla.temp +/opt/nifi/scripts/start.sh & +pid=$! +if [[ ! -f "created" ]]; then +while true; do + curl -s --head http://localhost:8080/nifi | head -n 1 | grep "HTTP/1.[01] [23].." > /dev/null + if [ $? -eq 0 ]; then + echo "NIFI Website is up." + break + else + echo "NIFI Website is down." + sleep 5 + fi +done +# Set the nifi cli path +NIFI_CLI=/opt/nifi/nifi-toolkit-current/bin/cli.sh + +# Set the nifi url +NIFI_URL=http://localhost:8080/nifi + +REG_CLIENT_EXISTS=$($NIFI_CLI nifi get-reg-client-id -rcn regclient1|grep -c regclient1) +if [ $REG_CLIENT_EXISTS -gt 0 ]; then +echo "Creating reg client" +$NIFI_CLI nifi create-reg-client -u ${MY_HOST} --registryClientUrl ${NIFI_REG} --registryClientName regclient1 +fi +echo "checking bucket" +BUCKETS_EXISTS=$($NIFI_CLI registry list-buckets -u ${NIFI_REG}| grep -c "MyBucket") + + + + +if [ $BUCKETS_EXISTS -lt 1 ]; then +echo "bucket does not exist" +$NIFI_CLI registry create-bucket -u ${NIFI_REG} --bucketName MyBucket +BUCKET_ID=$($NIFI_CLI registry list-buckets -u ${NIFI_REG}|grep MyBucket|awk '{print $3}') +$NIFI_CLI registry create-flow -u ${NIFI_REG} --bucketIdentifier $BUCKET_ID --flowName MyFlow +FLOWID=$($NIFI_CLI registry list-flows -u ${NIFI_REG} --bucketIdentifier=$BUCKET_ID|grep MyFlow|awk '{print $3}') +$NIFI_CLI registry import-flow-version -u ${NIFI_REG} -f $FLOWID -i /home/nifi/NGSILDHL7Flow.json +$NIFI_CLI nifi pg-import --bucketIdentifier $BUCKET_ID --flowIdentifier $FLOWID --flowVersion 1 +fi +PG_ID=$($NIFI_CLI nifi pg-list|grep 1|awk '{print $4}') +$NIFI_CLI nifi pg-enable-services --processGroupId $PG_ID +$NIFI_CLI nifi pg-start --processGroupId $PG_ID +touch created +fi +wait $pid diff --git a/tempInterval2File/NGSILDHL7Flow.json b/tempInterval2File/NGSILDHL7Flow.json new file mode 100644 index 0000000..ff8d0a1 --- /dev/null +++ b/tempInterval2File/NGSILDHL7Flow.json @@ -0,0 +1 @@ +{"flowContents":{"identifier":"3e06a40c-e274-3903-99d0-9c45b5531e80","instanceIdentifier":"744cc16e-0188-1000-1b7e-e925a1f1b367","name":"NiFi Flow","comments":"","position":{"x":0.0,"y":8.0},"processGroups":[{"identifier":"3d4a75a2-18f7-3432-b0ef-fa8f31ca6fb8","instanceIdentifier":"12526f06-a771-3706-136e-8cabcf70b101","name":"NGSI-LD continuous Temporal Query ","comments":"","position":{"x":606.0,"y":967.0},"processGroups":[],"remoteProcessGroups":[],"processors":[{"identifier":"289764b0-4b54-3d6f-a6ba-6511cc398fc8","instanceIdentifier":"8ccd4af5-1f5b-37e4-0d5c-825978f6a84a","name":"GenerateFlowFile","comments":"","position":{"x":128.0,"y":0.0},"type":"org.apache.nifi.processors.standard.GenerateFlowFile","bundle":{"group":"org.apache.nifi","artifact":"nifi-standard-nar","version":"1.21.0"},"properties":{"character-set":"UTF-8","File Size":"0B","mime-type":null,"generate-ff-custom-text":"${ENTITY_TYPES}","Batch Size":"1","Unique FlowFiles":"false","Data Format":"Text"},"propertyDescriptors":{"character-set":{"name":"character-set","displayName":"Character Set","identifiesControllerService":false,"sensitive":false},"File Size":{"name":"File Size","displayName":"File Size","identifiesControllerService":false,"sensitive":false},"mime-type":{"name":"mime-type","displayName":"Mime Type","identifiesControllerService":false,"sensitive":false},"generate-ff-custom-text":{"name":"generate-ff-custom-text","displayName":"Custom Text","identifiesControllerService":false,"sensitive":false},"Batch Size":{"name":"Batch Size","displayName":"Batch Size","identifiesControllerService":false,"sensitive":false},"Unique FlowFiles":{"name":"Unique FlowFiles","displayName":"Unique FlowFiles","identifiesControllerService":false,"sensitive":false},"Data Format":{"name":"Data Format","displayName":"Data Format","identifiesControllerService":false,"sensitive":false}},"style":{},"schedulingPeriod":"10 sec","schedulingStrategy":"TIMER_DRIVEN","executionNode":"ALL","penaltyDuration":"30 sec","yieldDuration":"1 sec","bulletinLevel":"WARN","runDurationMillis":0,"concurrentlySchedulableTaskCount":1,"autoTerminatedRelationships":[],"scheduledState":"ENABLED","retryCount":10,"retriedRelationships":[],"backoffMechanism":"PENALIZE_FLOWFILE","maxBackoffPeriod":"10 mins","componentType":"PROCESSOR","groupIdentifier":"3d4a75a2-18f7-3432-b0ef-fa8f31ca6fb8"},{"identifier":"3a35ae06-e813-3e9c-a06f-35e859e6917b","instanceIdentifier":"285f24f5-75f6-33d6-d0db-11fcbfb22c4e","name":"SplitContent","comments":"","position":{"x":440.0,"y":320.0},"type":"org.apache.nifi.processors.standard.SplitContent","bundle":{"group":"org.apache.nifi","artifact":"nifi-standard-nar","version":"1.21.0"},"properties":{"Byte Sequence Location":"Trailing","Keep Byte Sequence":"false","Byte Sequence Format":"Text","Byte Sequence":","},"propertyDescriptors":{"Byte Sequence Location":{"name":"Byte Sequence Location","displayName":"Byte Sequence Location","identifiesControllerService":false,"sensitive":false},"Keep Byte Sequence":{"name":"Keep Byte Sequence","displayName":"Keep Byte Sequence","identifiesControllerService":false,"sensitive":false},"Byte Sequence Format":{"name":"Byte Sequence Format","displayName":"Byte Sequence Format","identifiesControllerService":false,"sensitive":false},"Byte Sequence":{"name":"Byte Sequence","displayName":"Byte Sequence","identifiesControllerService":false,"sensitive":false}},"style":{},"schedulingPeriod":"0 sec","schedulingStrategy":"TIMER_DRIVEN","executionNode":"ALL","penaltyDuration":"30 sec","yieldDuration":"1 sec","bulletinLevel":"WARN","runDurationMillis":0,"concurrentlySchedulableTaskCount":1,"autoTerminatedRelationships":["original"],"scheduledState":"ENABLED","retryCount":10,"retriedRelationships":[],"backoffMechanism":"PENALIZE_FLOWFILE","maxBackoffPeriod":"10 mins","componentType":"PROCESSOR","groupIdentifier":"3d4a75a2-18f7-3432-b0ef-fa8f31ca6fb8"},{"identifier":"e70882d7-5bb2-3f36-8666-7cdc64c0cfab","instanceIdentifier":"c1ffcc9a-c8f8-3176-d8d1-7bbc8395f2cc","name":"ExtractText","comments":"","position":{"x":904.0,"y":528.0},"type":"org.apache.nifi.processors.standard.ExtractText","bundle":{"group":"org.apache.nifi","artifact":"nifi-standard-nar","version":"1.21.0"},"properties":{"Enable Unicode Predefined Character Classes":"false","Permit Whitespace and Comments in Pattern":"false","Enable Unicode-aware Case Folding":"false","Enable DOTALL Mode":"false","Enable Unix Lines Mode":"false","extract-text-enable-named-groups":"false","Maximum Buffer Size":"1 MB","Enable Canonical Equivalence":"false","callType":"(.*)","Enable Case-insensitive Matching":"false","Enable Multiline Mode":"false","Maximum Capture Group Length":"1024","Enable Literal Parsing of the Pattern":"false","Character Set":"UTF-8","Include Capture Group 0":"true","extract-text-enable-repeating-capture-group":"false"},"propertyDescriptors":{"Enable Unicode Predefined Character Classes":{"name":"Enable Unicode Predefined Character Classes","displayName":"Enable Unicode Predefined Character Classes","identifiesControllerService":false,"sensitive":false},"Permit Whitespace and Comments in Pattern":{"name":"Permit Whitespace and Comments in Pattern","displayName":"Permit Whitespace and Comments in Pattern","identifiesControllerService":false,"sensitive":false},"Enable Unicode-aware Case Folding":{"name":"Enable Unicode-aware Case Folding","displayName":"Enable Unicode-aware Case Folding","identifiesControllerService":false,"sensitive":false},"Enable DOTALL Mode":{"name":"Enable DOTALL Mode","displayName":"Enable DOTALL Mode","identifiesControllerService":false,"sensitive":false},"Enable Unix Lines Mode":{"name":"Enable Unix Lines Mode","displayName":"Enable Unix Lines Mode","identifiesControllerService":false,"sensitive":false},"extract-text-enable-named-groups":{"name":"extract-text-enable-named-groups","displayName":"Enable named group support","identifiesControllerService":false,"sensitive":false},"Maximum Buffer Size":{"name":"Maximum Buffer Size","displayName":"Maximum Buffer Size","identifiesControllerService":false,"sensitive":false},"Enable Canonical Equivalence":{"name":"Enable Canonical Equivalence","displayName":"Enable Canonical Equivalence","identifiesControllerService":false,"sensitive":false},"callType":{"name":"callType","displayName":"callType","identifiesControllerService":false,"sensitive":false},"Enable Case-insensitive Matching":{"name":"Enable Case-insensitive Matching","displayName":"Enable Case-insensitive Matching","identifiesControllerService":false,"sensitive":false},"Enable Multiline Mode":{"name":"Enable Multiline Mode","displayName":"Enable Multiline Mode","identifiesControllerService":false,"sensitive":false},"Maximum Capture Group Length":{"name":"Maximum Capture Group Length","displayName":"Maximum Capture Group Length","identifiesControllerService":false,"sensitive":false},"Enable Literal Parsing of the Pattern":{"name":"Enable Literal Parsing of the Pattern","displayName":"Enable Literal Parsing of the Pattern","identifiesControllerService":false,"sensitive":false},"Character Set":{"name":"Character Set","displayName":"Character Set","identifiesControllerService":false,"sensitive":false},"Include Capture Group 0":{"name":"Include Capture Group 0","displayName":"Include Capture Group 0","identifiesControllerService":false,"sensitive":false},"extract-text-enable-repeating-capture-group":{"name":"extract-text-enable-repeating-capture-group","displayName":"Enable repeating capture group","identifiesControllerService":false,"sensitive":false}},"style":{},"schedulingPeriod":"0 sec","schedulingStrategy":"TIMER_DRIVEN","executionNode":"ALL","penaltyDuration":"30 sec","yieldDuration":"1 sec","bulletinLevel":"WARN","runDurationMillis":0,"concurrentlySchedulableTaskCount":1,"autoTerminatedRelationships":["unmatched"],"scheduledState":"ENABLED","retryCount":10,"retriedRelationships":[],"backoffMechanism":"PENALIZE_FLOWFILE","maxBackoffPeriod":"10 mins","componentType":"PROCESSOR","groupIdentifier":"3d4a75a2-18f7-3432-b0ef-fa8f31ca6fb8"},{"identifier":"72d0db0d-c388-3ad8-a5eb-d22903025c21","instanceIdentifier":"08122f07-6105-35d4-ffd7-bedafef7e1f4","name":"Get Temporal Entities","comments":"","position":{"x":1224.0,"y":336.0},"type":"org.apache.nifi.processors.standard.InvokeHTTP","bundle":{"group":"org.apache.nifi","artifact":"nifi-standard-nar","version":"1.21.0"},"properties":{"Proxy Host":null,"Attributes to Send":null,"use-etag":"false","proxy-configuration-service":null,"Proxy Type":"http","cookie-strategy":"DISABLED","Connection Timeout":"5 secs","send-message-body":"true","set-form-filename":"true","Always Output Response":"false","etag-max-cache-size":"10MB","Content-Encoding":"DISABLED","disable-http2":"False","idle-timeout":"5 mins","Put Response Body In Attribute":null,"Use Chunked Encoding":"false","Follow Redirects":"True","Remote URL":"${NGSILD_HOST}/ngsi-ld/v1/temporal/entities?type=${callType}&timerel=after&timeAt=${now():minus(1800000):format(\"yyyy-MM-dd'T'HH:mm:ss'Z'\")}&timeproperty=modifiedAt","form-body-form-name":null,"Content-Type":"${mime.type}","flow-file-naming-strategy":"RANDOM","max-idle-connections":"5","Accept":"application/json","invokehttp-proxy-user":null,"Read Timeout":"15 secs","Max Length To Put In Attribute":"256","ignore-response-content":"false","Proxy Port":null,"SSL Context Service":null,"Digest Authentication":"false","HTTP Method":"GET","Add Response Headers to Request":"false","oauth2-access-token-provider":null,"Basic Authentication Username":null,"Include Date Header":"True","Penalize on \"No Retry\"":"false","Link":"<${AT_CONTEXT}>; rel=\"http://www.w3.org/ns/json-ld#context\"; type=\"application/ld+json\"","Useragent":null},"propertyDescriptors":{"Proxy Host":{"name":"Proxy Host","displayName":"Proxy Host","identifiesControllerService":false,"sensitive":false},"Attributes to Send":{"name":"Attributes to Send","displayName":"Request Header Attributes Pattern","identifiesControllerService":false,"sensitive":false},"use-etag":{"name":"use-etag","displayName":"Response Cache Enabled","identifiesControllerService":false,"sensitive":false},"proxy-configuration-service":{"name":"proxy-configuration-service","displayName":"Proxy Configuration Service","identifiesControllerService":true,"sensitive":false},"Proxy Type":{"name":"Proxy Type","displayName":"Proxy Type","identifiesControllerService":false,"sensitive":false},"Basic Authentication Password":{"name":"Basic Authentication Password","displayName":"Request Password","identifiesControllerService":false,"sensitive":true},"cookie-strategy":{"name":"cookie-strategy","displayName":"Response Cookie Strategy","identifiesControllerService":false,"sensitive":false},"Connection Timeout":{"name":"Connection Timeout","displayName":"Socket Connect Timeout","identifiesControllerService":false,"sensitive":false},"send-message-body":{"name":"send-message-body","displayName":"Request Body Enabled","identifiesControllerService":false,"sensitive":false},"set-form-filename":{"name":"set-form-filename","displayName":"Request Multipart Form-Data Filename Enabled","identifiesControllerService":false,"sensitive":false},"Always Output Response":{"name":"Always Output Response","displayName":"Response Generation Required","identifiesControllerService":false,"sensitive":false},"etag-max-cache-size":{"name":"etag-max-cache-size","displayName":"Response Cache Size","identifiesControllerService":false,"sensitive":false},"Content-Encoding":{"name":"Content-Encoding","displayName":"Request Content-Encoding","identifiesControllerService":false,"sensitive":false},"disable-http2":{"name":"disable-http2","displayName":"HTTP/2 Disabled","identifiesControllerService":false,"sensitive":false},"idle-timeout":{"name":"idle-timeout","displayName":"Socket Idle Timeout","identifiesControllerService":false,"sensitive":false},"Put Response Body In Attribute":{"name":"Put Response Body In Attribute","displayName":"Response Body Attribute Name","identifiesControllerService":false,"sensitive":false},"Use Chunked Encoding":{"name":"Use Chunked Encoding","displayName":"Request Chunked Transfer-Encoding Enabled","identifiesControllerService":false,"sensitive":false},"Follow Redirects":{"name":"Follow Redirects","displayName":"Response Redirects Enabled","identifiesControllerService":false,"sensitive":false},"Remote URL":{"name":"Remote URL","displayName":"HTTP URL","identifiesControllerService":false,"sensitive":false},"form-body-form-name":{"name":"form-body-form-name","displayName":"Request Multipart Form-Data Name","identifiesControllerService":false,"sensitive":false},"Content-Type":{"name":"Content-Type","displayName":"Request Content-Type","identifiesControllerService":false,"sensitive":false},"flow-file-naming-strategy":{"name":"flow-file-naming-strategy","displayName":"Response FlowFile Naming Strategy","identifiesControllerService":false,"sensitive":false},"max-idle-connections":{"name":"max-idle-connections","displayName":"Socket Idle Connections","identifiesControllerService":false,"sensitive":false},"Accept":{"name":"Accept","displayName":"Accept","identifiesControllerService":false,"sensitive":false},"invokehttp-proxy-user":{"name":"invokehttp-proxy-user","displayName":"Proxy Username","identifiesControllerService":false,"sensitive":false},"Read Timeout":{"name":"Read Timeout","displayName":"Socket Read Timeout","identifiesControllerService":false,"sensitive":false},"Max Length To Put In Attribute":{"name":"Max Length To Put In Attribute","displayName":"Response Body Attribute Size","identifiesControllerService":false,"sensitive":false},"invokehttp-proxy-password":{"name":"invokehttp-proxy-password","displayName":"Proxy Password","identifiesControllerService":false,"sensitive":true},"ignore-response-content":{"name":"ignore-response-content","displayName":"Response Body Ignored","identifiesControllerService":false,"sensitive":false},"Proxy Port":{"name":"Proxy Port","displayName":"Proxy Port","identifiesControllerService":false,"sensitive":false},"SSL Context Service":{"name":"SSL Context Service","displayName":"SSL Context Service","identifiesControllerService":true,"sensitive":false},"Digest Authentication":{"name":"Digest Authentication","displayName":"Request Digest Authentication Enabled","identifiesControllerService":false,"sensitive":false},"HTTP Method":{"name":"HTTP Method","displayName":"HTTP Method","identifiesControllerService":false,"sensitive":false},"Add Response Headers to Request":{"name":"Add Response Headers to Request","displayName":"Response Header Request Attributes Enabled","identifiesControllerService":false,"sensitive":false},"oauth2-access-token-provider":{"name":"oauth2-access-token-provider","displayName":"Request OAuth2 Access Token Provider","identifiesControllerService":true,"sensitive":false},"Basic Authentication Username":{"name":"Basic Authentication Username","displayName":"Request Username","identifiesControllerService":false,"sensitive":false},"Include Date Header":{"name":"Include Date Header","displayName":"Request Date Header Enabled","identifiesControllerService":false,"sensitive":false},"Penalize on \"No Retry\"":{"name":"Penalize on \"No Retry\"","displayName":"Request Failure Penalization Enabled","identifiesControllerService":false,"sensitive":false},"Link":{"name":"Link","displayName":"Link","identifiesControllerService":false,"sensitive":false},"Useragent":{"name":"Useragent","displayName":"Request User-Agent","identifiesControllerService":false,"sensitive":false}},"style":{},"schedulingPeriod":"0 sec","schedulingStrategy":"TIMER_DRIVEN","executionNode":"ALL","penaltyDuration":"30 sec","yieldDuration":"1 sec","bulletinLevel":"WARN","runDurationMillis":0,"concurrentlySchedulableTaskCount":4,"autoTerminatedRelationships":["No Retry","Retry","Original","Failure"],"scheduledState":"ENABLED","retryCount":10,"retriedRelationships":[],"backoffMechanism":"PENALIZE_FLOWFILE","maxBackoffPeriod":"10 mins","componentType":"PROCESSOR","groupIdentifier":"3d4a75a2-18f7-3432-b0ef-fa8f31ca6fb8"}],"inputPorts":[],"outputPorts":[{"identifier":"b44f3c5d-9031-3a3e-a7e7-e1a6290adfa5","instanceIdentifier":"123763bf-1f63-322c-effd-2e1d6aaa713c","name":"Temporal Entities","position":{"x":1359.0,"y":640.0},"type":"OUTPUT_PORT","concurrentlySchedulableTaskCount":1,"scheduledState":"ENABLED","allowRemoteAccess":false,"componentType":"OUTPUT_PORT","groupIdentifier":"3d4a75a2-18f7-3432-b0ef-fa8f31ca6fb8"}],"connections":[{"identifier":"ec2bac80-c735-3cc0-b25b-c604bee1f665","instanceIdentifier":"9be4a124-bdfe-3dc1-249c-8c2af4ed9aa8","name":"","source":{"id":"3a35ae06-e813-3e9c-a06f-35e859e6917b","type":"PROCESSOR","groupId":"3d4a75a2-18f7-3432-b0ef-fa8f31ca6fb8","name":"SplitContent","comments":"","instanceIdentifier":"285f24f5-75f6-33d6-d0db-11fcbfb22c4e"},"destination":{"id":"e70882d7-5bb2-3f36-8666-7cdc64c0cfab","type":"PROCESSOR","groupId":"3d4a75a2-18f7-3432-b0ef-fa8f31ca6fb8","name":"ExtractText","comments":"","instanceIdentifier":"c1ffcc9a-c8f8-3176-d8d1-7bbc8395f2cc"},"labelIndex":1,"zIndex":0,"selectedRelationships":["splits"],"backPressureObjectThreshold":10000,"backPressureDataSizeThreshold":"1 GB","flowFileExpiration":"0 sec","prioritizers":[],"bends":[],"loadBalanceStrategy":"DO_NOT_LOAD_BALANCE","partitioningAttribute":"","loadBalanceCompression":"DO_NOT_COMPRESS","componentType":"CONNECTION","groupIdentifier":"3d4a75a2-18f7-3432-b0ef-fa8f31ca6fb8"},{"identifier":"9f89d7db-43e4-3c3c-92a3-92073c43e0a2","instanceIdentifier":"e52c1d79-cbba-31ae-131a-8b808821cc09","name":"","source":{"id":"289764b0-4b54-3d6f-a6ba-6511cc398fc8","type":"PROCESSOR","groupId":"3d4a75a2-18f7-3432-b0ef-fa8f31ca6fb8","name":"GenerateFlowFile","comments":"","instanceIdentifier":"8ccd4af5-1f5b-37e4-0d5c-825978f6a84a"},"destination":{"id":"3a35ae06-e813-3e9c-a06f-35e859e6917b","type":"PROCESSOR","groupId":"3d4a75a2-18f7-3432-b0ef-fa8f31ca6fb8","name":"SplitContent","comments":"","instanceIdentifier":"285f24f5-75f6-33d6-d0db-11fcbfb22c4e"},"labelIndex":1,"zIndex":0,"selectedRelationships":["success"],"backPressureObjectThreshold":10000,"backPressureDataSizeThreshold":"1 GB","flowFileExpiration":"0 sec","prioritizers":[],"bends":[],"loadBalanceStrategy":"DO_NOT_LOAD_BALANCE","partitioningAttribute":"","loadBalanceCompression":"DO_NOT_COMPRESS","componentType":"CONNECTION","groupIdentifier":"3d4a75a2-18f7-3432-b0ef-fa8f31ca6fb8"},{"identifier":"8a3b5d07-1c05-32db-af76-450a23ad8821","instanceIdentifier":"eb242f18-f6ec-3c89-2d21-d6a3989d22cc","name":"","source":{"id":"e70882d7-5bb2-3f36-8666-7cdc64c0cfab","type":"PROCESSOR","groupId":"3d4a75a2-18f7-3432-b0ef-fa8f31ca6fb8","name":"ExtractText","comments":"","instanceIdentifier":"c1ffcc9a-c8f8-3176-d8d1-7bbc8395f2cc"},"destination":{"id":"72d0db0d-c388-3ad8-a5eb-d22903025c21","type":"PROCESSOR","groupId":"3d4a75a2-18f7-3432-b0ef-fa8f31ca6fb8","name":"Get Temporal Entities","comments":"","instanceIdentifier":"08122f07-6105-35d4-ffd7-bedafef7e1f4"},"labelIndex":1,"zIndex":0,"selectedRelationships":["matched"],"backPressureObjectThreshold":10000,"backPressureDataSizeThreshold":"1 GB","flowFileExpiration":"0 sec","prioritizers":[],"bends":[],"loadBalanceStrategy":"DO_NOT_LOAD_BALANCE","partitioningAttribute":"","loadBalanceCompression":"DO_NOT_COMPRESS","componentType":"CONNECTION","groupIdentifier":"3d4a75a2-18f7-3432-b0ef-fa8f31ca6fb8"},{"identifier":"5fb243ff-018c-3a57-bdf2-c0446fbb84f3","instanceIdentifier":"0a9f1c7b-40a3-347b-4d86-a03dd263caae","name":"","source":{"id":"72d0db0d-c388-3ad8-a5eb-d22903025c21","type":"PROCESSOR","groupId":"3d4a75a2-18f7-3432-b0ef-fa8f31ca6fb8","name":"Get Temporal Entities","comments":"","instanceIdentifier":"08122f07-6105-35d4-ffd7-bedafef7e1f4"},"destination":{"id":"b44f3c5d-9031-3a3e-a7e7-e1a6290adfa5","type":"OUTPUT_PORT","groupId":"3d4a75a2-18f7-3432-b0ef-fa8f31ca6fb8","name":"Temporal Entities","instanceIdentifier":"123763bf-1f63-322c-effd-2e1d6aaa713c"},"labelIndex":1,"zIndex":0,"selectedRelationships":["Response"],"backPressureObjectThreshold":10000,"backPressureDataSizeThreshold":"1 GB","flowFileExpiration":"0 sec","prioritizers":[],"bends":[],"loadBalanceStrategy":"DO_NOT_LOAD_BALANCE","partitioningAttribute":"","loadBalanceCompression":"DO_NOT_COMPRESS","componentType":"CONNECTION","groupIdentifier":"3d4a75a2-18f7-3432-b0ef-fa8f31ca6fb8"}],"labels":[],"funnels":[],"controllerServices":[],"variables":{},"defaultFlowFileExpiration":"0 sec","defaultBackPressureObjectThreshold":10000,"defaultBackPressureDataSizeThreshold":"1 GB","componentType":"PROCESS_GROUP","flowFileConcurrency":"UNBOUNDED","flowFileOutboundPolicy":"STREAM_WHEN_AVAILABLE","groupIdentifier":"3e06a40c-e274-3903-99d0-9c45b5531e80"}],"remoteProcessGroups":[],"processors":[{"identifier":"d83461a2-4bfa-366b-a557-3d03db37a25e","instanceIdentifier":"27ea53ae-3ea1-39d6-c0b2-6d15ba2545b4","name":"LogMessage","comments":"","position":{"x":1118.0,"y":959.0},"type":"org.apache.nifi.processors.standard.LogMessage","bundle":{"group":"org.apache.nifi","artifact":"nifi-standard-nar","version":"1.21.0"},"properties":{"log-message":null,"log-level":"info","log-prefix":null},"propertyDescriptors":{"log-message":{"name":"log-message","displayName":"Log message","identifiesControllerService":false,"sensitive":false},"log-level":{"name":"log-level","displayName":"Log Level","identifiesControllerService":false,"sensitive":false},"log-prefix":{"name":"log-prefix","displayName":"Log prefix","identifiesControllerService":false,"sensitive":false}},"style":{},"schedulingPeriod":"0 sec","schedulingStrategy":"TIMER_DRIVEN","executionNode":"ALL","penaltyDuration":"30 sec","yieldDuration":"1 sec","bulletinLevel":"WARN","runDurationMillis":25,"concurrentlySchedulableTaskCount":1,"autoTerminatedRelationships":["success"],"scheduledState":"ENABLED","retryCount":10,"retriedRelationships":[],"backoffMechanism":"PENALIZE_FLOWFILE","maxBackoffPeriod":"10 mins","componentType":"PROCESSOR","groupIdentifier":"3e06a40c-e274-3903-99d0-9c45b5531e80"},{"identifier":"c4f7a560-0d0d-3536-a195-0928f3ac2365","instanceIdentifier":"75e9ff9a-0188-1000-cd58-0e58dae99bcd","name":"Make ND","comments":"","position":{"x":3407.717950590265,"y":719.738274311672},"type":"org.apache.nifi.processors.script.ExecuteScript","bundle":{"group":"org.apache.nifi","artifact":"nifi-scripting-nar","version":"1.21.0"},"properties":{"Script File":null,"Script Engine":"python","Script Body":"import json\nimport java.io\nfrom org.apache.commons.io import IOUtils\nfrom java.nio.charset import StandardCharsets\nfrom org.apache.nifi.processor.io import StreamCallback\nfrom org.apache.nifi.processors.script import ExecuteScript\nfrom org.python.core.util import StringUtil\n\nclass PutEntitiesInOneArray(StreamCallback):\n def __init__(self):\n pass\n\n def process(self, inputStream, outputStream):\n # Read input stream as JSON object\n text = IOUtils.toString(inputStream, StandardCharsets.UTF_8)\n outputStream.write(bytearray(text.replace(\"@@@@@\", \"\\n\").encode('utf-8'))) \n\nflowFile = session.get()\nif (flowFile != None):\n flowfilenamebase = flowFile.getAttribute('filename').split('.')[0] + '_translated.json'\n# try:\n flowFile = session.write(flowFile, PutEntitiesInOneArray())\n flowFile = session.putAttribute(flowFile, \"filename\", flowfilenamebase)\n session.transfer(flowFile, REL_SUCCESS)\n# except Exception as e:\n# # Write error message to NiFi log\n# log.error(str(e))\n# log.error(\"Failed to process JSON file\")\n# # Transfer flow file to failure relationship\n# session.transfer(flowFile, REL_FAILURE)\nsession.commit()","Module Directory":null},"propertyDescriptors":{"Script File":{"name":"Script File","displayName":"Script File","identifiesControllerService":false,"sensitive":false,"resourceDefinition":{"cardinality":"SINGLE","resourceTypes":["FILE"]}},"Script Engine":{"name":"Script Engine","displayName":"Script Engine","identifiesControllerService":false,"sensitive":false},"Script Body":{"name":"Script Body","displayName":"Script Body","identifiesControllerService":false,"sensitive":false},"Module Directory":{"name":"Module Directory","displayName":"Module Directory","identifiesControllerService":false,"sensitive":false,"resourceDefinition":{"cardinality":"MULTIPLE","resourceTypes":["DIRECTORY","FILE"]}}},"style":{},"schedulingPeriod":"0 sec","schedulingStrategy":"TIMER_DRIVEN","executionNode":"ALL","penaltyDuration":"30 sec","yieldDuration":"1 sec","bulletinLevel":"WARN","runDurationMillis":0,"concurrentlySchedulableTaskCount":1,"autoTerminatedRelationships":["failure"],"scheduledState":"ENABLED","retryCount":10,"retriedRelationships":[],"backoffMechanism":"PENALIZE_FLOWFILE","maxBackoffPeriod":"10 mins","componentType":"PROCESSOR","groupIdentifier":"3e06a40c-e274-3903-99d0-9c45b5531e80"},{"identifier":"6864420d-9c3b-3e97-bb16-d9bcd04c95bc","instanceIdentifier":"3ba97192-327c-380b-31a0-a8547b0fff6a","name":"Get Single Entities","comments":"","position":{"x":1670.0,"y":1031.0},"type":"org.apache.nifi.processors.script.ExecuteScript","bundle":{"group":"org.apache.nifi","artifact":"nifi-scripting-nar","version":"1.21.0"},"properties":{"Script File":null,"Script Engine":"python","Script Body":"import json\nimport java.io\nfrom org.apache.commons.io import IOUtils\nfrom java.nio.charset import StandardCharsets\nfrom org.apache.nifi.processor.io import StreamCallback\nfrom org.apache.nifi.processors.script import ExecuteScript\nfrom org.python.core.util import StringUtil\n\nclass TransformJSON(StreamCallback):\n def __init__(self):\n pass\n\n def process(self, inputStream, outputStream):\n text = IOUtils.toString(inputStream, StandardCharsets.UTF_8)\n entity = json.loads(text)\n template = {'id': entity['id'], 'type': entity['type']}\n tmpList = []\n for attrsKey, attrsValue in entity.items():\n if attrsKey in ['id', 'type', 'modifiedAt', 'createdAt', 'observedAt']:\n continue\n for i in range(len(attrsValue)):\n if len(tmpList) == i:\n tmpEntity = template.copy()\n tmpList.append(tmpEntity)\n else:\n tmpEntity = tmpList[i]\n if type(attrsValue) == dict:\n tmpEntity[attrsKey] = attrsValue\n else:\n tmpEntity[attrsKey] = attrsValue[i]\n if 'observedAt' in tmpEntity[attrsKey].keys():\n del tmpEntity[attrsKey]['observedAt']\n if 'instanceId' in tmpEntity[attrsKey].keys():\n del tmpEntity[attrsKey]['instanceId']\n outputStream.write(bytearray(json.dumps(tmpList, indent=4).encode('utf-8'))) \n\nflowFile = session.get()\nif (flowFile != None):\n flowfilenamebase = flowFile.getAttribute('filename').split('.')[0] + '_translated.json'\n flowFile = session.write(flowFile, TransformJSON())\n flowFile = session.putAttribute(flowFile, \"filename\", flowfilenamebase)\n session.transfer(flowFile, REL_SUCCESS)\nsession.commit()","Module Directory":null},"propertyDescriptors":{"Script File":{"name":"Script File","displayName":"Script File","identifiesControllerService":false,"sensitive":false,"resourceDefinition":{"cardinality":"SINGLE","resourceTypes":["FILE"]}},"Script Engine":{"name":"Script Engine","displayName":"Script Engine","identifiesControllerService":false,"sensitive":false},"Script Body":{"name":"Script Body","displayName":"Script Body","identifiesControllerService":false,"sensitive":false},"Module Directory":{"name":"Module Directory","displayName":"Module Directory","identifiesControllerService":false,"sensitive":false,"resourceDefinition":{"cardinality":"MULTIPLE","resourceTypes":["DIRECTORY","FILE"]}}},"style":{},"schedulingPeriod":"0 sec","schedulingStrategy":"TIMER_DRIVEN","executionNode":"ALL","penaltyDuration":"30 sec","yieldDuration":"1 sec","bulletinLevel":"WARN","runDurationMillis":0,"concurrentlySchedulableTaskCount":1,"autoTerminatedRelationships":[],"scheduledState":"ENABLED","retryCount":10,"retriedRelationships":[],"backoffMechanism":"PENALIZE_FLOWFILE","maxBackoffPeriod":"10 mins","componentType":"PROCESSOR","groupIdentifier":"3e06a40c-e274-3903-99d0-9c45b5531e80"},{"identifier":"02135b05-548b-37f2-b5e2-5432f2fc1cac","instanceIdentifier":"c58e4e34-800b-35d8-2ce4-ff157e442c13","name":"ExecuteScript","comments":"","position":{"x":2771.5,"y":1015.75},"type":"org.apache.nifi.processors.script.ExecuteScript","bundle":{"group":"org.apache.nifi","artifact":"nifi-scripting-nar","version":"1.21.0"},"properties":{"Script File":null,"Script Engine":"python","Script Body":"import json\nimport java.io\nfrom org.apache.commons.io import IOUtils\nfrom java.nio.charset import StandardCharsets\nfrom org.apache.nifi.processor.io import StreamCallback\nfrom org.apache.nifi.processors.script import ExecuteScript\nfrom org.python.core.util import StringUtil\n\nclass PutEntitiesInOneArray(StreamCallback):\n def __init__(self):\n pass\n\n def process(self, inputStream, outputStream):\n # Read input stream as JSON object\n text = IOUtils.toString(inputStream, StandardCharsets.UTF_8)\n entities = json.loads(text)\n result = []\n for entity in entities:\n result.extend(entity)\n outputStream.write(bytearray(json.dumps(result, indent=4).encode('utf-8'))) \n\nflowFile = session.get()\nif (flowFile != None):\n flowfilenamebase = flowFile.getAttribute('filename').split('.')[0] + '_translated.json'\n# try:\n flowFile = session.write(flowFile, PutEntitiesInOneArray())\n flowFile = session.putAttribute(flowFile, \"filename\", flowfilenamebase)\n session.transfer(flowFile, REL_SUCCESS)\n# except Exception as e:\n# # Write error message to NiFi log\n# log.error(str(e))\n# log.error(\"Failed to process JSON file\")\n# # Transfer flow file to failure relationship\n# session.transfer(flowFile, REL_FAILURE)\nsession.commit()","Module Directory":null},"propertyDescriptors":{"Script File":{"name":"Script File","displayName":"Script File","identifiesControllerService":false,"sensitive":false,"resourceDefinition":{"cardinality":"SINGLE","resourceTypes":["FILE"]}},"Script Engine":{"name":"Script Engine","displayName":"Script Engine","identifiesControllerService":false,"sensitive":false},"Script Body":{"name":"Script Body","displayName":"Script Body","identifiesControllerService":false,"sensitive":false},"Module Directory":{"name":"Module Directory","displayName":"Module Directory","identifiesControllerService":false,"sensitive":false,"resourceDefinition":{"cardinality":"MULTIPLE","resourceTypes":["DIRECTORY","FILE"]}}},"style":{},"schedulingPeriod":"0 sec","schedulingStrategy":"TIMER_DRIVEN","executionNode":"ALL","penaltyDuration":"30 sec","yieldDuration":"1 sec","bulletinLevel":"WARN","runDurationMillis":0,"concurrentlySchedulableTaskCount":1,"autoTerminatedRelationships":["failure"],"scheduledState":"ENABLED","retryCount":10,"retriedRelationships":[],"backoffMechanism":"PENALIZE_FLOWFILE","maxBackoffPeriod":"10 mins","componentType":"PROCESSOR","groupIdentifier":"3e06a40c-e274-3903-99d0-9c45b5531e80"},{"identifier":"bc7e6072-e3e0-342c-9e88-14a19647c8f4","instanceIdentifier":"36945014-35ba-37bf-8a94-e7594e2be0c1","name":"MergeContent","comments":"","position":{"x":2286.0,"y":1370.5},"type":"org.apache.nifi.processors.standard.MergeContent","bundle":{"group":"org.apache.nifi","artifact":"nifi-standard-nar","version":"1.21.0"},"properties":{"Keep Path":"false","Maximum Group Size":null,"Merge Strategy":"Bin-Packing Algorithm","Attribute Strategy":"Keep All Unique Attributes","Compression Level":"1","Maximum Number of Entries":"1000","Minimum Group Size":"100 KB","Maximum number of Bins":"10","Tar Modified Time":"${file.lastModifiedTime}","Delimiter Strategy":"Text","Merge Format":"Binary Concatenation","Footer File":"]","Max Bin Age":"180 sec","Demarcator File":",","Correlation Attribute Name":null,"Header File":"[","mergecontent-metadata-strategy":"Do Not Merge Uncommon Metadata","Minimum Number of Entries":"10"},"propertyDescriptors":{"Keep Path":{"name":"Keep Path","displayName":"Keep Path","identifiesControllerService":false,"sensitive":false},"Maximum Group Size":{"name":"Maximum Group Size","displayName":"Maximum Group Size","identifiesControllerService":false,"sensitive":false},"Merge Strategy":{"name":"Merge Strategy","displayName":"Merge Strategy","identifiesControllerService":false,"sensitive":false},"Attribute Strategy":{"name":"Attribute Strategy","displayName":"Attribute Strategy","identifiesControllerService":false,"sensitive":false},"Compression Level":{"name":"Compression Level","displayName":"Compression Level","identifiesControllerService":false,"sensitive":false},"Maximum Number of Entries":{"name":"Maximum Number of Entries","displayName":"Maximum Number of Entries","identifiesControllerService":false,"sensitive":false},"Minimum Group Size":{"name":"Minimum Group Size","displayName":"Minimum Group Size","identifiesControllerService":false,"sensitive":false},"Maximum number of Bins":{"name":"Maximum number of Bins","displayName":"Maximum number of Bins","identifiesControllerService":false,"sensitive":false},"Tar Modified Time":{"name":"Tar Modified Time","displayName":"Tar Modified Time","identifiesControllerService":false,"sensitive":false},"Delimiter Strategy":{"name":"Delimiter Strategy","displayName":"Delimiter Strategy","identifiesControllerService":false,"sensitive":false},"Merge Format":{"name":"Merge Format","displayName":"Merge Format","identifiesControllerService":false,"sensitive":false},"Footer File":{"name":"Footer File","displayName":"Footer","identifiesControllerService":false,"sensitive":false,"resourceDefinition":{"cardinality":"SINGLE","resourceTypes":["TEXT","FILE"]}},"Max Bin Age":{"name":"Max Bin Age","displayName":"Max Bin Age","identifiesControllerService":false,"sensitive":false},"Demarcator File":{"name":"Demarcator File","displayName":"Demarcator","identifiesControllerService":false,"sensitive":false,"resourceDefinition":{"cardinality":"SINGLE","resourceTypes":["TEXT","FILE"]}},"Correlation Attribute Name":{"name":"Correlation Attribute Name","displayName":"Correlation Attribute Name","identifiesControllerService":false,"sensitive":false},"Header File":{"name":"Header File","displayName":"Header","identifiesControllerService":false,"sensitive":false,"resourceDefinition":{"cardinality":"SINGLE","resourceTypes":["TEXT","FILE"]}},"mergecontent-metadata-strategy":{"name":"mergecontent-metadata-strategy","displayName":"Metadata Strategy","identifiesControllerService":false,"sensitive":false},"Minimum Number of Entries":{"name":"Minimum Number of Entries","displayName":"Minimum Number of Entries","identifiesControllerService":false,"sensitive":false}},"style":{},"schedulingPeriod":"0 sec","schedulingStrategy":"TIMER_DRIVEN","executionNode":"ALL","penaltyDuration":"30 sec","yieldDuration":"1 sec","bulletinLevel":"WARN","runDurationMillis":0,"concurrentlySchedulableTaskCount":1,"autoTerminatedRelationships":["original","failure"],"scheduledState":"ENABLED","retryCount":10,"retriedRelationships":[],"backoffMechanism":"PENALIZE_FLOWFILE","maxBackoffPeriod":"10 mins","componentType":"PROCESSOR","groupIdentifier":"3e06a40c-e274-3903-99d0-9c45b5531e80"},{"identifier":"a2ff60ef-c2f5-39fd-9c77-fe0fd60d7188","instanceIdentifier":"b7e47680-cd4f-3db3-8909-28f272f5f0c3","name":"SplitJson","comments":"","position":{"x":1086.0,"y":1215.0},"type":"org.apache.nifi.processors.standard.SplitJson","bundle":{"group":"org.apache.nifi","artifact":"nifi-standard-nar","version":"1.21.0"},"properties":{"Null Value Representation":"empty string","JsonPath Expression":"$[*]"},"propertyDescriptors":{"Null Value Representation":{"name":"Null Value Representation","displayName":"Null Value Representation","identifiesControllerService":false,"sensitive":false},"JsonPath Expression":{"name":"JsonPath Expression","displayName":"JsonPath Expression","identifiesControllerService":false,"sensitive":false}},"style":{},"schedulingPeriod":"0 sec","schedulingStrategy":"TIMER_DRIVEN","executionNode":"ALL","penaltyDuration":"30 sec","yieldDuration":"1 sec","bulletinLevel":"WARN","runDurationMillis":0,"concurrentlySchedulableTaskCount":1,"autoTerminatedRelationships":["original","failure"],"scheduledState":"ENABLED","retryCount":10,"retriedRelationships":[],"backoffMechanism":"PENALIZE_FLOWFILE","maxBackoffPeriod":"10 mins","componentType":"PROCESSOR","groupIdentifier":"3e06a40c-e274-3903-99d0-9c45b5531e80"},{"identifier":"4c31aa1b-cb10-3d48-bdc3-ce139af2365f","instanceIdentifier":"4857e29b-a7b3-3067-8e2c-e9bd1ee86056","name":"SplitJson","comments":"","position":{"x":2112.0,"y":648.0},"type":"org.apache.nifi.processors.standard.SplitJson","bundle":{"group":"org.apache.nifi","artifact":"nifi-standard-nar","version":"1.21.0"},"properties":{"Null Value Representation":"empty string","JsonPath Expression":"$[*]"},"propertyDescriptors":{"Null Value Representation":{"name":"Null Value Representation","displayName":"Null Value Representation","identifiesControllerService":false,"sensitive":false},"JsonPath Expression":{"name":"JsonPath Expression","displayName":"JsonPath Expression","identifiesControllerService":false,"sensitive":false}},"style":{},"schedulingPeriod":"0 sec","schedulingStrategy":"TIMER_DRIVEN","executionNode":"ALL","penaltyDuration":"30 sec","yieldDuration":"1 sec","bulletinLevel":"WARN","runDurationMillis":0,"concurrentlySchedulableTaskCount":1,"autoTerminatedRelationships":["original","failure"],"scheduledState":"ENABLED","retryCount":10,"retriedRelationships":[],"backoffMechanism":"PENALIZE_FLOWFILE","maxBackoffPeriod":"10 mins","componentType":"PROCESSOR","groupIdentifier":"3e06a40c-e274-3903-99d0-9c45b5531e80"},{"identifier":"67dc7b8e-46c2-396a-a160-c6e0694175ad","instanceIdentifier":"3f4fd0d7-599a-3922-7e19-fd3aba33e97b","name":"MergeContent","comments":"","position":{"x":2808.0,"y":608.0},"type":"org.apache.nifi.processors.standard.MergeContent","bundle":{"group":"org.apache.nifi","artifact":"nifi-standard-nar","version":"1.21.0"},"properties":{"Keep Path":"false","Maximum Group Size":null,"Merge Strategy":"Bin-Packing Algorithm","Attribute Strategy":"Keep All Unique Attributes","Compression Level":"1","Maximum Number of Entries":"1000","Minimum Group Size":"0 B","Maximum number of Bins":"5","Tar Modified Time":"${file.lastModifiedTime}","Delimiter Strategy":"Text","Merge Format":"Binary Concatenation","Footer File":null,"Max Bin Age":null,"Demarcator File":"@@@@@","Correlation Attribute Name":null,"Header File":null,"mergecontent-metadata-strategy":"Do Not Merge Uncommon Metadata","Minimum Number of Entries":"1"},"propertyDescriptors":{"Keep Path":{"name":"Keep Path","displayName":"Keep Path","identifiesControllerService":false,"sensitive":false},"Maximum Group Size":{"name":"Maximum Group Size","displayName":"Maximum Group Size","identifiesControllerService":false,"sensitive":false},"Merge Strategy":{"name":"Merge Strategy","displayName":"Merge Strategy","identifiesControllerService":false,"sensitive":false},"Attribute Strategy":{"name":"Attribute Strategy","displayName":"Attribute Strategy","identifiesControllerService":false,"sensitive":false},"Compression Level":{"name":"Compression Level","displayName":"Compression Level","identifiesControllerService":false,"sensitive":false},"Maximum Number of Entries":{"name":"Maximum Number of Entries","displayName":"Maximum Number of Entries","identifiesControllerService":false,"sensitive":false},"Minimum Group Size":{"name":"Minimum Group Size","displayName":"Minimum Group Size","identifiesControllerService":false,"sensitive":false},"Maximum number of Bins":{"name":"Maximum number of Bins","displayName":"Maximum number of Bins","identifiesControllerService":false,"sensitive":false},"Tar Modified Time":{"name":"Tar Modified Time","displayName":"Tar Modified Time","identifiesControllerService":false,"sensitive":false},"Delimiter Strategy":{"name":"Delimiter Strategy","displayName":"Delimiter Strategy","identifiesControllerService":false,"sensitive":false},"Merge Format":{"name":"Merge Format","displayName":"Merge Format","identifiesControllerService":false,"sensitive":false},"Footer File":{"name":"Footer File","displayName":"Footer","identifiesControllerService":false,"sensitive":false,"resourceDefinition":{"cardinality":"SINGLE","resourceTypes":["TEXT","FILE"]}},"Max Bin Age":{"name":"Max Bin Age","displayName":"Max Bin Age","identifiesControllerService":false,"sensitive":false},"Demarcator File":{"name":"Demarcator File","displayName":"Demarcator","identifiesControllerService":false,"sensitive":false,"resourceDefinition":{"cardinality":"SINGLE","resourceTypes":["TEXT","FILE"]}},"Correlation Attribute Name":{"name":"Correlation Attribute Name","displayName":"Correlation Attribute Name","identifiesControllerService":false,"sensitive":false},"Header File":{"name":"Header File","displayName":"Header","identifiesControllerService":false,"sensitive":false,"resourceDefinition":{"cardinality":"SINGLE","resourceTypes":["TEXT","FILE"]}},"mergecontent-metadata-strategy":{"name":"mergecontent-metadata-strategy","displayName":"Metadata Strategy","identifiesControllerService":false,"sensitive":false},"Minimum Number of Entries":{"name":"Minimum Number of Entries","displayName":"Minimum Number of Entries","identifiesControllerService":false,"sensitive":false}},"style":{},"schedulingPeriod":"0 sec","schedulingStrategy":"TIMER_DRIVEN","executionNode":"ALL","penaltyDuration":"30 sec","yieldDuration":"1 sec","bulletinLevel":"WARN","runDurationMillis":0,"concurrentlySchedulableTaskCount":1,"autoTerminatedRelationships":["original","failure"],"scheduledState":"ENABLED","retryCount":10,"retriedRelationships":[],"backoffMechanism":"PENALIZE_FLOWFILE","maxBackoffPeriod":"10 mins","componentType":"PROCESSOR","groupIdentifier":"3e06a40c-e274-3903-99d0-9c45b5531e80"},{"identifier":"4546e1db-11b6-351e-83ef-44da3e693086","instanceIdentifier":"5c6c8b37-6aa0-3087-9f76-dd0c39bc13ae","name":"PutFile","comments":"","position":{"x":3392.0,"y":368.0},"type":"org.apache.nifi.processors.standard.PutFile","bundle":{"group":"org.apache.nifi","artifact":"nifi-standard-nar","version":"1.21.0"},"properties":{"Group":null,"Owner":null,"Create Missing Directories":"true","Permissions":null,"Maximum File Count":null,"Last Modified Time":null,"Directory":"/home/nifi/download","Conflict Resolution Strategy":"fail"},"propertyDescriptors":{"Group":{"name":"Group","displayName":"Group","identifiesControllerService":false,"sensitive":false},"Owner":{"name":"Owner","displayName":"Owner","identifiesControllerService":false,"sensitive":false},"Create Missing Directories":{"name":"Create Missing Directories","displayName":"Create Missing Directories","identifiesControllerService":false,"sensitive":false},"Permissions":{"name":"Permissions","displayName":"Permissions","identifiesControllerService":false,"sensitive":false},"Maximum File Count":{"name":"Maximum File Count","displayName":"Maximum File Count","identifiesControllerService":false,"sensitive":false},"Last Modified Time":{"name":"Last Modified Time","displayName":"Last Modified Time","identifiesControllerService":false,"sensitive":false},"Directory":{"name":"Directory","displayName":"Directory","identifiesControllerService":false,"sensitive":false},"Conflict Resolution Strategy":{"name":"Conflict Resolution Strategy","displayName":"Conflict Resolution Strategy","identifiesControllerService":false,"sensitive":false}},"style":{},"schedulingPeriod":"0 sec","schedulingStrategy":"TIMER_DRIVEN","executionNode":"ALL","penaltyDuration":"30 sec","yieldDuration":"1 sec","bulletinLevel":"WARN","runDurationMillis":0,"concurrentlySchedulableTaskCount":1,"autoTerminatedRelationships":["success","failure"],"scheduledState":"ENABLED","retryCount":10,"retriedRelationships":[],"backoffMechanism":"PENALIZE_FLOWFILE","maxBackoffPeriod":"10 mins","componentType":"PROCESSOR","groupIdentifier":"3e06a40c-e274-3903-99d0-9c45b5531e80"},{"identifier":"285d89c3-2669-3dc6-bf70-cf91fe1d651b","instanceIdentifier":"a8d0d810-706b-3569-0d1f-3c75e5d389a8","name":"NGSI-LD to HL7 FHIR","comments":"","position":{"x":2054.0,"y":895.0},"type":"org.apache.nifi.processors.script.ExecuteScript","bundle":{"group":"org.apache.nifi","artifact":"nifi-scripting-nar","version":"1.21.0"},"properties":{"Script File":null,"Script Engine":"python","Script Body":"import json\nimport java.io\nfrom org.apache.commons.io import IOUtils\nfrom java.nio.charset import StandardCharsets\nfrom org.apache.nifi.processor.io import StreamCallback\nfrom org.apache.nifi.processors.script import ExecuteScript\nfrom org.python.core.util import StringUtil\n\nclass PutEntitiesInOneArray(StreamCallback):\n def __init__(self):\n pass\n\n def getAttribute(self, value):\n if type(value) == list:\n result = []\n for entry in value:\n result.append(self.getAttribute(entry))\n elif type(value) == dict:\n result = {}\n for key, value in value.items():\n if key in ['type', 'createdAt', 'observedAt', 'modifiedAt']:\n continue\n if key in ['value', 'object']:\n result['value'] = value\n else:\n result[key] = self.getAttribute(value)\n if len(result) == 1:\n result = result['value']\n else:\n if type(result['value']) == list:\n tmp = result['value']\n del result['value']\n tmp.append(result)\n result = tmp\n elif type(result['value']) == dict:\n tmp = result['value']\n del result['value']\n tmp.update(result)\n result = tmp\n else:\n result = value\n return result\n def process(self, inputStream, outputStream):\n # Read input stream as JSON object\n text = IOUtils.toString(inputStream, StandardCharsets.UTF_8)\n entities = json.loads(text)\n result = []\n for entity in entities:\n newEntity = {}\n for key, value in entity.items():\n if key in ['id', 'type']:\n newEntity[key] = value\n continue\n if key in ['observedAt', 'modifiedAt', 'createdAt']:\n continue\n newEntity[key] = self.getAttribute(value)\n result.append(newEntity) \n \n outputStream.write(bytearray(json.dumps(result, indent=4).encode('utf-8'))) \n\nflowFile = session.get()\nif (flowFile != None):\n flowfilenamebase = flowFile.getAttribute('filename').split('.')[0] + '_translated.json'\n# try:\n flowFile = session.write(flowFile, PutEntitiesInOneArray())\n flowFile = session.putAttribute(flowFile, \"filename\", flowfilenamebase)\n session.transfer(flowFile, REL_SUCCESS)\n# except Exception as e:\n# # Write error message to NiFi log\n# log.error(str(e))\n# log.error(\"Failed to process JSON file\")\n# # Transfer flow file to failure relationship\n# session.transfer(flowFile, REL_FAILURE)\nsession.commit()","Module Directory":null},"propertyDescriptors":{"Script File":{"name":"Script File","displayName":"Script File","identifiesControllerService":false,"sensitive":false,"resourceDefinition":{"cardinality":"SINGLE","resourceTypes":["FILE"]}},"Script Engine":{"name":"Script Engine","displayName":"Script Engine","identifiesControllerService":false,"sensitive":false},"Script Body":{"name":"Script Body","displayName":"Script Body","identifiesControllerService":false,"sensitive":false},"Module Directory":{"name":"Module Directory","displayName":"Module Directory","identifiesControllerService":false,"sensitive":false,"resourceDefinition":{"cardinality":"MULTIPLE","resourceTypes":["DIRECTORY","FILE"]}}},"style":{},"schedulingPeriod":"0 sec","schedulingStrategy":"TIMER_DRIVEN","executionNode":"ALL","penaltyDuration":"30 sec","yieldDuration":"1 sec","bulletinLevel":"WARN","runDurationMillis":0,"concurrentlySchedulableTaskCount":1,"autoTerminatedRelationships":["failure"],"scheduledState":"ENABLED","retryCount":10,"retriedRelationships":[],"backoffMechanism":"PENALIZE_FLOWFILE","maxBackoffPeriod":"10 mins","componentType":"PROCESSOR","groupIdentifier":"3e06a40c-e274-3903-99d0-9c45b5531e80"}],"inputPorts":[],"outputPorts":[],"connections":[{"identifier":"e1ebafe5-9639-32a8-a7f6-7431948a7e40","instanceIdentifier":"ec17af03-012c-3b94-6a5f-1c84cd84db37","name":"","source":{"id":"b44f3c5d-9031-3a3e-a7e7-e1a6290adfa5","type":"OUTPUT_PORT","groupId":"3d4a75a2-18f7-3432-b0ef-fa8f31ca6fb8","name":"Temporal Entities","instanceIdentifier":"123763bf-1f63-322c-effd-2e1d6aaa713c"},"destination":{"id":"a2ff60ef-c2f5-39fd-9c77-fe0fd60d7188","type":"PROCESSOR","groupId":"3e06a40c-e274-3903-99d0-9c45b5531e80","name":"SplitJson","comments":"","instanceIdentifier":"b7e47680-cd4f-3db3-8909-28f272f5f0c3"},"labelIndex":1,"zIndex":0,"selectedRelationships":[""],"backPressureObjectThreshold":10000,"backPressureDataSizeThreshold":"1 GB","flowFileExpiration":"0 sec","prioritizers":[],"bends":[],"loadBalanceStrategy":"DO_NOT_LOAD_BALANCE","partitioningAttribute":"","loadBalanceCompression":"DO_NOT_COMPRESS","componentType":"CONNECTION","groupIdentifier":"3e06a40c-e274-3903-99d0-9c45b5531e80"},{"identifier":"97865dec-8d71-32be-a945-079949480b3e","instanceIdentifier":"75e25104-0188-1000-3835-62ac5650ab98","name":"","source":{"id":"67dc7b8e-46c2-396a-a160-c6e0694175ad","type":"PROCESSOR","groupId":"3e06a40c-e274-3903-99d0-9c45b5531e80","name":"MergeContent","comments":"","instanceIdentifier":"3f4fd0d7-599a-3922-7e19-fd3aba33e97b"},"destination":{"id":"c4f7a560-0d0d-3536-a195-0928f3ac2365","type":"PROCESSOR","groupId":"3e06a40c-e274-3903-99d0-9c45b5531e80","name":"Make ND","comments":"","instanceIdentifier":"75e9ff9a-0188-1000-cd58-0e58dae99bcd"},"labelIndex":1,"zIndex":0,"selectedRelationships":["merged"],"backPressureObjectThreshold":10000,"backPressureDataSizeThreshold":"1 GB","flowFileExpiration":"0 sec","prioritizers":[],"bends":[],"loadBalanceStrategy":"DO_NOT_LOAD_BALANCE","partitioningAttribute":"","loadBalanceCompression":"DO_NOT_COMPRESS","componentType":"CONNECTION","groupIdentifier":"3e06a40c-e274-3903-99d0-9c45b5531e80"},{"identifier":"57503fba-3217-3582-993f-83fcea78d73f","instanceIdentifier":"8a619ccc-6b0e-36ef-d28c-f65d47585d1a","name":"","source":{"id":"4c31aa1b-cb10-3d48-bdc3-ce139af2365f","type":"PROCESSOR","groupId":"3e06a40c-e274-3903-99d0-9c45b5531e80","name":"SplitJson","comments":"","instanceIdentifier":"4857e29b-a7b3-3067-8e2c-e9bd1ee86056"},"destination":{"id":"67dc7b8e-46c2-396a-a160-c6e0694175ad","type":"PROCESSOR","groupId":"3e06a40c-e274-3903-99d0-9c45b5531e80","name":"MergeContent","comments":"","instanceIdentifier":"3f4fd0d7-599a-3922-7e19-fd3aba33e97b"},"labelIndex":1,"zIndex":0,"selectedRelationships":["split"],"backPressureObjectThreshold":10000,"backPressureDataSizeThreshold":"1 GB","flowFileExpiration":"0 sec","prioritizers":[],"bends":[],"loadBalanceStrategy":"DO_NOT_LOAD_BALANCE","partitioningAttribute":"","loadBalanceCompression":"DO_NOT_COMPRESS","componentType":"CONNECTION","groupIdentifier":"3e06a40c-e274-3903-99d0-9c45b5531e80"},{"identifier":"44914c43-a3f5-3677-aaf3-fbd262635323","instanceIdentifier":"66279c63-71cb-3bc5-1e72-56bd141490e4","name":"","source":{"id":"285d89c3-2669-3dc6-bf70-cf91fe1d651b","type":"PROCESSOR","groupId":"3e06a40c-e274-3903-99d0-9c45b5531e80","name":"NGSI-LD to HL7 FHIR","comments":"","instanceIdentifier":"a8d0d810-706b-3569-0d1f-3c75e5d389a8"},"destination":{"id":"4c31aa1b-cb10-3d48-bdc3-ce139af2365f","type":"PROCESSOR","groupId":"3e06a40c-e274-3903-99d0-9c45b5531e80","name":"SplitJson","comments":"","instanceIdentifier":"4857e29b-a7b3-3067-8e2c-e9bd1ee86056"},"labelIndex":1,"zIndex":0,"selectedRelationships":["success"],"backPressureObjectThreshold":10000,"backPressureDataSizeThreshold":"1 GB","flowFileExpiration":"0 sec","prioritizers":[],"bends":[],"loadBalanceStrategy":"DO_NOT_LOAD_BALANCE","partitioningAttribute":"","loadBalanceCompression":"DO_NOT_COMPRESS","componentType":"CONNECTION","groupIdentifier":"3e06a40c-e274-3903-99d0-9c45b5531e80"},{"identifier":"104da2d5-95a1-3c6a-b260-d54b7d12bf89","instanceIdentifier":"d4d44b8a-f8e7-3c03-1fb7-acb08c522a54","name":"","source":{"id":"a2ff60ef-c2f5-39fd-9c77-fe0fd60d7188","type":"PROCESSOR","groupId":"3e06a40c-e274-3903-99d0-9c45b5531e80","name":"SplitJson","comments":"","instanceIdentifier":"b7e47680-cd4f-3db3-8909-28f272f5f0c3"},"destination":{"id":"6864420d-9c3b-3e97-bb16-d9bcd04c95bc","type":"PROCESSOR","groupId":"3e06a40c-e274-3903-99d0-9c45b5531e80","name":"Get Single Entities","comments":"","instanceIdentifier":"3ba97192-327c-380b-31a0-a8547b0fff6a"},"labelIndex":1,"zIndex":0,"selectedRelationships":["split"],"backPressureObjectThreshold":10000,"backPressureDataSizeThreshold":"1 GB","flowFileExpiration":"0 sec","prioritizers":[],"bends":[],"loadBalanceStrategy":"DO_NOT_LOAD_BALANCE","partitioningAttribute":"","loadBalanceCompression":"DO_NOT_COMPRESS","componentType":"CONNECTION","groupIdentifier":"3e06a40c-e274-3903-99d0-9c45b5531e80"},{"identifier":"559928a8-1282-3761-b9a0-2614e01ecadf","instanceIdentifier":"2ecfe5e0-014b-395f-de26-4b2c6d67b550","name":"","source":{"id":"6864420d-9c3b-3e97-bb16-d9bcd04c95bc","type":"PROCESSOR","groupId":"3e06a40c-e274-3903-99d0-9c45b5531e80","name":"Get Single Entities","comments":"","instanceIdentifier":"3ba97192-327c-380b-31a0-a8547b0fff6a"},"destination":{"id":"d83461a2-4bfa-366b-a557-3d03db37a25e","type":"PROCESSOR","groupId":"3e06a40c-e274-3903-99d0-9c45b5531e80","name":"LogMessage","comments":"","instanceIdentifier":"27ea53ae-3ea1-39d6-c0b2-6d15ba2545b4"},"labelIndex":1,"zIndex":0,"selectedRelationships":["failure"],"backPressureObjectThreshold":10000,"backPressureDataSizeThreshold":"1 GB","flowFileExpiration":"0 sec","prioritizers":[],"bends":[],"loadBalanceStrategy":"DO_NOT_LOAD_BALANCE","partitioningAttribute":"","loadBalanceCompression":"DO_NOT_COMPRESS","componentType":"CONNECTION","groupIdentifier":"3e06a40c-e274-3903-99d0-9c45b5531e80"},{"identifier":"38c05b85-5f11-3f7f-80d6-c6b41a7fd75e","instanceIdentifier":"909b94a0-7e56-3fe9-c822-f5910da8ea5a","name":"","source":{"id":"bc7e6072-e3e0-342c-9e88-14a19647c8f4","type":"PROCESSOR","groupId":"3e06a40c-e274-3903-99d0-9c45b5531e80","name":"MergeContent","comments":"","instanceIdentifier":"36945014-35ba-37bf-8a94-e7594e2be0c1"},"destination":{"id":"02135b05-548b-37f2-b5e2-5432f2fc1cac","type":"PROCESSOR","groupId":"3e06a40c-e274-3903-99d0-9c45b5531e80","name":"ExecuteScript","comments":"","instanceIdentifier":"c58e4e34-800b-35d8-2ce4-ff157e442c13"},"labelIndex":1,"zIndex":0,"selectedRelationships":["merged"],"backPressureObjectThreshold":10000,"backPressureDataSizeThreshold":"1 GB","flowFileExpiration":"0 sec","prioritizers":[],"bends":[],"loadBalanceStrategy":"DO_NOT_LOAD_BALANCE","partitioningAttribute":"","loadBalanceCompression":"DO_NOT_COMPRESS","componentType":"CONNECTION","groupIdentifier":"3e06a40c-e274-3903-99d0-9c45b5531e80"},{"identifier":"9e995a06-4b64-3a25-ac1e-6817aec991c6","instanceIdentifier":"b6abe8a9-4361-3624-fce3-a05cfbe1023d","name":"","source":{"id":"6864420d-9c3b-3e97-bb16-d9bcd04c95bc","type":"PROCESSOR","groupId":"3e06a40c-e274-3903-99d0-9c45b5531e80","name":"Get Single Entities","comments":"","instanceIdentifier":"3ba97192-327c-380b-31a0-a8547b0fff6a"},"destination":{"id":"bc7e6072-e3e0-342c-9e88-14a19647c8f4","type":"PROCESSOR","groupId":"3e06a40c-e274-3903-99d0-9c45b5531e80","name":"MergeContent","comments":"","instanceIdentifier":"36945014-35ba-37bf-8a94-e7594e2be0c1"},"labelIndex":1,"zIndex":0,"selectedRelationships":["success"],"backPressureObjectThreshold":10000,"backPressureDataSizeThreshold":"1 GB","flowFileExpiration":"0 sec","prioritizers":[],"bends":[],"loadBalanceStrategy":"DO_NOT_LOAD_BALANCE","partitioningAttribute":"","loadBalanceCompression":"DO_NOT_COMPRESS","componentType":"CONNECTION","groupIdentifier":"3e06a40c-e274-3903-99d0-9c45b5531e80"},{"identifier":"d952c0da-248f-36b9-ae66-58a81f1e222e","instanceIdentifier":"aabfa23a-8fcc-3674-dcb6-b953f66c2bbd","name":"","source":{"id":"02135b05-548b-37f2-b5e2-5432f2fc1cac","type":"PROCESSOR","groupId":"3e06a40c-e274-3903-99d0-9c45b5531e80","name":"ExecuteScript","comments":"","instanceIdentifier":"c58e4e34-800b-35d8-2ce4-ff157e442c13"},"destination":{"id":"285d89c3-2669-3dc6-bf70-cf91fe1d651b","type":"PROCESSOR","groupId":"3e06a40c-e274-3903-99d0-9c45b5531e80","name":"NGSI-LD to HL7 FHIR","comments":"","instanceIdentifier":"a8d0d810-706b-3569-0d1f-3c75e5d389a8"},"labelIndex":1,"zIndex":0,"selectedRelationships":["success"],"backPressureObjectThreshold":10000,"backPressureDataSizeThreshold":"1 GB","flowFileExpiration":"0 sec","prioritizers":[],"bends":[],"loadBalanceStrategy":"DO_NOT_LOAD_BALANCE","partitioningAttribute":"","loadBalanceCompression":"DO_NOT_COMPRESS","componentType":"CONNECTION","groupIdentifier":"3e06a40c-e274-3903-99d0-9c45b5531e80"},{"identifier":"044fe185-8789-3c80-b927-49da787a4971","instanceIdentifier":"75ec7c90-0188-1000-3240-b9839a21e9a6","name":"","source":{"id":"c4f7a560-0d0d-3536-a195-0928f3ac2365","type":"PROCESSOR","groupId":"3e06a40c-e274-3903-99d0-9c45b5531e80","name":"Make ND","comments":"","instanceIdentifier":"75e9ff9a-0188-1000-cd58-0e58dae99bcd"},"destination":{"id":"4546e1db-11b6-351e-83ef-44da3e693086","type":"PROCESSOR","groupId":"3e06a40c-e274-3903-99d0-9c45b5531e80","name":"PutFile","comments":"","instanceIdentifier":"5c6c8b37-6aa0-3087-9f76-dd0c39bc13ae"},"labelIndex":1,"zIndex":0,"selectedRelationships":["success"],"backPressureObjectThreshold":10000,"backPressureDataSizeThreshold":"1 GB","flowFileExpiration":"0 sec","prioritizers":[],"bends":[],"loadBalanceStrategy":"DO_NOT_LOAD_BALANCE","partitioningAttribute":"","loadBalanceCompression":"DO_NOT_COMPRESS","componentType":"CONNECTION","groupIdentifier":"3e06a40c-e274-3903-99d0-9c45b5531e80"}],"labels":[],"funnels":[],"controllerServices":[],"variables":{},"defaultFlowFileExpiration":"0 sec","defaultBackPressureObjectThreshold":10000,"defaultBackPressureDataSizeThreshold":"1 GB","componentType":"PROCESS_GROUP","flowFileConcurrency":"UNBOUNDED","flowFileOutboundPolicy":"STREAM_WHEN_AVAILABLE"},"externalControllerServices":{},"parameterContexts":{},"flowEncodingVersion":"1.0","parameterProviders":{},"latest":false} \ No newline at end of file diff --git a/tempInterval2File/docker-compose.yml b/tempInterval2File/docker-compose.yml new file mode 100644 index 0000000..fc62fa1 --- /dev/null +++ b/tempInterval2File/docker-compose.yml @@ -0,0 +1,103 @@ +version: '3' + +services: +# testserver: +# image: testserver +# ports: +# - "55551:55551" + nifireg: + image: apache/nifi-registry + ports: + - "18080:18080" + nifi: + image: apache/nifi + ports: + - "8443:8443" + - "8080:8080" + environment: + ENTITY_TYPES: Medication,Patient + AT_CONTEXT: https://fiware.github.io/data-models/context.jsonld + NGSILD_HOST: http://scorpio:9090 + NOTIFICATION_PATH: notify + NOTIFICATION_PORT: 4444 + NOTIFICATION_HOST: http://nifi + HL7_HOST: http://testserver:55551 + TEMP_INTERVAL: 20 + NIFI_REG: http://nifireg:18080 + MY_HOST: http://nifi:8080 + ########## JVM ########## + + # -Xms + # The initial JVM heap size. + #NIFI_JVM_HEAP_INIT: 512m + + # -Xmx + # The maximum JVM heap size. + #NIFI_JVM_HEAP_MAX: 512m + + # -Xdebug + # The JVM Debugger can be enabled by setting this environment variable to any value. + #NIFI_JVM_DEBUGGER: '' + + + + ########## Web ########## + + # nifi.web.http.host + NIFI_WEB_HTTP_HOST: '0.0.0.0' + + # nifi.web.http.port + # HTTP Port + NIFI_WEB_HTTP_PORT: 8080 + volumes: + - ./NGSILDHL7Flow.json:/home/nifi/NGSILDHL7Flow.json + - ./loadtemplate.sh:/home/nifi/loadtemplate.sh + - ./download:/home/nifi/download + entrypoint: ["bash", "/home/nifi/loadtemplate.sh"] + zookeeper: + image: zookeeper + ports: + - "2181" + logging: + driver: none + kafka: + image: bitnami/kafka + ports: + - "9092" + environment: + KAFKA_ADVERTISED_HOST_NAME: kafka + KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181 + KAFKA_ADVERTISED_PORT: 9092 + KAFKA_LOG_RETENTION_MS: 10000 + KAFKA_LOG_RETENTION_CHECK_INTERVAL_MS: 5000 + ALLOW_PLAINTEXT_LISTENER: "yes" + volumes: + - /var/run/docker.sock:/var/run/docker.sock + depends_on: + - zookeeper +# logging: +# driver: none + postgres: + image: postgis/postgis + ports: + - "5432" + environment: + POSTGRES_USER: ngb + POSTGRES_PASSWORD: ngb + POSTGRES_DB: ngb + logging: + driver: none +# volumes: +# - /var/lib/docker/volumes/b089a32ad3162e1f7152fe9a87bdb10f4340f02372ae802c65ea870ccefb863f/_data:/var/lib/postgresql/data + scorpio: +# image: scorpiobroker/scorpio:scorpio-aaio-no-eureka_1.1.0-SNAPSHOT + image: scorpiobroker/all-in-one-runner:java-kafka-3.0.11 + ports: + - "9090:9090" +# environment: +# SPRING_SECURITY_MODE: deactivated +# SPRING_SECURITY_OAUTH2_RESOURCESERVER_JWT_JWT-SET-URI: http://localhost:1234/realms/scorpio/protocol/openid-connect/certs +# SPRING_SECURITY_OAUTH2_RESOURCESERVER_JWT_ISSUER-URI: http://localhost:1234/realms/scorpio + depends_on: + - postgres + - kafka diff --git a/tempInterval2File/loadtemplate.sh b/tempInterval2File/loadtemplate.sh new file mode 100644 index 0000000..460ce22 --- /dev/null +++ b/tempInterval2File/loadtemplate.sh @@ -0,0 +1,48 @@ +#!/bin/bash + +touch bla.temp +/opt/nifi/scripts/start.sh & +pid=$! +if [[ ! -f "created" ]]; then +while true; do + curl -s --head http://localhost:8080/nifi | head -n 1 | grep "HTTP/1.[01] [23].." > /dev/null + if [ $? -eq 0 ]; then + echo "NIFI Website is up." + break + else + echo "NIFI Website is down." + sleep 5 + fi +done +# Set the nifi cli path +NIFI_CLI=/opt/nifi/nifi-toolkit-current/bin/cli.sh + +# Set the nifi url +NIFI_URL=http://localhost:8080/nifi + +REG_CLIENT_EXISTS=$($NIFI_CLI nifi get-reg-client-id -rcn regclient1|grep -c regclient1) +if [ $REG_CLIENT_EXISTS -gt 0 ]; then +echo "Creating reg client" +$NIFI_CLI nifi create-reg-client -u ${MY_HOST} --registryClientUrl ${NIFI_REG} --registryClientName regclient1 +fi +echo "checking bucket" +BUCKETS_EXISTS=$($NIFI_CLI registry list-buckets -u ${NIFI_REG}| grep -c "MyBucket") + + + + +if [ $BUCKETS_EXISTS -lt 1 ]; then +echo "bucket does not exist" +$NIFI_CLI registry create-bucket -u ${NIFI_REG} --bucketName MyBucket +BUCKET_ID=$($NIFI_CLI registry list-buckets -u ${NIFI_REG}|grep MyBucket|awk '{print $3}') +$NIFI_CLI registry create-flow -u ${NIFI_REG} --bucketIdentifier $BUCKET_ID --flowName MyFlow +FLOWID=$($NIFI_CLI registry list-flows -u ${NIFI_REG} --bucketIdentifier=$BUCKET_ID|grep MyFlow|awk '{print $3}') +$NIFI_CLI registry import-flow-version -u ${NIFI_REG} -f $FLOWID -i /home/nifi/NGSILDHL7Flow.json +$NIFI_CLI nifi pg-import --bucketIdentifier $BUCKET_ID --flowIdentifier $FLOWID --flowVersion 1 +fi +PG_ID=$($NIFI_CLI nifi pg-list|grep 1|awk '{print $4}') +$NIFI_CLI nifi pg-enable-services --processGroupId $PG_ID +$NIFI_CLI nifi pg-start --processGroupId $PG_ID +touch created +fi +wait $pid