Writing File Using Agent

Last Updated: 03/28/2018 Introduced in Version: 4.0

This tutorial demonstrates how to Write File to the Client machine using Agent in Decisions.

To learn what the Agent is and how to set it up in Decisions please follow this document: How To Set Up An Agent.

Example:

In this example we are going to demonstrate how to write a File from Decisions Server to the client machine using Agent.

Note: for this example the Agent is already set and configured based on How To Set Up An Agent document.

 

We begin in the Designer Folder with clicking Create Flow on Folder Actions Panel.

Then, we Name the Flow and click Ok to proceed to the Flow Designer.

In the Flow Designer we add Create File step from Integrations > All Integrations > File category.

In this example we are going to use a simple txt file to write to the client machine using Agent.

testfile

For data Input into Create File step we use Constant Mapping Type and drag and drop our file to Value box.

For the file Name Input we also use Constant Mapping Type. In the Value field we provide full path where we want to create file on our Client machine and file Name.

Next, we connect the outcome from our Create File step to the End Step in our Flow.

Finally, in the Flow Settings we change Behavior Type to Agent Flow.

This completes our Flow. We can save the Flow and close Flow Designer.

Back in the Designer Folder we click Create Flow on Folder Actions Panel.

Then, we Name the Flow and click Ok to proceed to the Flow Designer.

In the Flow Designer we add GetAgentList step from Flows, Rules, Forms and Reports > Flows > Wizards > AgentFlowsAndRules category.

Then, on the outcome from GetAgentList we add Run Agent Flow step from Flows, Rules, Forms and Reports > Flows > Advanced category.

Next, we are going to set up Run Agent Flow step. In the Edit Step: Run Agent Flow window we click Pick Or Create Flow on the Edit Step Actions panel.

In the resulting Create or Pick window we pick our Write File Flow that we created previously in this tutorial and click Pick.

Then, we use Select Value Mapping Type for Agent Id Input. Using Path Picker we expand agent Sub Folders outcome from the GetAgentList step. Because we only have one Agent in our System we expand First and pick FolderID data.

Next, we connect the outcome from Run Agent Flow to the End Step in our Flow. This completes our Main Flow. We can save the Flow and close Flow Designer.

Back in the Designer Folder we locate thumbnail for our Main Flow and click Action > Run Flow on the thumbnail’s menu.

Our Flow runs silently with no User Interactions. If we switch to our Client machine we should see our text file created in the location defined in Write File Flow.

Additional Resources