Adding attachments to processes


In BMC Helix Innovation Studio, you can add an attachment or a list of attachments as an input parameter to a process. You can publish the process as an interface, which allows a user to include attachments to those interfaces.

For example, users can use the attachment field on BMC Helix Digital Workplace Catalog to attach additional details while creating case requests.

This capability provides you with the following benefits:

  • Add attachments to processes quickly and easily.
  • Share files conveniently.
  • Enhance collaboration between users.

To add an attachment parameter or attachment list to a process

You can attach only one file to an attachment parameter; however, you can attach multiple attachment parameters to a process. You can attach any of the file formats that the administrator configures for your environment. However, if the administrator restricts specific file formats from being uploaded and viewed, you cannot attach those restricted file types to processes.

For example, you add a Record association attachment of input type to a process. When you run the process that contains an attachment parameter, you are prompted to choose the file to attach to the process, as shown in the following image:

22_1_Run_process_with_attachment.PNG

  1. Log in to BMC Helix Innovation Studio and navigate to the Workspace tab.
  2. Select the application in which you want to create a process or modify an existing process.
  3. Perform any of the following tasks:
    • If you want to create a new process and add an attachment parameter to the process, select New >  Processes tab. 
    • If you want to add an attachment parameter to an existing process, select the process.
  4. In the Properties section of a new or existing process, click Add/Remove Variables.
  5. In the Add/Remove Variables window, click Add Variable and complete the fields as described in the following table:

    Field name

    Action

    Name

    Specify a suitable name for the variable.
    For example, AttachmentVariable1.

    Variable ID

    Specify a unique ID for the variable.
    This value must be numeric.

    Variable Type

    Specify whether the variable is an input parameter, output parameter, or a local variable.

    For more information, see Process-variables-and-data-types.

    Description

    Provide a description that clearly indicates the purpose of this variable.

    Data Type

    From the list displayed, select the Attachment data type.

    (Optional) List

    If you want to add a list of attachments to the process, select the List 22_1_List_toggle_key.png toggle key

    The following image shows the Add/Remove Variables window:

    22_1_Add or Remove Variable window for attachment list.png

  6. (Optional) To configure the Create List element to create a list of attachments, see Creating-lists-from-processes.
  7. Click Save

Tasks that you can perform after adding the Attachment parameter

The following table provides information about the actions that you can perform after you add an attachment to a process:

Click to view the tasks and their description

Task

Description

Start a process instance that includes an attachment

When you start the process instance that includes an Attachment parameter, select the file that you want to attach to the process. You can attach files, such as PDFs, text documents, images, and so on to individual processes.

Get process instance attachment

This task retrieves the attachment associated with the process instance. You can download the attached file, update it with the required information, and upload the updated file to the process.

The following image shows an example of a retrieved attachment:

StartProcessUI2.jpg

Pass an attachment to another process by using the Call Activity element

To pass an attachment from one process to the other, a parent process can pass an attachment as an input to the child process.

If any child process has output as an attachment, the attachment can be stored into a process variable of the parent process, or it can be passed to any other activity as an input.

Use the getAttachment action to get the attachment from record instance

Use Get Record or Get Records by Query Service Tasks for attachments

Get Record Service Task retrieves the field value of the record definition; however, the Service Task cannot retrieve the attachments of a record definition. To retrieve the attachments associated with a specific record definition, BMC Helix Innovation Studio provides a new Get Attachment Service Task. 

To retrieve attachments of a specific record definition, use the following Service Tasks in your process:

  1. Get RecordRetrieves the details of the record.
  2. Get AttachmentRetrieves the attachment associated with the record.
Warning

Important

  • Do not use the part of Get Attachment Record instance. You must use the whole object.
  • You cannot use the Get Attachment Service Task in a rule; the Service Task can only be used in a process.

For more information, see Creating-or-modifying-record-instances-using-Record-Service-Tasks.

Delete a process that includes an attachment

BMC Helix Innovation Studio stores the actual attachments associated with the process to a separate backend record definition. When the process is deleted, the attachments also get deleted.

Store activity result with attachment

Assign activity result to process variable

Use the activity result that has attachments. If any activity has output as an attachment, the attachment can be stored into a process variable, or it can be passed to any other activity as an input.

For example, the get attachment result is stored as an activity result and can be used in the process as an input to another task or stored to a process variable.

Create or update Record service actions

Create Record and Update Record service actions support the attachment type input when used in the process. A process can use the attachment type variable to pass as an input to create a record and update a record by using the service actions.

The output of the actions cannot be used for the attachment type field. If you want to access a particular attachment that is associated with the record action, you can use the Get Attachment Service Type in addition to the create record or update record actions.

Pass attachment to signal process command

Signal process command supports the attachment type variable as an input.

Tasks that you cannot perform after adding the Attachment parameter

You cannot perform the following tasks with processes that have attachment parameters from rules:

Click to view the tasks
  • Pass an attachment to any service action; for example, create record, update record.
  • Use an attachment as an output in rule from an action or a process.
  • Use the output of the Create Record, Update Record, and Get Record service actions for the attachment type field.
  • Pass an attachment variable to the process instance when the trigger type is 'After delete'.

You cannot perform the following tasks with processes that have attachment parameters: 

Click to view the tasks
  • Pass an attachment to a user task.
  • Use the output of the user task for an attachment.
  • Pass an attachment to a custom action.  
  • Use the output of the Create Record, Update Record, Get Record, and Get Record by Query service actions for the attachment type field.


 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*

BMC Helix Innovation Suite 25.1