TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
AlibabaMosflowDraftAdddraftRequest req = new AlibabaMosflowDraftAdddraftRequest();
AlibabaMosflowDraftAdddraftRequest.DraftDo obj1 = new AlibabaMosflowDraftAdddraftRequest.DraftDo();
obj1.setOperId("4010076");
obj1.setStatus("S");
obj1.setProcessDefinitionKey("LYHTADD");
obj1.setSystemType("MIS");
obj1.setUrl("http://xxxxxxxxx");
obj1.setMessage("测试备注");
obj1.setProcessType("5");
obj1.setTitle("联营合同新增");
obj1.setFormId("intime-11111");
obj1.setOperName("小尹");
obj1.setDataJson("{\"money\":1000,\"type\":\"RMB\"}");
obj1.setProcessInstanceId("1321412");
req.setDraftDo(obj1);
AlibabaMosflowDraftAdddraftResponse rsp = client.execute(req);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
AlibabaMosflowDraftAdddraftRequest req = new AlibabaMosflowDraftAdddraftRequest();
AlibabaMosflowDraftAdddraftRequest.DraftDoDomain obj1 = new AlibabaMosflowDraftAdddraftRequest.DraftDoDomain();
obj1.OperId = "4010076";
obj1.Status = "S";
obj1.ProcessDefinitionKey = "LYHTADD";
obj1.SystemType = "MIS";
obj1.Url = "http://xxxxxxxxx";
obj1.Message = "测试备注";
obj1.ProcessType = "5";
obj1.Title = "联营合同新增";
obj1.FormId = "intime-11111";
obj1.OperName = "小尹";
obj1.DataJson = "{\"money\":1000,\"type\":\"RMB\"}";
obj1.ProcessInstanceId = "1321412";
req.DraftDo_ = obj1;
AlibabaMosflowDraftAdddraftResponse rsp = client.Execute(req);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new AlibabaMosflowDraftAdddraftRequest;
$draft_do = new DraftDo;
$draft_do->oper_id="4010076";
$draft_do->status="S";
$draft_do->process_definition_key="LYHTADD";
$draft_do->system_type="MIS";
$draft_do->url="http://xxxxxxxxx";
$draft_do->message="测试备注";
$draft_do->process_type="5";
$draft_do->title="联营合同新增";
$draft_do->form_id="intime-11111";
$draft_do->oper_name="小尹";
$draft_do->data_json="{\"money\":1000,\"type\":\"RMB\"}";
$draft_do->process_instance_id="1321412";
$req->setDraftDo(json_encode($draft_do));
$resp = $c->execute($req);
curl -X POST 'http://gw.api.taobao.com/router/rest' \
-H 'Content-Type:application/x-www-form-urlencoded;charset=utf-8' \
-d 'app_key=12129701' \
-d 'format=json' \
-d 'method=alibaba.mosflow.draft.adddraft' \
-d 'partner_id=apidoc' \
-d 'sign=ACB30C02E905F71F9C65449BC8F11F7D' \
-d 'sign_method=hmac' \
-d 'timestamp=2025-05-23+19%3A03%3A02' \
-d 'v=2.0' \
-d 'draft_do=null'
# -*- coding: utf-8 -*-
import top.api
req=top.api.AlibabaMosflowDraftAdddraftRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.draft_do=""
try:
resp= req.getResponse()
print(resp)
except Exception,e:
print(e)
pTopRequest pRequest = alloc_top_request();
pTopResponse pResponse = NULL;
pTaobaoClient pClient = alloc_taobao_client(url, appkey, appsecret);
set_api_name(pRequest,"alibaba.mosflow.draft.adddraft");
add_param(pRequest,"draft_do","数据结构JSON示例");
pResponse = top_execute(pClient,pRequest,NULL);
printf("ret code:%d\n",pResponse->code);
if(pResponse->code == 0){
pTopResponseIterator ite = init_response_iterator(pResponse);
pResultItem pResultItem = alloc_result_item();
while(parseNext(ite, pResultItem) == 0){
printf("%s:%s\n",pResultItem->key,pResultItem->value);
}
destroy_response_iterator(ite);
destroy_result_item(pResultItem);
}
destroy_top_request(pRequest);
destroy_top_response(pResponse);
destroy_taobao_client(pClient);
TopClient = require('./topClient').TopClient;
var client = new TopClient({
'appkey': 'appkey',
'appsecret': 'secret',
'REST_URL': 'http://gw.api.taobao.com/router/rest'
});
client.execute('alibaba.mosflow.draft.adddraft', {
'draft_do':'数据结构JSON示例'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})