Notice: Undefined index: DYN_UID in /opt/processmaker3.3.2/workflow/engine/src/ProcessMaker/BusinessModel/DynaForm.php on line 1154
Notice: Undefined index: $dynaFormUid in /opt/processmaker3.3.2/workflow/engine/src/ProcessMaker/BusinessModel/DynaForm.php on line 374
{"error":{"code":400,"message":"Bad Request: The DynaForm with : does not exist."}} [status] => 400 )
Code: Select all$content = '{"name":"Product Info","description":"","items":[{"type":"form","variable":"","var_uid":"","dataType":"","id":"1352098365c0efd6c21b2d9037373693","name":"Product Info","description":"","mode":"edit","script":{"type":"js","code":""},"language":"en","externalLibs":"","printable":false,"items":[[{"type":"text","variable":"productName","var_uid":"5032625705c0efd7c9ba579087277592","dataType":"string","protectedValue":false,"id":"productName","name":"productName","label":"Product Name","defaultValue":"","placeholder":"","hint":"","required":false,"requiredFieldErrorMessage":"","textTransform":"none","validate":"","validateMessage":"","maxLength":1000,"formula":"","mode":"parent","operation":"","dbConnection":"workflow","dbConnectionLabel":"PM Database","sql":"","var_name":"productName","colSpan":12}],[{"type":"multipleFile","variable":"specFiles","var_uid":"3466037925c0efd88a7b0e9026297065","dataType":"multiplefile","protectedValue":false,"id":"specFiles","name":"specFiles","label":"Spec Files","inputDocument":"","required":false,"requiredFieldErrorMessage":"","dnd":false,"extensions":"*","size":1024,"sizeUnity":"MB","enableVersioning":false,"mode":"parent","multiple":false,"inp_doc_uid":"","var_name":"specFiles","colSpan":12}],[{"type":"submit","id":"submit0000000001","name":"submit0000000001","label":"Submit","colSpan":12}]],"variables":[{"var_uid":"5032625705c0efd7c9ba579087277592","prj_uid":"1349269745c53c45612c467076876288","var_name":"productName","var_field_type":"string","var_field_size":10,"var_label":"string","var_dbconnection":"workflow","var_dbconnection_label":"PM Database","var_sql":"","var_null":0,"var_default":"","var_accepted_values":"[]","inp_doc_uid":""},{"var_uid":"3466037925c0efd88a7b0e9026297065","prj_uid":"1349269745c53c45612c467076876288","var_name":"specFiles","var_field_type":"multiplefile","var_field_size":10,"var_label":"multiplefile","var_dbconnection":"workflow","var_dbconnection_label":"PM Database","var_sql":"","var_null":0,"var_default":"","var_accepted_values":"[]","inp_doc_uid":""}]}]}';
$accessToken = 'f5f1396a9302dd1f3696712ea32e18f962ed34dd';
$aVars = array(
"dyn_title" => "Billing Form",
"dyn_description" => "Form to bill the client",
"dyn_type" => "xmlform",
"dyn_version" => 2,
"dyn_content" => $content
);
$json = json_encode($aVars);
$processId = '1349269745c53c45612c467076876288';
$url = "http://192.168.3.178:5001/w247/project/$processId/dynaform?type=normal";
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
"Authorization: OAuth oauth_token=" . $accessToken . "",
"access_token: " . $accessToken,
"Content-Type: application/json",
"Content-Length: " . strlen($json)
));
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $json);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
$response = curl_exec($ch);
$err = curl_error($ch);
$result = json_decode($response, true);
if ($err) {
echo "cURL Error #:" . $err;
} else {
print_r ($result);
}
please tell me how to fix it.