You are viewing limited content. For full access, please sign in.

Question

Question

JSON Call to Workflow REST API Creates system.object instead of value

asked on November 14, 2016

Hi all,

I expect there's a simple resolution...
 


$data = '{ 
  "Initiator":
  {
    "InitiatorDisplayName":"String content", 
    "InitiatorName":"String content"
  }, 
  "InstanceCreationFlags":0, 
  "Origin":"String content", 
  "Originator":"String content", 
  "ParameterCollection":
  [{ 
    "Name":"result", 
    "Value":
    { 
      "string":"success"
    }
  }], 
  "WorkflowName":"someWorkflow"
}';


Instead of the workflow parameters receiving values, they receive "system.object."  Normally I do this with XML and it works fine. In fact, just to be sure, I created a test with XML and i did work fine. However, integration is designed to use JSON.


-Ben

 

1 0

Answer

SELECTED ANSWER
replied on November 15, 2016

Hi Ben,

Please try setting the parameter value in the following way and see how it goes.

"ParameterCollection":
  [{ 
    "Name":"result", 
    "Value":"success"
  }]

Regards

2 0
replied on November 15, 2016

Thanks!

1 0
replied on January 29, 2020 Show version history

@████████

Thank you so much for this!!

We were banging our heads trying to read the Workflow API JSON Post sample wondering about this - my question now is, what does an array/multi-value parameter look like for the expected JSON body?

 

EDIT: Looks like I was able to figure it out using the below as an example!;

 

{
	"ParameterCollection":
  [{ 
    "Name":"Shark", 
    "Value":["Great Whites","Bullshark"
    
    ]
  }]
	
}

 

1 0

Replies

You are not allowed to reply in this post.
You are not allowed to follow up in this post.

Sign in to reply to this post.