Skip to content

Digital Signature Code Generation Support

The IFS Signature Service allows a technician to sign a document after the work is complete. The signature is stored and associated with the document. In order to enable digital signatures, relevant properties are added to the respective models.

Entity Models

Digital Signature support for entity models is handled through the following properties:

Property Name Level Description
DigitalSignatureColumn Entity Enables the use of digital signatures by an entity
DigitalSignatureEnforced Attribute Enables an attribute to have a digital signature
DigitalSignatureKeyReference Association Enables one-to-many digital signature mapping from the main LU to child LUs

According to the property settings, the code generator will add additional code to the Check_Common___ method of the apy file.

DigitalSignatureColumn

This property enables an entity to bind with a Digital Signature using the column specified as a reference to DssDocument LU.

Syntax

Parameter Description
Column Name Table column name of the attribute reference to DssDocument LU
Considerations
1 Entity should have reference to DssDocument LU binding with attribute specified as "Column Name" parameter
2 Persistent or derived attributes can be specified as the digital signature column
3 Reference to DssDocument should be specified with necessary additional settings. If the entity component does not have a static dependency on FNDDSS component, it should be specified with DynamicComponentReference property.
Sample

Validations
1 Digital signature enabled entity should have reference to DssDcoument LU
2 Reference to DssDocument LU should bind with attribute specified in DigitalSignatureColumn property

DigitalSignatureEnforced

This is an optional attribute level property making a digital signature mandatory for any updates to the attribute value when digital signatures are enabled for the LU.

Syntax

Property Value Description Implementation
default Enables standard Digital Signature check implementation None
custom Enables custom Digital Signature check implementation in Check_Digital_Signature_Attr___ method Developers need to implement Check_Digital_Signature_Attr___ method in plsql file. Otherwise, generated apy code is not deployable to the database.
Considerations
1 Entity should be Digital Signature enabled with DigitalSignatureColumn property
2 Digital Signature can be enforced on multiple attributes
Sample

Validations
1 Entity should be Digital Signature enabled with DigitalSignatureColumn property

DigitalSignatureKeyReference

This property enables one-to-many Digital Signature mapping from the main LU to child LUs where the actual signature is attached to the main LU but validations need to take place at the child level.

Syntax

Property Value Description
true Enables Digital Signature mapping from main LU to child LU
Considerations
1 Entity should be Digital Signature enabled with DigitalSignatureColumn property
2 Only one reference can be a Digital Signature key reference
Sample

Validations
1 Entity should be Digital Signature enabled with DigitalSignatureColumn property
2 Only one association reference can be a Digital Signature key reference

Client Models

Setting up a Digital Signature

The following properties can be used to set up a digital signature.

1. digitalsignature

Sets up a digital signature.

Syntax
digitalsignature for <Entity_Name> { }
Parameter Description
<Entity_Name> Entity name of the signature entry
Considerations

This syntax can only be used in Lists and Groups. Lists marked with the digitalsignature property will have all rows in the data source appear in the generated PDF irrespective of the defined paging size.

2. hashcontent

Used for hash content generation of Digital Signatures. Informs the server to hash the contents of each row when evaluated to true.

Syntax
hashcontent = [<Condition>];
Parameter Description
<Condition> Condition to evaluate for content hashing
Sample
list RemovePartList for RemovedPartLineVirtual {
   label = "Removed Parts";
   multiselect = [false];
   orderby = TaskPartId desc;
   digitalsignature for AvExeTaskPart {
      hashcontent = [SignedFlag = true];
   }
}

3. signaturemappingattribute

Used to specify the DB column name when it cannot be derived from the field or badge name. This property is optional and must always be in all caps.

Syntax
signaturemappingattribute = <Column_Name>;
Parameter Description
<Column_Name> Column name of the DB entity
Considerations

This syntax can only be used in Fields and Badges.

Sample

signaturemappingattribute used in a Badge and Field

4. excludefromsignaturemapping

When true, the field will be excluded from hash calculations used in Digital Signatures. The default value is false.

Syntax
excludefromsignaturemapping = true;
Considerations

This syntax can only be used in Fields and Badges.

Sample

excludefromsignaturemapping used in a Field

Signing a Document

1. signdocument

Instruction to trigger the signing process. This syntax can be used in a command's execute block.

Syntax
variable <Variable_Name> Structure(EsigResponseStructure);
signdocument into <Variable_Name> { }

Or

variable <Variable_Name> { 
    type = Structure(EsigResponseStructure);
}
signdocument into <Variable_Name> { }
Parameter Description
EsigResponseStructure An implicit structure defined by the framework
Considerations

It is mandatory to use EsigResponseStructure as the structure type when used with signdocument. Include FndEsignature.fragment in the projection when EsigResponseStructure is used with signdocument.

FndEsignature.fragment

structure EsigResponseStructure {
    attribute Guid Text;
    attribute State Text;
}
Sample
command SignCommand for EsigRecordWorkVirtual {
   label = "Sign";
   enabled = [SignEnable and(ESigPermission = "Yes" or ESigPermission = null)];
   variable SignResponse {
      type = Structure(EsigResponseStructure);
   }
   execute {
      signdocument into SignResponse {
         keyref = ParentKeyRef;
         luname = ParentLuName;
         filenameprefix = "Record-work";
         documenttype = pdf;
      }
      alert("Signing outcome: ${SignResponse.Guid} - ${SignResponse.State}");
      if [SignResponse.State = "SUCCESS"] {
         call SignRecordWork(TaskId, SignResponse.Guid);
         set SignEnable = false;
         if[Source = "TASK_DETAIL"] {
            navigate back;
         }
         else {
            navigate back;
            navigate {
               page MyWorkPage {
                  filter(TaskId, TaskId);
               }
            }
         }
         alert("***** ${SignResponse.Guid}");

      }
      if [SignResponse.State = "FAIL"] {
         error("Failed to record electronic signature. Review changes and try again.");
      }
      exit;
   }
}

2. filenameprefix

Specifies the prefix used for formatting the file name, always being suffixed with a GUID. The maximum length of the filename consisting of the prefix, suffix and file extension is 100 chars due to a limitation in the File Storage Service.

Syntax
filenameprefix = "<Prefix>";
Considerations

If excluded, the file name will be formatted only using a GUID.

Sample
command Sign for EsigReleaseAircraftVirtual {
   label = "Sign";
   visible = [IsWpComplete = false and Status = "Completed" and(ESigPermission = "Yes" or ESigPermission = null)];
   variable SignResponse {
      type = Structure(EsigResponseStructure);
   }
   execute {
      signdocument into SignResponse {
         keyref = ParentKeyRef;
         luname = ParentLuName;
         filenameprefix = "Release Aircraft";
         documenttype = pdf;
      }
    }
}

Mobile App models

The documentation for Mobile apps resides under the following two pages: