How to share comments with the parent process?

Hi,

I have a main process which has no tasks but several Call Activities.

Within the tasks of each Call Activity I can share the comments by having its scope set to “Process Instance”.

But the comments are not shared between tasks of different Call Activities (of the same main process instance).
I suppose this happens because each Call Activity is a different process instance.
But all the tasks belong to the same Task Project as the Call Activities all belong to the same Process Project.

Do I have to create a task on the main process so I have a top-level comments container?

Do I have to customize all the comments (or overview) views of the remaining tasks to set this upper-level container?
Or is there a project task portlet global preference I can set?
Does it have to do with the taskCommentsList Managed Bean from the portlet project configuration (faces-config.xml)?

Open to any suggestions.

Best regards,

Create a holding variable that you are sure to be available on all tasks.
In this case I created ProcessCommentContainerID in the tasks’ BusinessData (which is passed from task to task but could be another system too).

I had already set the Task Comments Scope to Process Instance.

On the first task called (either on the top level process or the first subprocess), in this case ,
I added on the initialize() of the Overview.java (but after the resolveDataBinding call!):

if (StringTools.isEmpty(this
                    .<yourTaskName>()
                    .getTaskData()
                    .getProcessInstance()
                    .getProcessCommentContainerID())) {
                                    this.<yourTaskName>()
                                            .getTaskData()
                                            .getProcessInstance()
                                            .setProcessCommentContainerID(
                                                  this.<yourTaskName>()
                                                       .getTaskInfo()
                                                       .getTaskID());
                this.<yourTaskName>().applyChangesNoAccept();
            }

Taking advantage the fact the comments portlet is, by default, accessed by the Overview portlet, it is just a question of configuring those portlets on all the tasks, including this one:

on Overview.view in the of taskCommentsViewInclude Portlet Include
set commentsContainerID Control Parameter to #{OverviewDefaultviewView..taskData.processInstance.processCommentContainerID} .