Hello,
I'm testing custom workflow for Sales Order.
We I run process, log shows me the error with text:
ERROR: Workflow[61f39819cf10d7209]: Action failed [runService] with cid [0], details: . [] []
It's look like the custom code didn't even run.
Can you help me please, thank you.
I'm following this guide https://docs.espocrm.com/development...rvice-actions/
This my testing workflow code located here: Espo/Custom/Services/flexibeeSync.php:
metadata folder Espo/Custom/Resources/metadata/entityDefs/Workflow.json
and i18n folder Espo/Custom/Resources/i18n/en_US/Workflow.json
I'm testing custom workflow for Sales Order.
We I run process, log shows me the error with text:
ERROR: Workflow[61f39819cf10d7209]: Action failed [runService] with cid [0], details: . [] []
It's look like the custom code didn't even run.
Can you help me please, thank you.
I'm following this guide https://docs.espocrm.com/development...rvice-actions/
This my testing workflow code located here: Espo/Custom/Services/flexibeeSync.php:
PHP Code:
namespace Espo\Custom\Services;
use Espo\ORM\Entity;
class flexibeeSync extends \Espo\Core\Services\Base
{
public function flexibeeSync($workflowId, Entity $entity, $additionalParameters = null){
$url ='$entity->get('url')';
$log_response = date("Y-m-d H:i:s") . ' ' . $url;
file_put_contents('response-' . date("Y-m-d") .'.log', $log_response . PHP_EOL, FILE_APPEND | LOCK_EX);
}
}
metadata folder Espo/Custom/Resources/metadata/entityDefs/Workflow.json
Code:
{ "serviceActions": { "SalesOrder":{ "Flexibee Sync": { "serviceName": "flexibeeSync", "methodName": "flexibeeSync" } } } }
and i18n folder Espo/Custom/Resources/i18n/en_US/Workflow.json
Code:
{ "serviceActions": { "flexibeeSync": "FlexibeeSync" } }
Comment