12. Action settings

The action settings are used to setup different actions that may be called from within a profile via an action button, the action menu from the Cargo Dispatch interface or from an external call to the Cargo system. To add a new, duplicate an existing or delete the selected action item, use the buttons below the action list.

12.1 Action set

Actions are grouped into action sets and it is the actual action set that is called when actions should be executed.

An action set may contain a single action or many actions. If the action set consists of many actions the individual actions may be moved up or down in the action set in order to execute them in the correct order. If one action for example is using the result from another action it is important that the actions are ordered correctly.

The settings for an action set.


Image 12.1-1 The action set settings
Setting parameter Description
Name The name to make the identification of this action set easier.
Action ID

The ID of the action set is the ID to use when calling this action either from a profile layout, e.g. from an action button in the layout, or from an external application, e.g. FileTrain.

The ID will not show until the action set is saved the first time.

Action parameters

The action parameter list is populated automatically from the individual actions that this action set holds. These are taken from the actions settings where the macro ACTION_PARAMETER_IN is used. The caller of this action set should make sure that all the action parameters have values or the action set may fail in it's execution. If the action set for example is called from an action button within a profile the profile should have components with ID's that corresponds to the action parameter list seen in the action set setup.

Input dialog

If the action requires additional information to be performed the user will be presented a user input dialog. To edit this dialog setup click the edit layout button.

If the user have multiple items there is an option to only show one dialog (default) or to show one dialog per item (if this is wanted, select the option 'Show dialog for each selected item').

The action input editor.


Image12.1-2 The action input editor

For more information about each component used, see the layout editor chapter. There are two components that are unique in the editor for action input dialog.

Table 12.1-1 Action input dialog components
Layout components and their individual properties

Cancel button

The special cancel button component.


Image 12.1-3 The cancel button component

The cancel button component will cancel the action. The text property is the label that will be visible on the button.

Ok button

The special ok button component.


Image 12.1-4 The ok button component

The ok button component will make the dialog close and continue with the action. The text property is the label that will be visible on the button.

Popup

The popup component is slightly different than the regular popup component. The option setup may be set as regular text, job status list and/or file status list.

 

Required fields

If the action set is to be run from a profile or the staff interface the required fields/meta data are first evaluated and if they miss a value their corresponding text message will appear.

The settings for a required field in an action set.


Image12.1-6 The required field dialog

The Job or file property in the required field is the ID of the property in the job or file which has to have a value. If a value is missing when the action is invoked the message defined will appear to the user that tries to execute the action and the action is cancelled.

Output When all the individual actions have been executed the caller may get a result back or nothing back. If text is selcted as the return value the text skeleton should be entered in the macro text area. Note that values from the individual actions, e.g. a job search, may be used with appropriate macros.

12.2 Action

A action is a part of a action set. Each action in an action set is executed when the action set is called. There are many different types of actions seen in the table below.

Table 12.2-1 Action types
Action types and their individual properties

Send email

The send email action settings.


Image 12.2-1 The send email action

This action will send an email to one or more recipients. The recepients may be static or taken from values sent to the action.

Setting parameter Description
Name The name of the action.
SMTP The selected SMTP entry will be used when sending the email. All added SMTP entries may be seen/edited in the SMTP setting tab in the admin interface.
To This field will contain all the recepients of the email. If more than one recepient is wanted, the addresses should be separated with comma. If an address from the profile input form is wanted the macro ACTION_PARAMETER_IN should be used.

 

CC The email addresses to send a CC to.
BCC The email addresses to send a BCC to.
Subject The email subject.
Email body The body of the email. This may be HTML formatted by surrounding the text with <html><body> and </body></html>, e.g. <html><body>The HTML text goes here</body></html>
Attachments Optional attachments.

Copy file

The copy action settings.


Image 12.2-3 The copy action

This action is only valid from the dispatch interface where the selected job's file(s) will be copied.

Setting parameter Description
Name The name of the action.
Folder The folder, relative to the server, where the file should be copied.
File name change If the file name is to be changed the value is entered here.
Copy the job and add the copied file in this new job Select this option if the copied file automatically should create a new job and the copied file will be added into this newly created job.
Add the copied file to the existing job Select this option if the copied file should be added to the job where the source file belong.
Ignore the copied file Select this option if the copied file should not be added to the Cargo system.

Move file

The move action settings.


Image 12.2-4 The move action

This action is only valid from the dispatch interface where the selected job's file(s) will be moved.

Setting parameter Description
Name The name of the action.
Folder The folder, relative to the server, where the file should be moved.
File name change If the file name is to be changed the value is entered here.
Update job file If this option is selected the job will be updated with the new location for the file.
Delete file from job If this option is selected the moved file will be removed from the job where it belongs.

Unzip file

The unzip action settings.


Image 12.2-5 The unzip action
Setting parameter Description
Name The name of the action.
Unzipped folder The folder, relative to the server, where the result file will be placed.
File name change If the file name is to be changed the value is entered here. Note that this change will affect all the individual unzipped files.
Delete zip file If this option is selected the source zip file will be deleted.
Attach unzipped file to original file If this option is selected the unzipped file will be attached to the original file.
Attach original to unzipped file If this option is selected the original zip file will be attached to the unzipped file.
Copy the job and add the result file in this new job Select this option if the unzipped file automatically should create a new job and the unzipped file will be added into this newly created job.
Add unzipped files to job Select this if the unzipped files should be added to the current job.
Ignore result file If this option is selected the unzipped files will be ignored by the Cargo system.
Copy file properties If this option is selected the unzipped file will be getting a copy of the original file properties.

Create text file

The create text file action settings.


Image 12.2-5 The create text file action

The action will create a text file with the specified content. If more than one file is passed to the action set, each file will result in a text file.

Setting parameter Description
Name The name of the action.
Location The full path, relative to the server, where the file should be created. This location must include the file name.
Text format The format for the content to write to the file. Default is UTF-8.
Text

The text skeleton for the result file.

If a file should append the content to an existing file the macro FILE_CONTENT may be used.

Create job related text file

The create job related text file action settings.


Image 12.2-6 The create job related text file action

The action will create a text file with the specified content. Only one file is created for each job that is passed to the action set.

Setting parameter Description
Name The name of the action.
Location The full path, relative to the server, where the file should be created. This location must include the file name.
Text format The format for the content to write to the file. Default is UTF-8.
Text

The text skeleton for the result file.

If a file should append the content to an existing file the macro FILE_CONTENT may be used.

Change job status

The change job status action settings.


Image 12.2-7 The change job status action

This action will change the status of the related job that was passed to the action set.

Setting parameter Description
Name The name of the action.
Status The status that the job will get. Either use a static value or a dynamically value (from for example an action input dialog)

Change file status

The change file status action settings.


Image 12.2-2 The change file status action

This action will change the file status to the selected value.

Setting parameter Description
Name The name of the action.
Status The status that the file will get. Either use a static value or a dynamically value (from for example an action input dialog)

Job search

The job search action settings.


Image 12.2-8 The job search action

The search action will only perform a search in the Cargo system. Nothing will be affected by this search. The search result may be used by actions following this action.

Setting parameter Description
Name The name of the action.
ID This is the search ID which may be used in actions following this particular action. The macros FOR_EACH_JOB_IN_SEARCH and FOR_EACH_JOB_GROUP_IN_SEARCH may for example use the search result.
Search parameters

The search parameters are the filter to use when doing the search. More than one parameter may be added. The valid parameters are;

  • Job ID: The result will only have jobs with this ID.
  • Job status: The result will only have jobs with this status ID.
  • Job property: This data has a meta data ID (this could for example be the component ID from a profile input form) and the value that this meta data should have to be in the result.
    Note when calling a job search action from external source

    When an action is called from external source the parameters to the call may be used for example for the value field using the macto ACTION_PARAMETER_IN. The parameter to this macro must be used carefully, see the macro section for more information regarding this macro.

  • Profile ID: The result will only have jobs from this profile ID.

Create job

The job creation action settings.


Image 12.2-9 The job creation action

This action will create a new job in the Cargo system.

Setting parameter Description
Name The name of the action.
Login The login name for the user that will create this job. Make sure that the user are enabled to access the profile that is specified in the profile ID below.
Password The password for the named login above.
Profile The profile to use when creating the job.
Move original If this option is selected the original file will be moved by the Cargo server. This is a good thing to use if the action is used in a hotfolder setup.

Save job

The save job action settings.


Image 12.2-10 The save job action

This action will save an existing job in the Cargo system.

Setting parameter Description
Name The name of the action.
Login The login name for the user that will save this job. Make sure that the user are enabled to access the profile that is specified in the profile ID below.
Password The password for the named login above.
Job properties Additional meta data to save with the job.

Delete file from job

The delete file from job action settings.


Image 12.2-11 The delete file from job action

This action will delete the file that is passed to the action from the containing job.

Setting parameter Description
Name The name of the action.