Add Attachment Plug-in
The Add Attachment plug-in enables you to attach a document automatically to the attachment control at a given point in a workflow.
The document that is attached can reside:
- in a folder on server
- on a form in another process
- in a File Library
Properties
Name | Description | Mandatory |
---|---|---|
file |
Describes the location of a file which is attached. It must be the full file path from the server's file system. Example:
Direct value: D:\Files\Public\Users\Daily-Records.xlsx Value from form field: [/my:myFields/my:field2] Value from solution field: [field1] |
No |
controlbinding | The attachment control binding to which the attachment is added. | Yes |
sourcebinding |
Defines the Attachment Control binding of the process defined in the sourceprocessid parameter. Example: Direct Value: Attachment_1, where 'Attachment_1' is the name of the binding Value from form field: [/my:myFields/my:field2] Value from solution field: [field1] |
No |
sourceprocessid |
The process id with which the 'extracted attachment' attaches to the attachment control. The specified process Specify the sourcebinding to define the attachment control binding. Example: Direct value: 5CE7CE49-6A9E-4300-B20D-0DCA2DCA1ABB Value from form field: [/my:myFields/my:field2] Value from solution field: [field1] |
No |
folder | The folder name for the File Library which contains the file that is attached. | No |
filename |
The file name which is selected from the folder. Example: Direct Value: Daily-Records.xlsx Value from form field: [/my:myFields/my:field2] Value from solution field: [field1] |
No |
Example
This is for scenarios where a customer wants to add an attachment to a parent process. The parent form should be designed in such a way as to send the process ID (for example, using [$Process.Id]) to the child process so that it can be used in a child form plug-in. This can be done in other ways, including setting it up to a form field and then sending it to a child form, saving this to "Solution Data" after which the child form can query, etc.
Also for non-parent-and-child scenarios, the form is similarly designed and the process ID is set to either externally like Solution Data, Customer own database table, etc., and other form should be designed to query so that the process copies the attachments.
Add the following to the documentation for the Add Attachment Plug-in - sourceProcessID parameter
- To extract the current running process id -- [$Process.Id]
- Query [WFPROCESS] Table on basis of Process definition name and extract ProcessID of all corresponding running processes. (data connection with query/lookup control )
You can use the Add Attachment plug-in to attach a resume to a form when, for example, you are on-boarding a new employee. This plug-in is also commonly used to attach PDF files or other supporting documents to a form (such as when you route an invoice through a series of approvals).
Preference of file upload
- File parameter
- Both sourcebinding and sourceprocessid parameters
- Folder and filename
Attachment Types
By default, Winshuttle supports attachment of the following document types:
- TIFF
- JPEG
- PNG
- DOC(X)
- XLS(X)
- TXT
Add Other Document Types
You can customize which document types you can attach.
- On the SAP Integration Server, open the ShuttleRule.xml file (in C:\Program Files\Winshuttle\Server\Worker or in C:\Program Files\Winshuttle\Server\WorkerLaunchGui).
- Enter the MIME type for the document type that you want to add.
For example, to add .mht files, enter the following:
<TypeEntry MimeType="message/rfc822">
<Extension>MHT</Extension>
<Extension>MHTML</Extension>
</TypeEntry>
Attachment Size for AutoRun
The default maximum size for attachments during AutoRun is 30 MB.
You can change this setting in the ShuttleRule file of Worker and Launch GUI worker on SAP Integration Server.
- On the SAP Integration Server, open the ShuttleRule.xml file (in C:\Program Files\Winshuttle\Server\Worker or in C:\Program Files\Winshuttle\Server\WorkerLaunchGui).
- Change the DOCUMENTUPLOADSIZE value. For example,
<DOCUMENTUPLOADSIZE SizeUnit="MB" Size="40"></DOCUMENTUPLOADSIZE>
This has been tested with a 50 MB attachment and a DOCUMENTUPLOADSIZE setting of 53 MB.