Skip to end of metadata
Go to start of metadata

 

If you have a problem understanding how the action works, check: ActionConditional executionComponents parameters

Basic information

Category: eSignature

Action location: Button, Table button

Available from version: 1.0.0

Description

The action places an electronic signature on documents using a certificate using the Szafir module containing cryptographic tools. The resulting signature files are cumulative signatures, i.e. they contain signed data that is attached to the signature file and encoded using Base64. The action, when signing more than one document, does not stop its operation when it encounters an error with a specific document on the side of the Szafir application - after completing the signing operation, the displayed summary window shows information on the number of correctly signed documents and those that could not be signed. Signed documents are saved in the system archive.

Prerequisites

For the action to work properly, you must have Java 1.8 x64 or newer installed, preferably from the Oracle or Eclipse Adoptium distribution. The following programs should also be downloaded and installed:

Action call-up

Leaving an empty conditional field is equal to setting it to "true".

Action location

From version

Conditional execution parameter action

Action call-up condition

Button

1.0.0

Activates action

Pressing the button

Table button1.0.0Activates actionPressing the button
Configuration parameters
Parameter nameFrom versionDescriptionParemeter typeDefault valueField typeComments and restrictions
Files download source*1.0.0

Specifies the source from which the files to be signed are to be downloaded. There are 3 options:

  1. Process - documents attached to the process are downloaded.
  2. Archive - documents are downloaded from the archive, from a specified class of documents.
  3. File identifiers from the archive - specified files by identifier are downloaded from the archive.
Text Uneditable drop-down list
Displayed valuePassed value
ProcessPROCESS
ArchiveARCHIVE
File identifiers from the archiveFILEIDS

If you select "Process" or "Archive", the latest version of the document will be downloaded.

Source document classes [Process/File identifiers from the archive]*1.0.0The names of the classes of documents from which the documents are retrieved. The resulting signed files are saved as new document version in the indicated document classes if the Save as new version parameter is set to Yes.Text values array Uneditable drop-down listThe names of the document classes in the column cannot be duplicated.
Destination document classes [Process/File identifiers from the archive]*1.0.3Paramater indicates to the files from the specified source document classes attached to the process a place to save their corresponding signed files in the selected destination document classes.Text values array Uneditable drop-down listThe parameter is available when the Save as new version parameter is set to No.
Source document class [Archive]*1.0.0The name of the document class from which the documents are retrieved. The resulting signed files are saved as new document version in the indicated document class if the Save as new version parameter is set to Yes.Text Uneditable drop-down list 

Index names [Filtering by indexes - Archive]

1.0.0

Optional filtering by indexes of the selected document class. This parameter specifies the name of the index.

Text values array Uneditable drop-down list / editable fieldList of indexes to choose from after selecting a specific class of documents. If a variable or function is used in the Source document class [Archive] parameter, the field of this parameter becomes an editable field.
Index values [Filtering by indexes - Archive]1.0.0Optional filtering by indexes of the selected document class. This parameter specifies the index value.Text values array Editable field 
File identifiers*1.0.0IDs of files to be downloaded from the archive. The resulting signed files are saved as new document version in the indicated identifiers of document from the archive if the Save as new version parameter is set to Yes.Integer values array Editable field 
Save as new version*1.0.0If set to "Yes", the signature file will be saved as a new version of the input document. If set to "No", the signature file will be saved in the specified document class and indices as a new document.BooleanYesEditable field 
Document classes [Index mapping - Process/File identifiers from the archive]1.0.3The names of the document classes where the files with the signatures will be saved.Text values array Uneditable drop-down listOnly those document classes that have been previously defined in the Destination document classes [Process/File identifiers from the archive] parameter can be used in this parameter. If there is a function or a variable in one of the values of the Destination document classes [Process/File identifiers from the archive] parameter, the rule is not applied.
Index names [Index mapping - Process/File identifiers from the archive]1.0.3The names of the indexes from the selected document classes.Text values array Uneditable drop-down list 
Index values [Index mapping - Process/File identifiers from the archive]1.0.3The values of the indexes from the selected document classes. It is possible to use the SOURCE_FILE_ID and SOURCE_DOCUMENT_CLASS_NAME keywords as mapping information about the source file identifier and the source document class from which the document passed for signature originates.Text values array Editable fieldKeywords are plain, written text - they are not selected from the list of variables as in the case of, for example, context variables.
Destination document class [Archive]*1.0.0Document class to which already signed files can be saved that belong to the indicated document class from the archive.Text Uneditable drop-down list 
Index names [Index mapping - Archive]1.0.0The names of the indexes from the selected document class.Text values array Uneditable drop-down list / Editable fieldList of indexes to choose from after selecting a specific class of documents. If a variable or function is used in the Destination document class [Archive] parameter, the field of this parameter becomes an editable field.
Index values [Index mapping - Archive]1.0.0The values of the indexes from the selected document class. It is possible to use the SOURCE_FILE_ID and SOURCE_DOCUMENT_CLASS_NAME keywords as mapping information about the source file identifier and the source document class from which the document passed for signature originates.Text values array Editable fieldKeywords are plain, written text - they are not selected from the list of variables as in the case of, for example, context variables.
Add document to process1.0.0Attaches a signature file to the process.BooleanNoEditable field 
Execute actions in the document class1.0.0It calls actions which have the source of action set to "Add new document in archive".BooleanNoEditable field 
Save form after action execution1.0.3Saves the form after the action is successfully completed.BooleanNoEditable field 
Mode of operation*1.0.0Defines how the Szafir application works. The "Szafir window" mode enables the creation of a signature using the native graphical user interface. On the other hand, the "Window with PIN code and optional certificate selection" mode performs the signing with the use of a dialog in which the PIN for the cryptographic device and optionally the certificate file are entered.Text Uneditable drop-down list
Displayed valuePassed value
Szafir windowSZAFIR_WINDOW
Window with PIN code and optional certificate selectionPIN_AND_CERTIFICATE_WINDOW

Selecting the "Szafir window" value results in the appearance of the Certificate parameter, and selecting "Window with PIN code and optional certificate selection" - the Certificate parameter and the User selects certificate.

Certificate*1.0.0

File name containing the certificate configuration, which comes from the Plugin Configuration Manager (PCM) panel. The parameter presents a list of all created files with the certificate configuration.

Text Uneditable drop-down list 
User selects certificate1.0.0Specifies whether the user on the form can select the certificate file from the Plugin Configuration Manager (PCM) panel. The selection is possible from the level of the dialog box that appears while the Szafir application is running and includes the certificates specified in the Available certificates parameter.BooleanNieEditable fieldSetting the parameter to "Yes" causes the appearance of the Available certificates parameter and hides the Certificate parameter, while setting the parameter to "No" leaves the Certificate visible.
Available certificates1.0.0It defines the files with the certificate that can be selected by the user on the form from the level of the dialog box. The parameter presents a list of all created files with the certificate configuration.Text values array Uneditable drop-down list 
Signature version*1.0.0

Specifies a signature version.

 

More information...

Text Uneditable drop-down list
Displayed valuePassed value
BESBES
TT
LTV/ALTV_A
Signature format*1.0.0

Specifies the signature format. The parameter presents the list of available formats depending on the selected signature version.

 

More information...

Text Uneditable drop-down list
  • BES
Displayed valuePassed value
ASIC-S-CAdES-BESASIC_S_CADES_BES
ASIC-S-XAdES-BESASIC_S_XADES_BES
CAdES-BESCADES_BES
EPO-XAdES-BESEPO_XADES_BES
PAdES-BESPADES_BES
PKCS#7PKCS7
XAdES-BESXADES_BES
  • T
Displayed valuePassed value
ASIC-S-CAdES-TASIC_S_CADES_T
ASIC-S-XAdES-TASIC_S_XADES_T
CAdES-TCADES_T
EPO-XAdES-TEPO_XADES_T
PAdES-TPADES_T
PKCS#7 with TimePKCS7_WITH_TIME
PKCS#7-TPKCS7_T
XAdES-TXADES_T
  • LTV/A
Displayed valuePassed value
EPO-XAdES-AEPO_XADES_A
EPO-XAdES-A-REFRESHEPO_XADES_A_REFRESH
PAdES-LTVPADES_LTV
PAdES-LTV-REFRESHPADES_LTV_REFRESH
XAdES-AXADES_A
XAdES-A-REFRESHXADES_A_REFRESH
Automatic insertion of a graphic element1.0.3Specifies whether to attach to the document with the PAdES signature a graphic element containing information about the entity providing trust services, the signer and the date of signing.BooleanNoEditable fieldGraphic element insertion settings are visible when the Signature format parameter has one of the following values: PAdES-BES, PAdES-T, PAdES-LTV, PAdES-LTV-REFRESH.
Insert image file1.0.3Specifies whether to add image to the textual information related to the signature, which can be accessed by a file path.BooleanNoEditable field 
Path to the image file1.0.3The absolute path to the image file in .jpg format. There is possibility to use the DEFAULT_IMAGE keyword, which means that the default image file from the plugin will be inserted.TextDEFAULT_IMAGEEditable field

The parameter is visible when Insert image file is set to Yes.

Keyword is plain, written text - It is not selected from the list of variables as in the case of, for example, context variables.

Document page number 1.0.3Defines the page number of the document on which the graphic element is to be placed. If you want to place a graphic element at the end of the document, use a negative value indicating the page number counted from the last one.Text Editable field 
Distance from the left edge of the document%1.0.3Specifies the coordinates of placing the graphic element on the document. The starting point (anchor) on the graphic, i.e. the point from which the position of the graphic is set, is the lower left corner of the image. The distance from the left edge is given in percent.Integer Editable field 
Distance from the bottom edge of the document% 1.0.3Specifies the coordinates of placing the graphic element on the document. The starting point (anchor) on the graphic, i.e. the point from which the position of the graphic is set, is the lower left corner of the image. The distance from the bottom edge is given in percent.Integer Editable field 
Height%1.0.3Defines the height of the graphic element in percent.Integer Editable fieldThe minimum percentage height to display the default icon is 6.
Width%1.0.3Defines the width of the graphic element in percent.Integer Editable fieldThe minimum percentage width to display the default icon is 6.
Debug mode1.0.0Opens the console window of the SzafirHost application while the action is running.BooleanNoEditable field 
Save signing files information 1.0.3Specifies whether to write information about the result of signed files in the columns of the table. The information may include source file IDs and names, signed file IDs, processing statuses and error descriptions.BooleanNoEditable field 
Saving signing information mode1.0.3

Specifies the mode of saving information about the results of signed files in the table. Three modes are available:

  1. Overwrite - overwrites the entire table with information from the last action execution.
  2. Add - adds information to the table without affecting the existing rows.
  3. Update - updates and adds values to the table. The key after which the values are updated is the Source file identifiers parameter. The update mode works on the principle of UPSERT.
Text  
Displayed valuePassed value
OverwriteOVERWRITE
AddADD
UpdateUPDATE
Source file identifiers1.0.2A parameter where the column is indicated for saving source file identifiers (fileIds) which correspond to documents submitted for signature. The parameter is completed after the signature operation is finished.Variable Editable fieldThe parameter is one of the five possible parameters to define that make up the table in the Summary information about the results of signed files section. The table is cleared every time the signature insertion mechanism is called, no matter how many columns it has. The table stores information about the last action invocation.

Source file names

1.0.2A parameter where the column is indicated for saving source file names which correspond to documents submitted for signature. The parameter is completed after the signature operation is finished.Variable Editable fieldThe parameter is one of the five possible parameters to define that make up the table in the Summary information about the results of signed files section. The table is cleared every time the signature insertion mechanism is called, no matter how many columns it has. The table stores information about the last action invocation.
Identifiers of signed files1.0.2A parameter where the column is indicated for saving identifiers of signed and result files (fileIds). The parameter is completed after the signature operation is finished.   

The parameter is one of the five possible parameters to define that make up the table in the Summary information about the results of signed files section. The table is cleared every time the signature insertion mechanism is called, no matter how many columns it has. The table stores information about the last action invocation.

When the signature operation fails for a given source file, the cell in the column will be blank.

File processing statuses1.0.2A parameter where the column is indicated for saving statuses of performing operations on file signatures. Two status values are available: OK - in case of a successful signature, ERROR - in case of an error. The parameter is completed after the signature operation is finished.   The parameter is one of the five possible parameters to define that make up the table in the Summary information about the results of signed files section. The table is cleared every time the signature insertion mechanism is called, no matter how many columns it has. The table stores information about the last action invocation.
Error descriptions1.0.2

A parameter where the column is indicated for saving error descriptions occurring during file signature attempts for files from Source file identifiers. The parameter value is populated only when the processing status for the given file is ERROR. The parameter is completed after the signature operation is finished.

Variable Editable field

The parameter is one of the five possible parameters to define that make up the table in the Summary information about the results of signed files section. The table is cleared every time the signature insertion mechanism is called, no matter how many columns it has. The table stores information about the last action invocation.

If the specified source file is successfully signed, the cell in the column will be blank.

Parametr*- mandatory field

Configuration example

Example of operation
 Mode of operation "Window with PIN code and optional certificate selection"

An example of operation based on the action configuration below.

 

One document with the given index values is signed and its content with the signature will be saved as a new version of the document. After clicking on the button on the form under which the action is defined, a dialog box for entering the PIN code and selecting the certificate will open. In the "Certificate" field, you can choose from two certificate configuration items based on the "Available certificates" parameter configured in this action.

 

After approval, the document is signed. In this mode, the native Szafir application window does not open. The signature operation is entirely based on the contents of the certificate configuration file. After the action is completed, the signature operation summary window appears. During the action, the console of the SzafirHost application is launched.

Change log

1.0.0 (applicable documentation)

  • Adding a component

1.0.1

  • Support for ENTER and ESC keys in the PIN window. Libraries and certificates update.

1.0.2 (applicable documentation)

  • Support for ENTER and ESC keys in the PIN window. Adding parameters Source file identifiers, Source file names, Identifiers of signed files and File processing statuses, deleting lines in the table with errors each time the signature is inserted. Adding keywords "SOURCE_FILE_ID" and "SOURCE_DOCUMENT_CLASS_NAME" under the Index value [Save] parameter.

1.0.3 (applicable documentation)

  • Enabling the signing of documents attached to the process from many document classes and saving their files with the signature to many destination document classes. Saving the form after the action is successful. Adding the option of updating and adding data in the table summarizing the results of signed files. Allowing you to insert a watermark into the signed document.

1.0.4

  • Updating libraries to szafir_sdk_1.8.4 Build 450. Adding a default icon in the "Path to the image file" parameter. Supplementing the description of the "Document page number" parameter with the possibility of using negative integers.
Package with a sample form using the action

  • No labels

0 Comments

You are not logged in. Any changes you make will be marked as anonymous. You may want to Log In if you already have an account.