GraphQL on Azure: Part 5 – Can We Make GraphQL Type Safe in Code

This article is contributed. See the original author and article here.

I’ve been doing a lot of work recently with GraphQL on Azure Functions and something that I find works nicely is the schema-first approach to designing the GraphQL endpoint.


The major drawback I’ve found though is that you start with a strongly typed schema but lose that type information when implementing the resolvers and working with your data model.


So let’s have a look at how we can tackle that by building an application with GraphQL on Azure Functions and backing it with a data model in CosmosDB, all written in TypeScript.



To learn how to get started with GraphQL on Azure Functions, check out the earlier posts in this series.



Creating our schema


The API we’re going to build today is a trivia API (which uses data from Open Trivia DB as the source).


We’ll start by defining a schema that’ll represent the API as a file named schema.graphql within the graphql folder:



type Question {
    id: ID!
    question: String!
    correctAnswer: String!
    answers: [String!]!
}

type Query {
    question(id: ID!): Question
    getRandomQuestion: Question
}

type Answer {
    questionId: ID
    question: String!
    submittedAnswer: String!
    correctAnswer: String!
    correct: Boolean
}

type Mutation {
    answerQuestion(id: ID, answer: String): Answer
}

schema {
    query: Query
    mutation: Mutation
}


 

Our schema has defined two core types, Question and Answer, along with a few queries and a mutation and all these types are decorated with useful GraphQL type annotations, that would be useful to have respected in our TypeScript implementation of the resolvers.


Creating a resolver


Let’s start with the query resolvers, this will need to get back the data from CosmosDB to return the our consumer:


const resolvers = {
    Query: {
        question(_, { id }, { dataStore }) {
            return dataStore.getQuestionById(id);
        },
        async getRandomQuestion(_, __, { dataStore }) {
            const questions = await dataStore.getQuestions();
            return questions[Math.floor(Math.random() * questions.length) + 1];
        }
    }
};

export default resolvers;

This matches the query portion of our schema from the structure, but how did we know how to implement the resolver functions? What arguments do we get to question and getRandomQuestion? We know that question will receive an id parameter, but how? If we look at this in TypeScript there’s any all over the place, and that’s means we’re not getting much value from TypeScript.


Here’s where we start having a disconnect between the code we’re writing, and the schema we’re working against.


Enter GraphQL Code Generator


Thankfully, there’s a tool out there that can help solve this for us, GraphQL Code Generator. Let’s set it up by installing the tool:

npm install --save-dev @graphql-codegen/cli

And we’ll setup a config file named config.yml in the root of our Functions app:

overwrite: true
schema: "./graphql/schema.graphql"
generates:
    graphql/generated.ts:
        plugins:
            - typescript
            - typescript-resolvers

This will generate a file named generated.ts within the graphql folder using our schema.graphql as the input. The output will be TypeScript and we’re also going to generate the resolver signatures using the typescript and typescript-resolvers plugins, so we best install those too:

npm install --save-dev @graphql-codegen/typescript @graphql-codegen/typescript-resolvers

It’s time to run the generator:

npx graphql-codegen --config codegen.yml

Strongly typing our resolvers


We can update our resolvers to use this new type information:

import { Resolvers } from "./generated";

const resolvers: Resolvers = {
    Query: {
        question(_, { id }, { dataStore }) {
            return dataStore.getQuestionById(id);
        },
        async getRandomQuestion(_, __, { dataStore }) {
            const questions = await dataStore.getQuestions();
            return questions[Math.floor(Math.random() * questions.length) + 1];
        }
    }
};

export default resolvers;

Now we can hover over something like id and see that it’s typed as a string, but we’re still missing a piece, what is dataStore and how do we know what type to make it?


Creating a data store


Start by creating a new file named data.ts. This will house our API to work with CosmosDB, and since we’re using CosmosDB we’ll need to import the node module:

npm install --save @azure/cosmos

Why CosmosDB? CosmosDB have just launched a serverless plan which works nicely with the idea of a serverless GraphQL host in Azure Functions. Serverless host with a serverless data store, sound like a win all around!


With the module installed we can implement our data store:

import { CosmosClient } from "@azure/cosmos";

export type QuestionModel = {
    id: string;
    question: string;
    category: string;
    incorrect_answers: string[];
    correct_answer: string;
    type: string;
    difficulty: "easy" | "medium" | "hard";
};

interface DataStore {
    getQuestionById(id: string): Promise;
    getQuestions(): Promise<QuestionModel[]>;
}

class CosmosDataStore implements DataStore {
    #client: CosmosClient;
    #databaseName = "trivia";
    #containerName = "questions";

    #getContainer = () => {
    return this.#client
        .database(this.#databaseName)
        .container(this.#containerName);
    };

    constructor(client: CosmosClient) {
    this.#client = client;
    }

    async getQuestionById(id: string) {
    const container = this.#getContainer();

    const question = await container.items
        .query({
        query: "SELECT * FROM c WHERE c.id = @id",
        parameters: [{ name: "@id", value: id }],
        })
        .fetchAll();

    return question.resources[0];
    }

    async getQuestions() {
    const container = this.#getContainer();

    const question = await container.items
        .query({
        query: "SELECT * FROM c",
        })
        .fetchAll();

    return question.resources;
    }
}

export const dataStore = new CosmosDataStore(
    new CosmosClient(process.env.CosmosDB)
);

This class will receive a CosmosClient that gives us the connection to query CosmosDB and provides the two functions that we used in the resolver. We’ve also got a data model, QuestionModel that represents how we’re storing the data in CosmosDB.



To create a CosmosDB resource in Azure, check out their quickstart and here is a data sample that can be uploaded via the Data Explorer in the Azure Portal.



To make this available to our resolvers, we’ll add it to the GraphQL context by extending index.ts:

import { ApolloServer } from "apollo-server-azure-functions";
import { importSchema } from "graphql-import";
import resolvers from "./resolvers";
import { dataStore } from "./data";

const server = new ApolloServer({
    typeDefs: importSchema("./graphql/schema.graphql"),
    resolvers,
    context: {
        dataStore
    }
});

export default server.createHandler();

If we run the server, we’ll be able to query the endpoint and have it pull data from CosmosDB but our resolver is still lacking a type for dataStore, and to do that we’ll use a custom mapper.


Custom context types


So far, the types we’re generating are all based off what’s in our GraphQL schema, and that works mostly but there are gaps. One of those gaps is how we use the request context in a resolver, since this doesn’t exist as far as the schema is concerned we need to do something more for the type generator.


Let’s define the context type first by adding this to the bottom of data.ts:

export type Context = {
    dataStore: DataStore;
};

Now we can tell GraphQL Code Generator to use this by modifying our config:

overwrite: true
schema: "./graphql/schema.graphql"
generates:
    graphql/generated.ts:
        config:
            contextType: "./data#Context"
        plugins:
            - "typescript"
            - "typescript-resolvers"

We added a new config node in which we specify the contextType in the form of <path>#<type name> and when we run the generator the type is used and now the dataStore is typed in our resolvers!


Custom models


It’s time to run our Function locally.

npm start

And let’s query it. We’ll grab a random question:

{
    getRandomQuestion {
        id
        question
        answers
    }
}

Unfortunately, this fails with the following error:



Cannot return null for non-nullable field Question.answers.



If we refer back to our Question type in the GraphQL schema:

type Question {
    id: ID!
    question: String!
    correctAnswer: String!
    answers: [String!]!
}

This error message makes sense as answers is a non-nullable array of non-nullable strings ([String!]!), but if that’s compared to our data model in Cosmos:

export type QuestionModel = {
    id: string;
    question: string;
    category: string;
    incorrect_answers: string[];
    correct_answer: string;
    type: string;
    difficulty: "easy" | "medium" | "hard";
};

Well, there’s no answers field, we only have incorrect_answers and correct_answer.


It’s time to extend our generated types a bit further using custom models. We’ll start by updating the config file:

overwrite: true
schema: "./graphql/schema.graphql"
generates:
    graphql/generated.ts:
        config:
            contextType: "./data#Context"
            mappers:
                Question: ./data#QuestionModel
        plugins:
            - "typescript"
            - "typescript-resolvers"

With the mappers section, we’re telling the generator when you find the Question type in the schema, it’s use QuestionModel as the parent type.


But this still doesn’t tell GraphQL how to create the answers field, for that we’ll need to define a resolver on the Question type:

import { Resolvers } from "./generated";

const resolvers: Resolvers = {
    Query: {
        question(_, { id }, { dataStore }) {
            return dataStore.getQuestionById(id);
        },
        async getRandomQuestion(_, __, { dataStore }) {
            const questions = await dataStore.getQuestions();
            return questions[Math.floor(Math.random() * questions.length) + 1];
        }
    },

    Question: {
        answers(question) {
            return question.incorrect_answers
                .concat([question.correct_answer])
                .sort();
        },
        correctAnswer(question) {
            return question.correct_answer;
        }
    }
};

export default resolvers;

These field resolvers will receive a parent as their first argument that is the QuestionModel and expect to return the type as defined in the schema, making it possible to do mapping of data between types as required.


If you restart your Azure Functions and execute the query from before, a random question is returned from the API.


Conclusion


We’ve taken a look at how we can build on the idea of deploying GraphQL on Azure Functions and looked at how we can use the GraphQL schema, combined with our own models, to enforce type safety with TypeScript.


We didn’t implement the mutation in this post, that’s an exercise for you as the reader to tackle.


You can check out the full example, including how to connect it with a React front end, on GitHub.



Modern Application Development Overview

Modern Application Development Overview

This article is contributed. See the original author and article here.

This blog will provide an overview of Modern application development. I will first define the modern application development approach. Then delve into the ‘7 building blocks’ of the approach starting with cloud native architecture, followed by AI, Integration, Data, Software delivery, Operations, and Security.


 


Each segment will define and explain the ‘building block’ and how the modern application development approach leverages the ‘building blocks’ to produce more robust applications.


 


What is Modern Application Development (MAD)?


Modern application development is an approach that enables you to innovate rapidly by using cloud-native architectures with loosely coupled microservices, managed databases, AI, DevOps support, and built-in monitoring.


 


The resulting modern applications leverage cloud native architectures by packaging code and dependencies in containers and deploying them as microservices to increase developer velocity using DevOps practices.


 


Subsequently modern applications utilize continuous integration and delivery (CI/CD) technologies and processes to improve system reliability. Modern apps employ automation to identify and quickly mitigate issues applying best practices like infrastructure as code and increasing data security with threat detection and protection.


 


Lastly, modern applications are faster by infusing AI into native architecture structures to reduce manual tasks, accelerating workflows and introducing low code application development tools to simplify and expedite development processes.


 


Cloud-native architectures


According to The Cloud Native Computing Foundation (CNCF), cloud native is defined as “Cloud-native technologies empower organizations to build and run scalable applications in modern, dynamic environments such as public, private, and hybrid clouds.


Containers, service meshes, microservices, immutable infrastructure, and declarative APIs exemplify this approach.


 


These techniques enable loosely coupled systems that are resilient, manageable, and observable. Combined with robust automation, they allow engineers to make high-impact changes frequently and predictably with minimal toil.”


 


Utilizing that definition, what are the key tenants of a cloud-native approach, and how does each tenant benefit you?


 


As stated above, cloud-native architectures center on speed and agility. That speed and agility are derived from 6 factors:


1. Cloud infrastructure


2. Modern design


3. Microservices


4. Containers


5. Backing services


6. Automation.


Cloud infra.png



 


Cloud infrastructure is the most important factor that contributes to the speed and agility of cloud-native architecture.


 


3 Key Factors


1. Cloud-native systems fully leverage the cloud service model using PaaS compute infrastructure and managed services.


2. Cloud-native systems continue to run as infrastructure scales in or out without worrying about the back end because the infra is fully managed.


3. Cloud-native systems have auto scaling, self-healing, and monitoring capabilities.


Modern Design is highly effective in part due to the Twelve-Factor Application method, which is a set of principles and practices that developers follow to construct applications optimized for modern cloud environments.


 


Most Critical Considerations for Modern Design


1. Communication — How front ends communication with back-end services, and how back-end services communicate with each other.


2. Resiliency — How services in your distributed architecture respond in less-than-ideal scenarios due to the in-process, out-process network communications of microservices architecture.


3. Distributed Data — How do you query data or implement a transaction across multiple services?


4. Identity — How does your service identify who is accessing it and their allotted permissions?


 


What are Microservices?


Microservices are built as a distributed set of small, independent services that interact through a shared fabric.


Microservices infra.png


 


Improved Agility with Microservices


1. Each microservice has an autonomous lifecycle and can evolve independently and deploy frequently.


2. Each microservice can scale independently, enabling services to scale to meet demand.


Those microservices are then packaged a container image, those images are stored in container registry. When needed you transform the container into a running container instance, to utilize the stored microservices. How do containers benefit cloud native apps?


 


Benefits of Containers


1. Provide portability and guarantee consistency across environments.


2. Containers can isolate microservices and their dependencies from the underlying infrastructure.


3. Smaller footprints than full virtual machines (VMs). That smaller size increases density, the number of microservices, that a given host can run at a time.


 


Cloud native solutions also increase application speed and agility via backing services.


Container bois.png



Benefits of Backing Services


1. Save time and labor


2. Treating backing services as attached resources enables the services to attach and detach as needed without code changes to the microservices that contain information, enabling greater dynamism.


Lastly, cloud-native solutions leverage automation. Using cloud-native architectures your infrastructure and deployment are automated, consistent, and reputable.


 


Benefits of Automation


1. Infrastructure as Code (IaC) avoids manual environment configuration and delivers stable environments rapidly at scale.


2. Automated deployment leverages CI/CD to speed up innovation and deployment, updating on-demand; saving money and time.


 


Artificial Intelligence


The second building block in the modern application development approach is Artificial intelligence (AI).


 


What comprises artificial intelligence? How do I add AI to my applications? Azure Artificial Intelligence is comprised of machine learning, knowledge mining, and AI apps and agents. Under the apps and agent’s domain there are two overarching products, Azure Cognitive Services and Bot Service, that we’re going to focus on.


 


Cognitive services are a collection of domain specific pre-trained AI models that can be customized with your data. Bot service is a purpose-built bot development environment with out-of-the-box templates. To learn how to add AI to your applications watch the short video titled “Easily add AI to your applications.


Virtual Assitant guy.png


Innate Benefits


 


User benefits: Translation, chatbots, and voice for AI-enabled user interfaces.


Business benefits: Enhanced business logic for scenarios like search, personalization, document processing, image analytics, anomaly detection, and speech analytics.


 


Modern Application Development unique benefit:


Enable developers of any skill to add AI capabilities to their applications with pre-built and customizable AI models for speech, vision, language, and decision-making.


 


Integration


The third building block is integration.


 


Why is integration needed, and how is it accomplished?


Integration is needed to integrate applications by connecting multiple independent systems. The four core cloud services to meet integration needs are:


 


1. A way to publish and manage application programming interfaces (APIs).


2. A way to create and run integration logic, typically with a graphical tool for defining the workflow’s logic.


3. A way for applications and integration technologies to communicate in a loosely coupled way via messaging.


4. A technology that supports communication via events


Azure Integration Services jawn.jpg



What are the benefits of Azure integration services and how do they translate to the modern app dev approach?


Azure meets all four needs, the first need is met by Azure API management, the second is met by Azure Logic Apps, the third is Azure Service Bus, and the final is met by Azure Event Grid.


 


The four components of Azure Integration Services address the core requirements of application integration. Yet real scenarios often require more, and this is where the modern application development approach comes into play.


 


Perhaps your integration application needs a place to store unstructured data, or a way to include custom code that does specialized data transformations.


 


Azure Integration Services is part of the larger Azure cloud platform, making it easier to integrate data, APIs, and into your modern app to meet your needs.


 


You might store unstructured data in Azure Data Lake Store, for instance, or write custom code using Azure Functions, to meet serverless compute tech needs.


 


Data


The fourth building block is data, and more specifically managed databases.


 


What are the advantages of managed databases?


Fully managed, cloud-based databases provide limitless scale, low-latency access to rich data, and advanced data protection — all built in, regardless of languages or frameworks.


 


How does the modern application development approach benefit from fully managed databases?


Modern application development leverages microservices and containers, the benefit to both technologies is their ability to operate independently and scale as demand warrants.


 


To ensure the greatest user satisfaction and app functionality the limitless scale and low-latency access to data enable apps to run unimpeded.


 


Software Delivery


The fifth building block is software delivery.


 


What constitutes modern development software delivery practices?


Modern app development software delivery practices enable you to meet rapid market changes that require shorter release cycles without sacrificing quality, stability, and security.


 


The practices help you to release in a fast, consistent, and reliable way by using highly productive tools, automating mundane and manual steps, and iterating in small increments through CI/CD and DevOps practices.


 


What is DevOps?


A compound of development (Dev) and operations (Ops), DevOps is the union of people, process, and technology to continually provide value to customers. DevOps enables formerly siloed roles — development, IT operations, quality engineering, and security — to coordinate and collaborate to produce better, more reliable products.


 


By adopting a DevOps culture along with DevOps practices and tools, teams gain the ability to better respond to customer needs, increase confidence in the applications they build, and achieve development goals faster.


 


DevOps influences the application lifecycle throughout its plan, develop, deliver, and operate phases.


 


Plan


In the plan phase, DevOps teams ideate, define, and describe features and capabilities of the applications and systems they are building. Creating backlogs, tracking bugs, managing agile software development with Scrum, using Kanban boards, and visualizing progress with dashboards are some of the ways DevOps teams plan with agility and visibility.


CICD life.png



Develop


The develop phase includes all aspects of coding — writing, testing, reviewing, and the integration of code by team members — as well as building that code into build artifacts that can be deployed into various environments. To develop rapidly, they use highly productive tools, automate mundane and manual steps, and iterate in small increments through automated testing and continuous integration.


 


Deliver


Delivery is the process of deploying applications into production environments and deploying and configuring the fully governed foundational infrastructure that makes up those environments.


 


In the deliver phase, teams define a release management process with clear manual approval stages. They also set automated gates that move applications between stages until they’re made available to customers.


 


Operate


The operate phase involves maintaining, monitoring, and troubleshooting applications in production environments. In adopting DevOps practices, teams work to ensure system reliability, high availability, and aim for zero downtime while reinforcing security and governance.


 


What is CI/CD?


Under continuous integration, the develop phase — building and testing code — is fully automated. Each time you commit code, changes are validated and merged to the master branch, and the code is packaged in a build artifact.


 


Under continuous delivery, anytime a new build artifact is available, the artifact is automatically placed in the desired environment and deployed. With continuous deployment, you automate the entire process from code commit to production.


 


Operations
The sixth building block is operations to maximize automation.


How do you maximize automation in your modern application development approach?


With an increasingly complex environment to manage, maximizing the use of automation helps you improve operational efficiency, identify issues before they affect customer experiences, and quickly mitigate issues when they occur.


 


Fully managed platforms provide automated logging, scaling, and high availability. Rich telemetry, actionable alerting, and full visibility into applications and the underlying system are key to a modern application development approach.


 


Automating regular checkups and applying best practices like infrastructure as code and site reliability engineering promotes resiliency and helps you respond to incidents with minimal downtime and data loss.


 


Security


The seventh building block is multilayered security.


 


Why do I need multi-layered security in my modern applications?


Modern applications require multilayered security across code, delivery pipelines, app runtimes, and databases. Start by providing developers secure dev boxes with well-governed identity. As part of the DevOps lifecycle, use automated tools to examine dependencies in code repositories and scan for vulnerabilities as you deploy apps to the target environment.


 


Enterprise-grade secrets and policy management encrypt the applications and give the operations team centralized policy enforcement. With fully managed compute and database services, security control is built in and threat protection is executed in real time.


 


Conclusion
While modern application development can seem daunting, it is an approach that can be done iteratively, and each step can yield large benefits for your team.


 


Access webinars, analyst reports, tutorials, and more on the Modern application development on Azure page.

A journey to green labelling

A journey to green labelling

This article is contributed. See the original author and article here.

Before joining Microsoft and falling in love with the technology and platform and possibilities that the Azure public cloud provides, I was (and for a 2-digit number of years, gosh) an expert in the contact center and telco market: the technology that companies use to provide customer service on their products. Lately, my focus has been mostly on the customer experience, as the power clearly shifted over the years from the technology and technologists to the end-users and how their perception of experience was contributing to the success (or failure) of a company.


pexels-canva-studio-3194519.jpg


 


As a part of my customer experience work, I researched how to apply the idea of a Net Promoter Score. I was really drawn to the technique of using a single question to define if something was going to succeed or fail. But the more I saw companies using NPS, the more I realized this approach omitted an entire important set of choices a company can make: green choices.


 


While a customer is navigating your virtual space, such as a website, mobile app or even your physical store, there is nothing that communicates a green option for the product or the technology that is used to bring that product to the end user.


 


When I think about my e-commerce experiences, which started back in the year 2000, the closest example to a green option was the energy consumption label on some appliances. I searched the web and found the EU energy consumption labels only apply to the following categories: appliances (dishwashers, refrigerators, etc.), air conditioners, light bulbs, cars, televisions, houses, and tires. When buying a large appliance, this label helped me, as a consumer, to pick the one that was more energy efficient. While choosing an appliance that consumes less energy could be framed as a “greener” choice, in most cases, it’s framed more like a “cost savings” choice.


 


The point is we need to start doing something at all levels, and little changes can lead to a great impact if we concentrate our efforts in the same direction. Consumers make many small choices every day on the products they buy. In many cases, they have little or no knowledge about the carbon impact those choices have.


pexels-ready-made-3850512.jpg


 


But what if the end-user could be more knowledgeable about the carbon impact of their purchases? Thinking of my own experiences as a user, I’d like to see in the foreseeable future something like:



  • An energy consumption label (with street-light color code and A to F rating) on computers and devices.

  • How recyclable a device is.

  • Sustainable software, knowing that the software used in the device was created with sustainability paths and best practices and will allow the user choices on energy consumption.

  • Active and real-time information from the energy suppliers about the carbon impact of the consumed energy in my house. A device might be labeled as low carbon impact, but knowing from the energy supplier when is the greenest moment (i.e. the time of day when energy is produced with alternative sources) to charge my device is something that needs to be done at user level and is highly dependent on the location.


Omitting carbon impact information from a product undervalues a customer’s desire to reduce their carbon footprint through their purchasing choices. Adding this labeling opens up a lot of potential for both consumers and companies to make more sustainable choices. For companies, this could even mean leveraging “green loyalty, which is a marketing technique that can help people feel more active in their consumers’ choices on sustainability.


By Sandra PallierBy Sandra Pallier


Today, a customer has the ability to make some green choices, such as conserving water, recycling, using reusable items and shopping bags, etc. Adding labeling around carbon impact would give customers significantly more choice. Despite the upfront challenges in providing this information, carbon impact labeling would allow products with a lower carbon impact to differentiate themselves. This could produce better products as well as a reduction in carbon emissions, and an overall education of technology users to search for the greener option.

Issues with LogicApp RosettaNet connector

Issues with LogicApp RosettaNet connector

This article is contributed. See the original author and article here.

The problem:


 


If you use LogicApp Rosettanet connector(i.e: from RN Encode/Decode templates) to send/receive documents to/from external Rosettanet systems like BizTalk server, you may meet different MIME decoding/disassembler errors like the following:


 


Receive pipeline rejected incoming message


due to the following RNIF exception:


UNP.PRMB.VALERR : A failure occurred while validating the preamble.                            


 


Details:


Invalid character in the given encoding. Line 10, position 13.


 


Analysis:


 


The following is an original message from LogicApp Rosettanet connector:


 


MIME-Version: 1.0


Content-Type: application/xml


Content-Transfer-Encoding: base64


Content-Description: Preamble_MP


Content-Disposition: attachment;           filename=”86822f5b5dc84dca974635740be5e359″


Content-Location: RN-Preamble


 


77u/PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhRE9DVFlQRSBQcmVhbWJsZSBTWVNURU0gIlByZWFtYmxlX01TX1YwMl8wMC5kdGQiW10+DQo8UHJlYW1ibGU+DQogIDxzdGFuZGFyZE5hbWU+DQogICAgPEdsb2JhbEFkbWluaXN0ZXJpbmdBdXRob3JpdHlDb2RlPlJvc2V0dGFOZXQ8L0dsb2JhbEFkbWluaXN0ZXJpbmdBdXRob3JpdHlDb2RlPg0KICA8L3N0YW5kYXJkTmFtZT4NCiAgPHN0YW5kYXJkVmVyc2lvbj4NCiAgICA8VmVyc2lvbklkZW50aWZpZXI+VjAyLjAwPC9WZXJzaW9uSWRlbnRpZmllcj4NCiAgPC9zdGFuZGFyZFZlcnNpb24+DQo8L1ByZWFtYmxlPg==


–_0ea1da80-4cfa-4c0a-9047-c16e3d663d45_


Content-Type: application/xml


Content-Transfer-Encoding: base64


Content-Description: DeliveryHeader_MP


Content-Disposition: attachment;           filename=”a09bdee8c9f246faa8b15b5931fc4c4e”


Content-Location: RN-Delivery-Header


 


77u/PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhRE9DVFlQRSBEZWxpdmVyeUhlYWRlciBTWVNURU0gIkRlbGl2ZXJ5SGVhZGVyX01TX1YwMl8wMC5kdGQiW10+DQo8RGVsaXZlcnlIZWFkZXI+DQogIDxpc1NlY3VyZVRyYW5zcG9ydFJlcXVpcmVkPg0KICAgIDxBZmZpcm1hdGlvbkluZGljYXRvcj5ZZXM8L0FmZmlybWF0aW9uSW5kaWNhdG9yPg0KICA8L2lzU2VjdXJlVHJhbnNwb3J0UmVxdWlyZWQ+DQogIDxtZXNzYWdlRGF0ZVRpbWU+DQogICAgPERhdGVUaW1lU3RhbXA+MjAyMTAzMThUMTAyMDEyLjU5OVo8L0RhdGVUaW1lU3RhbXA+DQogIDwvbWVzc2FnZURhdGVUaW1lPg0KICA8bWVzc2FnZVJlY2VpdmVySWRlbnRpZmljYXRpb24+DQogICAgPFBhcnRuZXJJZGVudGlmaWNhdGlvbj4NCiAgICAgIDxkb21haW4+DQogICAgICAgIDxGcmVlRm9ybVRleHQ+RFVOUzwvRnJlZUZvcm1UZXh0Pg0KICAgICAgPC9kb21haW4+DQogICAgICA8R2xvYmFsQnVzaW5lc3NJZGVudGlmaWVyPjIwMTYyMDE2MjwvR2xvYmFsQnVzaW5lc3NJZGVudGlmaWVyPg0KICAgICAgPGxvY2F0aW9uSUQ+DQogICAgICAgIDxWYWx1ZT5DWUVBSTIwMTY8L1ZhbHVlPg0KICAgICAgPC9sb2NhdGlvbklEPg0KICAgIDwvUGFydG5lcklkZW50aWZpY2F0aW9uPg0KICA8L21lc3NhZ2VSZWNlaXZlcklkZW50aWZpY2F0aW9uPg0KICA8bWVzc2FnZVNlbmRlcklkZW50aWZpY2F0aW9uPg0KICAgIDxQYXJ0bmVySWRlbnRpZmljYXRpb24+DQogICAgICA8ZG9tYWluPg0KICAgICAgICA8RnJlZUZvcm1UZXh0PkRVTlM8L0ZyZWVGb3JtVGV4dD4NCiAgICAgIDwvZG9tYWluPg0KICAgICAgPEdsb2JhbEJ1c2luZXNzSWRlbnRpZmllcj4wNTIzNTQwNjk8L0dsb2JhbEJ1c2luZXNzSWRlbnRpZmllcj4NCiAgICAgIDxsb2NhdGlvbklEPg0KICAgICAgICA8VmFsdWU+QVpVUkU8L1ZhbHVlPg0KICAgICAgPC9sb2NhdGlvbklEPg0KICAgIDwvUGFydG5lcklkZW50aWZpY2F0aW9uPg0KICA8L21lc3NhZ2VTZW5kZXJJZGVudGlmaWNhdGlvbj4NCiAgPG1lc3NhZ2VUcmFja2luZ0lEPg0KICAgIDxJbnN0YW5jZUlkZW50aWZpZXI+YzkzOTQwOGQwY2ZjNGI5YmIyY2JiZTNiMWU1MjgyNTc8L0luc3RhbmNlSWRlbnRpZmllcj4NCiAgPC9tZXNzYWdlVHJhY2tpbmdJRD4NCjwvRGVsaXZlcnlIZWFkZXI+


–_0ea1da80-4cfa-4c0a-9047-c16e3d663d45_


Content-Type: application/xml


Content-Transfer-Encoding: base64


Content-Description: RN-Service-Header


Content-Disposition: attachment;           filename=”de7c1086c0774fb9b32b8cea930cb53e”


Content-Location: RN-Service-Header


 


77u/PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhRE9DVFlQRSBTZXJ2aWNlSGVhZGVyIFNZU1RFTSAiU2VydmljZUhlYWRlcl9NU19WMDJfMDAuZHRkIltdPg0KPFNlcnZpY2VIZWFkZXI+DQogIDxQcm9jZXNzQ29udHJvbD4NCiAgICA8QWN0aXZpdHlDb250cm9sPg0KICAgICAgPEJ1c2luZXNzQWN0aXZpdHlJZGVudGlmaWVyPkRpc3RyaWJ1dGUgQXN5bmNocm9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0eU9mU2VydmljZUVsZW1lbnQ+DQogICAgPC9RdWFsaXR5T2ZTZXJ2aWNlU3BlY2lmaWNhdGlvbj4NCiAgICA8S25vd25Jbml0aWF0aW5nUGFydG5lcj4NCiAgICAgIDxQYXJ0bmVySWRlbnRpZmljYXRpb24+DQogICAgICAgIDxkb21haW4+DQogICAgICAgICAgPEZyZWVGb3JtVGV4dD5EVU5TPC9GcmVlRm9ybVRleHQ+DQogICAgICAgIDwvZG9tYWluPg0KICAgICAgICA8R2xvYmFsQnVzaW5lc3NJZGVudGlmaWVyPjA1MjM1NDA2OTwvR2xvYmFsQnVzaW5lc3NJZGVudGlmaWVyPg0KICAgICAgICA8bG9jYXRpb25JRD4NCiAgICAgICAgICA8VmFsdWU+QVpVUkU8L1ZhbHVlPg0KICAgICAgICA8L2xvY2F0aW9uSUQ+DQogICAgICA8L1BhcnRuZXJJZGVudGlmaWNhdGlvbj4NCiAgICA8L0tub3duSW5pdGlhdGluZ1BhcnRuZXI+DQogIDwvUHJvY2Vzc0NvbnRyb2w+DQo8L1NlcnZpY2VIZWFkZXI+


–_0ea1da80-4cfa-4c0a-9047-c16e3d663d45_


Content-Type: application/xml;


                  charset=”utf-8″


Content-Transfer-Encoding: base64


Content-Description: ServiceContent_MP


Content-Disposition: attachment;           filename=”377ffd9bfb4c45dba5fb7779afada257″


Content-Location: RN-Service-Content


 


<?xml version=”1.0″ encoding=”UTF-8″ ?>


<!DOCTYPE Pip0C1AsynchronousTestNotification SYSTEM “0C1_MS_R01_02_AsynchronousTestNotification.dtd”>


<Pip0C1AsynchronousTestNotification>


                  <AsynchronousTest></AsynchronousTest>


                  <fromRole>


                                    <PartnerRoleDescription>


                                                      <ContactInformation>


                                                                        <contactName>


                                                                                          <FreeFormText xml:lang=”EN”>John Doe Sender</FreeFormText>


                                                                        </contactName>


                                                                        <EmailAddress>jdoesender@johndoe.com</EmailAddress>


                                                                        <facsimileNumber>


                                                                                          <CommunicationsNumber>000.000.0001</CommunicationsNumber>


                                                                        </facsimileNumber>


                                                                        <telephoneNumber>


                                                                                          <CommunicationsNumber>000.000.0001</CommunicationsNumber>


                                                                        </telephoneNumber>


                                                      </ContactInformation>


                                              <GlobalPartnerRoleClassificationCode>Initiator</GlobalPartnerRoleClassificationCode>


                                                      <PartnerDescription>


                                                                        <BusinessDescription>


                                                                                          <GlobalBusinessIdentifier>123456783</GlobalBusinessIdentifier>


                                                                                          <GlobalSupplyChainCode>Information Technology</GlobalSupplyChainCode>


                                                                        </BusinessDescription>


                                                                        <GlobalPartnerClassificationCode>Warehouser</GlobalPartnerClassificationCode>


                                                      </PartnerDescription>


                                    </PartnerRoleDescription>


                  </fromRole>


                  <GlobalDocumentFunctionCode>Request</GlobalDocumentFunctionCode>


                  <thisDocumentGenerationDateTime>


                                    <DateTimeStamp>20040122T073935.737Z</DateTimeStamp>


                  </thisDocumentGenerationDateTime>


                  <thisDocumentIdentifier>


                    <ProprietaryDocumentIdentifier>20040122T073935.737Z</ProprietaryDocumentIdentifier>


                  </thisDocumentIdentifier>


                  <toRole>


                                    <PartnerRoleDescription>


                                                      <ContactInformation>


                                                                        <contactName>


                                                                                          <FreeFormText xml:lang=”EN”>John Doe Receiver</FreeFormText>


                                                                        </contactName>


                                                                        <EmailAddress>jdoereceiver@johndoe.com</EmailAddress>


                                                                        <facsimileNumber>


                                                                                          <CommunicationsNumber>000.000.0002</CommunicationsNumber>


                                                                        </facsimileNumber>


                                                                        <telephoneNumber>


                                                                                          <CommunicationsNumber>000.000.0002</CommunicationsNumber>


                                                                        </telephoneNumber>


                                                      </ContactInformation>


                                         <GlobalPartnerRoleClassificationCode>Responder</GlobalPartnerRoleClassificationCode>


                                                      <PartnerDescription>


                                                                        <BusinessDescription>


                                                                                          <GlobalBusinessIdentifier>123456784</GlobalBusinessIdentifier>


                                                                                          <GlobalSupplyChainCode>Information Technology</GlobalSupplyChainCode>


                                                                        </BusinessDescription>


                                                                        <GlobalPartnerClassificationCode>End User</GlobalPartnerClassificationCode>


                                                      </PartnerDescription>


                                    </PartnerRoleDescription>


                  </toRole>


</Pip0C1AsynchronousTestNotification>


 


–_0ea1da80-4cfa-4c0a-9047-c16e3d663d45_–


 


 


Below is a modified message which can be accepted by BizTalk:


 


POST http://xx.xx.xx.xx/BTARNHttpReceive/BTSHTTPReceive.dll?xRNResponseType=async HTTP/1.1


Host: xx.xx.xx.xx


Content-Length: 8573


Expect: 100-continue


Connection: Keep-Alive


 


MIME-Version: 1.0


MIME-Version: 1.0


Content-Type: multipart/related; start=a1b66a8d58d34adb81d17737ec2b2819;


                  type=”application/xml”; boundary=”_410bf7bd-d294-4c7e-9c17-0bf85b7890d2_”


 


–_410bf7bd-d294-4c7e-9c17-0bf85b7890d2_


MIME-Version: 1.0


Content-Type: application/xml


Content-Transfer-Encoding: base64


Content-ID: afafcd4ecb04489cbed76f7e7a0e0492


Content-Description: Preamble_MP


Content-Disposition: attachment;           filename=”df9591d3f63e465bbefc37bcff854d47″


Content-Location: RN-Preamble


 


77u/PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhRE9DVFlQRSBQcmVhbWJsZSBTWVNURU0gIlByZWFtYmxlX01TX1YwMl8wMC5kdGQiW10+DQo8UHJlYW1ibGU+DQogIDxzdGFuZGFyZE5hbWU+DQogICAgPEdsb2JhbEFkbWluaXN0ZXJpbmdBdXRob3JpdHlDb2RlPlJvc2V0dGFOZXQ8L0dsb2JhbEFkbWluaXN0ZXJpbmdBdXRob3JpdHlDb2RlPg0KICA8L3N0YW5kYXJkTmFtZT4NCiAgPHN0YW5kYXJkVmVyc2lvbj4NCiAgICA8VmVyc2lvbklkZW50aWZpZXI+VjAyLjAwPC9WZXJzaW9uSWRlbnRpZmllcj4NCiAgPC9zdGFuZGFyZFZlcnNpb24+DQo8L1ByZWFtYmxlPg==


–_410bf7bd-d294-4c7e-9c17-0bf85b7890d2_


Content-Type: application/xml


Content-Transfer-Encoding: base64


Content-ID: 9eeecf9805834e07a01e5fa893e54472


Content-Description: DeliveryHeader_MP


Content-Disposition: attachment;           filename=”254cb5e4c75b4690a7bdcd28fccf4f97″


Content-Location: RN-Delivery-Header


 


77u/PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhRE9DVFlQRSBEZWxpdmVyeUhlYWRlciBTWVNURU0gIkRlbGl2ZXJ5SGVhZGVyX01TX1YwMl8wMC5kdGQiW10+DQo8RGVsaXZlcnlIZWFkZXI+DQogIDxpc1NlY3VyZVRyYW5zcG9ydFJlcXVpcmVkPg0KICAgIDxBZmZpcm1hdGlvbkluZGljYXRvcj5ZZXM8L0FmZmlybWF0aW9uSW5kaWNhdG9yPg0KICA8L2lzU2VjdXJlVHJhbnNwb3J0UmVxdWlyZWQ+DQogIDxtZXNzYWdlRGF0ZVRpbWU+DQogICAgPERhdGVUaW1lU3RhbXA+MjAyMTAzMThUMTAxODEyLjU5M1o8L0RhdGVUaW1lU3RhbXA+DQogIDwvbWVzc2FnZURhdGVUaW1lPg0KICA8bWVzc2FnZVJlY2VpdmVySWRlbnRpZmljYXRpb24+DQogICAgPFBhcnRuZXJJZGVudGlmaWNhdGlvbj4NCiAgICAgIDxkb21haW4+DQogICAgICAgIDxGcmVlRm9ybVRleHQ+RFVOUzwvRnJlZUZvcm1UZXh0Pg0KICAgICAgPC9kb21haW4+DQogICAgICA8R2xvYmFsQnVzaW5lc3NJZGVudGlmaWVyPjIwMTYyMDE2MjwvR2xvYmFsQnVzaW5lc3NJZGVudGlmaWVyPg0KICAgICAgPGxvY2F0aW9uSUQ+DQogICAgICAgIDxWYWx1ZT5DWUVBSTIwMTY8L1ZhbHVlPg0KICAgICAgPC9sb2NhdGlvbklEPg0KICAgIDwvUGFydG5lcklkZW50aWZpY2F0aW9uPg0KICA8L21lc3NhZ2VSZWNlaXZlcklkZW50aWZpY2F0aW9uPg0KICA8bWVzc2FnZVNlbmRlcklkZW50aWZpY2F0aW9uPg0KICAgIDxQYXJ0bmVySWRlbnRpZmljYXRpb24+DQogICAgICA8ZG9tYWluPg0KICAgICAgICA8RnJlZUZvcm1UZXh0PkRVTlM8L0ZyZWVGb3JtVGV4dD4NCiAgICAgIDwvZG9tYWluPg0KICAgICAgPEdsb2JhbEJ1c2luZXNzSWRlbnRpZmllcj4wNTIzNTQwNjk8L0dsb2JhbEJ1c2luZXNzSWRlbnRpZmllcj4NCiAgICAgIDxsb2NhdGlvbklEPg0KICAgICAgICA8VmFsdWU+QVpVUkU8L1ZhbHVlPg0KICAgICAgPC9sb2NhdGlvbklEPg0KICAgIDwvUGFydG5lcklkZW50aWZpY2F0aW9uPg0KICA8L21lc3NhZ2VTZW5kZXJJZGVudGlmaWNhdGlvbj4NCiAgPG1lc3NhZ2VUcmFja2luZ0lEPg0KICAgIDxJbnN0YW5jZUlkZW50aWZpZXI+YjhhYTY4ZjI0N2NlNDA1ZjkwMDU0OGYwY2Y2MjBhYWE8L0luc3RhbmNlSWRlbnRpZmllcj4NCiAgPC9tZXNzYWdlVHJhY2tpbmdJRD4NCjwvRGVsaXZlcnlIZWFkZXI+


–_410bf7bd-d294-4c7e-9c17-0bf85b7890d2_


Content-Type: application/xml


Content-Transfer-Encoding: base64


Content-ID: a1b66a8d58d34adb81d17737ec2b2819


Content-Description: RN-Service-Header


Content-Disposition: attachment;           filename=”465a75c692254f86a813b6d38dee4890″


Content-Location: RN-Service-Header


 


77u/PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhRE9DVFlQRSBTZXJ2aWNlSGVhZGVyIFNZU1RFTSAiU2VydmljZUhlYWRlcl9NU19WMDJfMDAuZHRkIltdPg0KPFNlcnZpY2VIZWFkZXI+DQogIDxQcm9jZXNzQ29udHJvbD4NCiAgICA8QWN0aXZpdHlDb250cm9sPg0KICAgICAgPEJ1c2luZXNzQWN0aXZpdHlJZGVudGlmaWVyPkRpc3RyaWJ1dGUgQXN5bmNocm9ub3VzIFRlc3QgTm90aWZpY2F0aW9uPC9C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FsaXR5T2ZTZXJ2aWNlU3BlY2lmaWNhdGlvbj4NCiAgICA8S25vd25Jbml0aWF0aW5nUGFydG5lcj4NCiAgICAgIDxQYXJ0bmVySWRlbnRpZmljYXRpb24+DQogICAgICAgIDxkb21haW4+DQogICAgICAgICAgPEZyZWVGb3JtVGV4dD5EVU5TPC9GcmVlRm9ybVRleHQ+DQogICAgICAgIDwvZG9tYWluPg0KICAgICAgICA8R2xvYmFsQnVzaW5lc3NJZGVudGlmaWVyPjA1MjM1NDA2OTwvR2xvYmFsQnVzaW5lc3NJZGVudGlmaWVyPg0KICAgICAgICA8bG9jYXRpb25JRD4NCiAgICAgICAgICA8VmFsdWU+QVpVUkU8L1ZhbHVlPg0KICAgICAgICA8L2xvY2F0aW9uSUQ+DQogICAgICA8L1BhcnRuZXJJZGVudGlmaWNhdGlvbj4NCiAgICA8L0tub3duSW5pdGlhdGluZ1BhcnRuZXI+DQogIDwvUHJvY2Vzc0NvbnRyb2w+DQo8L1NlcnZpY2VIZWFkZXI+


–_410bf7bd-d294-4c7e-9c17-0bf85b7890d2_


Content-Type: application/xml;


                  charset=”utf-8″


Content-Transfer-Encoding: base64


Content-ID: 4c9a493f37144d8988741b641eb30086


Content-Description: ServiceContent_MP


Content-Disposition: attachment;           filename=”216c6b984eb94a2995b707ca57c13bc4″


Content-Location: RN-Service-Content


 


PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiID8+DQo8IURPQ1RZUEUgUGlwMEMxQXN5bmNocm9ub3VzVGVzdE5vdGlmaWNhdGlvbiBTWVNURU0gIjBDMV9NU19SMDFfMDJfQXN5bmNocm9ub3VzVGVzdE5vdGlmaWNhdGlvbi5kdGQiPg0KPFBpcDBDMUFzeW5jaHJvbm91c1Rlc3ROb3RpZmljYXRpb24+DQoJPEFzeW5jaHJvbm91c1Rlc3Q+PC9Bc3luY2hyb25vdXNUZXN0Pg0KCTxmcm9tUm9sZT4NCgkJPFBhcnRuZXJSb2xlRGVz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NzaW1pbGVOdW1iZXI+DQoJCQkJPHRlbGVwaG9uZU51bWJlcj4NCgkJCQkJPENvbW11bmljYXRpb25zTnVtYmVyPjAwMC4wMDAuMDAwMjwvQ29tbXVuaWNhdGlvbnNOdW1iZXI+DQoJCQkJPC90ZWxlcGhvbmVOdW1iZXI+DQoJCQk8L0NvbnRhY3RJbmZvcm1hdGlvbj4NCgkJCTxHbG9iYWxQYXJ0bmVyUm9sZUNsYXNzaWZpY2F0aW9uQ29kZT5SZXNwb25kZXI8L0dsb2JhbFBhcnRuZXJSb2xlQ2xhc3NpZmljYXRpb25Db2RlPg0KCQkJPFBhcnRuZXJEZXNjcmlwdGlvbj4NCgkJCQk8QnVzaW5lc3NEZXNjcmlwdGlvbj4NCgkJCQkJPEdsb2JhbEJ1c2luZXNzSWRlbnRpZmllcj4xMjM0NTY3ODQ8L0dsb2JhbEJ1c2luZXNzSWRlbnRpZmllcj4NCgkJCQkJPEdsb2JhbFN1cHBseUNoYWluQ29kZT5JbmZvcm1hdGlvbiBUZWNobm9sb2d5PC9HbG9iYWxTdXBwbHlDaGFpbkNvZGU+DQoJCQkJPC9CdXNpbmVzc0Rlc2NyaXB0aW9uPg0KCQkJCTxHbG9iYWxQYXJ0bmVyQ2xhc3NpZmljYXRpb25Db2RlPkVuZCBVc2VyPC9HbG9iYWxQYXJ0bmVyQ2xhc3NpZmljYXRpb25Db2RlPg0KCQkJPC9QYXJ0bmVyRGVzY3JpcHRpb24+DQoJCTwvUGFydG5lclJvbGVEZXNjcmlwdGlvbj4NCgk8L3RvUm9sZT4NCjwvUGlwMEMxQXN5bmNocm9ub3VzVGVzdE5vdGlmaWNhdGlvbj4=


 


–_410bf7bd-d294-4c7e-9c17-0bf85b7890d2_–


 


After above modification, the modified 0C1 message can be successfully processed by BizTalk.


 


Items modified:


 



  1. Added Content-Type with boundary string. (Green)

  2. Added first boundary string is missing. (Yellow)

  3. Added Content-IDs on all segments. (Red) NOTE: Content-ID is optional according to Rosettanet specification.

  4. Corrected ServiceContent part’s encoding to Base64. (Blue)

  5. processName is incorrectly set as PIP name in PIP configuration.


WenJun_Zhang_1-1617693413555.jpeg


 


This will lead to the following error in BizTalk:


 


Public Responder could not send an Async exception signal due to internal errors below:


                             RNIF Exception detail:-


              Error code:UNP.SHDR.VALERR


              Error Number:2005


              Description: PIP name specified does not match the PIP specification.


             


This is because the wrong processName is set as BusinessActivityIdentifier in ServiceHeader.


 


<?xml version=”1.0″ encoding=”utf-8″?>


<!DOCTYPE ServiceHeader SYSTEM “ServiceHeader_MS_V02_00.dtd”[]>


<ServiceHeader>


  <ProcessControl>


    <ActivityControl>


      <BusinessActivityIdentifier>Test0C1</BusinessActivityIdentifier>


      <MessageControl>


        <fromRole>


          <GlobalPartnerRoleClassificationCode>Initiator</GlobalPartnerRoleClassificationCode>


        </fromRole>


        <fromService>


          <GlobalBusinessServiceCode>Initiator Service</GlobalBusinessServiceCode>


 


To resolve this error, we need to manually edit the PIP in JSON and correct the processName as the same string of BizTalk PIP configuration:


 


WenJun_Zhang_2-1617693413560.jpeg


 


WenJun_Zhang_3-1617693413566.jpeg


 


Solution & workaround:


 


LogicApps product group is actively working on the fixes of these issues now.


 


For item #4 ServiceContent encoding issue, the corresponding fix has already been deployed to East US region and other regions’ deployment will be finished in couple of days as well.


For items #1 and #2, we can manually edit RN Encode/Decode LogicApps from template to add Content-Type and boundary string as a workaround(see below).


 


RN Encode LogicApp:


WenJun_Zhang_4-1617694429534.png


 


RN Decode LogicApp:


WenJun_Zhang_5-1617694460156.png


 


(The samples of these two modified workflows’ JSON definition can be found in attachment.)


 


Also, please don’t forget to correct processName in PIP config (Edit As JSON). For 3A4, processName should be Request Purchase Order.


{



    “properties”: {

        “processCode”: “3A4”,

        “processVersion”: “V02.02.00”,

        “processName”: “Request Purchase Order”,

        “activitySettings”: {


 


After all the changes above, your LogicApp should be able to successfully send/receive Rosettanet documents without error.


WenJun_Zhang_6-1617694668054.png


 

Can’t list pool due to encryption key after subscription suspension

Can’t list pool due to encryption key after subscription suspension

This article is contributed. See the original author and article here.

Can’t list pool due to encryption key after subscription suspension



For some reason, Subscription Account got suspended because of which unable to list the pools in the pool blade and you will see the following error message:


 


ReasonCode: AccountKeysNotFound.

 


Error Message: AccountEncryptionKeyUnavailable message: Account data could not be decrypted as the account encryption key is currently unavailable.


 


 Untitled.png


 


Cause
 


This is a known bug in Batch, typically associated with subscriptions being suspended due to credits running out, fraud, and other things for any period of time.


 


Solution


 


Since this is a known issue in Batch, the Product Team is already working on this.
 


We are aware of this issue and will deploy a fix in the future, but unfortunately. At this moment the customer’s only recourse is to delete and recreate the batch account.


in order to mitigate the issue. We apologize for any inconvenience this has caused.


 


 


Next Step


If your Azure issue is not addressed in this article, please submit a support request, on the Azure support page, select Get support.