...
Code Block |
---|
language | java |
---|
title | Dodanie dokumentu |
---|
linenumbers | true |
---|
|
InputStream inputStream = ...
DocumentClassService documentClassService=ServiceFactory.getDocumentClassService();
DocumentService documentService=ServiceFactory.getDocumentService();
DocumentClass documentClass = documentClassService.getDocumentClass( "klasa" );
Map<Long, Object> idx = new HashMap<Long, Object>();
idx.put( 1L, "wartość tekstowa" );
idx.put( 2L, 555 );
idx.put( 3L, new Date() );
DocumentDefinition fddefinition = new DocumentDefinition();
fddefinition.setDocumentClassId( dcdocumentClass.getId() );
fddefinition.setFileName( "nazwa.pdf" );
fddefinition.setDescription( "opis" );
fddefinition.setUserName( "admin" );
fddefinition.setIndexes( idx );
fddefinition.setInputStream( inputStream );
WfDocument file = dsdefinition.setActivityId( "103_proces1_zadanie1" );//parametry opcjonalne jeżeli nie zostaną podane dokument zostanie dodany tylko do archiwum
definition.setProcessId( "103_proces1" );// nie będzie dołączony do żadnego procesu
WfDocument document = documentService.addDocument( fddefinition ); |
Code Block |
---|
language | java |
---|
title | Dołączanie dokumentu z archiwum do procesu |
---|
linenumbers | true |
---|
|
documentService.attachDocumentToProcess( documentId, documentClassId, "admin", "103_proces1", "103_proces1_zadanie1" ); |
Wyszukiwanie dokumentów
Do wyszukiwania dokumentów należy używać klasy.
...