← Powrót do listy dostępnych zadań automatycznych
Jeśli masz problem ze zrozumieniem jak działa zadanie automatyczne, sprawdź opisy: Zadanie automatyczne, Wykonanie warunkowe, Parametry komponentów
Poprzednie nazwy: Generowanie dokumentu (do wersji 1.0.33)
Kategoria: Dokumenty
Opis
Generuje dokument z podanego szablonu na podstawie aktualnych danych procesu. Przygotowanie szablonu dokumentu zostało opisane na stronie: Szablon DOCX do generowania PDF. Dokument może zostać dołączony do procesu w którym zostało wywołane zadanie automatyczne. Istnieje możliwość ustawienia własnej nazwy dla dokumentu i wybrania jednego z dwóch typów - PDF lub DOCX. Komponent pozwala na ustawienie wartości zmiennych w szablonie przy użyciu mapowania. Jeżeli zmienne w szablonie mają już odpowiadające im zmienne na formularzu, to przy użyciu tego komponentu możemy nadpisać te mapowania.
Parametry konfiguracyjne
Nazwa parametru | Od wersji | Opis | Typ parametru | Wartość domyślna | Rodzaj pola | Uwagi i ograniczenia |
---|---|---|---|---|---|---|
Format* | 1.0.11 | Format pliku, w jakim zostanie wygenerowany dokument. | Tekst | Nieedytowalna lista rozwijalna | Wartości do wyboru: PDF, DOCX | |
Klasa dokumentów* | 1.0.11 | Nazwa klasy dokumentów, do której dodany zostanie wygenerowany dokument. Uwaga - w parametrze musi znaleźć się oryginalna nazwa klasy dokumentów, gdyż tłumaczenia nie są obsługiwane. | Tekst | Edytowalna lista rozwijalna | Wartości do wyboru: <nazwy klas dokumentów dostępnych w systemie> Można wpisać własną nazwę, ale jeżeli komponent nie znajdzie klasy w systemie to wyrzuca informację o błędzie. | |
Szablon* | 1.0.11 | Nazwa szablonu generowanego dokumentu. Szablon powinien zostać załączony do procesu, w którym używamy zadania automatycznego. Sposób dodania szablonu został opisany tutaj (1.1.3) | Tekst | Pole edytowalne | Jeżeli nie znajdzie szablonu w systemie komponent wyrzuca informację o błędzie. | |
Podłącz* | 1.0.11 | Podłącza wygenerowany dokument do procesu. | Logiczny | Nie | Nieedytowalna lista rozwijalna | |
Nowa wersja* | 1.0.11 | Zapisuje podłączony do procesu dokument jako nową wersję. Działa jedynie w przypadku, gdy do procesu jest dołączony dokładnie jeden dokument z tej samej klasy, z tymi samymi indeksami. | Logiczny | Nie | Nieedytowalna lista rozwijalna | |
Nazwa dokumentu | 1.0.24 | Umożliwia podanie własnej nazwy generowanego dokumentu. W przypadku braku uzupełnienia tego parametru, system sam wygeneruje nazwę. | Tekst | Pole edytowalne | Jeżeli w nazwie znajdzie się "/" lub "\" komponent wyrzuca informację o błędzie. | |
Klucze do mapowania | 1.0.11 | Klucze z szablonu, które chcemy zmapować na odpowiednie wartości podane w "Wartościach mapujących". Np. dla wartości w szablonie: "@imie@" wpisujemy klucz "imie" | Tablica wartości tekstowych | Pole edytowalne | ||
Wartości mapujące | 1.0.11 | Wartości, które zapiszemy, bądź którymi nadpiszemy zmienne zadeklarowane w szablonie | Tablica wartości tekstowych | Pole edytowalne |
Parametr*- pole wymagane
Przykładowa konfiguracja
Prosta konfiguracja (bez mappingów i z automatycznie generowaną nazwą):
Zaawansowana konfiguracja:
Przykład zastosowania
The license could not be verified: License Certificate has expired!
← Back to the available automatic tasks list
In case of any problems with understanding how the automatic task works, check: Automatic task, Conditional execution, Component parameters
Previous names: Document generation (till version 1.0.33)
Category: Documents
Description
Generates a document from the given template based on the current process data. Preparation of the document template is described here: DOCX template for generating PDF. The document can be attached to the process in which the automatic task was run. You can set your own name for the document and choose from one of two types - PDF or DOCX. The component allows you to set variable values in the template using the mapping. If the variables in the template already have the corresponding variables on the form, then using this component we can overwrite these mappings.
Configuration parameters
Parameter Name | From version | Description | Parameter type | Default value | Field type | Comments and restricitons |
---|---|---|---|---|---|---|
Format* | 1.0.11 | The file format in which the document will be generated. | Text | Non-editable dropdown list | Values to choose from: PDF, DOCX | |
Document class* | 1.0.11 | The name of the document class to which the generated document will be added. Note - the parameter must contain the original name of the document class, because translations are not supported. | Text |
| Editable dropdown list | Values to choose from: <names of document classes available in the system> You can enter your own name, but if the component does not find a class in the system, it shows an error message. |
Template* | 1.0.11 | The name of the template of the generated document. The template should be attached to the process in which we use the automatic task. The method of adding the template has been described tutaj (1.1.3) | Text |
| Editable field | If it does not find a template in the system, the component throws the error information. |
Attach* | 1.0.11 | Attaches the generated document to the process. | Logical | No | Non-editable dropdown list |
|
New version* | 1.0.11 | Saves the document connected to the process as a new version. It works only when exactly one document with the same indexes from the same class is attached to the process | Logical | No | Non-editable dropdown list |
|
Document names | 1.0.24 | Allows you to enter your own name for the generated document. If this parameter is not filled in, the system will generate the name itself. | Text |
| Editable field | If "/" or "\" is found in the name, the component shows an error message. |
Key fields for mapping | 1.0.11 | The keys from the template that we want to map to the appropriate values given in "Mapping Values". For example, for the values in the template: "@ name @" enter the key "name" | Table of text values |
| Editable field |
|
Mapping values | 1.0.11 | Values that we write, or over which we overwrite the variables declared in the template. | Table of text values |
| Editable field |
|
Parameter*- mandatory field
Configuration example
Simple configuration (no mappings and with automatically generated name):
Advanced configuration:
Application example
The license could not be verified: License Certificate has expired!