Search code examples
lotus-noteslotus-dominolotusscript

Java Agent in Domino designer not signed after import


I imported a java-agent into an iNotes application using DXLImporter. The agent seems to be signed using my User Id. When imported into the host application, I am receiving the fowllowing error in domino designer:

Could not open the editor: Error - Document is not signed..

I tried to configure the agents before exporting them as DXL. I also configured my DXLImporter like this:

    dip.ReplaceDBProperties = False 
    'Don't import any documents
    dip.DocumentImportOption = DXLIMPORTOPTION_IGNORE 
    dip.ReplicaRequiredForReplaceOrUpdate = False 
    'Use ACL of host DB
    dip.ACLImportOption =  DXLIMPORTOPTION_IGNORE
    dip.DesignImportOption =  DXLIMPORTOPTION_REPLACE_ELSE_CREATE

I would like to ignore my signature or to programmatically sign the stuff with the User Id of the host application if this is possible.


Solution

  • You can easily use the sign method of NotesDatabase- Class to sign the whole database, or just some specific elements or even one specific element. Check out this link for the designer help for is method.

    Here is an excerpt of the linked site:


    Call notesDatabase.Sign( [ documentType% ] [ , existingSigsOnly ] [ , nameStr$] [ , nameStrIsNoteID ] )

    Parameters

    documentType%

    Integer. Optional. One of the following constants.

    DBSIGN_DOC_ACL (64) signs the ACL DBSIGN_DOC_AGENT (512) signs all agents DBSIGN_DOC_ALL (32767) (default) signs all elements except data documents' active content DBSIGN_DOC_DATA (1) signs all data documents' active content (hotspots) DBSIGN_DOC_FORM (4) signs all forms DBSIGN_DOC_HELP (256) signs the "About Database" and "Using Database" documents DBSIGN_DOC_ICON (16) signs the icon DBSIGN_DOC_REPLFORMULA (2048) signs the replication formula DBSIGN_DOC_SHAREDFIELD (1024) signs all shared fields DBSIGN_DOC_VIEW (8) signs all views

    existingSigsOnly

    Boolean. Optional.

    True to sign only elements with existing signatures. False (default) to sign all elements.

    nameStr

    String. Optional. Programmatic name or note ID of a single design element. If this parameter is not specified, all design elements of type parameter 1 are signed.

    nameStrIsNoteID

    Boolean. Optional.

    True if parameter 3 represents a note ID. False (default) if parameter 3 represents a programmatic name.


    For your example it would be something like:

    call db.sign(DBSIGN_DOC_AGENT, False, "NameOfYourAgent", False)