Skip to content

Commit

Permalink
Merge pull request #63 from infor-cloud/localWorkspaceAPIs
Browse files Browse the repository at this point in the history
Local workspace APIs Documentation. Delivery one.
  • Loading branch information
filiphakansson1 authored Oct 18, 2023
2 parents 329d69a + d66e7f1 commit 3796273
Show file tree
Hide file tree
Showing 10 changed files with 226 additions and 9 deletions.
2 changes: 1 addition & 1 deletion _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ aux_links:
footer_content: "Copyright &copy; 2020 Infor. Distributed by an <a href=\"https://raw.githubusercontent.com/infor-cloud/XtendM3/master/LICENSE\">Apache license.</a>"

# Color scheme currently only supports "dark" or nil (default)
color_scheme: nil
color_scheme: dark

plugins:
- jekyll-seo-tag
Expand Down
2 changes: 1 addition & 1 deletion docs/documentation/approval-requirements.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
layout: default
title: Approval Requirements
parent: Documentation
nav_order: 8
nav_order: 10
---

# Approval Requirements
Expand Down
2 changes: 1 addition & 1 deletion docs/documentation/batch-scheduling.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
layout: default
title: Batch Scheduling
parent: Documentation
nav_order: 2
nav_order: 3
---

# Batch Scheduling
Expand Down
2 changes: 1 addition & 1 deletion docs/documentation/capabilities.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
layout: default
title: Capabilities
parent: Documentation
nav_order: 4
nav_order: 6
---

# Capabilities
Expand Down
2 changes: 1 addition & 1 deletion docs/documentation/exceptions.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
layout: default
title: Exceptions
parent: Documentation
nav_order: 3
nav_order: 4
---

# Exceptions
Expand Down
2 changes: 1 addition & 1 deletion docs/documentation/limitations.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
layout: default
title: Limitations
parent: Documentation
nav_order: 5
nav_order: 7
---

# Limitations
Expand Down
217 changes: 217 additions & 0 deletions docs/documentation/local-workspace.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,217 @@
---
layout: default
title: Local XtendM3 workspace
parent: Documentation
nav_order: 5
---

# Local XtendM3 workspace
{: .no_toc }

Setting up and using local XtendM3 workspace
{: .fs-6 .fw-300 }

## Table of contents
{: .no_toc .text-delta }

1. TOC
{:toc}

---
## ACME Corp Template Repository
We can start with setting up a local workspace using the [ACME Corp Template](https://github.com/infor-cloud/acme-corp-extensions) available in the Infor Cloud Github repository.
This template should be used for setting up customer repoistories to version control live extensions.


## Lint and export
Using the XtendM3 Maven plugin, you can lint and export your extension locally.

### Setup XtendM3 Maven plugin
To being setting up your local workspace, you should begin with downloading a few things


## Test-compile, import and activate
From your local workspace, you can test-compile, import and activate your extensions using ION APIs.

### Setup Authorization
Authorization is done using OAuth 2.0, start setting up new authorization from ION API.

**Create OAuth2.0 credentials**
* Open the ION API application
* Navigate to _"Authorized Apps"_
* Press the plus button on top of the list
* Input a name, check type _"Backend Service"_ and input a description
* After saving you will be able to download your credentials
* Download your credentials and open the file using a text editor of your choice

### Setup Postman
Using the information from the credentials(.ionapi) file, setup the authorization in Postman.

* Open Postman
* Create a new request
* In the request, open the authorization tab
* Set "Type" to OAuth 2.0 and _"Add authorization data to"_ to _"Request Headers"_
* Give the token a name, set _"Grant Type"_ to _"Password Credentials"_ and fill in the rest of the fields using information from the downloaded(.ionapi) credentials file
* Access Token URL = pu + ot
* Client ID = ci
* Client Secret = cs
* Username = saak
* Password = sask
* Press the button on the bottom of the _"Configure New Token"_ page to get a new access token

With authorization setup and ready, we can move on to create the requests in Postman.

**Test-compile**
* Method: POST
* URL: https://**url**>/<**tenantName**>/M3/extensibility/testCompile/
* Body: see section _"Body Template"_
* Headers
* Content-Type: application/json
* Content-Length: <calculated when request is sent> (usually automatically generated)
* Host: <calculated when request is sent> (usually automatically generated)

**Import**
* Method: POST
* URL: https://**url**/**tenantName**/M3/extensibility/import/
* Body: see section _"Body Template"_
* Headers
* Content-Type: application/json
* Content-Length: <calculated when request is sent> (usually automatically generated)
* Host: <calculated when request is sent> (usually automatically generated)

**Activate**
* Method: PUT
* URL: https://**url**/**tenantName**/M3/extensibility/active/<extension-uuid>?active=true
* Body: no body needed
* Headers
* Host: <calculated when request is sent> (usually automatically generated)


**Body Template**


{
"programModules": {
<name_of_be_program>: {
"program": <name_of_be_program>,
"triggers": {
<trigger_extension_name>: {
"name": <trigger_extension_name>,
"method": <method>,
"advice": <advice>,
"active": true/false,
"modified": <epoch_last_modified_date>,
"modifiedBy": <user>,
"sourceUuid": <source_uuid>,
"programName": <name_of_be_program>,
"utilities": [],
"type": "METHOD",
"priority": <priority>
}
},
"transactions": {},
"batches": {}
},
<name_of_batch_program>: {
"program": <name_of_transaction_program>,
"triggers": {},
"transactions": {},
"batches": {
"sourceUuid": <source_uuid>,
"description": <description>,
"active": true/false,
"modified": <epoch_last_modified_date>,
"modifiedBy": <user>,
"utilities": []
}
},
<name_of_transaction_program>: {
"program": <name_of_transaction_program>,
"triggers": [],
"transactions": {
<name_of_transaction>: {
"sourceUuid": <source_uuid>,
"name": <name_of_transaction",
"program": <name_of_transaction_program>,
"description": <description>,
"active": true/false,
"multi": true/false,
"modified": <epoch_last_modified_date>,
"modifiedBy": <user>,
"outputFields": [
{
"name": <field_name>,
"description": <field_description>,
"length": <field_length>,
"mandatory": <true/false>,
"type": <A/N>
}
],
"inputFields": [
{
"name": <field_name>,
"description": <field_description>,
"length": <field_length>,
"mandatory": <true/false>,
"type": <A/N>
}
],
"utilities": []
}
},
"batches": {}
}
},
"utilities": {
<utility_name>: {
"name": <utility_name>,
"sourceUuid": <source_uuid>
}
},
"sources": {
<source_uuid>: {
"uuid": <source_uuid>,
"updated": <epoch_last_modified_date>,
"updatedBy": <user>,
"created": <epoch_created_date>,
"createdBy": <user>,
"apiVersion" <apiVersion, e.g. 0.12>,
"beVersion": <>,
"codeHash": <codeHash, generated during export>,
"code": <base64 encoded extension code>,
},
<source_uuid>: {
"uuid": <source_uuid>,
"updated": <epoch_last_modified_date>,
"updatedBy": <user>,
"created": <epoch_created_date>,
"createdBy": <user>,
"apiVersion" <apiVersion, e.g. 0.12>,
"beVersion": <>,
"codeHash": <codeHash, generated during export>,
"code": <base64 encoded extension code>,
},
<source_uuid>: {
"uuid": <source_uuid>,
"updated": <epoch_last_modified_date>,
"updatedBy": <user>,
"created": <epoch_created_date>,
"createdBy": <user>,
"apiVersion" <apiVersion, e.g. 0.12>,
"beVersion": <>,
"codeHash": <codeHash, generated during export>,
"code": <base64 encoded extension code>,
},
<source_uuid>: {
"uuid": <source_uuid>,
"updated": <epoch_last_modified_date>,
"updatedBy": <user>,
"created": <epoch_created_date>,
"createdBy": <user>,
"apiVersion" <apiVersion, e.g. 0.12>,
"beVersion": <>,
"codeHash": <codeHash, generated during export>,
"code": <base64 encoded extension code>,
}
}
}
2 changes: 1 addition & 1 deletion docs/documentation/metadata.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
layout: default
title: Metadata
parent: Documentation
nav_order: 9
nav_order: 11
---

# Metadata
Expand Down
2 changes: 1 addition & 1 deletion docs/documentation/programming-standard.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
layout: default
title: Programming Standard
parent: Documentation
nav_order: 6
nav_order: 8
---

# Programming Standard
Expand Down
2 changes: 1 addition & 1 deletion docs/documentation/version-controlling.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
layout: default
title: Version Controlling
parent: Documentation
nav_order: 7
nav_order: 9
---

# Version Controlling
Expand Down

0 comments on commit 3796273

Please sign in to comment.