Copy from functionality in Expressions

<< Click to Display Table of Contents >>

Navigation:  Bizagi Studio > Process wizard > Business Rules >

Copy from functionality in Expressions

Bizagi provides the Copy From feature to speed up the development of expressions.

This functionality allows you to easily and quickly create a new expression by duplicating an existing one.

 

The Copy From functionality will INSERT the code from the original expression (source expression) to the target expression. Hence, if you have elements in the target expression and then use the Copy from feature, everything contained will be overwritten.

 

note_pin

The Copy From feature can be performed for expressions sharing the same context. For example, when you use the feature in a Process expression, you can copy from any of the expressions associated to the current Process, expressions from the Application to which the Process belongs to or from any Global expression; you will not be able to copy expressions from another Process or application. Similarly, when using the feature in an Entity expression you will be able to copy expressions associated with that Entity exclusively.

 

 

Example

In a Claims management Process, some information is updated each time the Process enters an activity.

This information is related to the current allocated person, the date in which the Process entered the activity and the case status. The expression defined in the first activity to obtain them is as follows:

 

Copyfromexp1

 

<Claim.Assignee> = Me.Case.WorkingCredential.UserId;

<Claim.ActivityOpeningDate> = DateTime.Now;

<Claim.Status> = "In review";

 

The same expression can be used to update this information in the remaining activities. However, the value of the case status changes so, it is convenient to create a copy of the original expression in each of the activities and change the value of the status in the code accordingly.

 

To do so, go to another activity and create a new expression. Click the Copy From button found at the left of the Expressions editor.

A new window will display the list of available expressions. Click the desired expression to select it and then click Ok.

 

Copyfromexp2

 

The information is copied exactly as it was in the original (source) expression. Now you can modify it as required.

 

Copyfromexp3

 

When the expression is complete, save it and close it.