Skip to content

tutorial v3 alternative ways running flows

Raymond Meester edited this page Mar 17, 2023 · 2 revisions

Alternative ways to run a flow

In all the other tutorials we were creating and running flows through the web interface. There are several other ways to run flows for example:

  1. Using the REST API.
  2. Using the Deploy Directory.

Let's try both.

Step 1: Export a flow

To run a flow outside the web interface we need the flow as an XML file. It's possible to create a new flow as XML with a text editor. It's easier however to export an existing flow.

  • On the Flows page export a flow that you previously created (for example "TestFlow").

ExportFlow

Note: All flows (the Gateway) or single Flows can also be exported and imported at the Administration --> Deployment page.

Step 2: Configure the flow using the API

  • Go to Administration --> API

This opens the API documentation (Swagger page).

  • Open the endpoint "/api/integration/{integrationId}/setflowconfiguration/{flowId}" on flow-configurer-resource.
  • Click on "Try it out".
  • In the body add the exported flow (XML).
  • Make sure you fill in the right "integrationid" and "flowid" (The ID's are in the XML of the exported flow).
  • Execute.

ConfigureFlow

Step 3: Run the route

  • Open the endpoint "/api/integration/{integrationId}/flow/start/{flowId}" on the flow-manager-resource.
  • Click on "Try it out".
  • Make sure you fill in the right "integrationsid" and "flowid" again.
  • Execute.

Result is a running flow. You can go to the Flows page to check if the flow is running. You can also try other endpoints like "pause" or "uptime". You can read more on the wiki on how to call Assimbly from an external REST client.

Step 4: Run the route from the deploy directory

  • Now stop the flow (through the GUI or API).
  • Open a file explorer and go to the following directory:

/{userhome}/.assimbly/deploy (for example /Users/Jane/.assimbly/deploy)

  • Past the exported flow into this directory.

Result is a running flow. You can check the log file in your terminal or from the GUI (Administration --> Log viewer).

Note: Unlike the API, the Deploy directory is not attached to the User interface.

Step 5: Change the flow

  • Open the XML (flow) in the Deploy directory in a text editor.
  • Change something in the XML and save it.

The flow gets automatically redeployed on change.

Step 6: Stop the flow

  • Stop the flow by deleting the file.

Now you completed all tutorials. On the wiki there is more documentation. In case of question or problems just create an issue.

Clone this wiki locally