bpm-comments

The <bpm-comments> business component renders a user interface that can be used to add comments to a work item, process instance, or case, or to display comments that had been previously added to those entities.

A data model is passed to the component that contains a work item ID, process instance ID, or case reference, to identify the type of entity for which comments are being displayed or added. Depending on whether the data model contains a work item ID, process instance ID, or case reference, the appropriate operation is called in the BPMCommentService.

Unlike most of the other business components provided in the framework, this component does not have a template, and it is not demonstrated in the Component Showcase Application. Instead, an example of displaying and adding case comments is illustrated in the Case Management application that is provided in Application Development.

Usage

The <bpm-comments> business component can be invoked in your HTML file using the following form:

<bpm-comments 
    position="string"
    avatarSrc="string"
    comment-model="object">
</bpm-comments>

Attributes

Name Type Description
position String The position of the user icon (avatar); see avatarSrc below.

The valid values are "left" and "right". Default = "left"

avatarSrc String A graphical representation of the user.

This is a relative path to the image file. Images must be of type SVG.

comment-model Object Identifies the data model that identifies the work item, process instance, or case for which comments are added or displayed.

Example

The following is from the example Case Management application:

<div ng-show="showData=='Case Comments'" layout="column" flex>
      <div class="md-whiteframe-z1 panel" flex layout="column">
      <md-toolbar class="md-theme-light panel-heading md-toolbar-tools">
      <h3>Comments</h3>
      </md-toolbar>
      <div class="comment-parent" layout="column" flex>
      <bpm-comments position="left" avatarSrc="Images/userprofile.svg" comment-model="commentModel"></bpm-comments>
</div>

The <bpm-comments> business component is used in the Case Management application when you click Case Comments on the Case Menu for a case.