Skip to main content

eBA Plus AI İle Veri Maskeleme: Formun PDF Halinin Maskelenmesi

Bu doküman eBA Plus'ta AI ile veri maskeleme yapısını bir eBA formunu doldurup akışın bir sonraki onaycısında bu formun maskeli *.pdf halini görmesini sağlayan yapıyı örneklemektedir.

Bu dokümanı okumadan önce eBA Plus AI İle Veri Maskeleme Dokümanı 'nın okunması gerekmektedir.

Giriş

Bu süreçte, süreç içinde ki bir forma hassas bilgiler içeren alanlar eklenecek, kullanım anında akış üzerinde bu form *.pdf'e dönüştürülüp ardından dönüştürülen *.pdf AI ile maskelenerek bir sonraki onaycının formun *.pdf halinin maskelenmiş versiyonunu görmesi sağlanacaktır.

Doküman Yönetimi

Doküman yönetimi tarafında süreç içerisinde formun *.pdf halinin ve bu *.pdf dokümanın AI ile maskelenmiş halinin tutulacağı AI kütüphanesi oluşturulmalıdır.

İş Akış Sürecini Tasarlama

Workflow Studio’da yeni bir süreç tanımlanır. Yapılacak örnek için Workflow Project tipinde bir süreç yeterli olacaktır.

Akış aşağıdaki gibi olmalıdır. Form akış başlatandan bir sonraki adıma gönderildiğinde PDF'e Aktar nesnesi ile *.pdf'e dönüştürülüp Dokuman1 nesnesine atanmalı. Bu yeni oluşturulan *.pdf Dokuman1 nesnesi aracılığıyla AI ile akış üzerinde ki Fonksiyon nesnesi üzerinde maskelenip, maskelenen *.pdf dosyasının yine Dokuman1 nesnesine aktarılmasının ardından bir sonraki onaycının maskelenmiş dokümanı görmesi sağlanır.

Ardından Workflow Studio'da Projeye sağ tıklayıp Project Properties -> Reference Files sekmesinden aşağıdaki şekilde eBAPI.dll'i referans olarak eklenir.

  • %SystemPath%\Common\eBAPI.dll

Daha sonra akış kodunun using tanımlamalarına aşağıdaki değerler eklenmelidir.

using eBAPI;
using eBAPI.Connection;
using eBAPI.DocumentManagement;

Akabinde doküman içerisinde hangi kategorideki veriler nasıl maskelenecekse bu değerler tanımlanır.

List<MaskedDataOption> showOptions = new List<MaskedDataOption>
{
new MaskedDataOption
{
Category = DataCategories.Unknown,
ActionType = DataMaskingActionTypes.Change,
ActionValue = "[UNKNOWN]",
RestrictedShowOptions = null
},
new MaskedDataOption
{
Category = DataCategories.FullName,
ActionType = DataMaskingActionTypes.ShowOnlyFirstCharacters,
ActionValue = null,
RestrictedShowOptions = null
},
new MaskedDataOption
{
Category = DataCategories.Address,
ActionType = DataMaskingActionTypes.Change,
ActionValue = "[GİZLİ]",
RestrictedShowOptions = null
},
new MaskedDataOption
{
Category = DataCategories.Email,
ActionType = DataMaskingActionTypes.Hide,
ActionValue = null,
RestrictedShowOptions = null
},
new MaskedDataOption
{
Category = DataCategories.NationalIdNumber,
ActionType = DataMaskingActionTypes.RestrictedShow,
ActionValue = null,
RestrictedShowOptions = new Dictionary<DataRestrictedShowOptions, int>
{
{DataRestrictedShowOptions.ShowFirstXCharacters, 3}
}
},
new MaskedDataOption
{
Category = DataCategories.TaxNumber,
ActionType = DataMaskingActionTypes.RestrictedShow,
ActionValue = null,
RestrictedShowOptions = new Dictionary<DataRestrictedShowOptions, int>
{
{DataRestrictedShowOptions.ShowLastXCharacters, 3}
}
},
new MaskedDataOption
{
Category = DataCategories.SocialSecurityNumber,
ActionType = DataMaskingActionTypes.RestrictedShow,
ActionValue = null,
RestrictedShowOptions = new Dictionary<DataRestrictedShowOptions, int>
{
{DataRestrictedShowOptions.ShowFirstLastXCharacters, 3}
}
},
new MaskedDataOption
{
Category = DataCategories.CreditCardNumber,
ActionType = DataMaskingActionTypes.RestrictedShow,
ActionValue = null,
RestrictedShowOptions = new Dictionary<DataRestrictedShowOptions, int>
{
{DataRestrictedShowOptions.HideFirstXCharacters, 3}
}
},
new MaskedDataOption
{
Category = DataCategories.Iban,
ActionType = DataMaskingActionTypes.RestrictedShow,
ActionValue = null,
RestrictedShowOptions = new Dictionary<DataRestrictedShowOptions, int>
{
{DataRestrictedShowOptions.HideLastXCharacters, 3}
}
},
new MaskedDataOption
{
Category = DataCategories.BankAccountNumber,
ActionType = DataMaskingActionTypes.Hide,
ActionValue = null,
RestrictedShowOptions = null
},
new MaskedDataOption
{
Category = DataCategories.InstitutionName,
ActionType = DataMaskingActionTypes.RestrictedShow,
ActionValue = null,
RestrictedShowOptions = new Dictionary<DataRestrictedShowOptions, int>
{
{DataRestrictedShowOptions.ShowFirstXCharacters, 1}
}
},
new MaskedDataOption
{
Category = DataCategories.Country,
ActionType = DataMaskingActionTypes.Change,
ActionValue = "[COUNTRY]",
RestrictedShowOptions = null
},
new MaskedDataOption
{
Category = DataCategories.City,
ActionType = DataMaskingActionTypes.Change,
ActionValue = "[CITY]",
RestrictedShowOptions = null
},
new MaskedDataOption
{
Category = DataCategories.IPAddress,
ActionType = DataMaskingActionTypes.RestrictedShow,
ActionValue = null,
RestrictedShowOptions = new Dictionary<DataRestrictedShowOptions, int>
{
{DataRestrictedShowOptions.ShowFirstLastXCharacters, 2}
}
},
new MaskedDataOption
{
Category = DataCategories.Date,
ActionType = DataMaskingActionTypes.Change,
ActionValue = "[DATE]",
RestrictedShowOptions = null
},
new MaskedDataOption
{
Category = DataCategories.InvoiceNumber,
ActionType = DataMaskingActionTypes.ShowOnlyFirstCharacters,
ActionValue = null,
RestrictedShowOptions = null
},
new MaskedDataOption
{
Category = DataCategories.Website,
ActionType = DataMaskingActionTypes.Change,
ActionValue = "[LINK]",
RestrictedShowOptions = null
},
new MaskedDataOption
{
Category = DataCategories.Salary,
ActionType = DataMaskingActionTypes.Hide,
ActionValue = null,
RestrictedShowOptions = null
},
new MaskedDataOption
{
Category = DataCategories.Amount,
ActionType = DataMaskingActionTypes.Change,
ActionValue = "[AMOUNT]",
RestrictedShowOptions = null
},
new MaskedDataOption
{
Category = DataCategories.BankName,
ActionType = DataMaskingActionTypes.ShowOnlyFirstCharacters,
ActionValue = null,
RestrictedShowOptions = null
}
};

PDF'e Aktar nesnesinin kodlarıda aşağıdaki gibi olmalıdır.

public void PDFeAktar1_Execute()
{
//<#eBA Workflow Studio created code begin> -- do not remove
eBAConnection con = CreateServerConnection();
con.Open();
try
{
PDFExport ebapdfexport = new PDFExport(con);

//Documents to export
ebapdfexport.AddDocument(Dokuman1.Path, "default");
ebapdfexport.Export();

//Save exported document
string filename = @"AI/" + Process + "-" + ProcessId.ToString() + ".pdf";
ebapdfexport.SaveToDMFileSystem(filename);
Dokuman1.Path = filename;
}
finally
{
con.Close();
}
//<#eBA Workflow Studio created code end> -- do not remove
}

Ardından akış içerisinde bulunan fonksiyon nesnesine aşağıdaki kodlar eklenmelidir.

public void maskForm_Execute()
{
eBAConnection con = CreateServerConnection();
con.Open()

DMFile file = con.FileSystem.CreateMaskedDocument(Dokuman1.Path, showOptions);
Dokuman1.Path = file.Path;

con.Close();
}

Form Tasarlama

Süreç içinde ki form görseldeki şekilde hassas bilgiler içermelidir.

Bu aşamadan sonra proje derlenmelidir.

Çalıştırma

Süreç açıldığında form üzerine eklenen hassas bilgi içermesi gereken alanlar doldurulur, ardından bir sonraki onaycıya gönderilir. Bu aşamada form *.pdf'e aktarılır, daha sonra bu *.pdf AI'a gönderilerek hassas bilgiler maskelenir. En son onaycıya geldiğinde onaycı, oluşturulan *.pdf'in maskelenmiş halini görecektir.

Maskeleme işlemi doküman boyutuna göre ortalama 15-20 saniye sürebilir. Bir hata oluştuğu durumda Olay Günlük Görüntüleyici üzerindeki Workflow Service kategorisinden takibi sağlanabilir.