webMethods

webMethods

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
Expand all | Collapse all

How to share comments with the parent process?

  • 1.  How to share comments with the parent process?

    Posted Fri January 13, 2012 06:29 AM

    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,


    #MWS-CAF-Task-Engine
    #webMethods-BPMS
    #webMethods


  • 2.  RE: How to share comments with the parent process?

    Posted Tue January 31, 2012 07:39 AM

    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} .


    #webMethods-BPMS
    #MWS-CAF-Task-Engine
    #webMethods