Hi,
I found a way to get the attachments common to all task in a process (and even to access the attachments from outside a task).
I did not consider the “comments” part, only the files.
This is a turn around since I did not manage to set properly the tasks with the properties supplied by webMethods.
Here is the steps I followed :
- Open Overview in eclipse
- Delete the import of “/portlet/wm_comments_editor___commentseditor”
- Drag and drop the item “Data/Attachments/Portal Container Attachments Provider” instead of the deleted portlet
- Open the source (java) and type the following code in the initialize method (it sets the containerID to the first taskID) :
<taskname> = this.get<taskname>();
String taskID = <taskname>.getTaskID();
portalContainerAttachmentsProvider = this.getPortalContainerAttachmentsProvider();
portalContainerAttachmentsProvider.setContainerID(taskID);
- Open the source of the View (taskDetails) and type the following code in the completeTask method (it sets the variable attachmentID with the taskID) :
get<taskname>().getTaskData().setAttachmentID(get<taskname>().getTaskID());
- And then for all other instances you have to :
Delete the comments portlet
Add a Portal Container Attachments provider
set the “containerID” with the “attachmentID” from the first task.
You can do those steps in any portlet you want to access the files (did not test in a web application).
PS : The code isn’t optimized but it’s a beginning.
It is important to set the containerID with a taskID (random value won’t work).
Regards,
Mathieu
#MWS-CAF-Task-Engine#webMethods-BPMS#webMethods