HomeGuidesRecipesAPI
HomeGuidesAPILog In

Actions - Overview

TITLE:

Actions - Overview

DESCRIPTION:

BODY:

Infiniti Actions incorporate the ability to pass eForm data and generated documents to third-party systems, data stores or trigger specific events based on business rules. Infiniti includes several Actions that covers the majority of everyday tasks.

If for any reason the required event is not covered by the Out of the Box Actions, please check our Ecosystem or maybe consider building your own following this guide: Actions

Here a simple guide that explains how to add and configure Actions in Infiniti.

Adding an action to a project

  1. Create or open an existing project in design.

  2. Ensure 'Action' is available in the toolbox.

47
  1. There are two ways to add an action to your project.
  • Click 'Action' and drag onto the Finish page in the 'Question set'.
  • Select 'Finish' in the 'Question set' and double click 'Action' in the Toolbox.
  1. The 'Select Action' window will display.
203
  1. By default Infiniti adds the following actions:
  • Display Message
  • Print
  • Redirect
  • Save to Disk
  • Save to SQL Server Database
  • Save to Oracle Database
  • Send Email
  • Add Message to management Console
  • Send to REST Service
  • Post to Webhook
  • Push Notification
  • Project Results To SQL
  1. Drag and drop an action from the list on the Finish page.

  2. The action you selected will now be added to the 'Finish' page. The added action can now be configured by adding the parameters in Design.

405

👍

Retry On Failure

Clicking "Retry On Failure" checkbox allows user to specify the number of retries and wait between retries

📘

Note:

  • Actions can only be added to the 'Finish' page in the design window, an action can also be added to a transition in a workflow. (refer to How to add actions to workflow transitions article).

  • You can have more than one of the same action type on the Finish Page of a project.

  • Because Actions run after the project answers have been saved, Actions cannot be used in workflow transitions to update project properties.

How to add actions to workflow transitions

Actions can be added to transitions in a workflow, for this you will need to know how Infiniti Workflow works (for more information Workflows )

  1. Open a project with a valid workflow in design.

  2. Open Infiniti workflow via the workflow button.

  3. Select a transition.

  4. Click on the Actions Button

52
  1. The Actions list will pop up.

  2. Drag and drop the action you would like to add to the transition, we are using the 'Redirect' action as an example.

  3. The action will now be added in between the state that transition was going to.

607
  1. Click to select the 'Redirect' action.

  2. The Redirect properties pane will now display on the right screen.

396
  1. Once configured, this action will occur on transition from 'Start' to the 'Start 1' state.

Nested Actions

Infiniti allows for the creation of nested actions which can reference the output value of the parent action. A nested action can reference that newly created ID and run another action. An action can only be the child of another action if the parent is a repeater.

The following example shows how to create a simple save to disk action nested with an email action. The goal is to save files to different disk locations and nesting an email action to it which sends email notifications containing the location to different users.

  1. Create a repeating section ‘File Saver’ with a text field for entering the document save location and a multiple choice for deciding whether to send email notification or not

  2. Create a repeating section ‘Email Sender’ (which appears based on the selection for the multiple choice question) within the repeating section ‘File Saver’ with a text field for entering the email addresses of the receivers.

395
  1. Add a ‘Save to Disk’ action and set the following properties
649

📘

Note

When adding a nested action, the parent action needs to be a valid repeating action.

  1. Drag and drop a new action to the parent action, set it as ‘Send Email’ and click OK
    
  2. Click YES on the opened dialog box  
    
439

The ‘Send Email’ action will be nested on the ‘Save to Disk’ action as per the following image.

214
  1. Set the following properties for the ‘Send Email’ action
342
  1. Set the condition for which the nested action should be activated and save the project
346

Here, the condition will be set in a way that the email will be send only if the document is properly saved in the specified location

Testing nested actions

  1. Open the project and enter the values.
738
  1. Click Next and then Generate Document.

The results will be the following:

a. The folders Nested Action Test 1, Nested Action Test 2 and Nested Action Test 3 will be created if it’s not already present in the ‘C:_temp’ folder and the generated documents will be saved in the 3 folders

265

b. If the folders are created and documents are saved in their respective locations, then emails containing the file locations will be sent to the respective email addresses mentioned in the respective folder sections.

Triggering document generation with actions

You can trigger generated documents on your action(s). This is useful for those situations when specific actions generate specific documents.

This example will demonstrate how to set up a project that has two generated documents. Doc 1 will be linked to an 'email' action while Doc2 will be linked to a 'print' action.

  1. In Design create a new project 
    
  2. Add another Word template (Actions > Add Template) 
    
  3. Change the name of both document templates to Doc1 and Doc2 
    
  4. Add an email action to the Finish page (refer to Add an Action to a Project how-to article) 
    
  5. Configure the email action (refer to Send to Email Action how-to article) 
    
  6. Add a Print action to the Finish page (refer to Send to Print how-to article) 
    
  7. Select the 'Send Email' action and select the 'Documents' tab on the right hand of the screen 
    
  8. Within the 'Action Documents' screen select the 'Custom' option and from the 'Document' drop-down menu select 'Doc1' then click 'Add.' 
    
340
  1. Select the 'Print' action and select the 'Documents' tab on the right hand of the screen

  2. Within the 'Action Documents' screen, select the 'Custom' option and from the 'Document' dropdown menu select 'Doc2' then click 'Add'.

340

Once the project has been run (generated) in Produce, Doc1 and Attachment_1 will be sent to the email address configured in the email action. Doc2 will be sent to the printer configured in the Print action.

Choose format of action documents

Action documents can now have different formats In Design. There used to be a Document drop-down list (for more information see Related Links below) which can generate documents on your action/s. Now, a ‘Format’ drop-down list has been introduced to select a format for the action documents

There are different formats available for the type of document selected. If the format selected is Default/None, the document will be generated in the default format selected in the publish options in Manage. By choosing other formats, the documents are generated accordingly to the selected format, for example, Microsoft Word Docx/Docm.

For a document of type File Selection Question/item, the format drop-down function will be disabled as it is no longer applicable.

For both a word and PowerPoint template, the populated formats are similar to the ones on Manage -> Publish project page.

Once a document and format are selected, the List view will display both of these in two separate columns as shown in the following screenshot. A selected document and format cannot be selected more than once, in that case, the ‘Add’ button will get disabled.

When the project is executed in Produce and if specific documents have been selected, the document will only be sent to the action in that format.

📘

Note:

The action document format works for both Project Level Actions and Transition Actions.

'Run/Show Action When' option for actions

A new attribute ‘Run/Show Action When’ has been added for actions, this allows the user to specify if and when they would like the action to run or show.

This option can be found in the properties tab of the action:

649
AlwaysIf this option is selected, the action will run at all times.
NeverIf this option is selected, the action will never be executed.
On Generation FailureIf this option is selected, the action will only run when a generation error occurs.
On Generation SuccessIf this option is selected, the action will run when no generation errors occur when the form is generated.

Dynamically assign Infiniti groups to users with user action

Problem

Need to dynamically create a user and assign multiple groups via the Infiniti user action. The group names are coming from a multiple row data source so it will be one string with a pipe delimiter separating each value e.g. GroupA|GroupB|GroupC. Because the groups need to be 1 per line this will not work as the action will be looking for ‘GroupA|GroupB|GroupC’ group name which won’t exist.

Solution

Add a replace formula that breaks the string and separates the selected group on each line via an ASCII code.

=Replace([q37.GroupName], “|”, chr(10))
649

Then Reference the formula to the Groups attribute.

639

This will bring the string into the Groups attribute as 1 per line.line.

Referencing Action Response(s)

For those actions that contain outputs, these will appear as a expandable set of outputs in the tree view of Design. These can be referenced directly much like any other variable and answer using the Reference picker.

385

Example action outputs for Send to REST service, which are the HTTP Status and Response.

Additionally, they can also be referenced directly using the [Action.Output] notation. In the example above, the REST service response can be referenced as [Send to REST Service.Response].

Connector settings

The settings and default values of a connector can be configured by using “Connector Settings”. Connector settings are available in Manage->Settings->Connector Settings.

A drop-down list of all available connectors that contain settings and default values will be displayed.

How to edit Connector Settings

  1. Select the connector you wish to configure from the drop-down list.
421
  1. Enter the appropriate values.
554
  1.   Click Save.
    

📘

The default values added through Connector Settings in Manage will be the default settings to be used for every project that utilizes the connector.
All Connector Settings added through the Action Properties in Design will override the settings defined in Manage.