Author Studio Actions

  • Updated

This feature is only available in the current version of Author Studio released in the fall of 2023. If you have not updated to the newest version of the product, see our Archived Author Studio Documentation here.

Actions function the same way in Author Studio as they do in irAuthor, but the setup in Author Studio is different. Generally, actions are the tasks the engine executes if the conditions of a rule evaluate to TRUE. Rules can also contain only actions if required.

The following sections cover the various actions available in Author Studio in detail. 0

Set Value 

The Set Value action is similar to a calculation but can be nested within other rules to be made conditional.

SetValue.png

1. Name 
Click here to change the name of the Set Value action.

2. Enable
You can enable or disable the Set Value. A disabled Set Value will not run when the rule application is executed.

3. Description
This is the editable description of the Set Value.

4. Target 
Specifies the name of the field or rule set variable to set.

Target.png

5. Value
Specifies the calculation of the value for the field you are setting. Please see About Expressions for more information on expression syntax.

One entity field may be set to reference the same entity instance as another entity field.

An entity field may be set to null by using the null keyword as the expression.

Fire Notification

When executed as an action, Fire Notification creates a message and adds it to a collection of Notifications that were created based on a Rule Set execution or input value change. Active Notifications are displayed in an irVerify window. Developers can also easily leverage these notifications from the development environment through irSDK.

FireNotification.png

1. Name
Specifies the name of the notification. This name will be available in the drop-down combo boxes when selecting from a list of existing notifications for a Fire Notification action. You can edit the name by clicking on this field. 

2. Enabled
You can enable or disable the Fire Notification. A disabled Fire Notification will not run when the rule application is executed.

3. Description
This is the editable description of the Fire Notification.

4. Message
Specifies the actual message text. This text may contain embedded fields or rule expressions to provide context-sensitive information in the message. For example, to refer to the ItemQuantity field, specify <%ItemQuantity%>.

5. Notification Level
Specifies the severity level of the notification.

Notification Level .png

6. Associated field
Here you can associate a field with the notification. This enables runtime notifications to return the element-id of the associated field.

Associated Field Na,e.png

7. Allow Multiple Notifications
If Allow Multiple Notifications is checked, each execution of this action results in a runtime Notification. If this is not turned on, the default is Single Notification mode. That means the Fire Notification then only one runtime Notification can occur for a given notification runtime element ID.

Use Allow Multiple Notifications for logging and or tracing or cumulative output, Single Notification Mode for condition flagging (such as "This invoice qualifies for a discount").

Allow Multiple Notifications is not available under Auto-Optimized Rule Sets - a compile error will result if it is used in that context.

Declare Variable 

The Declare Variable action specifies a local Rule Set scope variable to use as an alternative to an Entity Field for storing intermediate values.

Fields having the Temporary Storage setting checked serve as Entity scope variables.

A Variable will be accessible only within the Rule Set, and only from the level declared and below.

DeclareVariable.png

1. Name
Specifies the name of the variable. You can edit the name by clicking on this field. 

2. Enabled
You can enable or disable the Declare Variable. A disabled Declare Variable will not run when the rule application is executed.

3. Description
This is the editable description of the Declare Variable action. 

4. Data type
Specifies the data type of the variable.

Data - Type Declare Variable .png

5. Entity
If the data type is Entity, then you should select the particular entity this variable will be the type of from the drop-down. 

6. Default value
If the Default value slider is turned on, then this is where you write the default value that will be assigned to the variable when it is created.

Add Collection Member

Provides the ability to add a new member to a collection.

AddCollectionMember.png

1. Name
Specifies the name of the Add Collection Member. If the action is defined at the Entity scope level (in an Actions folder), this name is used when executing an action by name (from either an Execute Action / Rule Set action or the irSDK). You can edit the name by clicking on this field. 

2. Enabled
You can enable or disable the Add Collection Member. A disabled Add Collection Member will not run when the rule application is executed.

3. Description
This is the editable description of the Add Collection Member.

4. Collection Name
Specifies the name of the collection to which a member can be added.

5. Initial Field Values
Optionally assign initial values to one or more collection member fields.

6. Entity collection options
A collection member may be either created new or created by copying from an entity field or specific entity collection member. Only if the Is Existing Entity slider is turned on will the Copy Mode options be applicable. 

7. Existing Entity Field
When choosing to source the new collection member from an Existing Entity Field with By reference as the selected copy mode, there cannot be any field values specified in the Initial field values section as all of the values will reference the specified source. However, if initial field values are defined along with the Shallow copy or Deep copy options, the copy operation will occur first, and then initial field values will be set. Therefore, if values exist on the copied entity that are also defined in the initial field values grid, the initial field value defined will overwrite the copied data.

When using an entity collection member as the source in the Existing Entity Field, you may not see the expected options in the ... pick list. You must refer to the specific member of the collection by using the CollectionName(index).

8. Copy Mode

  • By reference - Creates a new reference at the target location pointing to the source of the copy operation. This results in no new Entities being created.
  • Shallow copy - Creates a new Entity at the target location, copying over all primitive Field values. However, child Entity Field and Entity Collection values keep a reference to the existing Entities in the source location. This results in one new Entity being created.
  • Deep copy - Creates a new Entity at the target location, copying over all primitive Field values and creates new Entities for each child Entity Field and Entity Collection in the source location. If duplicate Entities are encountered, the copied Entity reference will be used. This results in a new Entity being created for each unique Entity in the source.

Remove Collection Member

Remove a member from a collection.

Remove Collection Member.png

1. Name
Specifies the name of the Remove Collection Member action. If the Remove Collection Member is defined at the "Entity scope" level (in an Actions folder), this name is used when executing an action by name (from either an Execute Action / Rule Set action or the irSDK).

2. Enabled
You can enable or disable the selected Remove Collection Member. A disabled Remove Collection Member will not run when the rule application is executed.

3. Description
This is the editable description of the Remove Collection Member action.

4. Collection

Specifies the name of the collection to remove an item from.

You may not remove a member from a collection while you are looping through that collection. For more information, see Looping Through a Collection.

5. Remove index

Specifies which item in the collection to remove. The value can either be static (like 2) or an expression that the rule engine will evaluate.

Please see About Expressions for more information on expression syntax.

Sort Collection

Sorts a collection by a user-specified field order.

 

Sort Collection.png

1. Name
Specifies the name of the Sort Collection action. You can edit the name by clicking on this field. 

2. Enabled
You can enable or disable the selected Sort Collection. A disabled Sort Collection will not run when the rule application is executed.

3. Description
This is the editable description of the Sort Collection.

4. Syntax field 
Use the syntax field to select the collection to sort.

5. Add new field
The Add new field button allows you to designate additional fields to sort on.

6. Field Name
Use the drop-down list to select fields from the collection to sort on.

7. Sort Direction
Specify the sort order for the chosen field from the drop-down.

8. Delete
This button deletes the field and sort direction in the same row.

Clear Collection

Clears all members of a collection

Clear Collection.png

1. Name
Specifies the name of the Clear Collection action.

2. Collection
Specifies the name of the collection from which to remove all members.

Execute Rule Set 

The Execute action provides the ability to invoke an existing Rule Set. An existing Rule Set might include a set of actions to be executed together.

ExecuteRuleSet.png

1. Name
Specifies the name of the Execute rule set action. You can edit the name by clicking on this field. 

2. Enabled
You can enable or disable the Execute Rule Set. A disabled Execute Rule Set will not run when the rule application is executed.

3. Description
This is the editable description of the Execute Rule Set.

4. Target Rule Set
Specifies the name of the rule set to execute. The values in this drop-down combo box are the combination of Rule Sets and Entity scope rule sets defined in the Rules folder.

Only Rule Sets that have a fire mode of Explicit will be included in this list.

Rows will appear in the table only if the explicit rule set being executed is an independent rule set requiring one or more entities as an input argument.

5. Parameters
The Parameters interface allows users to pass decimal, Boolean, date, datetime, integer, text, and entity values from the calling rule set into the Target rule set for runtime use.

The Target rule set must be defined to accept parameters. These values can be hard-coded literals, or Fields, Calculations, Variables, or Expressions.

Execute Member Rule Set

This action iterates over members in a collection and for each member that satisfies the [optional] filter expression, executes the specified explicit rule set in the context of that member.

Execute Member Rule Set.png

1. Name

Specifies a name for the Execute Member Rule Set action. If the Execute Member Rule Set is defined at the "Entity scope" level (in an Actions folder), this name is used when executing an action by name (from either an Execute Action / Rule Set action or the irSDK).

2. Enabled
You can enable or disable the selected Execute Member Rule Set. A disabled Execute Member Rule Set will not run when the rule application is executed.

3. Description
This is the editable description of the Execute Member Rule Set.

4. Collection

Specifies the collection over which to iterate. While looping through the collection, rules in the target rule set may not modify the collection (add member, remove member, sort, clear, or copy into). For more information, see Looping Through a Collection.

5. Ruleset

Specifies an explicit rule set to execute for each member of the collection which satisfies the specified [optional] filter expression. Rule sets executed by this action must exist in the context of the specified collection's items.

6. Filter

[Optional] Specifies additional criteria to filter members that will have the specified rule set executed in their context.

Execute REST Service

The Execute REST Service action allows you to pull in data from a REST resource during the rule execution. A valid defined REST service endpoint and REST resource must already exist.

Execute REST.png

1. Name

Specifies the name of the Execute REST Service action.

2. REST Operation
Select the REST Operation to use.

3. Inputs
For each parameter specified by the REST Operation, specify an expression to use.
Name and Type will be automatically populated from the REST Operation. Any function or field that returns the type specified is acceptable.

4. (Optional)Assign return to
Specify a Field or variable to assign the return value of REST call. This value can be mapped into an entity field or collection with a subsequent action.

 

Was this article helpful?

0 out of 0 found this helpful

Comments

0 comments

Please sign in to leave a comment.