How do I start Workflow from an API with attachments?

Hi,

Using YouTube video Infor OS - Starting a workflow from an API I was able to start a workflow from ION API (also on Postman).

However, we need the ability to have an attachment already in the Workflow (for instance, to have the Purchase Order documents already available for the Approval Chain process).

Workflow attachments are also available for mobile users using InforGo, which is a major advantage over DrillBacks.

 

I've also tried the API /IONAttachment/{ionAttachmentType}/{taskItemId}/upload , I figured that ionAttachmentType should be set to 3 (task), but I get the error :

<IONAttachmentResponse xmlns:i="www.w3.org/.../XMLSchema-instance">
  <ErrorList>
    <FaultError>
      <Code>412</Code>
      <Message>File name is missing</Message>
      <Severity>1</Severity>
    </FaultError>
  </ErrorList>
  <Status>2</Status>
  <AttachmentList i:nil="true" />
</IONAttachmentResponse>

 What am I missing here? Is there another way to POST an attachment?

(IOS 12.0.37 OP)

Thanks,

Jonathan

  • I think I know how to do it and it's not possible to test it in Infor ION API swagger page.

     

    To be able to upload an attachment to a WorkFlow Task externally we can use Postman.

    In Headers Content-Type should be application/octet-stream (although it worked also with other types), and need to add parameter called filename with the file name.

    In Body use Binary and upload the file.

     

    The result can be seen in the Task:

     

    Jonathan