File Attachments

You can attach a file to a record in the monitor. This allows users to view or download the file.

File Source

Files in OpenSearch

You can store files in BPC OpenSearch. In this case, a file is attached directly to the monitor data record.

The files should be encoded as a Base64 string and stored in the data record under a dataIndex. To ensure the file can be restored with the correct name and format, the data record must contain the following information:

  • File name

  • MIME type

The data record containing the file can be added to OpenSearch via a BPC log service or an index request. The following example shows a data record with a file attachment:

   {
      "PROCESSID": "2",
      "TEXT": "This is second test object",
      "FILEID": "foodmenu.xml",
      "filename": "foodmenu.xml",
      "contentType": "application/xml",
      "DATA": "PGJyZWFrZmFzdF9tZW51Pgo8Zm9vZD4KPG5hbWU+QmVsZ2lhbiBXYWZmbGVzPC9uYW1lPgo8cHJpY2U+JDUuOTU8L3ByaWNlPgo8ZGVzY3JpcHRpb24+VHdvIG9mIG91ciBmYW1vdXMgQmVsZ2lhbiBXYWZmbGVzIHdpdGggcGxlbnR5IG9mIHJlYWwgbWFwbGUgc3lydXA8L2Rlc2NyaXB0aW9uPgo8Y2Fsb3JpZXM+NjUwPC9jYWxvcmllcz4KPC9mb29kPgo8Zm9vZD4KPG5hbWU+U3RyYXdiZXJyeSBCZWxnaWFuIFdhZmZsZXM8L25hbWU+CjxwcmljZT4kNy45NTwvcHJpY2U+CjxkZXNjcmlwdGlvbj5MaWdodCBCZWxnaWFuIHdhZmZsZXMgY292ZXJlZCB3aXRoIHN0cmF3YmVycmllcyBhbmQgd2hpcHBlZCBjcmVhbTwvZGVzY3JpcHRpb24+CjxjYWxvcmllcz45MDA8L2NhbG9yaWVzPgo8L2Zvb2Q+Cjxmb29kPgo8bmFtZT5CZXJyeS1CZXJyeSBCZWxnaWFuIFdhZmZsZXM8L25hbWU+CjxwcmljZT4kOC45NTwvcHJpY2U+CjxkZXNjcmlwdGlvbj5MaWdodCBCZWxnaWFuIHdhZmZsZXMgY292ZXJlZCB3aXRoIGFuIGFzc29ydG1lbnQgb2YgZnJlc2ggYmVycmllcyBhbmQgd2hpcHBlZCBjcmVhbTwvZGVzY3JpcHRpb24+CjxjYWxvcmllcz45MDA8L2NhbG9yaWVzPgo8L2Zvb2Q+Cjxmb29kPgo8bmFtZT5GcmVuY2ggVG9hc3Q8L25hbWU+CjxwcmljZT4kNC41MDwvcHJpY2U+CjxkZXNjcmlwdGlvbj5UaGljayBzbGljZXMgbWFkZSBmcm9tIG91ciBob21lbWFkZSBzb3VyZG91Z2ggYnJlYWQ8L2Rlc2NyaXB0aW9uPgo8Y2Fsb3JpZXM+NjAwPC9jYWxvcmllcz4KPC9mb29kPgo8Zm9vZD4KPG5hbWU+SG9tZXN0eWxlIEJyZWFrZmFzdDwvbmFtZT4KPHByaWNlPiQ2Ljk1PC9wcmljZT4KPGRlc2NyaXB0aW9uPlR3byBlZ2dzLCBiYWNvbiBvciBzYXVzYWdlLCB0b2FzdCwgYW5kIG91ciBldmVyLXBvcHVsYXIgaGFzaCBicm93bnM8L2Rlc2NyaXB0aW9uPgo8Y2Fsb3JpZXM+OTUwPC9jYWxvcmllcz4KPC9mb29kPgo8L2JyZWFrZmFzdF9tZW51Pg=="
   }

The fields filename and contentType are required and must be named exactly as shown.

File Reference from INUBIT

Files can be stored in INUBIT. How files are stored there depends on the settings in INUBIT.

The files should be made available via a REST endpoint so that they can be downloaded from the BPC (see also Configuring File Downloads in the Monitor).

Configuring File Downloads in the Monitor

After a file or a reference to the file has been saved in the Monitor record, the following settings are required to enable the file to be downloaded.

Configuration: File Column

In the configuration, specify which column in INUBIT contains the file or a reference to the file. The setting is called “ Monitor_FileReferenceColumn ” (ID: column_file).

If the file is stored in OpenSearch, the content of the specified file column is decoded as a Base64 string during download.

If the file cannot be found or encoded in OpenSearch, the content of the file column is used as a file reference in INUBIT. In this case, the content of the file column is included in the query to INUBIT as the URL parameter directory.

Configuration: Downloading from INUBIT

If the file is to be downloaded from INUBIT, the following settings are also required:

  • Function_InubitBackendConnection (inubit_proxyId):
    INUBIT Backend Connection.

  • Function_InubitBaseURL (inubit_baseUrl):
    A fixed component in all URLs to INUBIT.

  • Function_FileDownloadEndpoint (inubit_referenceEndpoint):
    This setting specifies the INUBIT endpoint from which files can be downloaded.

  • Monitor_ProcessID (column_id):
    The query includes information about the process ID as a URL parameter, so the corresponding column must be set.

  • Monitor_HistoryID (column_historyId):
    If the download refers to the child process, the ID of the child process must be included in the query to INUBIT as a URL Parameter. The corresponding column must therefore be set.

Once everything is configured, the URL has the following structure:

{Protokoll}://{Domain}/{inubit_baseUrl}/{inubit_referenceEndpoint}?directory={Inhalt der Datei-Spalte}&processid={processId}&childid={childId}

Configuration: "Download" Action

Downloading files can be triggered via an attachment column (attachment column). The column configuration looks as follows:

   {
      "xtype": "attachmentColumn",
      "width": 200,
      "minWidth": 64,
      "text": "Download"
   }