Skip to content

Commit

Permalink
TE-641: Update document for process element
Browse files Browse the repository at this point in the history
  • Loading branch information
trungmaihova committed Jul 29, 2024
1 parent 073060e commit f0ec3a7
Show file tree
Hide file tree
Showing 8 changed files with 31 additions and 53 deletions.
28 changes: 0 additions & 28 deletions azure-blob-connector-product/.classpath

This file was deleted.

20 changes: 1 addition & 19 deletions azure-blob-connector-product/.gitignore
Original file line number Diff line number Diff line change
@@ -1,19 +1 @@
# general
Thumbs.db
.DS_Store
*~
*.log

# java
*.class
hs_err_pid*

# maven
target/
lib/mvn-deps/

# ivy
classes/
src_dataClasses/
src_wsproc/
logs/
/bin/
Original file line number Diff line number Diff line change
@@ -1,10 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?><project-modules id="moduleCoreId" project-version="1.5.0">

<wb-module deploy-name="azure-blob-connector-product">

<wb-resource deploy-path="/" source-path="/webContent" tag="defaultRootSource"/>

<wb-resource deploy-path="/WEB-INF/classes" source-path="/src"/>

<wb-resource deploy-path="/WEB-INF/classes" source-path="/src_wsproc"/>

<wb-resource deploy-path="/WEB-INF/classes" source-path="/src_dataClasses"/>
<wb-resource deploy-path="/WEB-INF/classes" source-path="/"/>

<property name="context-root" value="azure-blob-connector-product"/>

<property name="java-output-path" value="/azure-blob-connector-product/target/classes"/>

</wb-module>

</project-modules>
25 changes: 20 additions & 5 deletions azure-blob-connector-product/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ In the project, you only add the dependency in your pom.xml and call public APIs
<version>${process.analyzer.version}</version>
</dependency>
```
** Below is an example for connect by client secret **
**2. Azure Blob connection in variables**

You need to provide Azure Blob connection in variables.yaml. Below is an example for connect by client secret
```yaml
Variables:
AzureBlob:
Expand All @@ -33,15 +35,28 @@ Variables:
ContainterName: ''
```
**2. Call the constructor to set some basic information. Each instance of the advanced process analyzer should care about one specific process model. This way we can store some private information (e.g. simplified model) in the instance and reuse it for different calculations on this object.**
## For Process GUI
**1. What is support in BlobStorage Callable Sub Process?**
![azure-blob-connector](images/BlobStorageFunctions.png)
**2. How to call an event from BlobStorage Callable Sub Process?**
- From Extensions on Tool Bar, we can see a BlobStorage element
![azure-blob-connector](images/ElementInExtensions.png)
- We can draw a process with uploadFromUrl selection and field some information like: external url, blob name, the directory on Azure Blob Container, ..
![azure-blob-connector](images/AddBlobStorageAndCallFunction.png)
## For Java Developer
**1. Call the constructor to set some basic information. Each instance of the advanced process analyzer should care about one specific process model. This way we can store some private information (e.g. simplified model) in the instance and reuse it for different calculations on this object.**
```java
/**
* @param process - The process that should be analyzed.
*/
public AzureBlobStorageService(BlobServiceClient blobServiceClient, String container)
```

**3. Application requests to Azure Blob Storage must be authorized. You must to create a BlobServiceClient.**
**2. Application requests to Azure Blob Storage must be authorized. You must to create a BlobServiceClient.**

- This credential authenticates the created service principal through its client secret
```java
Expand All @@ -60,7 +75,7 @@ Variables:
```java
/**
* Create client to a storage account.
* @param connectionString - onnection string of the storage account
* @param connectionString - connection string of the storage account
* @param endpoint - URL of the service
* @return a {@link BlobServiceClient} created from the configurations in this builder
*/
Expand All @@ -79,7 +94,7 @@ Variables:
public static BlobServiceClient getBlobServiceClient(String accountName, String accountKey, String endpoint) {}
```

**4. You can call `uploadFromUrl` to upload a file from url, `getDownloadLink` to get download link of a blob.**
**3. You can call `uploadFromUrl` to upload a file from url, `getDownloadLink` to get download link of a blob.**
```java
/**
* The API to copy operation from a source object URL
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
import org.apache.commons.lang3.StringUtils;
import org.apache.http.HttpStatus;

import com.axonivy.cloud.storage.azure.blob.connector.BlobServiceClientHelper;
import com.axonivy.cloud.storage.azure.blob.connector.StorageService;
import com.axonivy.cloud.storage.azure.blob.connector.internal.helper.BlobSASHelper;
import com.azure.core.http.rest.PagedResponse;
Expand Down

0 comments on commit f0ec3a7

Please sign in to comment.