Expand my Community achievements bar.

OSGI Workflow attachment list on Assign Task

Avatar

Level 7

 

Hello,

 

I am trying to understand how to pass Attachments from one Assign Task to another. 

On the submission, I can see that I can add a Variable Array of Documents.  That works, all is good.

However, on the subsequent Assign Task, in the pre-populate section, I do not see the ability to assign a Variable Array to the prepopulation.

 

Does this mean that we must write the document Array to the payload?

Actually, that wouldn't work because we can only attach one document to the Prepopulate in Assign Task.

 

If somebody could explain this to me, it would be great.

 

Thanks,  

39 Replies

Avatar

Level 7

It looks like this is getting attachments from an attach button on the actual adaptive form.

 

Maybe you already know this but I am talking about the attachment feature in the inbox task assignment. Do I have to write code to make this useful?

Avatar

Employee

@crich2784 attachment should be the part of payload, then only it can be passed to Assign Task operation, as shown below:

 

Mayank_Tiwari_0-1633680096798.png

 

Avatar

Employee

Yes, in file attachment component's properties, you may enable "Allow multiple files" option.

Avatar

Level 7

You switched from Assign Task operation to Adaptive form component.  I am asking if I can attach more than one documents to a workflow in one step and then, see them in a se seque y step - not using the attach file component in an adaptive form.

Avatar

Employee

as per my previous response, you can't assign a document array variable as the attachment in assign task operation, as it accepts the attachments from the payload only. So, you better use a file attachment component in the form to achieve this use case.

 

Mayank_Tiwari_0-1633697578895.png

 

Avatar

Level 7

I understand that I can assign an Array on the Submission. Got it.

 

How do I assign multiple attachments from the relative to payload? 

Avatar

Employee

@crich2784 

this is my workflow:

Mayank_Tiwari_0-1633701065081.png

 

I am attaching 2 files in my AF, and I am submitting and invoking WF above.

 

Assigntask 1 props:

Mayank_Tiwari_1-1633701304327.pngMayank_Tiwari_2-1633701334335.png

 

Assigntask 2 props:

 

Mayank_Tiwari_3-1633701391984.pngMayank_Tiwari_4-1633701417830.png

 

After completing both the assign tasks, I am able to pass and submit both the attachments and store them at the payload path, as shown below:

 

Mayank_Tiwari_5-1633701537111.png

 

 

 

Avatar

Level 7

It's not working like LiveCycle workflow attachments.  Can attachments to a workflow be copied from one task to another task?

Avatar

Level 7

@Mayank_Tiwari 

 

Unfortunately, we executed a simplified version of your example

AssignTask1

Prepopulate - blank.

Submission - Relative to Payload, attachments

 

AssignTask2

Prepopulate - Relative to Payload, attachments

 

We received AssignTask1 and attached two documents (from the left side of the workflow task, not with a fileUpload button in the form) then, clicked Submit.

 

CRX payload directory did NOT create a directory called attachments, nor a fileUpload directory as you show in your screenshot.  

 

Please let me know what I'm doing wrong.  Again, we are NOT using file upload buttons in the Adaptive form.  We are merely trying to use the native attach in a workflow task.

Avatar

Employee

Can you please share the screenshots of the AssignTasks props as I have shared above?

Why your AssignTask1 prepopulate for attachment is blank? That's not in my case.

 

AssignTask1

Prepopulate - blank.

Avatar

Level 7

It is blank because it is the first task.  Nobody in front.  They will be the first people to attach files.

crich2784_1-1633803477239.png

AttachTask properties below

crich2784_2-1633803554839.png

 

 

AttachTask2

crich2784_3-1633803592140.png

 

 

crich2784_4-1633803677591.png

 

 

Avatar

Employee

Are you invoking this workflow on AF submission?

If yes, then you need to attach the files in the AF itself before invoking the workflow.

Avatar

Level 7

We are testing by invoking manually and pointing to a sample payload directory.

 

We will try to invoke using an AF however, we have workflows that are invoked by Java and assign tasks.  We need attachments to work there too.

 

What is the requirement? attachmenta directory needs to exist beforehand?

Avatar

Employee

Did you configure your Assign Task as shown below?

gbedekar_1-1633826839289.png

 

 

Avatar

Level 7

Ok. Ok.  So, I don't even need to configure prepopulate or submitted.  I just need to go to Advanced and configure as shown?  I'll test it out.