Page 33 - MSDN Magazine, June 2018
P. 33

Once you’ve created your custom smart contract and associated configuration files, the next task is to deploy the smart contract. After selecting Upload Custom Contract in the Administrator Dashboard of Azure Blockchain Workbench, you’ll see a page to upload your custom contract and configuration files. There are three files that you need to provide. Select the smart contract file and the two con- fig files created earlier, as indicated in the Upload Contract screen.
User Assignment
Once a smart contract (demo or custom) is deployed, users with initiator personas can create new contract instances. To create an instance of a particular contract, the user must have a persona as- sociated with that contract. Depending
on the specification of the smart con- tract, not every persona may have rights to create a contract. As an administra- tor, you can assign a user to a contract and specify their role (the persona) in the business process. Note that before an administrator can perform any user assignment actions, there must be at least one contract (demo or custom) deployed. Once a contract is uploaded, the next step is to complete the user assignment for the contract. Administra- tors can assign users to smart contracts from the User Assignment screen in the Azure Blockchain Workbench Administrator Dashboard.
Once assigned to contracts, users can participate in the smart contract work- flows by signing in to Azure Blockchain Workbench to create contracts. Say that the user wants to generate a new asset transfer. He or she must create a new con- tract by clicking Create New Contract on the upper right of the view and enter the details for the contract (this view will vary based on your smart contract) and submit. The screen is automatically gen- erated, based on the metadata provided as part of the Smart Contract definition.
After a contract instance is created, a user can drill down into the details to view available actions, given the current state of the contract.
Extending Azure
Blockchain Workbench
At the core of Azure Blockchain Work- bench is Azure Service Bus, enabling an extensible and pluggable model that allows multiple distributed ledger tech- nologies, storage and database offerings to be used as part of the blockchain
solution. There are also opportunities to integrate other services with the Workbench to extend functionality, such as with Azure Logic Apps, Web APIs, Notification Hubs and the like. Off-chain storage of data will allow for post-processing storage and analytics scenarios, with options such as with Power BI, Azure Machine Learning, HD Insight, Azure Data Lake and other services where contract data is shared.
Blockchain has the potential to extend digital transformation beyond a company’s walls and into the processes it shares with suppliers, customers and partners. As I’ve shown, at its core a blockchain is both a computing and data structure that can be used to create a digital transaction ledger that, instead of resting with a single provider, is shared among a distributed network of com-
puters. The result is a more transparent and verifiable system that will change the way you think about exchanging value and assets, enforcing contracts, and sharing data.
Microsoft is committed to bringing blockchain to the enterprise and bring- ing the full benefits of Azure to bear for developers and organizations looking to build distributed applications. The goal is to help companies thrive in this new era of secure, multi-party compu- tation by delivering scalable platforms and services that any company—from ledger startups and retailers to health providers and global banks—can use to improve shared business processes. Azure Blockchain Workbench is part of an ecosystem of services in Azure, along with the announced Azure Confidential Computing and the Confidential Con- sortium Blockchain Framework, that helps bridge the gap between the block- chain world and enterprise requirements for governance, security and scalability. Watch this space for additional devel- opment in the near future! n
Stefano tempeSta is a Microsoft Regional Director and MVP, as well as chapter leader for CRMUG in Switzerland, the largest community of Dynamics 365/CRM experts in the world. Tempesta is an instructor of courses about Dynamics 365, blockchain and machine learning, and a reg- ular speaker at international IT conferences, including Microsoft Ignite and Tech Summit. He founded Blogchain Space (blogchain.space), a blog about blockchain technologies, writes for MSDN Magazine and MS Dynamics World, and pub- lishes machine learning experiments on the Azure AI Gallery (gallery.azure.ai).
thankS to the following Microsoft technical experts for reviewing this article:
Marc Mercuri, JT Rose
Figure 7 InitiatingRoles
"InitiatingRoles": [ "Admin",
"User" ],
"Personas": { "Owner": {
"Role": "Initiator", "IsInitiator": true, "PropertyMapping": "Owner"
}, "Buyer": {
"Role": "Participant",
"PropertyMapping": "Buyer" },
"Appraiser": {
"Role": "Participant", "PropertyMapping": "Appraiser"
}, "Inspector": {
"Role": "Participant",
"PropertyMapping": "Inspector" }
},
"StateProperty": "State", "StateMapping": {
"Created": 0,
"Active": 1, "OfferPlaced": 2, "PendingInspection": 3, "Inspected": 4, "Appraised": 5, "NotionalAcceptance": 6, "BuyerAccepted": 7, "SellerAccepted": 8, "Accepted": 9, "Complete": 10, "Terminated": 11
}, "Constructor": {
"DisplayName": "Create Asset Transfer",
"Description": "Description of asset transfer" },
Figure 8 OfferPlaced Code
"OfferPlaced": { "PercentComplete": 30, "Style": "Success", "Actions": {
"Owner": { "AcceptOffer": {}, "Reject": {}, "Terminate": {}
}, "Buyer": {
"RescindOffer": {} }
} }
msdnmagazine.com


































































































   31   32   33   34   35