This method can be use for instance, by a model that holds the definition of the workflow it is
using.
If a workflow with same id already exist in this source, it is overwritten if the last parameter is set to TRUE.
If a workflow with same id already exist in this source, it is overwritten if the last parameter is set to TRUE.
public addWorkflowDefinition ( string $workflowId, array $definition, boolean $overwrite = false ) : boolean | ||
$workflowId | string | Id of the workflow |
$definition | array | array containing the workflow definition to process |
$overwrite | boolean | When set to TRUE, the operation will fail if a workflow definition already exists for this ID. Otherwise the existing definition is overwritten. |
return | boolean | TRUE if the workflow definition could be added, FALSE otherwise |