From 99c0a61a9617637e8b5114c2fc381486ff4f91d9 Mon Sep 17 00:00:00 2001 From: Martin Vogel <martin.vogel@sinc.de> Date: Wed, 22 Jun 2022 19:06:28 +0200 Subject: [PATCH] #414 Update workflow docu --- client/README.md | 51 ++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 45 insertions(+), 6 deletions(-) diff --git a/client/README.md b/client/README.md index 360a90d89..eb76e58cf 100644 --- a/client/README.md +++ b/client/README.md @@ -1,21 +1,60 @@ ## Client Module ### API Flow + The SdkClientFactory provides fluent API client both for **Sender** and **Subscriber**. -As the flow chart below shows, the fluent client guides through all essentials calls -in order to hand in a correct **Submission**. +As the flow chart below shows, the fluent client guides through all essentials calls in order to hand in a correct ** +Submission**. #### Api client flow for sending a submission +For the actual sender client those calls look like this: + + +<table> +<tr> +<th>Workflow</th> +<th>Java sample calls</th> +</tr> +<tr> +<td> + ```mermaid -flowchart LR +flowchart TD + +A[Create Client] --> B(Provide DestinationID) +B -->|get encryption key| C[Add Attachments] +C -->|send| D[SubmissionForPickup] +C -->|next| E[Add Data] +E -->|send| D[SubmissionForPickup] +``` + +</td> +<td> + +```java -A[retrieveOAuthToken] --> B(Upload Attachements) -B -->|encrypt Attachments| C[Create Submission] -B -->|upload Attachments| C[Result 2] +List<File> attachments... + +// Send without data + ClientFactory.senderClient() + .withDestination(UUID.randomUUID()) + .withAttachments(attachments) + .submit(); + +// Send with data + ClientFactory.senderClient() + .withDestination(UUID.randomUUID()) + .withAttachments(attachments) + .withData("some json or xml content") + .submit(); ``` +</td> +</tr> +</table> + #### Api client flow for subscribing to a submission ```mermaid -- GitLab