How to Design a Workflow?
- Last UpdatedJul 01, 2024
- 1 minute read
The below example shows how the user can design a AVEVA Work Tasks Workflow.
-
Drag and drop the 'SOA Execute' Activity next to the Start Activity to instantiate the 'Product' object. This will save the object in the mapped variable, so that it is possible to obtain the object from the variable the next time.
Expression for SOA Execute Action: [Instantiate Product Object]
//Variable to hold the total quantity
Variable.TotalQuantity = 10;
//Product codeProduct.Code;
Note: Invoking of the class is not always required. This is to show that the object state gets stored in the variable whenever you invoke the object for the first time.
-
Use 'SOA Execute' to calculate the total amount to be paid for the given quantity.
Expression for SOA Execute Activity, GetAmount:
//Total amount to be paid is calculated and stored in the 'TotalAmount' variable. Variable.TotalAmount =
Convert.ToInt32(OrderLine.GetAmount((Product.Product)Variable.ProductObject, Convert.ToInt32(Variable.TotalQuantity)));// 'Variable.ProductObject' is the mapped variable for the 'Product' instance. When the product object is instantiated for the first time, it automatically stores the object in the variable. So, in this step we can directly get the 'Product' object from the variable. We need to explicitly type cast the object to its appropriate type. (Product.Product)Variable.ProductObject