Workflow trigger not firing on upload via Document upload wizard
Setup
- I have a document type called
TEST
that has an optional metadata type assigned called company (label "Firma") - I have a workflow labeled "fix_metadata_firma" with two states:
-
Dirty
, Initial: True, Completion: 0 -
Clean
, Initial: False, Completion: 100
-
- The workflow has two transitions:
-
Process on new document version upload
, Origin State:Dirty
, Destination State:Clean
, Triggers:Document version file metadata processing finished
-
Reset to 0 on new document version upload
, Origin State:Clean
, Destination State:Dirty
, Triggers: None
-
- The workflow state
Clean
has one action:-
0 - replace_multi_whitespace
, Enabled: True, When:On entry
, Action type:Edit metadata
, Condition: False, Metadata type:Firma
, Value:{% regex_sub "\s+" " " workflow_instance.document.metadata_value_of.company %}
-
Steps to reproduce
Tested on Mayan 3.5.5
and 3.5.8
- Open Document upload wizard
- Assign metadata type labeled "Firma" with value
a b c
- Select document type
TEST
- Skip tag assignment
- Skip cabinet assignment
- Upload file via "Web-Upload"
Expected result:
- document events contain
Metadata: Document metadata edited
entry - document metadata labeled "Firma" should have value
a b c
Actual result:
- document events does not contain
Metadata: Document metadata edited
entry - document metadata labeled "Firma" still has value
a b c
Only when I manually add a new document version the workflow is triggered and the value of the metadata Firma
is updated:
Edited by Megamorf