<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Error when trying to run a process from REST API in Alfresco Forum</title>
    <link>https://connect.hyland.com/t5/alfresco-forum/error-when-trying-to-run-a-process-from-rest-api/m-p/30237#M12859</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I would like to use the REST API to run a process .. I saw in the documentation that I have to post a request&lt;/P&gt;&lt;P&gt;&lt;A href="https://api-explorer.alfresco.com/api-explorer/?urls.primaryName=Workflow%20API#/processes/createProcess" target="_blank" rel="noopener nofollow noreferrer"&gt;https://api-explorer.alfresco.com/api-explorer/?urls.primaryName=Workflow%20API#/processes/createProcess&lt;/A&gt;&lt;/P&gt;&lt;P&gt;So i'm trying it in PHP&lt;/P&gt;&lt;PRE&gt;$url="$PURLBASE/processes";
$ch = curl_init();

$variables = array(
'bpm_assignee' =&amp;gt; 'JC205236',
"bpm_sendEMailNotifications" =&amp;gt; true,
"bpm_workflowPriority" =&amp;gt; 0
);
//key are validationPublication or validationHierarchique
$processBody = array(
'processDefinitionKey' =&amp;gt; 'validationHierarchique',
'variables' =&amp;gt; $variables
);&lt;/PRE&gt;&lt;P&gt;But I have an unundestanding error :&lt;/P&gt;&lt;PRE&gt;Array
(
    [error] =&amp;gt; Array
        (
            [errorKey] =&amp;gt; framework.exception.ApiDefault
            [statusCode] =&amp;gt; 500
            [briefSummary] =&amp;gt; 022565607 Failed to execute supplied script: 022565606 TypeError: Impossible de lire la propriété "properties" de undefined (AlfrescoJS#2)
            [stackTrace] =&amp;gt; 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] =&amp;gt; https://api-explorer.alfresco.com
            [logId] =&amp;gt; 79615660-384d-4e8f-80a0-6380d05c18c1
        )

)&lt;/PRE&gt;&lt;P&gt;I can't find any way of solving it ..&lt;/P&gt;&lt;P&gt;Could someone help me ?&lt;/P&gt;</description>
    <pubDate>Fri, 25 Mar 2022 10:54:47 GMT</pubDate>
    <dc:creator>JC83</dc:creator>
    <dc:date>2022-03-25T10:54:47Z</dc:date>
    <item>
      <title>Error when trying to run a process from REST API</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/error-when-trying-to-run-a-process-from-rest-api/m-p/30237#M12859</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I would like to use the REST API to run a process .. I saw in the documentation that I have to post a request&lt;/P&gt;&lt;P&gt;&lt;A href="https://api-explorer.alfresco.com/api-explorer/?urls.primaryName=Workflow%20API#/processes/createProcess" target="_blank" rel="noopener nofollow noreferrer"&gt;https://api-explorer.alfresco.com/api-explorer/?urls.primaryName=Workflow%20API#/processes/createProcess&lt;/A&gt;&lt;/P&gt;&lt;P&gt;So i'm trying it in PHP&lt;/P&gt;&lt;PRE&gt;$url="$PURLBASE/processes";
$ch = curl_init();

$variables = array(
'bpm_assignee' =&amp;gt; 'JC205236',
"bpm_sendEMailNotifications" =&amp;gt; true,
"bpm_workflowPriority" =&amp;gt; 0
);
//key are validationPublication or validationHierarchique
$processBody = array(
'processDefinitionKey' =&amp;gt; 'validationHierarchique',
'variables' =&amp;gt; $variables
);&lt;/PRE&gt;&lt;P&gt;But I have an unundestanding error :&lt;/P&gt;&lt;PRE&gt;Array
(
    [error] =&amp;gt; Array
        (
            [errorKey] =&amp;gt; framework.exception.ApiDefault
            [statusCode] =&amp;gt; 500
            [briefSummary] =&amp;gt; 022565607 Failed to execute supplied script: 022565606 TypeError: Impossible de lire la propriété "properties" de undefined (AlfrescoJS#2)
            [stackTrace] =&amp;gt; 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] =&amp;gt; https://api-explorer.alfresco.com
            [logId] =&amp;gt; 79615660-384d-4e8f-80a0-6380d05c18c1
        )

)&lt;/PRE&gt;&lt;P&gt;I can't find any way of solving it ..&lt;/P&gt;&lt;P&gt;Could someone help me ?&lt;/P&gt;</description>
      <pubDate>Fri, 25 Mar 2022 10:54:47 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/error-when-trying-to-run-a-process-from-rest-api/m-p/30237#M12859</guid>
      <dc:creator>JC83</dc:creator>
      <dc:date>2022-03-25T10:54:47Z</dc:date>
    </item>
  </channel>
</rss>

