Calculating the cost of a flow
You can assign a cost to a flow by defining values for assignments and flow actions that are added together at run time. By collecting information about the path that a flow takes, you can generate metrics that are specific to your application.
- Open a flow by searching for it or by using the Application Explorer.
-
Repeat the following steps for each assignment in the flow:
-
Double-click the assignment to open the Assignment properties dialog box.
-
In the Advanced section, click Assignment details.
-
In the Effort cost field, associate a value with the assignment by doing one of the following actions:
-
Press the Down Arrow key and select the name of a property that stores an integer or decimal.
-
Enter an integer or decimal.
-
Enter an expression.
For example, you can assign different monetary amounts to assignments in a service repair flow to calculate the total price of parts to order.
-
-
Click Submit.
-
-
Repeat the following steps for each flow action in the flow:
-
Double-click the connector that displays the name of the flow action to open the Connector properties dialog box.
-
In the Flow action field, click the Open icon .
-
Click the Action tab of the Flow Action form.
-
In the Apply cost field, associate a value with the flow action by doing one of the following actions:
-
Enter an integer or decimal.
-
Enter the name of a property that stores an integer or decimal.
-
-
Click Save.
-
On the Flow form, click Submit to close the Connector properties dialog box.
-
-
On the Flow form, click Save.
At run time, you can retrieve the cost of a flow by inspecting the value of the Work-.pyResolutionCost property.