Skip to content
This repository was archived by the owner on Mar 8, 2020. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
105 commits
Select commit Hold shift + click to select a range
aadf9d6
Updates for work
EdProsser Apr 11, 2017
32c25e5
Merge remote-tracking branch 'refs/remotes/hyperledger/master'
EdProsser Apr 24, 2017
67461d2
Merge remote-tracking branch 'refs/remotes/hyperledger/master'
EdProsser Apr 24, 2017
b8aa84c
Adding Installing Index to ToC
EdProsser Apr 24, 2017
02c32b8
Removing Fabric Composer name
EdProsser Apr 24, 2017
b368825
Removing Fabric composer name
EdProsser Apr 24, 2017
c7c1139
Moving images for REST API doc
EdProsser Apr 24, 2017
c47dcc5
Merge remote-tracking branch 'refs/remotes/hyperledger/master'
EdProsser Apr 25, 2017
9e93011
Fabric Composer Name removal
EdProsser Apr 25, 2017
d5571f6
Fabric Composer name removal
EdProsser Apr 25, 2017
f451c3e
Other name changes (Stack Overflow, GitHub, Rocket.Chat, JavaScript)
EdProsser Apr 25, 2017
95ebad2
wording updates and bug splats
EdProsser Apr 25, 2017
6c9c6bf
Merge remote-tracking branch 'refs/remotes/hyperledger/master'
EdProsser Apr 25, 2017
dac8b5e
ToC Updates
EdProsser Apr 25, 2017
c6dd3bd
Merge branch 'master' into master
EdProsser Apr 26, 2017
3646022
Merge branch 'master' into master
EdProsser Apr 26, 2017
ca7d8bc
Merge remote-tracking branch 'refs/remotes/hyperledger/master'
EdProsser Apr 26, 2017
e1cbf5d
HLv1 docs updates, couple more bug splats.
EdProsser Apr 26, 2017
9a24290
Last edit for HLv1
EdProsser Apr 26, 2017
a6b3c83
Merge remote-tracking branch 'refs/remotes/hyperledger/master'
EdProsser Apr 26, 2017
dca7b3f
Whoops, bug splat
EdProsser Apr 27, 2017
cf23ac0
Another bug splat...
EdProsser Apr 27, 2017
8d9022e
Merge branch 'master' into master
EdProsser Apr 27, 2017
587ad3c
Merge remote-tracking branch 'refs/remotes/hyperledger/master'
EdProsser Apr 27, 2017
ce13300
Merge branch 'master' of https://github.com/EdProsser/fabric-composer
EdProsser Apr 28, 2017
b8ce008
Quick fixes prereqs navbar
EdProsser Apr 28, 2017
8326d50
Merge remote-tracking branch 'refs/remotes/hyperledger/master'
EdProsser Apr 28, 2017
fbcd5a2
intro diagram fix and bug fixes
EdProsser Apr 28, 2017
6231a5c
Merge remote-tracking branch 'refs/remotes/hyperledger/master'
EdProsser Apr 28, 2017
3cbd7ad
Fixes and updates
EdProsser Apr 28, 2017
2a7579b
Rollback optional script for v1.0
EdProsser Apr 28, 2017
a98cfeb
QoL changes and rollback changes - Quickstart
EdProsser Apr 28, 2017
788abd0
Link fixes
EdProsser Apr 28, 2017
62eb96d
Atom links fix, formatting fix
EdProsser Apr 28, 2017
b9ad27b
Odd formatting fix.
EdProsser Apr 28, 2017
55ad081
Name change and codeblock fix
EdProsser Apr 28, 2017
89c3327
More odd formatting fixes
EdProsser Apr 28, 2017
a629025
Merge branch 'master' into master
Apr 28, 2017
50a862f
Merge remote-tracking branch 'refs/remotes/hyperledger/master'
EdProsser Apr 29, 2017
8b2d43a
Merge remote-tracking branch 'refs/remotes/hyperledger/master'
EdProsser May 2, 2017
2b73ee0
Merge remote-tracking branch 'refs/remotes/hyperledger/master'
EdProsser May 2, 2017
183c442
Merge remote-tracking branch 'refs/remotes/hyperledger/master'
EdProsser May 8, 2017
8482482
Merge remote-tracking branch 'refs/remotes/hyperledger/master'
EdProsser May 8, 2017
26ca287
Merge remote-tracking branch 'refs/remotes/hyperledger/master'
EdProsser May 9, 2017
3927222
Ubuntu root user doc fix + draft of bnd doc changes
EdProsser May 9, 2017
bcb050f
update for CLI define + deploy BNA
EdProsser May 9, 2017
1abb831
Merge remote-tracking branch 'refs/remotes/hyperledger/master'
EdProsser May 10, 2017
a2f3bfc
last bnd update
EdProsser May 10, 2017
75fb2a0
Merge remote-tracking branch 'refs/remotes/hyperledger/master'
EdProsser May 10, 2017
60c4a60
Merge remote-tracking branch 'refs/remotes/hyperledger/master'
EdProsser May 11, 2017
b895950
Merge remote-tracking branch 'refs/remotes/hyperledger/master'
EdProsser May 11, 2017
c706604
Merge remote-tracking branch 'refs/remotes/hyperledger/master'
EdProsser May 15, 2017
ea8a49a
Events and bug fixes
EdProsser May 15, 2017
92b742e
Last event thing
EdProsser May 15, 2017
5872a55
Merge remote-tracking branch 'hyperledger/master'
May 15, 2017
7708e51
Updates for #803 and #822
May 16, 2017
7d08dea
removing unnecessary stuff
May 16, 2017
bb171ef
Undeploy support #673
May 16, 2017
3faa784
Clarifications on undeploy
May 16, 2017
343e72b
Merge remote-tracking branch 'hyperledger/master'
May 17, 2017
57aed2a
Merge remote-tracking branch 'hyperledger/master'
May 17, 2017
217ccc8
Merge remote-tracking branch 'hyperledger/master'
May 17, 2017
c15a8b1
Merge branch 'master' into master
EdProsser May 17, 2017
b413344
Merge remote-tracking branch 'hyperledger/master'
May 17, 2017
1860b49
Merge remote-tracking branch 'hyperledger/master'
May 17, 2017
fdf8670
Merge remote-tracking branch 'hyperledger/master'
May 22, 2017
9094568
Commit?
May 23, 2017
21f0fc9
Revert "Commit?"
May 23, 2017
4b06ac8
Quick Fixes
May 23, 2017
2470c57
Quick fix for connection profile keyvalstore
May 23, 2017
f10f070
Updates to show events docs in ToC
May 23, 2017
e00f929
Quick fixes
May 23, 2017
59b7173
Merge remote-tracking branch 'hyperledger/master'
May 24, 2017
5b558ac
Merge remote-tracking branch 'hyperledger/master'
May 24, 2017
bcc2455
Merge branch 'master' into master
cazfletch May 24, 2017
2acd47f
Merge remote-tracking branch 'hyperledger/master'
May 24, 2017
e4f2663
Merge remote-tracking branch 'hyperledger/master'
May 25, 2017
7dc7b33
Merge remote-tracking branch 'hyperledger/master'
May 30, 2017
f7e7db1
Merge remote-tracking branch 'hyperledger/master'
Jun 1, 2017
7b1c789
Merge remote-tracking branch 'hyperledger/master'
Jun 1, 2017
464f24d
Last minute docs updates.
Jun 1, 2017
9d12315
Merge remote-tracking branch 'hyperledger/master'
Jun 5, 2017
f74da77
changes from issue #912
Jun 5, 2017
3fcf133
Version 1 auto-generating landing pages
Jun 5, 2017
679ed52
Merge remote-tracking branch 'hyperledger/master'
Jun 5, 2017
d9599d0
Docs Updates week 2
Jun 6, 2017
88a800a
1 more set of updates
Jun 6, 2017
b128c27
Merge remote-tracking branch 'hyperledger/master' into new-user-docs-wk2
Jun 6, 2017
f7aa534
last changes
Jun 7, 2017
3ef7d9e
Merge remote-tracking branch 'hyperledger/master' into new-user-docs-wk2
Jun 7, 2017
e894de8
Merge remote-tracking branch 'hyperledger/master' into new-user-docs-wk2
Jun 7, 2017
b3a4a92
Merge remote-tracking branch 'hyperledger/master' into new-user-docs-wk2
Jun 7, 2017
1ea6001
Merge remote-tracking branch 'hyperledger/master' into new-user-docs-wk2
Jun 7, 2017
5aadcd3
Merge remote-tracking branch 'hyperledger/master' into new-user-docs-wk2
Jun 13, 2017
7660991
HLFV1 Beta and Query (#1247) (#1255)
cazfletch Jun 13, 2017
e764b4b
Move HLF v0.6 to use Duktape instead of Otto (#1257)
Jun 13, 2017
8e67249
Connection profile, identity import, logic.js
EdProsser Jun 13, 2017
6384af7
Merge remote-tracking branch 'hyperledger/master' into short-branch
EdProsser Jun 13, 2017
0db8076
Query v0.1
EdProsser Jun 13, 2017
bbfd8cb
Merge remote-tracking branch 'hyperledger/master' into short-branch
EdProsser Jun 14, 2017
a139679
Connection profile, Query, Security, Dev Guide
EdProsser Jun 14, 2017
34f096f
Merge remote-tracking branch 'hyperledger/master' into short-branch
EdProsser Jun 14, 2017
d631a32
Security updates for local playground
EdProsser Jun 14, 2017
5b58b7d
Last minute updates
EdProsser Jun 15, 2017
0869e15
Merge branch 'master' into short-branch
EdProsser Jun 15, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,23 @@ Once the BNA file has been created it can be deployed to a runtime using the `co

For example:

composer network deploy -p connectionProfileName -a <BusinessNetworkDefinition>.bna
composer network deploy -p connectionProfileName -a <BusinessNetworkDefinition>.bna
-i <Your EnrollmentID> -s <Your EnrollmentSecret>

To update the definition of an already deployed business network use the `composer network update` CLI command.

## Deploying business networks to {{site.data.conrefs.hlf_full}} Beta

In {{site.data.conrefs.hlf_full}} Beta peers now enforce the concepts of admins and members. Admin user's identities and crypto material must be available to the peer at deployment. To make that identity and its crypto material available, your must import it to your local `keyValStore` directory before deploying the business network. To import the identity, use the [`composer identity import` command](../reference/composer.identity.import.html). When importing an identity, you do not assign it a secret, however the `composer network deploy` command requires a secret. If you are using an imported identity, you can enter any value for the secret.

When connecting to the peer you must specify an identity where the userID contains the text `admin`, for example, `PeerAdmin`, `myadmin`, or `AdminPeer` are all valid userID's. Peers in different organizations may have different admin users. Only an admin user of peer's organization will be able to deploy a business network to their peers.

These security changes mean that {{site.data.conrefs.composer_full}} cannot support older versions of {{site.data.conrefs.hlf_full}} v1.0 (e.g. alpha 1).

### Deploying business networks using Playground locally

When deploying a business network to {{site.data.conrefs.hlf_full}} Beta using the Playground locally, you must follow the process above to connect using the peer admin identity. However, in order to create identities and interact with your business network in the Playground, you must use the certificate authority admin identity.

## References

* [**Composer CLI commands**](../reference/commands.html)
70 changes: 70 additions & 0 deletions packages/composer-website/jekylldocs/business-network/query.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
---
layout: default
title: Querying Business Network Data
category: tasks
section: business-network
sidebar: sidebars/businessnetworks.md
excerpt: Using {{site.data.conrefs.hlf_full}} and CouchDB, you can query assets in the stored world-state and return listed assets by using a transaction processor function.
---

# Querying business network data

>Warning
The status of this feature is experimental. You **must** use Hyperledger Composer v0.8+ with the the HLFv1 runtime to use queries. We welcome feedback and comments while we continue to iterate upon query functionality. The API may change based on the feedback received. In future releases we plan to extend this feature with a Composer specific query language, and data-binding to assets, participants and transactions.

{{site.data.conrefs.hlf_full}} v1.0 can be configured to store the world-state in a CouchDB database. CouchDB is a JSON document store, so all data in the world-state is persisted as JSON documents, including Composer assets, participants and transactions.

When {{site.data.conrefs.hlf_full}} is used in CouchDB mode chaincode can execute complex (content-based) queries against the world-state data. The queries are written in the Mango query language, the native CouchDB query language.

An example Mango _selector_ query:
var q = {
selector: {
size: 'SMALL'
}
};

This query will select all JSON documents in the document store that contain the property `size` that has the value `SMALL`. Please refer to the CouchDB documentation for the [query syntax for Mango queries](http://docs.couchdb.org/en/2.0.0/api/database/find.html). Note that CouchDB ships with a powerful web interface called [Fauxton](http://couchdb.apache.org/fauxton-visual-guide/). You can use Fauxton to inspect the documents in the document store, run queries, view results etc.

### Running Native CouchDB Mango Queries from Transaction Processor Functions

The Composer runtime API includes the `queryNative(queryString)` method, allowing transaction processor functions to submit native Mango queries to CouchDB. Composer will execute the query against CouchDB, returning a promise to a JS Object that captures the results of running the query.

The JS Object returned is composed of an array of objects, each with a `Key` and `Record` property. `Key` is a string that represents the key of the document in the document store. `Record` is a JS Object that captures the data for the document itself.

### Example

The example below runs a content-based query to select all `SMALL` marbles, verifies the number of marbles returned, and that they are indeed all `SMALL`.
```
/**
* Executes a CouchDB query and checks the results.
* @param {org.fabric_composer.marbles.QueryMarbleByOwner} transaction
* @transaction
* @return {Promise} a promise to the results of transaction processing
*/
function onQueryMarbleByOwner(transaction) {
var factory = getFactory();
// create the query
var q = {
selector: {
size: 'SMALL'
}
};
return queryNative(JSON.stringify(q))
.then(function (resultArray) {
print('TP function received query result: ', JSON.stringify(resultArray));
if (resultArray.length !== 5) {
throw new Error('The incorrect number of marbles found: ', resultArray.length);
}
for (var x = 0; x < resultArray.length; x++) {
var currentResult = resultArray[x];
if (currentResult.Record.size !== 'SMALL') {
throw new Error('Query returned a marble that is not SMALL!', currentResult.Record);
}
}
});
}
```

Using a selector it is possible to query all assets of a given type, with a given set of properties, and then to convert them back into Composer resources using `getSerializer().fromJSON(jsObject)`. Once the JS object returned by a query have been converted back into a Composer object it can be updated and persisted back into an asset registry.

>Note that in the future Composer will define a query language expressed in terms of assets, participants and transactions and automatically marshall the JS objects returned by CouchDB to the corresponding Composer modelled types.
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,19 @@ docker images -aq | xargs docker rmi -f

By default, the Web Browser connection profile is in use (for developing and testing in browser memory). To connect instead to the {{site.data.conrefs.hlf_full}} instance created in the previous step, click the globe icon in the top right of the UI to visit the Connection Profiles panel and change your active profile to 'hlfabric'.

## Deploying business networks to {{site.data.conrefs.hlf_full}} Beta

In {{site.data.conrefs.hlf_full}} Beta peers now enforce the concepts of admins and members. Admin user's identities and crypto material must be available to the peer at deployment. To make that identity and its crypto material available, your must import it to your local `keyValStore` directory before deploying the business network. To import the identity, use the [`composer identity import` command](../reference/composer.identity.import.html). When importing an identity, you do not assign it a secret, however the `composer network deploy` command requires a secret. If you are using an imported identity, you can enter any value for the secret.

When connecting to the peer you must specify an identity where the userID contains the text `admin`, for example, `PeerAdmin`, `myadmin`, or `AdminPeer` are all valid userID's. Peers in different organizations may have different admin users. Only an admin user of peer's organization will be able to deploy a business network to their peers.

These security changes mean that {{site.data.conrefs.composer_full}} cannot support older versions of {{site.data.conrefs.hlf_full}} v1.0 (e.g. alpha 1).

### Deploying business networks using Playground locally

When deploying a business network to {{site.data.conrefs.hlf_full}} Beta using the Playground locally, you must follow the process above to connect using the peer admin identity. However, in order to create identities and interact with your business network in the Playground, you must use the certificate authority admin identity.


---
<!--
<a name="installationoptions"></a>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ All the options are required. The `userId` doesn't have to match any information
## Syntax example

```
composer identity import -p hlfv1 -u Org1PeerAdmin -c admin.pem -k 9022d671ceedbb24af3ea69b5a8136cc64203df6b9920e26f48123fcfcb1d2e9_sk
node cli.js identity import -p hlfv1 -u PeerAdmin -c ./peerOrganizations/org1.example.com/users/Admin@org1.example.com/signcerts/Admin@org1.example.com-cert.pem -k ./peerOrganizations/org1.example.com/users/Admin@org1.example.com/keystore/9022d671ceedbb24af3ea69b5a8136cc64203df6b9920e26f48123fcfcb1d2e9_sk
```

## Options
Expand All @@ -32,8 +32,8 @@ Options:
-v, --version Show version number [boolean]
--connectionProfileName, -p The connection profile name [string] [required]
--userId, -u The user ID for the new identity [string] [required]
--signerCertFile, -c signerCert path [string] [required]
--keyFile, -k key file [string] [required]
--publicKeyFile, -c File containing the public key [string] [required]
--privateKeyFile, -k File containing the private key [string] [required]
```

#### Define connection profile name
Expand All @@ -54,15 +54,15 @@ Example: `-u Org1PeerAdmin`

#### Define signers public certificate

`-c` or `--signerCertFile`
`-c` or `--publicKeyFile`

Example: `-c admin.pem`

---

#### Define signers private key file

`-k` or `--keyFile`
`-k` or `--privateKeyFile`

Example: `-k 9022d671ceedbb24af3ea69b5a8136cc64203df6b9920e26f48123fcfcb1d2e9_sk`

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ A Connection Profile is used by {{site.data.conrefs.composer_full}} to connect t
],
"ca": {
"url:" "https://",
"name": "",
"trustedRoots": "",
"verify": true
},
Expand All @@ -69,12 +70,16 @@ A Connection Profile is used by {{site.data.conrefs.composer_full}} to connect t
"keyValStore": "/YOUR_HOME_DIR/.hfc-key-store",
"channel": "mychannel",
"mspID": "Org1MSP",
"deployWaitTime": "300",
"invokeWaitTime": "100"
"timeout": 300,
"globalcert": "",
"maxSendSize": 10,
"maxRecvSize": 15
}

If you are connecting to {{site.data.conrefs.hlf_full}} v1.0 and are not using TLS or if you don't need the trustedRoots and verify options of the Certificate Authority definition you can use the following simplified connection profile:

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The simplified version defines the "ca" as a single line. This will only work if the ca has no name defined. If it does then you will have to use the more complex definition of a ca

            "ca": {
                      "url:" "http://",
                      "name": ""
              },

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed


_Please note: The simplified version of the connection profile will only work if the relevant certificate authority has no name defined. If the certificate authority has a defined name, it must be specified._

{
"type": "hlfv1",
"orderers": [
Expand All @@ -94,8 +99,10 @@ A Connection Profile is used by {{site.data.conrefs.composer_full}} to connect t
"keyValStore": "/home/.hfc-key-store",
"channel": "mychannel",
"mspID": "Org1MSP",
"deployWaitTime": "300",
"invokeWaitTime": "100"
"timeout": 300,
"globalcert": "",
"maxSendSize": 10,
"maxRecvSize": 15
}

- `type` defines the version of {{site.data.conrefs.hlf_full}} that you will connect to. To connect to {{site.data.conrefs.hlf_full}} v1.0-alpha is must be `hlfv1`.
Expand All @@ -108,7 +115,6 @@ A Connection Profile is used by {{site.data.conrefs.composer_full}} to connect t


- `mspid` is the Membership Service Provider ID of your organization. It is associated with the enrollment id that you will use to interact with the business network.
- `deployWaitTime` is an optional property which sets a wait time for a response before timing out when attempting to deploy your business network.
- `invokeWaitTime` is an optional property which sets a wait time for a response before timing out when invoking a transaction or making a query request.

*Please note: If you are connecting to an instance of {{site.data.conrefs.hlf_full}} v1.0 the `keyValStore` property must be `home/.hfc-key-store`*
- `timeout` is an optional property which controls the timeout for each request made to peers and orderers. Please note, some commands may make several sequential requests and the timeout will be applied individually to each request.
- `maxSendSize` is an optional property which defines the size limit of outbound grpc messages being send to orderers and peers. The value is defined in megabytes. If this is not set, grpc sets a default. Setting this property to `-1` results in no size restriction.
- `maxRecvSize` is an optional property which defines the size limit of inbound grpc messages being received from orderers and peers. The value is defined in megabytes. If this is not set, grpc sets a default. Setting this property to `-1` results in no size restriction.
38 changes: 17 additions & 21 deletions packages/composer-website/jekylldocs/tutorials/developer-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ sidebar: sidebars/tutorials.md
excerpt: Developer Guide
---

# Create an end-to-end {{site.data.conrefs.composer_full}} solution from scratch
# Developer Tutorial for creating a {{site.data.conrefs.composer_full}} solution

---

*Note:* this tutorial was written against {{site.data.conrefs.composer_full}} v0.7.2 on Ubuntu Linux running with {{site.data.conrefs.hlf_full}} v1.0 where referenced below and also tested for a Mac environment. (The relevant steps for a {{site.data.conrefs.hlf_full}} v0.6 setup are shown in *italics*).
*Note:* this tutorial was written against {{site.data.conrefs.composer_full}} v0.8 on Ubuntu Linux running with {{site.data.conrefs.hlf_full}} v1.0 where referenced below and also tested for a Mac environment. (The relevant steps for a {{site.data.conrefs.hlf_full}} v0.6 setup are shown in *italics*).

This tutorial will walk you through the steps required to build a {{site.data.conrefs.composer_full}} blockchain solution from scratch. In the space of a day or probably less, you will be able to go from an idea for a disruptive blockchain innovation, to executing transactions against a real {{site.data.conrefs.hlf_full}} blockchain network, and generating/running a sample Angular 2 based application for Commodity Trading that interacts with a blockchain network.

Expand Down Expand Up @@ -81,6 +81,16 @@ The start of the `package.json` file should now look like this:

Save your changes to `package.json`

### Update your README.md file

Open the `README.md` file and update the markdown with a short decription of the business network.

```
# My very first Hyperledger Composer Network
```

Save your changes to `README.md`

## Define your Domain Model

Open the file `models/sample.cto` and inspect the contents. This is the domain model for the business network definition. It defines the structure (schema) for the assets, transaction and participants in the business network. You can add as many model files as convenient under the `models` folder, however each model file must have a unique namespace; do note that you can import types from one namespace into other namespaces.
Expand Down Expand Up @@ -159,7 +169,7 @@ Save your changes to `lib/sample.js`

## Update your Access Control Rules

The file `permissions.acl` defines the access control rules for the business network definition. Update the 'Default' rule to use the new namespace for the network (just cut and paste the entire contents from below if you prefer):
The file `permissions.acl` defines the access control rules for the business network definition. Replace the entire contents of `permissions.acl` with the rule below.

```
/**
Expand Down Expand Up @@ -390,19 +400,13 @@ Commodity Trading

## Import into Playground and Test

Change directory to your toplevel project folder (my-network) for example:

```
cd my-network
```

Re-generate the BNA file (overwriting the existing dist/my-network.bna file created earlier) using the following command (including the trailing '.' please note):
Change directory to your toplevel project folder (my-network). Re-generate the BNA file (overwriting the existing dist/my-network.bna file created earlier) using the following command (including the trailing '.' please note):

```
composer archive create -a dist/my-network.bna --sourceType dir --sourceName .
```

Next, in a browser, navigate to the online Bluemix Composer Playground [https://composer-playground.mybluemix.net](https://composer-playground.mybluemix.net) and import the newly-generated BNA file into the Playground using the "Import/Replace" button at the bottom left of the screen. Locate the `dist/my-network.bna` file under your 'my-network' folder and upload it, then press the "Deploy" button. Confirm to replace the current sample definition in Playground.
Next, in a browser, navigate to the online Bluemix Composer Playground <a href="https://composer-playground.mybluemix.net" target="blank">http://<span></span>composer-playground.mybluemix.net</a> and import the newly-generated BNA file into the Playground using the "Import/Replace" button at the bottom left of the screen. Locate the `dist/my-network.bna` file under your 'my-network' folder and upload it, then press the "Deploy" button. Confirm to replace the current sample definition in Playground.

<video autoplay "autoplay=autoplay" style="display:block; width:100%; height:auto;" loop="loop">
<source src="{{ site.baseurl }}/assets/img/tutorials/developer/import_replace.mp4" type="video/mp4" />
Expand Down Expand Up @@ -451,7 +455,7 @@ The Asset registry should look like this:

![Commodity Registry](../assets/img/tutorials/developer/commodity_registry.png)

Next, submit a `Trade` transaction (click the button, below left) to move the commodity from TRADER1 to TRADER2.
Next, submit a `Trade` transaction by clicking the "Submit Transaction" button, bottom left, to move the commodity from TRADER1 to TRADER2.

```
{
Expand All @@ -461,8 +465,6 @@ Next, submit a `Trade` transaction (click the button, below left) to move the co
}
```

<!-- ![Submit transaction](../assets/img/tutorials/developer/submit_tx.png) -->

After processing, you should now see the transaction in the transaction registry.

![Transaction registry](../assets/img/tutorials/developer/tx_registry.png)
Expand Down Expand Up @@ -624,14 +626,8 @@ If you navigate to this URL and press the "Assets" drop down (at the top-right o
Well done, you've now completed this tutorial and we hope you now have a much better idea how the capabilities fit together. You can start hacking on the skeleton Angular application to create the next industry defining blockchain-based application!


## Related Concepts
## Related Links

[Business Network Definition](../business-network/businessnetworkdefinition.html)

## Related Tasks

[Deploying a business network](../business-network/bnd-deploy.html)

## Related Reference

[Network deploy command](../reference/composer.network.deploy.html)
Loading