Error when trying to run a process from REST API

cancel
Showing results for 
Search instead for 
Did you mean: 
JC83
Active Member II

Error when trying to run a process from REST API

Hi,

I would like to use the REST API to run a process .. I saw in the documentation that I have to post a request

https://api-explorer.alfresco.com/api-explorer/?urls.primaryName=Workflow%20API#/processes/createPro...

So i'm trying it in PHP

 

$url="$PURLBASE/processes";
$ch = curl_init();

$variables = array(
'bpm_assignee' => 'JC205236',
"bpm_sendEMailNotifications" => true,
"bpm_workflowPriority" => 0
);
//key are validationPublication or validationHierarchique
$processBody = array(
'processDefinitionKey' => 'validationHierarchique',
'variables' => $variables
);

But I have an unundestanding error :

 

Array
(
    [error] => Array
        (
            [errorKey] => framework.exception.ApiDefault
            [statusCode] => 500
            [briefSummary] => 022565607 Failed to execute supplied script: 022565606 TypeError: Impossible de lire la propriété "properties" de undefined (AlfrescoJS#2)
            [stackTrace] => Pour des raisons de sécurité, le traçage de la pile n'est plus affiché, mais la propriété est conservée dans les versions précédente.
            [descriptionURL] => https://api-explorer.alfresco.com
            [logId] => 79615660-384d-4e8f-80a0-6380d05c18c1
        )

)

I can't find any way of solving it ..

Could someone help me ?