Symbiote/silverstripe-advancedworkflow on DataObject itself

Hi @all,

I’m using SS4.13 and the Module symbiote/silverstripe-advancedworkflow. I want to use the approval/reject-workflow on a dataobject like class Article extends DataObject. Declaring the extension WorkflowApplicable and defining the workflow itself works fine. Assiging the workflow to an existing Article explicitly works also - the workflow as it is specified works.
Otherwise, if the dataobject did not get an workflow explicitly, the workflow is inherited from the parent, for example for newly created Articles - The DataObjects did not have a parent…
In developer-documentation, there is an AdvancedWorkflowExtension which extends the ModelAdmin. Using this extension, I did not find any possibility to assign a dedicated workflow to ModelAdmin eg. ArticleAdmin. I miss something, but i did not see it.

Best regards

My config:

---
Name: Workflowconfig
---
Article:
  extensions:
    - Symbiote\AdvancedWorkflow\Extensions\WorkflowApplicable
ArticleAdmin:
  extensions:
    - Symbiote\AdvancedWorkflow\Extensions\AdvancedWorkflowExtension
Symbiote\AdvancedWorkflow\Actions\NotifyUsersWorkflowAction:
    whitelist_template_variables: true

I found a dirty solution. I overwrite the method to get the Worklow-ID from the dataobject itself.

    public function getWorkflowDefinitionID() {
        $workflow = DataObject::get(WorkflowDefinition::class, "Title = 'Inhalte erstellen und freigeben'");
        if ($workflow) {
            return $workflow->First()->ID;
        }
        return 0;
    }

This is not a good solution due to the workflow is configured as extension in yml and this is hard-coded. I did not find a better solution and any hint is welcome. There are several issues in the module (e.g. #263, #265) which leads to the same situation i had also.