2023.1:Apply Rules (Activity)

From Grooper Wiki

This article is about an older version of Grooper.

Information may be out of date and UI elements may have changed.

20252023.1

flowsheet Apply Rules is an Activity that runs flowsheet Data Rules on data that has already been extracted from a inventory_2 Batch. A edit_document Batch Process Step configured with the Apply Rules Activity will always need to be preceded by a Batch Process Step configured with the export_notes Extract Activity.

You may download the ZIP(s) below and upload it into your own Grooper environment (version 2023). The first contains one or more Batches of sample documents. The second contains one or more Projects with resources used in examples throughout this article.


About

Once you have extracted data from a Batch you might want to do something to manipulate that data. Data Rules allow you to automatically manipulate data through use of .NET, LINQ, and/or lambda expressions. For information on how to set these up, please visit our Data Rules wiki article.

However, just having Data Rule objects set up in your Content Model will not actually run those rules on your extracted data. To automatically apply these Data Rules you will need to include an Apply Rules Batch Process Step to your Batch Process after your Extract Batch Process Step.

How To

Creating and configuring the Apply Rules Activity is fairly simple and requires that you add an Apply Rules Step to your Batch Process.

Data Rules can only be applied on data that has already been extracted, so the Apply Rules Step must ALWAYS come after an Extract Step within a Batch Process.

Adding the Apply Rules Step

The first thing we need to do is actually add an Apply Rules Step to our Batch Process and assign the Scope to the Step.

  1. Right-click on the Batch Process.
  2. Hover over "Add Activity", then hover over "Document Processing". Finally, click on "Apply Rules..."
  3. When the "Add Activity" window pops up, you can change the name in the Step Name if you like, but in this tutorial we're going to keep the default of "Apply Rules".
  4. Click "EXECUTE" located in the top right corner of the pop up window.


  1. Now you should have an Apply Rules Batch Process Step in your Batch Process.
  2. You will need to set your Scope to the folder level your documents reside at. For our example, our Scope is set to Folder and the Folder Level is 1. You will never need to set this property to a Page Folder Level.


Configuring the Apply Rules Activity

Now that we have added our Apply Rules Step and set the Scope we need to tell Grooper what to actually do in this step. We will be configuring the Batch Process Step in the right-most property grid. We need to tell Grooper which Data Rules to apply and if we want issues to raise a flag on the document.

  1. Click on the ellipsis icon to the right of the Rules Property.


  1. When the "Rules" window pops up, in the right panel of the pop up, navigate to and click the check boxes next to the Data Rule objects you want to apply to the extracted data.
  2. The selected Data Rules will show up in a list on the left side of the window. They will be displayed in the order they will be applied.
  3. Click the up and down icons located above the Rules list to change the order of the selected rule in the list.
  4. When you are finished adding and reordering your Data Rules, click "OK" located in the top right of the pop up window.


  1. Check the box next to the Flag Issues property if you want the folder to be flagged when the Raise Issue action is fired. This will make it easier to find the issues during review.