Expand my Community achievements bar.

Task attachments in Task Manager endpoint

Avatar

Level 3

Hello everybody,

I'm having a problem with an advanced workflow application and I guess I'm stuck

What I want to achieve is to have a set of initial task attachments that get automatically attached to an initial task. This means that I want to have one or two documents attached to the endpoint task without user interaction - when a user invokes the workflow they should already be there by default.

I have tried to do this using the TaskManager's API functions (like copyAttachmentsToTask etc.) in a component that is called in the endpoints prepare data process. The function is triggered, does not throw any error but seemingly does not do anything - there's no attachment (the attachments tab IS enabled, by the way). I also tried to do the same using an TaskCreated event handler, without any positive effect.

Does anyone have any idea how to do this? Is it possible at all?

Thanks a million,

Steffen.

3 Replies

Avatar

Former Community Member

There is no UI to allow for attachments when you activate the startpoint. At that point in time you have not really started the process yet (until you hit the submit button) so I am not sure you will  be able to accomplish this. As an alternative you coudl modify the renderer and put the attachments in the PDF.

Paul

Avatar

Level 10

Why don't you attach documents immediatelly after the workflow is initiated? (i.e programattically within your process)

This can be done at the start activity of your workflow.

Do you want the initiator to see the documents attached?

Nith

Avatar

Level 3

Yes Nith, you are correct - we want the initiator to see the attachments, and because of that, this would probably need to be done either in the prepare data or the render process. Since it's a Flex based form, PDF attachments are not an alternative, either.

If I try to invoke a component based function which adds the attachments inside the prepare data process I'm not getting any error. Still, they are not visible in the workspace. However, if the initiator manually adds an attachment himself, the other attachments become visible as well. Maybe the workspace app is missing a "refresh" or something?