Querying Model Elements

If you want to retrieve a model element or elements, and to output content like the element's name, description, or a list of member elements (e.g. attributes of class, columns of entity), etc., read this section to learn the ways to retrieve model elements.

Querying Model Elements in Project

If you want to output any detail of all the model elements in project, write an ${ELEMENT} field in your Word document with LoopInProject specified as element source. Here are several examples of such an ${ELEMENT} field:

${ELEMENT, "Name of ALL Use Cases", "UseCase", LoopInProject, PROPERTY=name}

${ELEMENT, "Description of ALL model elements", , LoopInProject, PROPERTY=description}

${ELEMENT, "Details of ALL Use Cases and Business Processes", "UseCase,BPTask,BPSubProcess", LoopInProject, MyTemplate}

In the first example, the name of all use cases in the project will be output. Note that "Name of ALL Use Cases" is the field name, which is a required and unique value for identifying this field.

In the second example, the description of all the model elements in the project will be output.

In the third example, content will be output for each of the use cases, BPMN tasks and sub-processes in the project, based on the template MyTemplate.

Querying Selected Model Elements in Project

The model elements in your project may be created for different contexts or purposes. When you write a documentation, you may want to focus on some of them at a time. In that case, you will want to query a selected set of model elements in your project, instead of querying all elements.

If you want to output any detail of selected model elements in project, write an ${ELEMENT} field in your Word document with Any specified as element source. Here are several examples of such an ${ELEMENT} field:

${ELEMENT, "Use Cases", "UseCase", Any, PROPERTY=name}

${ELEMENT, "Elements' Detail", , Any, MyTemplate}

In the first example, the name of selected use cases will be output. Note that "Use Cases" is the field name, which is a required and unique value for identifying this field.

In the second example, content will be output for each of the selected model elements, based on the template MyTemplate.

When you pick-up a Doc Base with such an ${ELEMENT} field in it, you can select the model elements to query in Doc. Composer.

Querying Specific Model Element in Project

If you need to write a document for a specific model element, like a use case report, you may need to insert the details of a specific use case into your document. In that case, you will want to query a specific model element in your project, instead of querying all model elements.

If you want to output any detail of a specific model element in project, write an ${ELEMENT} field in your Word document with One specified as element source. Here are several examples of such an ${ELEMENT} field:

${ELEMENT, "Desc of Use Case", "UseCase", One, PROPERTY=description}

${ELEMENT, "List of Class Members", "Class", One, Children}

In the first example, the description of selected use case will be output. Note that "Desc of Use Case" is the field name, which is a required and unique value for identifying this field.

In the second example, content will be output for the selected class, based on the template Children.

When you pick-up a Doc Base with such a ${DIAGRAM} field in it, you can select the model element to query in Doc. Composer.

Querying Model Elements from Specific Model Element

If you need to write a document for a specific model element by detailing its children elements, like a business responsibility report that details the tasks contained by specific pool, or a use case report that details the use cases contained by a system, you will want to query the children elements of a selected model element.

If you want to output any detail of model elements from a specific model element, write an ${ELEMENT} field in your Word document with LoopInElement specified as element source. Here are several examples of such an ${ELEMENT} field:

${ELEMENT, "List of System Use Cases", "UseCase", LoopInElement, PROPERTY=name}

${ELEMENT, "List of Elements (Any type)", , LoopInElement, PROPERTY=name}

In the first example, the name of the children use cases of selected element will be output. Note that "List of System Use Cases" is the field name, which is a required and unique value for identifying this field.

In the second example, the name of all children elements of selected element will be output.

When you pick-up a Doc Base with such an ${ELEMENT} field in it, you can select the model element to query in Doc. Composer.

Related Resources

The following resources may help you to learn more about the topic discussed in this page.

 
9. Querying Diagrams Table of Contents 11. Querying Diagram Elements

We use cookies to offer you a better experience. By visiting our website, you agree to the use of cookies as described in our Cookie Policy.OK