1

I am testing this function, get_input() from Azure durable functions for Orchestra function. More details of the function.

What I'm facing now is that, when I'm trying to test with postman and input a json input for e.g.

{
    "points": 222
}

as the json body and while calling for http://localhost:<portnumber>/api/orchestrators/DurableFunctionsOrchestrator1, it will always return me a null value when i try to return the get_input function's value

Below is a screenshot of what it returns me. As you can see everything is working fine since its completed status but the output always returns me a null.

enter image description here

1 Answer 1

1

In a Instance_id you can pass your Client_input over there to get the request body parameter off the Durable Orchestration Client. Pass a Json serialized payload over the orchestrator.

async  def  main(req: func.HttpRequest, starter: str) -> func.HttpResponse:

client =  df.DurableOrchestrationClient(starter)

function_name =  req.route_params["functionName"]

requestBody =  json.loads(req.get_body().decode())

instance_id =  await  client.start_new(function_name, client_input=requestBody)

In a orchestrator, the code you can use the same get_input():

requestBody : str  =  context.get_input()

I am tried with the blog. I am not getting any Null value on get_input().

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.