Skip to main content

Hi All,

 

I am using rest api in k2 five to start a workflow.

I follow the guide in https://help.k2.com/onlinehelp/k2five/devref/5.0/default.htm#Runtime/WF-REST-API/WF-REST-c.htm

 

But I need in advance to pass variable workflow when start workflow.

 

Is it possible to pass varibale workflow in restapi with c# code.

I've already try to use Datafield and XMlField but the variable still didn't filled.

 

this below Json format that I pass to restapi, but didn't work (category and initiatetype is my variable that I want to pass)

{"expectedDuration":86400,

"folio":"start|K2:K2daniel|20*personal details removed*:10:59",
"priority":1,
"xmlFields":i{"name": "Category","value": "0"},{"name": "InitiateType","value": "CB"}],
"dataFields":{}
}

 

 

Is ianyone have already try it? Can I have one example to pass the varibale?

 

Please your help.

 

 

Thx.

Regards,

Daniel

Are your variables Xml structures?  From your example they look like they are simple data types.  Try passing them in the dataFields.


Reply