How to use WorkflowGen Web Services API to send a file

Hi everybody.

I’m trying to create a new request that contains a file as an attachment of the context as below :

<NewDataSet>
	<parameter>
		<name>Request_txtRequesterUsername</name>
		<dataType>TEXT</dataType>
		<direction>INOUT</direction>
		<textValue>userName</textValue>
	</parameter>
	<parameter>
		<name>Request_lblValidation</name>
		<dataType>TEXT</dataType>
		<direction>INOUT</direction>
	</parameter>
	<parameter>
		<name>Request_dtVacationStartDate</name>
		<dataType>DATETIME</dataType>
		<direction>INOUT</direction>
		<dateTimeValue>2019-02-05T00:00:00</dateTimeValue>
	</parameter>
	<parameter>
		<name>Request_dtVacationEndDate</name>
		<dataType>DATETIME</dataType>
		<direction>INOUT</direction>
		<dateTimeValue>2019-02-05T00:00:00</dateTimeValue>
	</parameter>
	<parameter>
		<name>Request_fileAttachment</name>
		<dataType>FILE</dataType>
		<direction>OUT</direction>
		<fileName>SCAN.PDF</fileName>
		<fileDescription>My report</fileDescription>
		<fileSize>778</fileSize>
		<fileContentType>application/pdf</fileContentType>
		<fileDateLastModified>2019-01-31T16:11:51-05:00</fileDateLastModified>
		<fileOriginalPath>C:\Users\userName\Documents\SCAN.PDF</fileOriginalPath>
		<filePath>C:\Users\userName\Documents\SCAN.PDF</filePath>
	</parameter>
	<parameter>
		<name>Request_txtVacationPeriod</name>
		<dataType>NUMERIC</dataType>
		<direction>INOUT</direction>
		<numericValue>1</numericValue>
	</parameter>
</NewDataSet>

the request done successfully but when trying to browse the attached file through the web app , it returns file not found.
kindly may you help me in this case.

BR.

Hi Ahmed,

The file needs to be accessible by WorkflowGen. Your file SCAN.PDF needs to be present on application server or in network folder accessible by WorkflowGen server.

We strongly recommend to use GraphQL or Incoming WebHooks to send file.

Regards,
Quentin

Hi qpomarel.

Thanks for your rapid response .
we currently use version 6.1.4 . Is it supportable for GraphQL.?

BR.

Hi.

<parameter>
		<name>Request_fileAttachment</name>
		<dataType>FILE</dataType>
		<direction>OUT</direction>
		<fileName>SCAN.PDF</fileName>
		<fileDescription>My File</fileDescription>
		<fileSize>778</fileSize>
		<fileContentType>application/pdf</fileContentType>
		<fileDateLastModified>2019-01-31T16:11:51-05:00</fileDateLastModified>
		<fileOriginalPath>file://fileserver/Public/SCAN.PDF</fileOriginalPath>
		<filePath>file://fileserver/Public/SCAN.PDF</filePath>
	</parameter>

I put the file on share folder accessible by workflowgen server and facing the same error.

kindly any advice.

BR.

Hi Ahmed,

GraphQL has been added in WorkflowGen version 7+.

For your example, the right structure of the file path is : \\YOUR_SERVER\Public\SCAN.PDF.

The file:// is only used to access the file by url, this will not work with SOAP Web Services.

Regards,
Quentin