使用 API - PHP 创建跑道应用程序工作流程
Create Podio App Workflows using API - PHP
我正在使用 Flows API 创建新的工作流程。
API: https://developers.podio.com/doc/flows/add-new-flow-26309928
我已经正确准备了属性(通过参考 API 文档)。它没有按预期工作并在创建带有效果的流时返回错误。我能够创建一个没有任何效果的流程,即。什么都不做的空流。但是当我尝试创建带有效果的流程时,它显示如下错误。
PodioServerError: An unexpected error occurred during execution.
下面是我的代码部分,
$attributes = array(
'config' => array(
'conditions' => array()
),
"effects" => array(array(
"values" => array(
'attribute_id' => "comment.value",
'label' => "Comment",
'required' => true,
'substitutions' => array(),
'type' => "text",
'value' => "This is a test comment from flow"
),
'type' => "comment.create",
)),
'name' => 'Test Flow via API',
'type' => 'item.create'
);
PodioFlow::create('app', $appID, $attrib);
知道可能是什么错误或如何正确调试它吗?
你能试试吗:
$attributes = array(
'config' => array(
'conditions' => array()
),
"effects" => array(array(
"attributes" => array(array(
'attribute_id' => "comment.value",
'label' => "Comment",
'required' => true,
'substitutions' => array(),
'type' => "text",
'value' => "This is a test comment from flow"
)),
'type' => "comment.create",
)),
'name' => 'Test Flow via API',
'type' => 'item.create'
);
唯一的区别是 values
在 effects
中被替换为 attributes
。那是文档中的错误输入,抱歉,现在已修复。
我正在使用 Flows API 创建新的工作流程。
API: https://developers.podio.com/doc/flows/add-new-flow-26309928
我已经正确准备了属性(通过参考 API 文档)。它没有按预期工作并在创建带有效果的流时返回错误。我能够创建一个没有任何效果的流程,即。什么都不做的空流。但是当我尝试创建带有效果的流程时,它显示如下错误。
PodioServerError: An unexpected error occurred during execution.
下面是我的代码部分,
$attributes = array(
'config' => array(
'conditions' => array()
),
"effects" => array(array(
"values" => array(
'attribute_id' => "comment.value",
'label' => "Comment",
'required' => true,
'substitutions' => array(),
'type' => "text",
'value' => "This is a test comment from flow"
),
'type' => "comment.create",
)),
'name' => 'Test Flow via API',
'type' => 'item.create'
);
PodioFlow::create('app', $appID, $attrib);
知道可能是什么错误或如何正确调试它吗?
你能试试吗:
$attributes = array(
'config' => array(
'conditions' => array()
),
"effects" => array(array(
"attributes" => array(array(
'attribute_id' => "comment.value",
'label' => "Comment",
'required' => true,
'substitutions' => array(),
'type' => "text",
'value' => "This is a test comment from flow"
)),
'type' => "comment.create",
)),
'name' => 'Test Flow via API',
'type' => 'item.create'
);
唯一的区别是 values
在 effects
中被替换为 attributes
。那是文档中的错误输入,抱歉,现在已修复。