Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 8f89240

Browse files
committedSep 26, 2018
Move articles to subfolder
1 parent e2db4a5 commit 8f89240

36 files changed

+867
-843
lines changed
 
Lines changed: 2 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,4 @@
11
---
2-
title: Get Azure Blockchain Workbench database details
3-
description: Learn how to get Azure Blockchain Workbench database and database server information.
4-
services: azure-blockchain
5-
keywords:
6-
author: PatAltimore
7-
ms.author: patricka
8-
ms.date: 5/4/2018
9-
ms.topic: article
10-
ms.service: azure-blockchain
11-
ms.reviewer: mmercuri
12-
manager: femila
13-
2+
redirect_url: /azure/blockchain/workbench/getdb-details
3+
redirect_document_id: true
144
---
15-
16-
# Get information about your Azure Blockchain Workbench database
17-
18-
This article shows how to get detailed information about your Azure Blockchain Workbench database.
19-
20-
## Overview
21-
22-
Information about applications, workflows, and smart contract execution is provided using database views in the Blockchain Workbench SQL DB. Developers can use this information when using tools such as Microsoft Excel, PowerBI, Visual Studio, and SQL Server Management Studio.
23-
24-
Before a developer can connect to the database, they need:
25-
26-
* External client access allowed in the database firewall. This article about configuring a database firewall article explains how to allow access.
27-
* The database server name and database name.
28-
29-
## Connect to the Blockchain Workbench database
30-
31-
To connect to the database:
32-
33-
1. Sign in to the Azure Portal with an account that has **Owner** permissions for the Azure Blockchain Workbench resources.
34-
2. In the left navigation pane, choose **Resource groups**.
35-
3. Choose the name of the resource group for your Blockchain Workbench deployment.
36-
4. Select **Type** to sort the resource list, and then choose your **SQL server**. The sorted list in the next screen capture shows two SQL databases, "master" and one that uses "lhgn" as the **Resource prefix**.
37-
38-
![Sorted Blockchain Workbench resource list](media/blockchain-workbench-getdb-details/sorted-workbench-resource-list.png)
39-
40-
5. To see detailed information about the Blockchain Workbench database, select the link for the database with the **Resource prefix** you provided for deploying Blockchain Workbench.
41-
42-
![Database details](media/blockchain-workbench-getdb-details/workbench-db-details.png)
43-
44-
The database server name and database name let you connect to the Blockchain Workbench database using your development or reporting tool.
45-
46-
## Next steps
47-
48-
> [!div class="nextstepaction"]
49-
> [Database views in Azure Blockchain Workbench](../blockchain/workbench/database-views.md)

‎articles/blockchain-workbench/blockchain-workbench-integration-patterns.md

Lines changed: 2 additions & 251 deletions
Large diffs are not rendered by default.
Lines changed: 2 additions & 114 deletions
Original file line numberDiff line numberDiff line change
@@ -1,116 +1,4 @@
11
---
2-
title: Manage Users in Azure Blockchain Workbench
3-
description: How to manage users in Azure Blockchain Workbench.
4-
services: azure-blockchain
5-
keywords:
6-
author: PatAltimore
7-
ms.author: patricka
8-
ms.date: 4/26/2018
9-
ms.topic: article
10-
ms.service: azure-blockchain
11-
ms.reviewer: zeyadr
12-
manager: femila
13-
#customer intent: As a administrator of Blockchain Workbench, I want to manage users for blockchain apps in Azure Blockchain Workbench.
2+
redirect_url: /azure/blockchain/workbench/manage-users
3+
redirect_document_id: true
144
---
15-
# Manage Users in Azure Blockchain Workbench
16-
17-
Azure Blockchain Workbench includes user management for people and organizations that are part of your consortium.
18-
19-
## Prerequisites
20-
21-
A Blockchain Workbench deployment is required. See [Azure Blockchain Workbench deployment](blockchain-workbench-deploy.md) for details on deployment.
22-
23-
## Add Azure AD users
24-
25-
The Azure Blockchain Workbench uses Azure Active Directory (Azure AD) for authentication, access control, and roles. Users in the Blockchain Workbench Azure AD tenant can authenticate and use Blockchain Workbench. Add users to the Administrator application role to interact and perform actions.
26-
27-
Blockchain Workbench users need to exist in the Azure AD tenant before you can assign them to applications and roles. To add users to Azure AD, use the following steps:
28-
29-
1. Sign in to the [Azure portal](https://portal.azure.com).
30-
2. Select your account in the top right corner, and switch to the Azure AD tenant associated to Blockchain Workbench.
31-
3. Select **Azure Active Directory > Users**. You see a list of users in your directory.
32-
4. To add users to the directory, select **New user**. For external users, select **New guest user**.
33-
34-
![New user](media/blockchain-workbench-manage-users/add-ad-user.png)
35-
36-
5. Complete the required fields for the new user. Select **Create**.
37-
38-
Visit [Azure AD](../active-directory/fundamentals/add-users-azure-active-directory.md) documentation for more details on how to manage users within Azure AD.
39-
40-
## Manage Blockchain Workbench administrators
41-
42-
Once users have been added to the directory, the next step is to choose which users are Blockchain Workbench administrators. Users in the **Administrator** group are associated with the **Administrator application role** in Blockchain Workbench. Administrators can add or remove users, assign users to specific scenarios, and create new applications.
43-
44-
To add users to the **Administrator** group in the Azure AD directory:
45-
46-
1. Sign in to the [Azure portal](https://portal.azure.com).
47-
2. Verify you are in the Azure AD tenant associated to Blockchain Workbench by selecting your account in the top right corner.
48-
3. Select **Azure Active Directory > Enterprise applications**.
49-
4. Select the Azure AD client application for Blockchain Workbench
50-
51-
![All enterprise application registrations](media/blockchain-workbench-manage-users/select-blockchain-client-app.png)
52-
53-
5. Select **Users and groups > Add user**.
54-
6. In **Add Assignment**, select **Users**. Choose or search for the user you want to add as an administrator. Click **Select** when finished choosing.
55-
56-
![Add assignment](media/blockchain-workbench-manage-users/add-user-assignment.png)
57-
58-
9. Verify **Role** is set to **Administrator**
59-
10. Select **Assign**. The added users are displayed in the list with the administrator role assigned.
60-
61-
![Blockchain client app users](media/blockchain-workbench-manage-users/blockchain-admin-list.png)
62-
63-
## Managing Blockchain Workbench members
64-
65-
Use the Blockchain Workbench application to manage users and organizations that are part of your consortium. You can add or remove users to applications and roles.
66-
67-
1. [Open the Blockchain Workbench](blockchain-workbench-deploy.md#blockchain-workbench-web-url) in your browser and sign in as an administrator.
68-
69-
![Blockchain Workbench](media/blockchain-workbench-manage-users/blockchain-workbench-applications.png)
70-
71-
Members are added to each application. Members can have one or more application roles to initiate contracts or take actions.
72-
73-
2. To manage members for an application, select an application tile in the **Applications** pane.
74-
75-
The number of members associated to the selected application is reflected in the members tile.
76-
77-
![Select application](media/blockchain-workbench-manage-users/blockchain-workbench-select-application.png)
78-
79-
80-
#### Add member to application
81-
82-
1. Select the member tile to display a list of the current members.
83-
2. Select **Add members**.
84-
85-
![Add members](media/blockchain-workbench-manage-users/application-add-members.png)
86-
87-
3. Search for the user's name. Only Azure AD users that exist in the Blockchain Workbench tenant are listed. If the user is not found, you need to [Add Azure AD users](#add-azure-ad-users).
88-
89-
![Add members](media/blockchain-workbench-manage-users/find-user.png)
90-
91-
4. Select a **Role** from the drop-down.
92-
93-
![Select role members](media/blockchain-workbench-manage-users/application-select-role.png)
94-
95-
5. Select **Add** to add the member with the associated role to the application.
96-
97-
#### Remove member from application
98-
99-
1. Select the member tile to display a list of the current members.
100-
2. For the user you want to remove, choose **Remove** from the role drop-down.
101-
102-
![Remove member](media/blockchain-workbench-manage-users/application-remove-member.png)
103-
104-
#### Change or add role
105-
106-
1. Select the member tile to display a list of the current members.
107-
2. For the user you want to change, click the drop-down and select the new role.
108-
109-
![Change role](media/blockchain-workbench-manage-users/application-change-role.png)
110-
111-
## Next steps
112-
113-
In this how-to article, you have learned how to manage users for Azure Blockchain Workbench. To learn how to create a blockchain application, continue to the next how-to article.
114-
115-
> [!div class="nextstepaction"]
116-
> [Create a blockchain application in Azure Blockchain Workbench](../blockchain/workbench/create-app.md)
Lines changed: 2 additions & 304 deletions
Original file line numberDiff line numberDiff line change
@@ -1,306 +1,4 @@
11
---
2-
title: Azure Blockchain Workbench messages integration overview
3-
description: Overview of using messages in Azure Blockchain Workbench.
4-
services: azure-blockchain
5-
keywords:
6-
author: PatAltimore
7-
ms.author: patricka
8-
ms.date: 4/16/2018
9-
ms.topic: article
10-
ms.service: azure-blockchain
11-
ms.reviewer: mmercuri
12-
manager: femila
2+
redirect_url: /azure/blockchain/workbench/messages-overview
3+
redirect_document_id: true
134
---
14-
15-
# Azure Blockchain Workbench messaging integration
16-
17-
In addition to providing a REST API, Azure Blockchain Workbench also provides messaging-based integration. Workbench publishes ledger-centric events via Azure Event Grid, enabling downstream consumers to ingest data or take action based on these events. For those clients that require reliable messaging, Azure Blockchain Workbench delivers messages to an Azure Service Bus endpoint as well.
18-
19-
Developers have also expressed interest in the ability to have external systems communicate initiate transactions to create users, create contracts, and update contracts on a ledger. While this functionality is not currently exposed in public preview, a sample that delivers that capability can be found at [http://aka.ms/blockchain-workbench-integration-sample](http://aka.ms/blockchain-workbench-integration-sample).
20-
21-
## Event notifications
22-
23-
Event notifications can be used to notify users and downstream systems of events that happen in Blockchain Workbench and the blockchain network it is connected to. Event notifications can be consumed directly in code or used with tools such as Logic Apps and Flow to trigger flow of data to downstream systems.
24-
25-
See [Notification message reference](#notification-message-reference)
26-
for details of various messages that can be received.
27-
28-
### Consuming Event Grid events with Azure Functions
29-
30-
If a user wants to use Event Grid to be notified about events that happen in Blockchain Workbench, you can consume events from Event Grid by using Azure Functions.
31-
32-
1. Create an **Azure Function App** in the Azure portal.
33-
2. Create a new function.
34-
3. Locate the template for Event Grid. Basic template code for reading the message is shown. Modify the code as needed.
35-
4. Save the Function.
36-
5. Select the Event Grid from Blockchain Workbench’s resource group.
37-
38-
### Consuming Event Grid events with Logic Apps
39-
40-
1. Create a new **Azure Logic App** in the Azure portal.
41-
2. When opening the Azure Logic App in the portal, you will be prompted to select a trigger. Select **Azure Event Grid -- When a resource event occurs**.
42-
3. When the workflow designer is displayed, you will be prompted to sign in.
43-
4. Select the Subscription. Resource as **Microsoft.EventGrid.Topics**. Select the **Resource Name** from the name of the resource from the Azure Blockchain Workbench resource group.
44-
5. Select the Event Grid from Blockchain Workbench's resource group.
45-
46-
## Using Service Bus Topics for notifications
47-
48-
Service Bus Topics can be used to notify users about events that happen in Blockchain Workbench.
49-
50-
1. Browse to the Service Bus within the Workbench’s resource group.
51-
2. Select **Topics**.
52-
3. Select **workbench-external**.
53-
4. Create a new subscription to this topic. Obtain a key for it.
54-
5. Create a program, which subscribes to events from this subscription.
55-
56-
### Consuming Service Bus Messages with Logic Apps
57-
58-
1. Create a new **Azure Logic App** in the Azure portal.
59-
2. When opening the Azure Logic App in the portal, you will be prompted to select a trigger. Type **Service Bus** into the search box and select the trigger appropriate for the type of interaction you want to have with the Service Bus. For example, **Service Bus -- When a message is received in a topic subscription (auto-complete)**.
60-
3. When the workflow designer is displayed, specify the connection information for the Service Bus.
61-
4. Select your subscription and specify the topic of **workbench-external**.
62-
5. Develop the logic for your application that utilizes the message from
63-
this trigger.
64-
65-
## Notification message reference
66-
67-
Depending on the **OperationName**, the notification messages have one of the following message types.
68-
69-
### AccountCreated
70-
71-
Indicates that a new account has been requested to be added to the specified chain.
72-
73-
| Name | Description |
74-
|----------|--------------|
75-
| UserId | ID of the user that was created. |
76-
| ChainIdentifier | Address of the user that was created on the blockchain network. In Ethereum, this would be the user's **on-chain** address. |
77-
78-
``` csharp
79-
public class NewAccountRequest : MessageModelBase
80-
{
81-
public int UserID { get; set; }
82-
public string ChainIdentifier { get; set; }
83-
}
84-
```
85-
86-
### ContractInsertedOrUpdated
87-
88-
Indicates that a request has been made to insert or update a contract on a distributed ledger.
89-
90-
| Name | Description |
91-
|-----|--------------|
92-
| ChainID | A unique identifier for the chain associated with the request.|
93-
| BlockId | The unique identifier for a block on the ledger.|
94-
| ContractId | A unique identifier for the contract.|
95-
| ContractAddress | The address of the contract on the ledger.|
96-
| TransactionHash | The hash of the transaction on the ledger.|
97-
| OriginatingAddress | The address of the originator of the transaction.|
98-
| ActionName | The name of the action.|
99-
| IsUpdate | Identifies if this is an update.|
100-
| Parameters | A list of objects that identify the name, value, and data type of parameters sent to an action.|
101-
| TopLevelInputParams | In scenarios where a contract is connected to one or more other contracts, these are the parameters from the top-level contract. |
102-
103-
``` csharp
104-
public class ContractInsertOrUpdateRequest : MessageModelBase
105-
{
106-
public int ChainId { get; set; }
107-
public int BlockId { get; set; }
108-
public int ContractId { get; set; }
109-
public string ContractAddress { get; set; }
110-
public string TransactionHash { get; set; }
111-
public string OriginatingAddress { get; set; }
112-
public string ActionName { get; set; }
113-
public bool IsUpdate { get; set; }
114-
public List<ContractProperty> Parameters { get; set; }
115-
public bool IsTopLevelUpdate { get; set; }
116-
public List<ContractInputParameter> TopLevelInputParams { get; set; }
117-
}
118-
```
119-
120-
#### UpdateContractAction
121-
122-
Indicates that a request has been made to execution an action on a specific contract on a distributed ledger.
123-
124-
| Name | Description |
125-
|--------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
126-
| ContractActionId | The unique identifier for this contract action |
127-
| ChainIdentifier | The unique identifier for the chain |
128-
| ConnectionId | The unique identifier for the connection |
129-
| UserChainIdentifier | Address of the user that was created on the blockchain network. In Ethereum, this would be the user’s “on chain” address. |
130-
| ContractLedgerIdentifier | Address of the contract on the ledger. |
131-
| WorkflowFunctionName | Name of the workflow function. |
132-
| WorkflowName | Name of the workflow. |
133-
| WorkflowBlobStorageURL | The url of the contract in blob storage. |
134-
| ContractActionParameters | Parameters for the contract action. |
135-
| TransactionHash | The hash of the transaction on the ledger. |
136-
| Provisioning Status | The current provisioning status of the action.</br>0 – Created</br>1 – In Process</br>2 – Complete</br> Complete indicates a confirmation from the ledger that this as been successfully added. |
137-
| | |
138-
139-
```csharp
140-
public class ContractActionRequest : MessageModelBase
141-
{
142-
public int ContractActionId { get; set; }
143-
public int ConnectionId { get; set; }
144-
public string UserChainIdentifier { get; set; }
145-
public string ContractLedgerIdentifier { get; set; }
146-
public string WorkflowFunctionName { get; set; }
147-
public string WorkflowName { get; set; }
148-
public string WorkflowBlobStorageURL { get; set; }
149-
public IEnumerable<ContractActionParameter> ContractActionParameters { get; set; }
150-
public string TransactionHash { get; set; }
151-
public int ProvisioningStatus { get; set; }
152-
}
153-
```
154-
155-
### UpdateUserBalance
156-
157-
Indicates that a request has been made to update the user balance on a specific distributed ledger.
158-
159-
> [!NOTE]
160-
> This message is generated only for those ledgers that require the funding of accounts.
161-
>
162-
163-
| Name | Description |
164-
|---------|------------------------------------------|
165-
| Address | The address of the user that was funded. |
166-
| Balance | The balance of the user balance. |
167-
| ChainID | The unique identifier for the chain. |
168-
169-
170-
``` csharp
171-
public class UpdateUserBalanceRequest : MessageModelBase
172-
{
173-
public string Address { get; set; }
174-
public decimal Balance { get; set; }
175-
public int ChainID { get; set; }
176-
}
177-
```
178-
179-
### InsertBlock
180-
181-
Message indicates that a request has been made to add a block on a distributed ledger.
182-
183-
| Name | Description |
184-
|----------------|------------------------------------------------------------------------|
185-
| ChainId | The unique identifier of the chain to which the block was added. |
186-
| BlockId | The unique identifier for the block inside Azure Blockchain Workbench. |
187-
| BlockHash | The hash of the block. |
188-
| BlockTimeStamp | The timestamp of the block. |
189-
190-
``` csharp
191-
public class InsertBlockRequest : MessageModelBase
192-
{
193-
public int ChainId { get; set; }
194-
public int BlockId { get; set; }
195-
public string BlockHash { get; set; }
196-
public int BlockTimestamp { get; set; }
197-
}
198-
```
199-
200-
### InsertTransaction
201-
202-
Message provides details on a request to add a transaction on a distributed ledger.
203-
204-
| Name | Description |
205-
|-----------------|------------------------------------------------------------------------|
206-
| ChainId | The unique identifier of the chain to which the block was added. |
207-
| BlockId | The unique identifier for the block inside Azure Blockchain Workbench. |
208-
| TransactionHash | The hash of the transaction. |
209-
| From | The address of the originator of the transaction. |
210-
| To | The address of the intended recipient of the transaction. |
211-
| Value | The value included in the transaction. |
212-
| IsAppBuilderTx | Identifies if this is a Blockchain Workbench transaction. |
213-
214-
``` csharp
215-
public class InsertTransactionRequest : MessageModelBase
216-
{
217-
public int ChainId { get; set; }
218-
public int BlockId { get; set; }
219-
public string TransactionHash { get; set; }
220-
public string From { get; set; }
221-
public string To { get; set; }
222-
public decimal Value { get; set; }
223-
public bool IsAppBuilderTx { get; set; }
224-
}
225-
```
226-
227-
### AssignContractChainIdentifier
228-
229-
Provides details on the assignment of a chain identifier for a contract. For example, in Ethereum blockchain, the address of a contract on the ledger.
230-
231-
| Name | Description |
232-
|-----------------|-----------------------------------------------------------------------------------|
233-
| ContractId | This is the unique identifier for the contract inside Azure Blockchain Workbench. |
234-
| ChainIdentifier | This is the identifier for the contract on the chain. |
235-
236-
``` csharp
237-
public class AssignContractChainIdentifierRequest : MessageModelBase
238-
{
239-
public int ContractId { get; set; }
240-
public string ChainIdentifier { get; set; }
241-
}
242-
```
243-
244-
## Classes used by message types
245-
246-
### MessageModelBase
247-
248-
The base model for all messages.
249-
250-
| Name | Description |
251-
|---------------|--------------------------------------|
252-
| OperationName | The name of the operation. |
253-
| RequestId | A unique identifier for the request. |
254-
255-
``` csharp
256-
public class MessageModelBase
257-
{
258-
public string OperationName { get; set; }
259-
public string RequestId { get; set; }
260-
}
261-
```
262-
263-
### ContractInputParameter
264-
265-
Contains the name, value and type of a parameter.
266-
267-
| Name | Description |
268-
|-------|-----------------------------|
269-
| Name | The name of the parameter. |
270-
| Value | The value of the parameter. |
271-
| Type | The type of the parameter. |
272-
273-
``` csharp
274-
public class ContractInputParameter
275-
{
276-
public string Name { get; set; }
277-
public string Value { get; set; }
278-
public string Type { get; set; }
279-
}
280-
```
281-
282-
#### ContractProperty
283-
284-
Contains the ID, name, value and type of a property.
285-
286-
| Name | Description |
287-
|-------|----------------------------|
288-
| Id | The ID of the property. |
289-
| Name | The name of the property. |
290-
| Value | The value of the property. |
291-
| Type | The type of the property. |
292-
293-
``` csharp
294-
public class ContractProperty
295-
{
296-
public int Id { get; set; }
297-
public string Name { get; set; }
298-
public string Value { get; set; }
299-
public string DataType { get; set; }
300-
}
301-
```
302-
303-
## Next steps
304-
305-
> [!div class="nextstepaction"]
306-
> [Smart contract integration patterns](blockchain-workbench-integration-patterns.md)
Lines changed: 2 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,4 @@
11
---
2-
title: Azure Blockchain Workbench overview
3-
description: Overview of Azure Blockchain Workbench and its capabilities.
4-
services: azure-blockchain
5-
keywords:
6-
author: PatAltimore
7-
ms.author: patricka
8-
ms.date: 3/21/2018
9-
ms.topic: overview
10-
ms.service: azure-blockchain
11-
ms.reviewer: zeyadr
12-
manager: femila
2+
redirect_url: /azure/blockchain/workbench/overview
3+
redirect_document_id: true
134
---
14-
# What is Azure Blockchain Workbench?
15-
16-
Azure Blockchain Workbench is a collection of Azure services and capabilities designed to help you create and deploy blockchain applications to share business processes and data with other organizations. Azure Blockchain Workbench provides the infrastructure scaffolding for building blockchain applications enabling developers to focus on creating business logic and smart contracts. It also makes it easier to create blockchain applications by integrating several Azure services and capabilities to help automate common development tasks.
17-
18-
## Create blockchain applications
19-
20-
With Blockchain Workbench, you can define blockchain applications using configuration and writing smart contract code. You can jumpstart blockchain application development and focus on defining your contract and writing business logic instead of building scaffolding and setting up supporting services.
21-
22-
## Manage applications and users
23-
24-
Azure Blockchain Workbench provides a web application and REST APIs for managing blockchain applications and users. Blockchain Workbench administrators can manage application access and assign your users to application roles. Azure AD users are automatically mapped to members in the application.
25-
26-
## Integrate blockchain with applications
27-
28-
You can use the Blockchain Workbench REST APIs and message-based APIs to integrate with existing systems. The APIs provide an interface to allow for replacing or using multiple distributed ledger technologies, storage, and database offerings.
29-
30-
Blockchain Workbench can transform messages sent to its message-based API to build transactions in a format expected by that blockchain’s native API. Workbench can sign and route transactions to the appropriate blockchain.
31-
32-
Workbench automatically delivers events to Service Bus and Event Grid to send messages to downstream consumers. Developers can integrate with either of these messaging systems to drive transactions and to look at results.
33-
34-
## Deploy a blockchain network
35-
36-
Azure Blockchain Workbench simplifies consortium blockchain network setup as a preconfigured solution with an Azure Resource Manager solution template. The template provides simplified deployment that deploys all components needed to run a consortium. Today, Blockchain Workbench currently supports Ethereum.
37-
38-
## Use Active Directory login
39-
40-
With existing blockchain protocols, blockchain identities are represented as an address on the network. Azure Blockchain Workbench abstracts away the blockchain identity by associating it with an Active Directory identity, making it simpler to build enterprise applications with Active Directory identities.
41-
42-
## Synchronize on-chain data with off-chain storage
43-
44-
Azure Blockchain Workbench makes it easier to analyze blockchain events and data by automatically synchronizing data on the blockchain to off-chain storage. Instead of extracting data directly from the blockchain, you can query off-chain database systems such as SQL Server. Blockchain specific expertise is not required for end users who are doing data analysis tasks.
45-
46-
## Next steps
47-
48-
> [!div class="nextstepaction"]
49-
> [Azure Blockchain Workbench architecture](../blockchain/workbench/architecture.md)
Lines changed: 2 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -1,74 +1,4 @@
11
---
2-
title: Azure Blockchain Workbench troubleshooting
3-
description: How to troubleshoot a Azure Blockchain Workbench application.
4-
services: azure-blockchain
5-
keywords:
6-
author: PatAltimore
7-
ms.author: patricka
8-
ms.date: 4/21/2018
9-
ms.topic: article
10-
ms.service: azure-blockchain
11-
ms.reviewer: zeyadr
12-
manager: femila
2+
redirect_url: /azure/blockchain/workbench/troubleshooting
3+
redirect_document_id: true
134
---
14-
15-
# Azure Blockchain Workbench troubleshooting
16-
17-
A PowerShell script is available to assist with developer debugging or support. The script generates a summary and collects detailed logs for troubleshooting. Collected logs include:
18-
19-
* Blockchain network, such as Ethereum
20-
* Blockchain Workbench microservices
21-
* Application Insights
22-
* Azure Monitoring (OMS)
23-
24-
You can use the information to determine next steps and determine root cause of issues.
25-
26-
## Troubleshooting script
27-
28-
The PowerShell troubleshooting script is available on GitHub. [Download a zip file](https://github.com/Azure-Samples/blockchain/archive/master.zip) or clone the sample from GitHub.
29-
30-
```
31-
git clone https://github.com/Azure-Samples/blockchain.git
32-
```
33-
34-
## Run the script
35-
[!INCLUDE [sample-powershell-install](../../includes/sample-powershell-install.md)]
36-
37-
Run the `collectBlockchainWorkbenchTroubleshooting.ps1` script to collect logs and create a ZIP file containing a folder of troubleshooting information. For example:
38-
39-
``` powershell
40-
collectBlockchainWorkbenchTroubleshooting.ps1 -SubscriptionID "<subscription_id>" -ResourceGroupName "workbench-resource-group-name"
41-
```
42-
The script accepts the following parameters:
43-
44-
| Parameter | Description | Required |
45-
|---------|---------|----|
46-
| SubscriptionID | SubscriptionID to create or locate all resources. | Yes |
47-
| ResourceGroupName | Name of the Azure Resource Group where Blockchain Workbench has been deployed. | Yes |
48-
| OutputDirectory | Path to create the output .ZIP file. If not specified, defaults to the current directory. | No |
49-
| LookbackHours | Number of hours to use when pulling telemetry. Default value is 24 hours. Maximum value is 90 hours | No |
50-
| OmsSubscriptionId | The subscription ID where OMS is deployed. Only pass this parameter if the OMS for the blockchain network is deployed outside of Blockchain Workbench's resource group.| No |
51-
| OmsResourceGroup |The resource group where OMS is deployed. Only pass this parameter if the OMS for the blockchain network is deployed outside of Blockchain Workbench's resource group.| No |
52-
| OmsWorkspaceName | The OMS workspace name. Only pass this parameter if the OMS for the blockchain network is deployed outside of Blockchain Workbench's resource group | No |
53-
54-
## What is collected?
55-
56-
The output ZIP file contains the following folder structure:
57-
58-
| Folder or File | Description |
59-
|---------|---------|
60-
| \Summary.txt | Summary of the system |
61-
| \Metrics\blockchain | Metrics about the blockchain |
62-
| \Metrics\Workbench | Metrics about the workbench |
63-
| \Details\Blockchain | Detailed logs about the blockchain |
64-
| \Details\Workbench | Detailed logs about the workbench |
65-
66-
The summary file gives you a snapshot of the overall state of the application and health of the application. The summary provides recommended actions, highlights top errors, and metadata about running services.
67-
68-
The **Metrics** folder contains metrics of various system components over time. For example, the output file `\Details\Workbench\apiMetrics.txt` contains a summary of different response codes, and response times throughout the collection period.
69-
The **Details** folder contains detailed logs for troubleshooting specific issues with Workbench or the underlying blockchain network. For example, `\Details\Workbench\Exceptions.csv` contains a list of the most recent exceptions that have occurred in the system, which is useful for troubleshooting errors with smart contracts or interactions with the blockchain.
70-
71-
## Next steps
72-
73-
> [!div class="nextstepaction"]
74-
> [Azure Blockchain Workbench architecture](../blockchain/workbench/architecture.md)

‎articles/blockchain-workbench/blockchain-workbench-use.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ You need to sign in as a member of the Blockchain Workbench. If there are no app
3030

3131
## Create new contract
3232

33-
To create a new contract, you need to be a member specified as an contract **initiator**. For information defining application roles and initiators for the contract, see [workflows in the configuration overview](../blockchain/workbench/configuration.md#workflows). For information on assigning members to application roles, see [add a member to application](blockchain-workbench-manage-users.md#add-member-to-application).
33+
To create a new contract, you need to be a member specified as an contract **initiator**. For information defining application roles and initiators for the contract, see [workflows in the configuration overview](../blockchain/workbench/configuration.md#workflows). For information on assigning members to application roles, see [add a member to application](../blockchain/workbench/manage-users.md#add-member-to-application).
3434

3535
1. In Blockchain Workbench application section, select the application tile that contains the contract you want to create. A list of active contracts are displayed.
3636

@@ -78,4 +78,4 @@ Depending on the state the contract is in, members can take actions to transitio
7878
## Next steps
7979

8080
> [!div class="nextstepaction"]
81-
> [How to troubleshoot Azure Blockchain Workbench](blockchain-workbench-troubleshooting.md)
81+
> [How to troubleshoot Azure Blockchain Workbench](../blockchain/workbench/troubleshooting.md)

‎articles/blockchain/workbench/create-app.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ You learn how to:
2727
## Prerequisites
2828

2929
* A Blockchain Workbench deployment. For more information, see [Azure Blockchain Workbench deployment](../../blockchain-workbench/blockchain-workbench-deploy.md) for details on deployment.
30-
* Azure Active Directory users in the tenant associated with Blockchain Workbench. For more information, see [add Azure AD users in Azure Blockchain Workbench](../../blockchain-workbench/blockchain-workbench-manage-users.md#add-azure-ad-users).
31-
* A Blockchain Workbench administrator account. For more information, see add [Blockchain Workbench administrators in Azure Blockchain Workbench](../../blockchain-workbench/blockchain-workbench-manage-users.md#manage-blockchain-workbench-administrators).
30+
* Azure Active Directory users in the tenant associated with Blockchain Workbench. For more information, see [add Azure AD users in Azure Blockchain Workbench](manage-users.md#add-azure-ad-users).
31+
* A Blockchain Workbench administrator account. For more information, see add [Blockchain Workbench administrators in Azure Blockchain Workbench](manage-users.md#manage-blockchain-workbench-administrators).
3232

3333
## Hello, Blockchain!
3434

@@ -371,7 +371,7 @@ Before exiting the function, call the `ContractUpdated()` function. The function
371371
To add a blockchain application to Blockchain Workbench, you upload the configuration and smart contract files to define the application.
372372
373373
1. In a web browser, navigate to the Blockchain Workbench web address. For example, `https://{workbench URL}.azurewebsites.net/` The web application is created when you deploy Blockchain Workbench. For information on how to find your Blockchain Workbench web address, see [Blockchain Workbench Web URL](../../blockchain-workbench/blockchain-workbench-deploy.md#blockchain-workbench-web-url)
374-
2. Sign in as a [Blockchain Workbench administrator](../../blockchain-workbench/blockchain-workbench-manage-users.md#manage-blockchain-workbench-administrators).
374+
2. Sign in as a [Blockchain Workbench administrator](manage-users.md#manage-blockchain-workbench-administrators).
375375
3. Select **Applications** > **New**. The **New application** pane is displayed.
376376
4. Select **Upload the contract configuration** > **Browse** to locate the **HelloBlockchain.json** configuration file you created. The configuration file is automatically validated. Select the **Show** link to display validation errors. Fix validation errors before you deploy the application.
377377
5. Select **Upload the contract code** > **Browse** to locate the **HelloBlockchain.sol** smart contract code file. The code file is automatically validated. Select the **Show** link to display validation errors. Fix validation errors before you deploy the application.
@@ -384,18 +384,18 @@ Deployment of the blockchain application takes a few minutes. When deployment is
384384
385385
## Add blockchain application members
386386
387-
Add application members to your application to initiate and take actions on contracts. To add application members, you need to be a [Blockchain Workbench administrator](../../blockchain-workbench/blockchain-workbench-manage-users.md#manage-blockchain-workbench-administrators).
387+
Add application members to your application to initiate and take actions on contracts. To add application members, you need to be a [Blockchain Workbench administrator](manage-users.md#manage-blockchain-workbench-administrators).
388388
389389
1. Select **Applications** > **Hello, Blockchain!**.
390390
2. The number of members associated to the application is displayed in the upper right corner of the page. For a new application, the number of members will be zero.
391391
3. Select the **members** link in the upper right corner of the page. A current list of members for the application is displayed.
392392
4. In the membership list, select **Add members**.
393-
5. Select or enter the member's name you want to add. Only Azure AD users that exist in the Blockchain Workbench tenant are listed. If the user is not found, you need to [add Azure AD users](../../blockchain-workbench/blockchain-workbench-manage-users.md#add-azure-ad-users).
393+
5. Select or enter the member's name you want to add. Only Azure AD users that exist in the Blockchain Workbench tenant are listed. If the user is not found, you need to [add Azure AD users](manage-users.md#add-azure-ad-users).
394394
6. Select the **Role** for the member. For the first member, select **Requestor** as the role.
395395
7. Select **Add** to add the member with the associated role to the application.
396396
8. Add another member to the application with the **Responder** role.
397397
398-
For more information about managing users in Blockchain Workbench, see [managing users in Azure Blockchain Workbench](../../blockchain-workbench/blockchain-workbench-manage-users.md)
398+
For more information about managing users in Blockchain Workbench, see [managing users in Azure Blockchain Workbench](manage-users.md)
399399
400400
## Next steps
401401
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
---
2+
title: Get Azure Blockchain Workbench database details
3+
description: Learn how to get Azure Blockchain Workbench database and database server information.
4+
services: azure-blockchain
5+
keywords:
6+
author: PatAltimore
7+
ms.author: patricka
8+
ms.date: 5/4/2018
9+
ms.topic: article
10+
ms.service: azure-blockchain
11+
ms.reviewer: mmercuri
12+
manager: femila
13+
14+
---
15+
16+
# Get information about your Azure Blockchain Workbench database
17+
18+
This article shows how to get detailed information about your Azure Blockchain Workbench database.
19+
20+
## Overview
21+
22+
Information about applications, workflows, and smart contract execution is provided using database views in the Blockchain Workbench SQL DB. Developers can use this information when using tools such as Microsoft Excel, PowerBI, Visual Studio, and SQL Server Management Studio.
23+
24+
Before a developer can connect to the database, they need:
25+
26+
* External client access allowed in the database firewall. This article about configuring a database firewall article explains how to allow access.
27+
* The database server name and database name.
28+
29+
## Connect to the Blockchain Workbench database
30+
31+
To connect to the database:
32+
33+
1. Sign in to the Azure Portal with an account that has **Owner** permissions for the Azure Blockchain Workbench resources.
34+
2. In the left navigation pane, choose **Resource groups**.
35+
3. Choose the name of the resource group for your Blockchain Workbench deployment.
36+
4. Select **Type** to sort the resource list, and then choose your **SQL server**. The sorted list in the next screen capture shows two SQL databases, "master" and one that uses "lhgn" as the **Resource prefix**.
37+
38+
![Sorted Blockchain Workbench resource list](./media/getdb-details/sorted-workbench-resource-list.png)
39+
40+
5. To see detailed information about the Blockchain Workbench database, select the link for the database with the **Resource prefix** you provided for deploying Blockchain Workbench.
41+
42+
![Database details](./media/getdb-details/workbench-db-details.png)
43+
44+
The database server name and database name let you connect to the Blockchain Workbench database using your development or reporting tool.
45+
46+
## Next steps
47+
48+
> [!div class="nextstepaction"]
49+
> [Database views in Azure Blockchain Workbench](database-views.md)

‎articles/blockchain/workbench/integration-patterns.md

Lines changed: 253 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 116 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
1+
---
2+
title: Manage Users in Azure Blockchain Workbench
3+
description: How to manage users in Azure Blockchain Workbench.
4+
services: azure-blockchain
5+
keywords:
6+
author: PatAltimore
7+
ms.author: patricka
8+
ms.date: 4/26/2018
9+
ms.topic: article
10+
ms.service: azure-blockchain
11+
ms.reviewer: zeyadr
12+
manager: femila
13+
#customer intent: As a administrator of Blockchain Workbench, I want to manage users for blockchain apps in Azure Blockchain Workbench.
14+
---
15+
# Manage Users in Azure Blockchain Workbench
16+
17+
Azure Blockchain Workbench includes user management for people and organizations that are part of your consortium.
18+
19+
## Prerequisites
20+
21+
A Blockchain Workbench deployment is required. See [Azure Blockchain Workbench deployment](../../blockchain-workbench/blockchain-workbench-deploy.md) for details on deployment.
22+
23+
## Add Azure AD users
24+
25+
The Azure Blockchain Workbench uses Azure Active Directory (Azure AD) for authentication, access control, and roles. Users in the Blockchain Workbench Azure AD tenant can authenticate and use Blockchain Workbench. Add users to the Administrator application role to interact and perform actions.
26+
27+
Blockchain Workbench users need to exist in the Azure AD tenant before you can assign them to applications and roles. To add users to Azure AD, use the following steps:
28+
29+
1. Sign in to the [Azure portal](https://portal.azure.com).
30+
2. Select your account in the top right corner, and switch to the Azure AD tenant associated to Blockchain Workbench.
31+
3. Select **Azure Active Directory > Users**. You see a list of users in your directory.
32+
4. To add users to the directory, select **New user**. For external users, select **New guest user**.
33+
34+
![New user](./media/manage-users/add-ad-user.png)
35+
36+
5. Complete the required fields for the new user. Select **Create**.
37+
38+
Visit [Azure AD](../../active-directory/fundamentals/add-users-azure-active-directory.md) documentation for more details on how to manage users within Azure AD.
39+
40+
## Manage Blockchain Workbench administrators
41+
42+
Once users have been added to the directory, the next step is to choose which users are Blockchain Workbench administrators. Users in the **Administrator** group are associated with the **Administrator application role** in Blockchain Workbench. Administrators can add or remove users, assign users to specific scenarios, and create new applications.
43+
44+
To add users to the **Administrator** group in the Azure AD directory:
45+
46+
1. Sign in to the [Azure portal](https://portal.azure.com).
47+
2. Verify you are in the Azure AD tenant associated to Blockchain Workbench by selecting your account in the top right corner.
48+
3. Select **Azure Active Directory > Enterprise applications**.
49+
4. Select the Azure AD client application for Blockchain Workbench
50+
51+
![All enterprise application registrations](./media/manage-users/select-blockchain-client-app.png)
52+
53+
5. Select **Users and groups > Add user**.
54+
6. In **Add Assignment**, select **Users**. Choose or search for the user you want to add as an administrator. Click **Select** when finished choosing.
55+
56+
![Add assignment](./media/manage-users/add-user-assignment.png)
57+
58+
9. Verify **Role** is set to **Administrator**
59+
10. Select **Assign**. The added users are displayed in the list with the administrator role assigned.
60+
61+
![Blockchain client app users](./media/manage-users/blockchain-admin-list.png)
62+
63+
## Managing Blockchain Workbench members
64+
65+
Use the Blockchain Workbench application to manage users and organizations that are part of your consortium. You can add or remove users to applications and roles.
66+
67+
1. [Open the Blockchain Workbench](../../blockchain-workbench/blockchain-workbench-deploy.md#blockchain-workbench-web-url) in your browser and sign in as an administrator.
68+
69+
![Blockchain Workbench](./media/manage-users/blockchain-workbench-applications.png)
70+
71+
Members are added to each application. Members can have one or more application roles to initiate contracts or take actions.
72+
73+
2. To manage members for an application, select an application tile in the **Applications** pane.
74+
75+
The number of members associated to the selected application is reflected in the members tile.
76+
77+
![Select application](./media/manage-users/blockchain-workbench-select-application.png)
78+
79+
80+
#### Add member to application
81+
82+
1. Select the member tile to display a list of the current members.
83+
2. Select **Add members**.
84+
85+
![Add members](./media/manage-users/application-add-members.png)
86+
87+
3. Search for the user's name. Only Azure AD users that exist in the Blockchain Workbench tenant are listed. If the user is not found, you need to [Add Azure AD users](#add-azure-ad-users).
88+
89+
![Add members](./media/manage-users/find-user.png)
90+
91+
4. Select a **Role** from the drop-down.
92+
93+
![Select role members](./media/manage-users/application-select-role.png)
94+
95+
5. Select **Add** to add the member with the associated role to the application.
96+
97+
#### Remove member from application
98+
99+
1. Select the member tile to display a list of the current members.
100+
2. For the user you want to remove, choose **Remove** from the role drop-down.
101+
102+
![Remove member](./media/manage-users/application-remove-member.png)
103+
104+
#### Change or add role
105+
106+
1. Select the member tile to display a list of the current members.
107+
2. For the user you want to change, click the drop-down and select the new role.
108+
109+
![Change role](./media/manage-users/application-change-role.png)
110+
111+
## Next steps
112+
113+
In this how-to article, you have learned how to manage users for Azure Blockchain Workbench. To learn how to create a blockchain application, continue to the next how-to article.
114+
115+
> [!div class="nextstepaction"]
116+
> [Create a blockchain application in Azure Blockchain Workbench](create-app.md)
Lines changed: 306 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,306 @@
1+
---
2+
title: Azure Blockchain Workbench messages integration overview
3+
description: Overview of using messages in Azure Blockchain Workbench.
4+
services: azure-blockchain
5+
keywords:
6+
author: PatAltimore
7+
ms.author: patricka
8+
ms.date: 4/16/2018
9+
ms.topic: article
10+
ms.service: azure-blockchain
11+
ms.reviewer: mmercuri
12+
manager: femila
13+
---
14+
15+
# Azure Blockchain Workbench messaging integration
16+
17+
In addition to providing a REST API, Azure Blockchain Workbench also provides messaging-based integration. Workbench publishes ledger-centric events via Azure Event Grid, enabling downstream consumers to ingest data or take action based on these events. For those clients that require reliable messaging, Azure Blockchain Workbench delivers messages to an Azure Service Bus endpoint as well.
18+
19+
Developers have also expressed interest in the ability to have external systems communicate initiate transactions to create users, create contracts, and update contracts on a ledger. While this functionality is not currently exposed in public preview, a sample that delivers that capability can be found at [http://aka.ms/blockchain-workbench-integration-sample](http://aka.ms/blockchain-workbench-integration-sample).
20+
21+
## Event notifications
22+
23+
Event notifications can be used to notify users and downstream systems of events that happen in Blockchain Workbench and the blockchain network it is connected to. Event notifications can be consumed directly in code or used with tools such as Logic Apps and Flow to trigger flow of data to downstream systems.
24+
25+
See [Notification message reference](#notification-message-reference)
26+
for details of various messages that can be received.
27+
28+
### Consuming Event Grid events with Azure Functions
29+
30+
If a user wants to use Event Grid to be notified about events that happen in Blockchain Workbench, you can consume events from Event Grid by using Azure Functions.
31+
32+
1. Create an **Azure Function App** in the Azure portal.
33+
2. Create a new function.
34+
3. Locate the template for Event Grid. Basic template code for reading the message is shown. Modify the code as needed.
35+
4. Save the Function.
36+
5. Select the Event Grid from Blockchain Workbench’s resource group.
37+
38+
### Consuming Event Grid events with Logic Apps
39+
40+
1. Create a new **Azure Logic App** in the Azure portal.
41+
2. When opening the Azure Logic App in the portal, you will be prompted to select a trigger. Select **Azure Event Grid -- When a resource event occurs**.
42+
3. When the workflow designer is displayed, you will be prompted to sign in.
43+
4. Select the Subscription. Resource as **Microsoft.EventGrid.Topics**. Select the **Resource Name** from the name of the resource from the Azure Blockchain Workbench resource group.
44+
5. Select the Event Grid from Blockchain Workbench's resource group.
45+
46+
## Using Service Bus Topics for notifications
47+
48+
Service Bus Topics can be used to notify users about events that happen in Blockchain Workbench.
49+
50+
1. Browse to the Service Bus within the Workbench’s resource group.
51+
2. Select **Topics**.
52+
3. Select **workbench-external**.
53+
4. Create a new subscription to this topic. Obtain a key for it.
54+
5. Create a program, which subscribes to events from this subscription.
55+
56+
### Consuming Service Bus Messages with Logic Apps
57+
58+
1. Create a new **Azure Logic App** in the Azure portal.
59+
2. When opening the Azure Logic App in the portal, you will be prompted to select a trigger. Type **Service Bus** into the search box and select the trigger appropriate for the type of interaction you want to have with the Service Bus. For example, **Service Bus -- When a message is received in a topic subscription (auto-complete)**.
60+
3. When the workflow designer is displayed, specify the connection information for the Service Bus.
61+
4. Select your subscription and specify the topic of **workbench-external**.
62+
5. Develop the logic for your application that utilizes the message from
63+
this trigger.
64+
65+
## Notification message reference
66+
67+
Depending on the **OperationName**, the notification messages have one of the following message types.
68+
69+
### AccountCreated
70+
71+
Indicates that a new account has been requested to be added to the specified chain.
72+
73+
| Name | Description |
74+
|----------|--------------|
75+
| UserId | ID of the user that was created. |
76+
| ChainIdentifier | Address of the user that was created on the blockchain network. In Ethereum, this would be the user's **on-chain** address. |
77+
78+
``` csharp
79+
public class NewAccountRequest : MessageModelBase
80+
{
81+
public int UserID { get; set; }
82+
public string ChainIdentifier { get; set; }
83+
}
84+
```
85+
86+
### ContractInsertedOrUpdated
87+
88+
Indicates that a request has been made to insert or update a contract on a distributed ledger.
89+
90+
| Name | Description |
91+
|-----|--------------|
92+
| ChainID | A unique identifier for the chain associated with the request.|
93+
| BlockId | The unique identifier for a block on the ledger.|
94+
| ContractId | A unique identifier for the contract.|
95+
| ContractAddress | The address of the contract on the ledger.|
96+
| TransactionHash | The hash of the transaction on the ledger.|
97+
| OriginatingAddress | The address of the originator of the transaction.|
98+
| ActionName | The name of the action.|
99+
| IsUpdate | Identifies if this is an update.|
100+
| Parameters | A list of objects that identify the name, value, and data type of parameters sent to an action.|
101+
| TopLevelInputParams | In scenarios where a contract is connected to one or more other contracts, these are the parameters from the top-level contract. |
102+
103+
``` csharp
104+
public class ContractInsertOrUpdateRequest : MessageModelBase
105+
{
106+
public int ChainId { get; set; }
107+
public int BlockId { get; set; }
108+
public int ContractId { get; set; }
109+
public string ContractAddress { get; set; }
110+
public string TransactionHash { get; set; }
111+
public string OriginatingAddress { get; set; }
112+
public string ActionName { get; set; }
113+
public bool IsUpdate { get; set; }
114+
public List<ContractProperty> Parameters { get; set; }
115+
public bool IsTopLevelUpdate { get; set; }
116+
public List<ContractInputParameter> TopLevelInputParams { get; set; }
117+
}
118+
```
119+
120+
#### UpdateContractAction
121+
122+
Indicates that a request has been made to execution an action on a specific contract on a distributed ledger.
123+
124+
| Name | Description |
125+
|--------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
126+
| ContractActionId | The unique identifier for this contract action |
127+
| ChainIdentifier | The unique identifier for the chain |
128+
| ConnectionId | The unique identifier for the connection |
129+
| UserChainIdentifier | Address of the user that was created on the blockchain network. In Ethereum, this would be the user’s “on chain” address. |
130+
| ContractLedgerIdentifier | Address of the contract on the ledger. |
131+
| WorkflowFunctionName | Name of the workflow function. |
132+
| WorkflowName | Name of the workflow. |
133+
| WorkflowBlobStorageURL | The url of the contract in blob storage. |
134+
| ContractActionParameters | Parameters for the contract action. |
135+
| TransactionHash | The hash of the transaction on the ledger. |
136+
| Provisioning Status | The current provisioning status of the action.</br>0 – Created</br>1 – In Process</br>2 – Complete</br> Complete indicates a confirmation from the ledger that this as been successfully added. |
137+
| | |
138+
139+
```csharp
140+
public class ContractActionRequest : MessageModelBase
141+
{
142+
public int ContractActionId { get; set; }
143+
public int ConnectionId { get; set; }
144+
public string UserChainIdentifier { get; set; }
145+
public string ContractLedgerIdentifier { get; set; }
146+
public string WorkflowFunctionName { get; set; }
147+
public string WorkflowName { get; set; }
148+
public string WorkflowBlobStorageURL { get; set; }
149+
public IEnumerable<ContractActionParameter> ContractActionParameters { get; set; }
150+
public string TransactionHash { get; set; }
151+
public int ProvisioningStatus { get; set; }
152+
}
153+
```
154+
155+
### UpdateUserBalance
156+
157+
Indicates that a request has been made to update the user balance on a specific distributed ledger.
158+
159+
> [!NOTE]
160+
> This message is generated only for those ledgers that require the funding of accounts.
161+
>
162+
163+
| Name | Description |
164+
|---------|------------------------------------------|
165+
| Address | The address of the user that was funded. |
166+
| Balance | The balance of the user balance. |
167+
| ChainID | The unique identifier for the chain. |
168+
169+
170+
``` csharp
171+
public class UpdateUserBalanceRequest : MessageModelBase
172+
{
173+
public string Address { get; set; }
174+
public decimal Balance { get; set; }
175+
public int ChainID { get; set; }
176+
}
177+
```
178+
179+
### InsertBlock
180+
181+
Message indicates that a request has been made to add a block on a distributed ledger.
182+
183+
| Name | Description |
184+
|----------------|------------------------------------------------------------------------|
185+
| ChainId | The unique identifier of the chain to which the block was added. |
186+
| BlockId | The unique identifier for the block inside Azure Blockchain Workbench. |
187+
| BlockHash | The hash of the block. |
188+
| BlockTimeStamp | The timestamp of the block. |
189+
190+
``` csharp
191+
public class InsertBlockRequest : MessageModelBase
192+
{
193+
public int ChainId { get; set; }
194+
public int BlockId { get; set; }
195+
public string BlockHash { get; set; }
196+
public int BlockTimestamp { get; set; }
197+
}
198+
```
199+
200+
### InsertTransaction
201+
202+
Message provides details on a request to add a transaction on a distributed ledger.
203+
204+
| Name | Description |
205+
|-----------------|------------------------------------------------------------------------|
206+
| ChainId | The unique identifier of the chain to which the block was added. |
207+
| BlockId | The unique identifier for the block inside Azure Blockchain Workbench. |
208+
| TransactionHash | The hash of the transaction. |
209+
| From | The address of the originator of the transaction. |
210+
| To | The address of the intended recipient of the transaction. |
211+
| Value | The value included in the transaction. |
212+
| IsAppBuilderTx | Identifies if this is a Blockchain Workbench transaction. |
213+
214+
``` csharp
215+
public class InsertTransactionRequest : MessageModelBase
216+
{
217+
public int ChainId { get; set; }
218+
public int BlockId { get; set; }
219+
public string TransactionHash { get; set; }
220+
public string From { get; set; }
221+
public string To { get; set; }
222+
public decimal Value { get; set; }
223+
public bool IsAppBuilderTx { get; set; }
224+
}
225+
```
226+
227+
### AssignContractChainIdentifier
228+
229+
Provides details on the assignment of a chain identifier for a contract. For example, in Ethereum blockchain, the address of a contract on the ledger.
230+
231+
| Name | Description |
232+
|-----------------|-----------------------------------------------------------------------------------|
233+
| ContractId | This is the unique identifier for the contract inside Azure Blockchain Workbench. |
234+
| ChainIdentifier | This is the identifier for the contract on the chain. |
235+
236+
``` csharp
237+
public class AssignContractChainIdentifierRequest : MessageModelBase
238+
{
239+
public int ContractId { get; set; }
240+
public string ChainIdentifier { get; set; }
241+
}
242+
```
243+
244+
## Classes used by message types
245+
246+
### MessageModelBase
247+
248+
The base model for all messages.
249+
250+
| Name | Description |
251+
|---------------|--------------------------------------|
252+
| OperationName | The name of the operation. |
253+
| RequestId | A unique identifier for the request. |
254+
255+
``` csharp
256+
public class MessageModelBase
257+
{
258+
public string OperationName { get; set; }
259+
public string RequestId { get; set; }
260+
}
261+
```
262+
263+
### ContractInputParameter
264+
265+
Contains the name, value and type of a parameter.
266+
267+
| Name | Description |
268+
|-------|-----------------------------|
269+
| Name | The name of the parameter. |
270+
| Value | The value of the parameter. |
271+
| Type | The type of the parameter. |
272+
273+
``` csharp
274+
public class ContractInputParameter
275+
{
276+
public string Name { get; set; }
277+
public string Value { get; set; }
278+
public string Type { get; set; }
279+
}
280+
```
281+
282+
#### ContractProperty
283+
284+
Contains the ID, name, value and type of a property.
285+
286+
| Name | Description |
287+
|-------|----------------------------|
288+
| Id | The ID of the property. |
289+
| Name | The name of the property. |
290+
| Value | The value of the property. |
291+
| Type | The type of the property. |
292+
293+
``` csharp
294+
public class ContractProperty
295+
{
296+
public int Id { get; set; }
297+
public string Name { get; set; }
298+
public string Value { get; set; }
299+
public string DataType { get; set; }
300+
}
301+
```
302+
303+
## Next steps
304+
305+
> [!div class="nextstepaction"]
306+
> [Smart contract integration patterns](integration-patterns.md)
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
---
2+
title: Azure Blockchain Workbench overview
3+
description: Overview of Azure Blockchain Workbench and its capabilities.
4+
services: azure-blockchain
5+
keywords:
6+
author: PatAltimore
7+
ms.author: patricka
8+
ms.date: 3/21/2018
9+
ms.topic: overview
10+
ms.service: azure-blockchain
11+
ms.reviewer: zeyadr
12+
manager: femila
13+
---
14+
# What is Azure Blockchain Workbench?
15+
16+
Azure Blockchain Workbench is a collection of Azure services and capabilities designed to help you create and deploy blockchain applications to share business processes and data with other organizations. Azure Blockchain Workbench provides the infrastructure scaffolding for building blockchain applications enabling developers to focus on creating business logic and smart contracts. It also makes it easier to create blockchain applications by integrating several Azure services and capabilities to help automate common development tasks.
17+
18+
## Create blockchain applications
19+
20+
With Blockchain Workbench, you can define blockchain applications using configuration and writing smart contract code. You can jumpstart blockchain application development and focus on defining your contract and writing business logic instead of building scaffolding and setting up supporting services.
21+
22+
## Manage applications and users
23+
24+
Azure Blockchain Workbench provides a web application and REST APIs for managing blockchain applications and users. Blockchain Workbench administrators can manage application access and assign your users to application roles. Azure AD users are automatically mapped to members in the application.
25+
26+
## Integrate blockchain with applications
27+
28+
You can use the Blockchain Workbench REST APIs and message-based APIs to integrate with existing systems. The APIs provide an interface to allow for replacing or using multiple distributed ledger technologies, storage, and database offerings.
29+
30+
Blockchain Workbench can transform messages sent to its message-based API to build transactions in a format expected by that blockchain’s native API. Workbench can sign and route transactions to the appropriate blockchain.
31+
32+
Workbench automatically delivers events to Service Bus and Event Grid to send messages to downstream consumers. Developers can integrate with either of these messaging systems to drive transactions and to look at results.
33+
34+
## Deploy a blockchain network
35+
36+
Azure Blockchain Workbench simplifies consortium blockchain network setup as a preconfigured solution with an Azure Resource Manager solution template. The template provides simplified deployment that deploys all components needed to run a consortium. Today, Blockchain Workbench currently supports Ethereum.
37+
38+
## Use Active Directory login
39+
40+
With existing blockchain protocols, blockchain identities are represented as an address on the network. Azure Blockchain Workbench abstracts away the blockchain identity by associating it with an Active Directory identity, making it simpler to build enterprise applications with Active Directory identities.
41+
42+
## Synchronize on-chain data with off-chain storage
43+
44+
Azure Blockchain Workbench makes it easier to analyze blockchain events and data by automatically synchronizing data on the blockchain to off-chain storage. Instead of extracting data directly from the blockchain, you can query off-chain database systems such as SQL Server. Blockchain specific expertise is not required for end users who are doing data analysis tasks.
45+
46+
## Next steps
47+
48+
> [!div class="nextstepaction"]
49+
> [Azure Blockchain Workbench architecture](architecture.md)
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
---
2+
title: Azure Blockchain Workbench troubleshooting
3+
description: How to troubleshoot a Azure Blockchain Workbench application.
4+
services: azure-blockchain
5+
keywords:
6+
author: PatAltimore
7+
ms.author: patricka
8+
ms.date: 4/21/2018
9+
ms.topic: article
10+
ms.service: azure-blockchain
11+
ms.reviewer: zeyadr
12+
manager: femila
13+
---
14+
15+
# Azure Blockchain Workbench troubleshooting
16+
17+
A PowerShell script is available to assist with developer debugging or support. The script generates a summary and collects detailed logs for troubleshooting. Collected logs include:
18+
19+
* Blockchain network, such as Ethereum
20+
* Blockchain Workbench microservices
21+
* Application Insights
22+
* Azure Monitoring (OMS)
23+
24+
You can use the information to determine next steps and determine root cause of issues.
25+
26+
## Troubleshooting script
27+
28+
The PowerShell troubleshooting script is available on GitHub. [Download a zip file](https://github.com/Azure-Samples/blockchain/archive/master.zip) or clone the sample from GitHub.
29+
30+
```
31+
git clone https://github.com/Azure-Samples/blockchain.git
32+
```
33+
34+
## Run the script
35+
[!INCLUDE [sample-powershell-install](../../../includes/sample-powershell-install.md)]
36+
37+
Run the `collectBlockchainWorkbenchTroubleshooting.ps1` script to collect logs and create a ZIP file containing a folder of troubleshooting information. For example:
38+
39+
``` powershell
40+
collectBlockchainWorkbenchTroubleshooting.ps1 -SubscriptionID "<subscription_id>" -ResourceGroupName "workbench-resource-group-name"
41+
```
42+
The script accepts the following parameters:
43+
44+
| Parameter | Description | Required |
45+
|---------|---------|----|
46+
| SubscriptionID | SubscriptionID to create or locate all resources. | Yes |
47+
| ResourceGroupName | Name of the Azure Resource Group where Blockchain Workbench has been deployed. | Yes |
48+
| OutputDirectory | Path to create the output .ZIP file. If not specified, defaults to the current directory. | No |
49+
| LookbackHours | Number of hours to use when pulling telemetry. Default value is 24 hours. Maximum value is 90 hours | No |
50+
| OmsSubscriptionId | The subscription ID where OMS is deployed. Only pass this parameter if the OMS for the blockchain network is deployed outside of Blockchain Workbench's resource group.| No |
51+
| OmsResourceGroup |The resource group where OMS is deployed. Only pass this parameter if the OMS for the blockchain network is deployed outside of Blockchain Workbench's resource group.| No |
52+
| OmsWorkspaceName | The OMS workspace name. Only pass this parameter if the OMS for the blockchain network is deployed outside of Blockchain Workbench's resource group | No |
53+
54+
## What is collected?
55+
56+
The output ZIP file contains the following folder structure:
57+
58+
| Folder or File | Description |
59+
|---------|---------|
60+
| \Summary.txt | Summary of the system |
61+
| \Metrics\blockchain | Metrics about the blockchain |
62+
| \Metrics\Workbench | Metrics about the workbench |
63+
| \Details\Blockchain | Detailed logs about the blockchain |
64+
| \Details\Workbench | Detailed logs about the workbench |
65+
66+
The summary file gives you a snapshot of the overall state of the application and health of the application. The summary provides recommended actions, highlights top errors, and metadata about running services.
67+
68+
The **Metrics** folder contains metrics of various system components over time. For example, the output file `\Details\Workbench\apiMetrics.txt` contains a summary of different response codes, and response times throughout the collection period.
69+
The **Details** folder contains detailed logs for troubleshooting specific issues with Workbench or the underlying blockchain network. For example, `\Details\Workbench\Exceptions.csv` contains a list of the most recent exceptions that have occurred in the system, which is useful for troubleshooting errors with smart contracts or interactions with the blockchain.
70+
71+
## Next steps
72+
73+
> [!div class="nextstepaction"]
74+
> [Azure Blockchain Workbench architecture](architecture.md)

0 commit comments

Comments
 (0)
Please sign in to comment.