How to download a file data of a specific request or action from a WorkflowGen URL

Utility

Here are 3 sample queries with different scenarios that will retrieve the form_archive of a specific request and optionally a specific activity instance:

  1. Downloads the latest form archive of request #5224
    http://localhost/wfgen/show.aspx?QUERY=DOWNLOAD&DATA_NAME=FORM_ARCHIVE&ID_PROCESS_INST=5224

  2. Downloads the form archive of the first action of request #5224
    http://localhost/wfgen/show.aspx?QUERY=DOWNLOAD&DATA_NAME=FORM_ARCHIVE&ID_PROCESS_INST=5224&ID_ACTIVITY_INST=1

  3. Downloads the form archive of the second action of request #5224
    http://localhost/wfgen/show.aspx?QUERY=DOWNLOAD&DATA_NAME=FORM_ARCHIVE&ID_PROCESS_INST=5224&ID_ACTIVITY_INST=2

NOTE:
For option 2 and 3, “Archive action associated data” must be enabled in order to archive each activity instance.

The value parameter of DATA_NAME can be changed in order to retrieve another file data (Eg. value FORM_DATA will return the form_data file)

Security

WorkflowGen will check the security if the user have access to the form archive of the specific request using this URL

I have “Archive action associated data” disabled and I can still get the form archive of previous actions. Why is that? My process’s state is “In test”… Is that why?

Hi @ParadimeWeb,

It’s only when the request is completed (closed or cancelled) that the system archives action associated data. Is that also the case with you?

Regards,
Eddy.

Thanks @eddy.daouk,

That is exactly the case for me too. Only when a request is completed will the system archive the action associated data. That’s good to know.

1 Like

I am getting unauthorized when I try to use these URLs with a delegated user. WorkflowGen does not check if the user is a delegated user?

It should do the check without me having to add the parameter, ID_USER_DELEGATOR, to the URL.

In some scenarios, I don’t have the ID of the DELEGATOR. Why can’t WorkflowGen check for this automatically?

Thanks,
Gabriel