|
Key
This line was removed.
This word was removed. This word was added.
This line was added.
|
Changes (4)
View Page History|| Attribute || Description || Default ||Required ? ||
| refid | Reference name of the internal object associated to MONIT traces loaded. | - | Yes |
| refid | Reference name of the internal object associated to MONIT traces loaded. | - | Yes |
| row | Index of the wanted flow step in all flow steps matching criterias | - | Yes, if criteria return more than one flow step. Exclusif with '{{selectRandomly}}'. |
| selectRandomly | If the given criteria match several flow step, one flow step will be selected randomly if this flag is set to '{{true}}'. | false | Yes, if criteria return more than one flow step. Exclusif with '{{row}}'. |
h3. Nested elements
* and, if needed, information can be extracted using '{{flowStepInfo}}'.
Available assertions on a flow step are relative to its attributes:
* '{{attributeEquals}}': the actual value of the property identifier by '{{name}}' must be equals to the value given by '{{value}}',
* '{{attributeEquals}}': the actual value of the property identifier by '{{name}}' must be equals to the value given by '{{value}}',
</petals-assert-flow-instance>
{code}
{code}
h2. Task {{petals-monit-build-flow-trees}}
This task builds flow trees from flow instances read through the Ant task '{{petals-monit-read-logfiles}}'. Flow trees are stored in an internal object through a reference.
|| Attribute || Description || Default ||Required ? ||
| refid | Reference name of the internal object associated to MONIT traces previously loaded. | - | Yes |
| id | Reference name of the internal object associated to flow trees built. | - | Yes |
| failOnError | If {{false}}, the Ant task will never fail even if an error occurs building flow trees | true | No |
h3. Example
{code}
<petals-monit-read-logfiles id="flows" dir="${petals.home}/logs/flow-monitoring" />
<petals-monit-build-flow-trees refid="flows" id="flow-trees">
{code}
h2. Task {{petals-assert-flow-trees}}
This task applies the given assertions to the given flow trees previously built with the task '{{petals-monit-build-flow-trees}}'.
|| Attribute || Description || Default ||Required ? ||
| refid | Reference name of the internal object associated to flow trees previously built. | - | Yes |
| assert-size | Assertion against the nulber of flow trees built (ie. a check about the number a flow tree build against the value of this parameter). | - | No |
h3. Example
{code}
<petals-monit-read-logfiles id="flows" dir="${petals.home}/logs/flow-monitoring" />
<petals-monit-build-flow-trees refid="flows" id="flow-trees">
<petals-assert-flow-trees refid="flow-trees" assert-size="${expected-flow-tree-number}" />
{code}
h2. Task {{petals-assert-flow-tree}}
This task applies the given assertions as nested elements to the given flow tree previously built from MONIT traces through the Ant task '{{petals-monit-build-flow-trees}}'.
|| Attribute || Description || Default ||Required ? ||
| refid | Reference name of the internal object associated to flow trees previously built. | - | Yes |
| flowInstanceId | The identifier of the flow instance to use as root of the flow tree on which the given assertions must be validated | - | Yes |
h3. Nested elements
h4. Assertions to apply on a flow tree node of the selected flow tree: {{assertFlowTreeNode}}
For the flow tree node identified by its path '{{path}}'' from the flow tree root, the assertions given as nested elements will be executed. {{path}} is an expression matching the pattern {{x.y.t...z}}, as following:
* {{x}}, {{y}}, {{t}} and {{z}} are positive integer numbers starting at {{0}} and separated by '{{.}}',
* an empty value (ie. {{""}}): select the root node of the selected flow tree,
* {{"0"}}: select the 1st child of the root node of the selected flow tree,
* {{"1"}}: select the 2nd child of the root node of the selected flow tree,
* {{"2.5"}}: select the 5th child of the 3rd child of the root node of the selected flow tree.
Available assertions on a flow tree node are:
* '{{flowInstanceIdEquals}}': the flow instance identifier of the flow tree node identified by {{path}} must be equals to the value given by '{{expected}}'.
h3. Example
{code}
<petals-monit-read-logfiles id="flows" dir="${petals.home}/logs/flow-monitoring" />
<petals-monit-build-flow-trees refid="flows" id="flow-trees">
<petals-extract-flow-step-info refid="flows" row="0">
<flowStepCriteria name="traceCode" value="provideFlowStepBegin" />
<flowStepCriteria name="flowStepInterfaceName" value="{http://petals.ow2.org/samples/se-bpmn/vacationService}vacation" />
<flowStepCriteria name="flowStepServiceName" value="{http://petals.ow2.org/samples/se-bpmn/vacationService}vacationService" />
<flowStepCriteria name="flowStepOperationName" value="{http://petals.ow2.org/samples/se-bpmn/vacationService}new" />
<flowStepInfo attribute="flowInstanceId" property="initial-flow-instance-id" />
<flowStepInfo attribute="flowStepId" property="initial-flow-step-id" />
</petals-extract-flow-step-info>
<petals-extract-flow-step-info refid="flows" row="0">
<flowStepCriteria name="traceCode" value="consumeExtFlowStepBegin" />
<flowStepCriteria name="correlatedFlowInstanceId" value="${initial-flow-instance-id}" />
<flowStepCriteria name="correlatedFlowStepId" value="${initial-flow-step-id}" />
<flowStepInfo attribute="flowInstanceId" property="process-flow-instance-id" />
</petals-extract-flow-step-info>
<petals-assert-flow-tree refid="flow-trees" flowInstanceId="${initial-flow-instance-id}">
<assertFlowTreeNode path="">
<flowInstanceIdEquals expected="${initial-flow-instance-id}" />
</assertFlowTreeNode>
<assertFlowTreeNode path="0">
<flowInstanceIdEquals expected="${process-flow-instance-id}" />
</assertFlowTreeNode>
</petals-assert-flow-tree>
{code}