-
-
Notifications
You must be signed in to change notification settings - Fork 10
deploy_directory
The deploy directory is a directory where files can be deployed to run on Assimbly.
{user.home}/.assimbly/deploy
For example
/Users/jdoe/.assimbly/deploy
Note that the Assimbly base directory is printed in the log after startup:
Currently only XML files can be deployed. Others are ignored. These XML files must contain a flow or route. The following types are allowed:
- Assimbly format
<?xml version="1.0" encoding="UTF-8"?>
<integrations>
<integration>
<id>1</id>
<name>default</name>
<flows>
<flow>
<id>1</id>
<name>TestFlow</name>
<type>connector</type>
<version>2</version>
<created>2022-05-13T07:26:39.435Z</created>
<lastModified>2022-05-13T08:52:58.949Z</lastModified>
<autostart>false</autostart>
<assimblyHeaders>true</assimblyHeaders>
<parallelProcessing>true</parallelProcessing>
<maximumRedeliveries>0</maximumRedeliveries>
<redeliveryDelay>3000</redeliveryDelay>
<logLevel>OFF</logLevel>
<notes/>
<components>
<component>file</component>
</components>
<endpoints>
<endpoint>
<id>1</id>
<type>from</type>
<uri>file://C:\messages\in</uri>
</endpoint>
<endpoint>
<id>2</id>
<type>to</type>
<uri>file://C:\messages\out2</uri>
</endpoint>
<endpoint>
<id>3</id>
<type>error</type>
<uri>file://C:\messages\error</uri>
</endpoint>
</endpoints>
</flow>
</flows>
<services/>
<headers/>
<routes/>
<routeConfigurations/>
<environmentVariables/>
</integration>
</integrations>
Tip: This file can also be exported from the web application from the deployment page (Administration --> Deployment).
- CamelContext
A CamelContext.xml contains the error route (onException) and routes:
<camelContext id="ID_62304af4f74a802780000006" xmlns="http://camel.apache.org/schema/blueprint" useMDCLogging="true" streamCache="true">
<onException>
<exception>java.lang.Exception</exception>
<redeliveryPolicy maximumRedeliveries="0" redeliveryDelay="5000"/>
<setExchangePattern pattern="InOut"/>
</onException>
<route id="00306c20-a438-11ec-a4bf-758ef17085f0">
<from uri="jetty:http://0.0.0.0:9000/test"/>
<removeHeaders pattern="CamelHttp*"/>
<split streaming="false" parallelProcessing="false">
<xpath saxon="true" threadSafety="true">/foods/food</xpath>
<setHeader headerName="CamelSplitIndex">
<simple>${exchangeProperty.CamelSplitIndex}</simple>
</setHeader>
<setHeader headerName="CamelSplitSize">
<simple>${exchangeProperty.CamelSplitSize}</simple>
</setHeader>
<setHeader headerName="CamelSplitComplete">
<simple>${exchangeProperty.CamelSplitComplete.toString().trim()}</simple>
</setHeader>
<convertBodyTo type="java.lang.String"/>
<choice>
<when>
<simple>${body} contains 'sub'</simple>
<toD uri="file://C:/test2?autoCreate=true&charset=utf-8&fileExist=Override&consumer.bridgeErrorHandler=true"/>
</when>
<otherwise>
<toD uri="file://C:/test3?autoCreate=true&charset=utf-8&fileExist=Override&consumer.bridgeErrorHandler=true"/>
</otherwise>
</choice>
</split>
<toD uri="file://C:/test1?autoCreate=true&charset=utf-8&fileExist=Override&consumer.bridgeErrorHandler=true"/>
</route>
</camelContext>
- Route
<routes>
<route>
<from uri="file:C:/messages/in"/>
<to uri="log:result"/>
</route>
</routes>
- Copy or save the XML file to the deploy directory. To undeploy just delete the file.
or
-
Use the REST API:
- Install REST endpoint: /api/integration/{integrationId}/flow/fileinstall/{flowId}
- Uninstall REST endpoint: /api/integration/{integrationId}/flow/fileuninstall/{flowId}
See the Swagger page (Administration --> API) to try these endpoints.
File deployments are synced with the user interface. This means you need to check to log file if a flow is successfully installed or not.
On startup it