Polish | |||||
---|---|---|---|---|---|
WstępDokument w systemie PlusWorkflow zawiera informację o pliku(nazwa, rozmiar, wersja itp.) i indeksach (polach zdefiniowanych w klasie dokumentów). Dokumenty są zawsze zapisywane w archiwum systemowym. Mogą być również przypisywane do zadań.
|
...
Przydatne klasy:
Operacje na dokumentachDo wykonywania operacji na dokumentach należy używać usługi DocumentService. Umożliwia ona dodawania nowych dokumentów, zmianę indeksów, usunięcie, dołączanie lub odłączenie z/do procesu/zadania. Przykłady:
Wyszukiwanie dokumentów Do wyszukiwania dokumentów należy używać klasy DocumentFinder
Przedstawiona wyżej metoda wyszukuje dokumenty o indeksach równych (operator '=' ) podanym wartościom i wszystkie warunki łączy operatorem logicznym AND. Jeżeli chcemy stworzyć bardziej zaawansowane warunki wyszukiwania możemy wykorzystać następującą metodę:
W powyższym przykładzie zdefiniowaliśmy operatory wyszukiwania, lecz warunki nadal są połączone logicznym operatorem AND. Aby to zmienić możemy wykorzystać grupowanie filtrów:
Powyższy przykład utworzy następujący warunek: idx_3 > date OR idx_1 = '%test' OR ( idx_5 = 'abc' AND idx_2 = 555 )
Podając argument WfDocument.JOIN_DOC_CLASS dołączymy informacje o klasie dokumentów.
Wyszukiwanie i zarządzanie dokumentami w zadaniach/procesachDo zarządzania dokumentami i ich wyszukiwania w zadaniach oraz pobierania szczegółowych informacji o nich można używać usługi ActivityDocumentService.
Drugi parametr jest opcjonalny. Do wyszukiwania dokumentów wg kryteriów dostępne są usługi : findOne, findByCriteria, getAll, getCountedResult itp. ImplementacjaWfDocument |
Klasa WfDocument |
reprezentuje dokument w systemie. Tworzy powiązanie między |
klasami WfFile, WfFileVersion |
oraz indeksami dokumentu(wartościami z tabeli pm_idx_000x). WfFile |
Klasa WfFile |
reprezentuje plik w systemie. Zawiera podstawowe informacje o pliku. WfFileVersion |
Klasa WfFileVersion |
reprezentuje wersję pliku w systemie. Relacja między |
obiektami WfFile, |
a WfFileVersion |
to 1-do-1 |
Operacje na dokumentach
Do wykonywania operacji na dokumentach należy używać usługi DocumentService. Umożliwia ona dodawania nowych dokumentów, zmianę indeksów, usunięcie, dołączanie lub odłączenie z/do procesu/zadania.
Przykłady
English | |||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
IntroductionA document in PlusWorkflow contains information about the file (name, size, version, etc.) and indexes (fields defined in the document class). Documents are always saved in the system archive. They can also be assigned to tasks.
Useful classes:
Operations on documentsUse DocumentService to perform operations on documents. It allows you to add new documents, change indexes, delete, attach or detach from/to a process/task. Examples:
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
...
|
Wyszukiwanie dokumentów
Do wyszukiwania dokumentów należy używać klasy.
Document Search Use the DocumentFinder class to search for documents
The method presented above searches for documents with indexes equal (operator '=' ) to the given values and combines all conditions with the logical operator AND. If you want to create more advanced search conditions, you can use the following method:
In the above example, we have defined search operators, but the conditions are still connected by a logical AND operator. To change this, we can use filter grouping:
The above example will create the following condition: idx_3 > date OR idx_1 = '%test' OR ( idx_5 = 'abc' AND idx_2 = 555 )
Specifying the WfDocument.JOIN_DOC_CLASS argument will include the document class information.
Searching and managing documents in tasks/processes
You can use ActivityDocumentService to manage and search for documents in tasks and retrieve detailed information about them.
It allows you to :
The second parameter is optional. If in the returned objects, some information is not filled in then, depending on your needs, you need to provide constants from ActivityDocument as additional parameters: JOIN_USER, JOIN_VERSION, JOIN_FILE, JOIN_PROCESS, JOIN_ACTIVITY. You can specify more than one constant by adding them as further parameters. For searching documents by criteria, services are available : findOne, findByCriteria, getAll, getCountedResult, etc. ImplementationWfDocument The WfDocument class represents a document in the system. It creates a link between the classes WfFile, WfFileVersion and the indexes of the document(values from the pm_idx_000x table). WfFileThe WfFile class represents a file in the system. It contains basic information about the file. WfFileVersionThe WfFileVersion class represents the version of a file in the system. The relationship between WfFile objects and WfFileVersion is 1-to-1. |