getTaskFileAttachments Step

Use this step to get the task file attachment's file path

Last published at: June 14th, 2024

Description:

This step gets the file path of the attachments added to the task.

 

Inputs

  • taskStepID – Select Task Step
  • resultFormat – Result Type
  • taskFileAttachments – Variable / Global to hold the task file attachments path in XML / JSON 
 

 

Returns

  • true  – true condition
  • false – false condition
 

 

Usage:

 

 

Example:

Let’s build and execute the getTaskFileAttachments example.

  • Create a new definition called “getTaskFileAttachmentsDef”
  • Select the definition and click the “design” button
  • Drag the above steps to the canvas
  • Connect the dots between the start and other steps as above
  • Define a variable/global to store the attachment file path information

 

  • Click the “Task” step to configure its “Advanced” properties. Then, route the task to yourself or a user. Here, the system variable.initiatorID routes the task to the user initiating the process instance. 

 

  • Click the “getTaskFileAttachments” step to configure its “Settings” properties. Select the Task step from the drop-down list. Select the result type, either XML or JSON, from the list. Provide the variable/global reference to store the file attachment path information. 

 

  • The “Logging” setting configuration is necessary for documentation and also measures the workflow progress and the percent complete. This is achieved by configuring the step state and percent fields individually, as shown in the images below. Configure the “Logging” using the following properties.

 

  • Save the process definition, create a new process instance, and execute. The task is assigned to the user as configured. You'll have to navigate to the Engage - Task page to view the task or use the task notification. Click on the task row to open the task. 

 

  • You may use the Attach File feature to add attachments from the local folder to the task. Provide the task comments and click the Complete Task button to confirm. 

 

  • The task is completed, and the process moves to the getTaskFileAttachments step in the workflow. The file attachments path is fetched and initialized in the variable/global reference provided. The process is completed. 
  • Render the process instance. Click on the getTaskFileAttachments step to view its properties. The step gets the file path of the attachments added to the task.