Skip to main content

Copy File (B2WS Client)

The Copy File (B2WS Client) node delivers one or more files generated or processed within a workflow directly to a folder on a connected B2Win Suite Client workstation.

Overview​

Use this node to transfer server-generated reports, archives, converted files, or documents directly to an end-user's local PC or desktop directory. The operation integrates with the B2Win Suite Client notification and approval workflow, alerting the user and awaiting authorization (or automatically executing if auto-approve is enabled).

Purpose​

  • Distribute processed files directly to a user's workstation without network shares or email attachments.
  • Organize delivered files on the client machine using dynamic folders based on workflow properties.
  • Enable user-in-the-loop verification via desktop notifications with Approve and Skip actions.

Configuration​

FieldDescription
B2Win Client*The B2Win Client service configuration used to select the target workstation. You can pick an existing configuration or click New Configuration to configure one.
Archive Client Path*The destination folder on the client workstation (e.g., C:\example_folder\). Supports workflow expressions and variables such as ${EXEC_BY_USERNAME}.

Selecting the Client Service​

Clicking the B2Win Client dropdown displays the available client services and configurations:

  • Click the edit pencil icon to modify the service settings or click New Configuration to add a new client target.

Inputs​

InputData TypeInput TypeDescription
InputFileNodeFileMultipleOne or more input files to copy to the client workstation.

Outputs​

OutputData TypeCollectionDescription
OutputDataObjectFalseJSON object detailing the destination directory, client ID, file count, and individual file copy statuses.

Properties​

PropertyFlowDataTypeDescription
B2WS_CLIENT_COPY_FILE_COPIED_FILES_INFOJsonNodeDetailed JSON object of all copied files with source paths, destination paths, bytes, and sizes.
B2WS_CLIENT_COPY_FILE_DESTINATIONStringEvaluated destination folder on the workstation.
B2WS_CLIENT_COPY_FILE_CLIENT_IDIntegerSystem ID of the target client.
B2WS_CLIENT_COPY_FILE_CLIENT_HOSTNAMEStringTarget client computer hostname.
B2WS_CLIENT_COPY_FILE_CLIENT_DISPLAYStringTarget client display name.
B2WS_CLIENT_COPY_FILE_COMMANDStringDesktop command executed (copy).
CLIENT_ACTION_ACTIVITY_IDStringID of the notification/activity record created in the system.
CLIENT_ACTION_STATUSStringExecution outcome (SUCCESS, FAILED, or SKIPPED).
CLIENT_ACTION_RESULT_MESSAGEStringDiagnostic result message from the client.
CLIENT_ACTION_COMPLETED_ATInstantTimestamp when the client finished processing the copy.

Processing & Approval Lifecycle​

The Copy File node is deeply integrated with the B2Win Suite Client notification and approval lifecycle:

  1. Target Validation: Resolves the online client workstation via B2WinClientService.requireClient().
  2. Notification Dispatch: Bundles the input files and creates an approval activity (ClientArchiving.createCopyRequest).
  3. Engine Pause: The node yields execution with an IN_PROGRESS status and waits for the workstation's response.
  4. Desktop Decision:
    • Approve: The client workstation downloads the files and saves them to the destination path. Upon success, reports SUCCESS and resumes the workflow.
    • Skip: The user rejects the action. The node marks the activity as IGNORED and the workflow continues with skipped status.
    • Auto-Approve: If the user configured their B2Win Suite Client in Auto-Approve mode, the client immediately accepts and executes the copy without prompt.

Examples​

User-Specific Destination Folder​

C:\Users\${EXEC_BY_USERNAME}\Documents\Reports\

Delivers the generated files to the documents folder of the logged-in user on their local PC.

On the User's Computer​

This node needs the B2Win Suite Client to be installed and signed in on the target computer. What the person at that computer sees and controls is described in the client documentation:

  • Approving Actions: Require Approval and Auto Approve modes, and the Approve / Skip buttons.
  • File Access: the folders the client is allowed to use. The destination folder must be on the user's File Access list with Read & Write access, or the user is asked to allow it.
  • Activity: progress, history and stopping a running action.