AgileApps Support Wiki Pre Release

Difference between revisions of "Rule Actions"

From AgileApps Support Wiki
imported>Aeric
imported>Aeric
 
(59 intermediate revisions by the same user not shown)
Line 1: Line 1:
<noinclude>__NOINDEX__</noinclude>
<noinclude>__NOINDEX__ __TOC__</noinclude>
# Select the ''action'' to perform when the Rule conditions are satisfied.
;Selecting actions:
#* '''Set Priority -''' This option appears for [[Cases]]. It allows the priority to be changed--for example from "P2" to "P1"
# Select the ''action'' to perform when [[Rule]] conditions are satisfied.<br>(Possible actions are listed below)
#* '''Set Status -''' This option appears for [[Cases]]. It allows the status to be changed--for example, to ''Closed''
#* '''Add Record -''' Add a record to a selected object
#* '''Update Record -''' Modify data in the current record
#*:'''Important:'''
#*:This action does ''not'' generate record update events (in order to prevent infinite recursions).
#* '''Add Note -''' Add a note to the current record.
#*:* Enter text for the note in the text area
#*:* Use the field selector to add values from the current record
#: '''Example:''' <tt>This note is for $user.full_name.</tt>
#:
#* '''Assign to User -''' Determine the new owner of the record
#* '''Assign to Team -''' Determine the group it goes to, so members of the group can claim it
#:
#* '''Send Email -''' Send a message, optionally using an [[Email Template]]
<!--#* '''Post Message in Relay -''' Deliver a message to a social-networking [[Relay]] feed-->
#:
#* '''Create Task -''' Create a new task and specify who it is to be assigned to 
#* '''Start Process -''' Automatically initiate a [[Process]]
#* '''Change Process Status -''' Set the status of the process.
#:
#* '''Execute Rule Set -''' Chain to a different Rule Set, and execute those Rules. Come back to this set when done, and resume processing with the next Rule.
#* '''Invoke Method -''' Invoke a method in a Java [[Class]]
#:
#:
# As with conditions, additional options appear, depending on the action you select.
# As with conditions, additional options appear, depending on the action you select.
#: [[File:RuleActionOptions.png]]
#: [[File:RuleActionOptions.png]]
#:
# Click '''[Add More]''' to specify additional actions.
# Click '''[Add More]''' to specify additional actions.
#: [[File:RuleActionsAddMore.png]]
#: [[File:RuleActionsAddMore.png]]
;Available Actions:
<blockquote>
=====Set Priority=====
: This option appears for [[Cases]]. It allows the priority to be changed--for example from "P2" to "P1"
::* '''Trigger Rules -''' This option enables the firing of Case-update rules.
=====Set Status=====
: This option appears for [[Cases]]. It allows the status to be changed--for example, to ''Closed''
::* '''Trigger Rules -''' This option enables the firing of Case-update rules.
=====Add Record=====
:Select an object to add a record to, and specify field values for the record:
::* '''Do Not Trigger Rules -''' By default, Rules are enabled when adding a record. This option disables them.
::* Use the Field Chooser to select object fields.
::* For each field, use the [[Formula Builder]] to specify the field value.
=====Update Record=====
:Modify data in the current record
:* '''Trigger Rules -''' This option enables the firing of record-updated rules.
{{Warn|Be careful when triggering rules in a record-update action. Make sure that there is no possibility of an "infinite regression", where one update triggers a Rule which updates a record, which re-triggers the first Rule, and so on.}}
:* Use the Field Chooser to select fields to modify -- including fields in a record targeted by a [[Lookup]] field in the current record, or fields targeted by Lookups in those records, and so on, as shown here:
:: [[File:FieldChooser.png|border‎]]
:* For each field, use the [[Formula Builder]] to specify the field value.
{{Note|To clear a lookup reference in any lookup field, use a pair of single quotes as the field value.}}
=====Add Note=====
:Add a note to the current record.
::* Enter text for the note in the text area
::* Use the field selector to add record variables
::* '''Example:''' <tt>This note is for $user.full_name.</tt>
=====Assign to User=====
:Determine the new owner of the record. The options are:
::* '''Logged-In User -''' The user who is running the application when the rule is triggered. (Not the designer who created the rule.)
::: '''Note:''' This value is ''undefined'' for a record that is created or updated by a [[Process]].
::* '''Pick a User -''' A lookup field appears. Use it to select a specific user.
::* '''Select a User Field -''' The '''[Choose User]''' button appears. Use it to select a Lookup field that targets the Users object.
:::  That field can be defined in the current record or in the record the Lookup points to, up to 5 levels deep.
:::  For example: <tt>Owner > Reports To > Reports To_id</tt> assigns the record to the current owner's second-level manager.
::* '''Use an expression -''' Use a combination of fields and expression operators to choose the user to assign to.
:::  This feature is commonly used to specify if-then logic, or to find a User field defined in an ''associated'' record.
:::  For example, for Case with a Lookup to an OrderItem, the Rule might choose <tt>OrderItem > Order > Customer > Agent in Charge_id</tt>
::: That setting would assign the case to the "troubleshooter" who handles issues raised by that customer.
=====Assign to Team=====
:Determine the group the record goes to, so members of the group can claim it.
=====Send Email=====
:Send a message, optionally using an [[Email Template]]
::'''Note:'''<br>Do not choose a template that includes a JSP page as an attachment.<br>''Learn more:'' [[JSP Attachment Deprecation]]
=====Start Process=====
:Automatically initiate a [[Process]].
'''Note''': One you start a process, you cannot stop it half way and resume it from that point at a later time. A process always restarts from the first step.
=====Invoke IS Service=====
Select this to communicate with Integration Server (IS).  It allows you to fetch a list of all the IS packages that you created in the Software AG Designer for the runtime application. You can view all the services that are part of each IS package. Designer is a separate application and is available to you as part of the Integration Server package.
For more information about this action, see [[Invoking Integration Server Services from Business Rules]].
=====Create Task=====
:Create a new task and specify its settings:
::* '''Owner -''' Who should perform the task.
::* '''Subject -''' Title of the task.
::* '''Duration -''' How long it is expected to take.
::* '''Do not notify -''' A notification is sent automatically, unless this box is checked. 
::* '''Description -''' Description of the activity to perform.<br>Use the Record Variable selector to add references to record fields, dates, times, user data, and company information.
=====Change Process Status=====
:Set the status of the process.
:Change process shows the following statuses:
::*Enable: You can enable the process instance, only if the current process status is '''DISABLED'''.
::*Disable: You can disable the process instance, only if the current process status is '''READY'''. You cannot disable a process which is currently in progress state.
::*Stop: You can stop the process instance, only if the current process status is '''STARTED'''.
=====Execute Rule Set=====
:Chain to a different Rule Set, and execute those Rules. Come back to this set when done, and resume processing with the next Rule.
=====Invoke Method=====
:''Learn more:'' [[Invoke a method in a Java Class]]
=====Execute Web Service=====
: Select a Web Service, and specify the mappings for its input and output parameters.
=====Return Process Decision Value=====
: This action can be taken by a Rule in a Rule Set whose return type is "Process Decision Value".
: The specified value becomes available for testing in a [[Process Decision Switch]].
: When this action is taken, rule processing stops.
: ''Learn more:'' [[Rule Set Properties]]
=====Return Step Owner=====
: This action can be taken by a Rule in a Rule Set whose return type is "Step Owner".
: Select the User or Role, who will be assigned the task associated with a Process step.
: When this action is taken, rule processing stops.
: ''Learn more:'' [[Rule Set Properties]]
</blockquote>

Latest revision as of 07:58, 1 June 2020

Selecting actions
  1. Select the action to perform when Rule conditions are satisfied.
    (Possible actions are listed below)
  2. As with conditions, additional options appear, depending on the action you select.
    RuleActionOptions.png
  3. Click [Add More] to specify additional actions.
    RuleActionsAddMore.png
Available Actions
Set Priority
This option appears for Cases. It allows the priority to be changed--for example from "P2" to "P1"
  • Trigger Rules - This option enables the firing of Case-update rules.
Set Status
This option appears for Cases. It allows the status to be changed--for example, to Closed
  • Trigger Rules - This option enables the firing of Case-update rules.
Add Record
Select an object to add a record to, and specify field values for the record:
  • Do Not Trigger Rules - By default, Rules are enabled when adding a record. This option disables them.
  • Use the Field Chooser to select object fields.
  • For each field, use the Formula Builder to specify the field value.
Update Record
Modify data in the current record
  • Trigger Rules - This option enables the firing of record-updated rules.

Warn.png

Warning: Be careful when triggering rules in a record-update action. Make sure that there is no possibility of an "infinite regression", where one update triggers a Rule which updates a record, which re-triggers the first Rule, and so on.

  • Use the Field Chooser to select fields to modify -- including fields in a record targeted by a Lookup field in the current record, or fields targeted by Lookups in those records, and so on, as shown here:
border‎

Notepad.png

Note: To clear a lookup reference in any lookup field, use a pair of single quotes as the field value.

Add Note
Add a note to the current record.
  • Enter text for the note in the text area
  • Use the field selector to add record variables
  • Example: This note is for $user.full_name.
Assign to User
Determine the new owner of the record. The options are:
  • Logged-In User - The user who is running the application when the rule is triggered. (Not the designer who created the rule.)
Note: This value is undefined for a record that is created or updated by a Process.
  • Pick a User - A lookup field appears. Use it to select a specific user.
  • Select a User Field - The [Choose User] button appears. Use it to select a Lookup field that targets the Users object.
That field can be defined in the current record or in the record the Lookup points to, up to 5 levels deep.
For example: Owner > Reports To > Reports To_id assigns the record to the current owner's second-level manager.
  • Use an expression - Use a combination of fields and expression operators to choose the user to assign to.
This feature is commonly used to specify if-then logic, or to find a User field defined in an associated record.
For example, for Case with a Lookup to an OrderItem, the Rule might choose OrderItem > Order > Customer > Agent in Charge_id
That setting would assign the case to the "troubleshooter" who handles issues raised by that customer.
Assign to Team
Determine the group the record goes to, so members of the group can claim it.
Send Email
Send a message, optionally using an Email Template
Note:
Do not choose a template that includes a JSP page as an attachment.
Learn more: JSP Attachment Deprecation
Start Process
Automatically initiate a Process.

Note: One you start a process, you cannot stop it half way and resume it from that point at a later time. A process always restarts from the first step.

Invoke IS Service

Select this to communicate with Integration Server (IS). It allows you to fetch a list of all the IS packages that you created in the Software AG Designer for the runtime application. You can view all the services that are part of each IS package. Designer is a separate application and is available to you as part of the Integration Server package. For more information about this action, see Invoking Integration Server Services from Business Rules.

Create Task
Create a new task and specify its settings:
  • Owner - Who should perform the task.
  • Subject - Title of the task.
  • Duration - How long it is expected to take.
  • Do not notify - A notification is sent automatically, unless this box is checked.
  • Description - Description of the activity to perform.
    Use the Record Variable selector to add references to record fields, dates, times, user data, and company information.
Change Process Status
Set the status of the process.
Change process shows the following statuses:
  • Enable: You can enable the process instance, only if the current process status is DISABLED.
  • Disable: You can disable the process instance, only if the current process status is READY. You cannot disable a process which is currently in progress state.
  • Stop: You can stop the process instance, only if the current process status is STARTED.


Execute Rule Set
Chain to a different Rule Set, and execute those Rules. Come back to this set when done, and resume processing with the next Rule.
Invoke Method
Learn more: Invoke a method in a Java Class
Execute Web Service
Select a Web Service, and specify the mappings for its input and output parameters.
Return Process Decision Value
This action can be taken by a Rule in a Rule Set whose return type is "Process Decision Value".
The specified value becomes available for testing in a Process Decision Switch.
When this action is taken, rule processing stops.
Learn more: Rule Set Properties
Return Step Owner
This action can be taken by a Rule in a Rule Set whose return type is "Step Owner".
Select the User or Role, who will be assigned the task associated with a Process step.
When this action is taken, rule processing stops.
Learn more: Rule Set Properties