Es gibt folgende Aktionen, um mit edoc documents-Service zu interagieren:
-
document\DeleteDocument - edoc automate -
document\GetDocument - edoc automate -
document\GetDocumentAttributes - edoc automate -
document\GetDocumentContent - edoc automate -
document\GetDocumentsBySchema - edoc automate -
document\GetNewDocumentsBySchema - edoc automate -
document\GetSchema - edoc automate -
document\GetSchemaDetails - edoc automate -
document\SaveDocument - edoc automate -
document\UpdateAttributes - edoc automate -
document\NewDocument - edoc automate -
document\GetDocumentByExternalId - edoc automate -
document\GetDocumentOcr - edoc automate
Gut zu wissen
Die Funktionen in Verbindung mit Schemas wurden aufgrund der Komplexität nicht als Aktionen erstellt. Im PHP-Code (z.B. in einer Plug-In-Aktion) können Sie stattdessen eine Instanz der DocumentService-Klasse erstellen und auf die folgenden Funktionen zurückgreifen:
-
getSchemas(): array -
getSchema(string $schemaName): array -
saveSchema(string $schemaName, array $data): void -
deleteSchema(string $schemaName): void -
getSchemaWebhooks(string $schemaName, string $appName): array -
saveSchemaWebhooks(string $schemaName, string $appName, array $data): void -
deleteSchemaWebhooks(string $schemaName, string $appName): void
Beispiel:
PHP
$dsClient = \edoc\appserver\services\DocumentService::GetInstance();
$dsClient->saveSchema(
'order-confirmation.active',
[
"label": [
"de": "Auftragsbestätigung | Aktiv",
"en": "Order confirmation | Active"
],
"attributes" => [
"order_description": [
"type": "nullable|string",
"label": [
"de": "Beschreibung",
"en": "Description"
]
],
"vendor_id": [
"type": "nullable|string",
"label": [
"de": "Lieferanten-Nr.",
"en": "Vendor ID"
]
]
]
]
);