2023.1:Apply Rules (Activity): Difference between revisions

From Grooper Wiki
// via Wikitext Extension for VSCode
No edit summary
 
(7 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{AutoVersion}}
{{AutoVersion}}


{|class="wip-box"
<blockquote>{{#lst:Glossary|Apply Rules}}</blockquote>
 
{|class="download-box"
|
|
'''WIP'''
[[File:Asset 22@4x.png]]
|
|
This article is a work-in-progress or created as a placeholder for testing purposes. This article is subject to change and/or expansion. It may be incomplete, inaccurate, or stop abruptly.
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.
 
* [[Media:2023.1 Wiki Apply-Rules-(Activity) Batches.zip]]
This tag will be removed upon draft completion.
* [[Media:2023.1 Wiki Apply-Rules-(Activity) Project.zip]]
|}
|}


<blockquote>{{#lst:Glossary|Apply Rules}}</blockquote>


== Glossary ==


== About ==
== 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 Rule]]''' wiki article.


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 Rule (Object)|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'''.
 
However, just having '''Data Rules''' 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 ==
== 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'''.  
Creating and configuring the ''Apply Rules Activity'' is fairly simple and requires that you create an ''Apply Rules'' '''Batch Process Step''' in a '''Batch Process'''.  


{|class="attn-box"
{|class="attn-box"
Line 28: Line 26:
|
|
'''Data Rules''' can only be applied on data that has already been extracted, so the ''Apply Rules'' '''Batch Process Step''' must ALWAYS come after an ''Extract'' '''Batch Process Step''' within a '''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 ===
=== 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'''.


# Right-click on the '''Batch Process'''.
# Right-click on the '''Batch Process'''.
Line 41: Line 40:




#<li value=5> Now you should have an ''Apply Rules'' '''Batch Process Step''' in your '''Batch Process'''.
#<li value=5> Now you should have an '''''Apply Rules''''' '''Batch Process Step''' in your '''Batch Process'''.
# 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'''''.  
# 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'''''.  


Line 48: Line 47:


=== Configuring the Apply Rules Activity ===
=== 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.


# Click on the ellipsis icon to the right of the '''''Rules Property'''''.
# Click on the ellipsis icon to the right of the '''''Rules Property'''''.
Line 54: Line 54:




#<li value=2> When the "Rules" window pops up, navigate to and click the check boxes next to the '''Data Rule''' objects you want to apply.  
#<li value=2> 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.  
# 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.
# 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.
# Click the up and down icons located above the Rules list to change the order of the selected rule in the list.  
# Click the up and down icons located above the Rules list to change the order of the selected rule in the list.  

Latest revision as of 16:05, 25 April 2025

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 previously been extracted from documents (folder Batch Folders).

  • The Apply Rules activity will always need to run after an Extract activity runs (An Extract step must come before an Apply Rules step in the order of edit_document Batch Process Steps in a settings Batch Process).

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 Rule 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.