ReportWriter: ActivityDiagram

Hi,
I want to show a static text “NO ACTIVITY ELEMENT”, if in my activity diagram there are not any elementType =“Activity”.
In my template I write:

    <HasChildElementChecker elementType= "Activity" flag ="false">
     <StaticText content = "Detail Activity: " style = "Heading 4"/>
     <ParagraphBreak/>
     <StaticText content = "NO ACTIVITY ELEMENT" style = "Table Contents"/>
    </HasChildElementChecker>
  
     <HasChildElementChecker elementType= "Activity" flag ="true">
     <StaticText content = "Detail Activity: " style = "Heading 4"/>
     <ParagraphBreak/>
     <StaticText content = "YES ACTIVITY ELEMENT" style = "Table Contents"/>
    </HasChildElementChecker>


but this code don’t work…
If there are activity element in my activity diagram , the text “YES ACTIVITY ELEMENT” shows in my document, inf there aren’t activity element in my activity diagram, the text “NO ACTIVITY ELEMENT” don’t show in my document generete whit report writer. Why???

tks

Hi user,

Thanks for your message. The reason of the problem is the unsupported @elementType, so the checker will return true if there is any child element. The attribute name should be “type” instead of “elementType”.

BTW, HasChildElementChecker supports the following xml attributes:
@type : determine which element type will be checked on this checker
@elementTypes : same as @type, but it accepts multiple element type, format: {type1, type2, type3} (use ", " (comma + space) as delimiter)
@flag : has or does not have this element type [true|false]
@filterHidden : filter the model which is hidden in diagram [true|false] (default = false)

Best regards,
Lilian Wong

Thanks Lilian,
It works now!!!

Thanks!

Hi user,

You are welcome.

Best regards,
Lilian Wong