Repository: Vantiq/vantiq-extension-sources (language: python)

Issue:
camelConnector: Defining assembly
Define assembly that includes sourceimpl & message type.


Discussion / hints:

Fix patch:
diff --git a/camelConnector/README.md b/camelConnector/README.md
index b68bb0c1..e9386f97 100644
--- a/camelConnector/README.md
+++ b/camelConnector/README.md
@@ -1,6 +1,6 @@
 # Overview
 
-The following documentation outlines how to incorporate an Apache Camel Connector Source into part of your project.
+The following documentation outlines how to incorporate an Apache Camel Connector and associated Vantiq SOURCE into part of your project.
 This allows a user to 
 construct Apache Camel applications that interact with Vantiq.
 
@@ -113,7 +113,7 @@ name for each class is the class's fully qualified class name, *e.g.* "io.vantiq
 
 To set up the Source in the VANTIQ Modelo IDE, you will need to add a Source to your project. Please check the [Prerequisites](#pre) 
 to make sure you have properly added a Source Definition to VANTIQ Modelo. Once this is complete,
-you can select CAMEL_CONNECTOR
+you can select CAMEL
 (or whatever you named your Source Definition) as the Source Type. You will then need to provide the
 Source Configuration Document.
 
@@ -288,7 +288,6 @@ PROCEDURE publishToCamel(valueToSend Integer)
 Query errors originating from the source will include the code and error message.
 They may also include the cause (the underlying exception).
 
-
 ## Testing <a name="testing" id="testing"></a>
 
 In order to properly run the tests, you must add properties to your _gradle.properties_ file in the _~/.gradle_
diff --git a/camelConnector/build.gradle b/camelConnector/build.gradle
index 51f5cfe9..c870d408 100644
--- a/camelConnector/build.gradle
+++ b/camelConnector/build.gradle
@@ -100,6 +100,31 @@ description = 'Vantiq Camel Connector'
 java.sourceCompatibility = 1.11
 java.targetCompatibility = JavaVersion.VERSION_11
 
+/**
+ * The following task builds an assembly project zip file to make the CAMEL source implementation type
+ * known to the Vantiq system.  It also provides a schema type for the structured message & header for use
+ * with the Vantiq component when the appropriate endpoint flag is specified.
+ */
+
+task zipAssembly(type: Zip) {
+    def inFiles =  project.fileTree('src/main/resources/assembly/camelconnector')
+    logger.debug('Infiles: {}', inFiles)
+
+    project(':camelComponent').fileTree('src/main/resources/types').each { f ->
+        it.inputs.file( f )
+    }
+    from(inFiles) {
+        include '**/*'
+    }
+    from (project(':camelComponent').fileTree('src/main/resources')) {
+        include 'types/**/*'
+    }
+    into "${project.name}"
+    archiveName "${project.name}-assembly.zip"
+}
+
+jar.finalizedBy zipAssembly
+
 publishing {
     publications {
         maven(MavenPublication) {
diff --git a/camelConnector/src/main/resources/assembly/camelconnector/projects/com.vantiq.extsrc.camelconn.camelConnector.json b/camelConnector/src/main/resources/assembly/camelconnector/projects/com.vantiq.extsrc.camelconn.camelConnector.json
new file mode 100644
index 00000000..6848e695
--- /dev/null
+++ b/camelConnector/src/main/resources/assembly/camelconnector/projects/com.vantiq.extsrc.camelconn.camelConnector.json
@@ -0,0 +1,52 @@
+{
+    "name": "com.vantiq.extsrc.camelconn.camelConnector",
+    "type": "dev",
+    "ars_relationships": [
+        
+    ],
+    "links": [
+        
+    ],
+    "tools": [
+        
+    ],
+    "views": [
+        
+    ],
+    "partitions": [
+        
+    ],
+    "isAssembly": true,
+    "options": {
+        "description": "Camel Connector Definition",
+        "filterBitArray": "ffffffffffffffffffffffffffffffff",
+        "type": "dev",
+        "v": 5,
+        "isModeloProject": true
+    },
+    "resources": [
+      {
+        "label": "CAMEL",
+        "name" : "CAMEL",
+        "resourceReference": "/sourceimpls/CAMEL",
+        "type" : 69
+      },
+      {
+        "label" : "com.vantiq.extsrc.camelcomp.message",
+        "name" : "com.vantiq.extsrc.camelcomp.message",
+        "resourceReference": "/types/com.vantiq.extsrc.camelcomp.message",
+        "type": 1
+      }
+    ],
+    "visibleResources": [
+      {
+        "resourceReference": "/types/com.vantiq.extsrc.camelcomp.message"
+      }
+    ],
+    "configurationMappings": {
+
+    },
+    "configurationProperties": {
+
+    }
+}
\ No newline at end of file
diff --git a/camelConnector/src/main/resources/assembly/camelconnector/sourceimpls/CAMEL.json b/camelConnector/src/main/resources/assembly/camelconnector/sourceimpls/CAMEL.json
new file mode 100644
index 00000000..513731f1
--- /dev/null
+++ b/camelConnector/src/main/resources/assembly/camelconnector/sourceimpls/CAMEL.json
@@ -0,0 +1,9 @@
+{
+  "name" : "CAMEL",
+  "baseType" : "EXTENSION",
+  "verticle" : "service:extensionSource",
+  "config" : {},
+  "operations" : [ "publish", "query", "notification" ],
+  "baseConfigProperties": [
+  ]
+}


Test patch:
diff --git a/camelConnector/src/test/resources/camelConnectorImpl.json b/camelConnector/src/test/resources/camelConnectorImpl.json
index 0fc0c22a..b4eda790 100644
--- a/camelConnector/src/test/resources/camelConnectorImpl.json
+++ b/camelConnector/src/test/resources/camelConnectorImpl.json
@@ -1,5 +1,5 @@
 {
-  "name" : "CAMEL_CONNECTOR",
+  "name" : "CAMEL",
   "baseType" : "EXTENSION",
   "verticle" : "service:extensionSource",
   "config" : {},