You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Context: I'm wanting to create a script to automatically convert videos. I wasn't seeing my script get triggered so I added 2 workflows for testing and had the script just log information when I noticed odd behavior. This is what I found.
Install a vanilla nextcloud/vm instance of NextCloud
Enable Workflow
Add a workflow script on file upload (i.e. creation):
When: File Created
and User group membership is member of Users
Run script: nc_video_converter upload %e %n %f
4.Add a workflow script on tag:
(not sure if this is needed?) sudo chown www-data:www-data /usr/bin/nc_video_converter
Create a user assigned to the Users group
Login as that user and upload a file
Notice the /var/log/nc_video_converter file shows:
Running converter...
tag OCP\SystemTag\ISystemTagObjectMapper::assignTags /myusername/files/Screen Shot 2020-04-02 at 4.02.43 PM.png /tmp/oc_tmp_6Z7GGl-.png
Running converter...
upload OCP\SystemTag\ISystemTagObjectMapper::assignTags /myusername/files/Screen Shot 2020-04-02 at 4.02.43 PM.png /tmp/oc_tmp_XjOYL4-.png
Add a tag to a file
Notice the /var/log/nc_video_converter file shows:
Running converter...
tag \OCP\Files::postCreate /myusername/files/Screen Shot 2020-04-02 at 4.02.33 PM.png /tmp/oc_tmp_Jd9L2p-.png
Running converter...
upload \OCP\Files::postCreate /myusername/files/Screen Shot 2020-04-02 at 4.02.33 PM.png /tmp/oc_tmp_5evyop-.png
Expected behaviour
I expect that when I upload a file that only the workflow for the file upload would be triggered.
I expect that when I tag a file that only the workflow for the tag would be triggered.
Actual behaviour
When I upload a file both the file upload AND the tag workflows were triggered. Interestingly, though, you can see that both workflows printed the same event name: OCP\SystemTag\ISystemTagObjectMapper::assignTags.
When I tag a file both both workflows were triggered. Interestingly, both workflows printed the same event name \OCP\Files::postCreate.
```
If you have access to your command line run e.g.:
sudo -u www-data php occ config:list system
from within your Nextcloud installation folder
or
Insert your config.php content here
Make sure to remove all sensitive content such as passwords. (e.g. database password, passwordsalt, secret, smtp password, …)
</details>
**Are you using external storage, if yes which one:** local/smb/sftp/...
**Are you using encryption:** yes/no
### Server log (data/nextcloud.log)
<details>
(not available)
</details>
The text was updated successfully, but these errors were encountered:
Steps to reproduce
Context: I'm wanting to create a script to automatically convert videos. I wasn't seeing my script get triggered so I added 2 workflows for testing and had the script just log information when I noticed odd behavior. This is what I found.
4.Add a workflow script on tag:
Expected behaviour
I expect that when I upload a file that only the workflow for the file upload would be triggered.
I expect that when I tag a file that only the workflow for the tag would be triggered.
Actual behaviour
When I upload a file both the file upload AND the tag workflows were triggered. Interestingly, though, you can see that both workflows printed the same event name:
OCP\SystemTag\ISystemTagObjectMapper::assignTags
.When I tag a file both both workflows were triggered. Interestingly, both workflows printed the same event name
\OCP\Files::postCreate
.Workflow Script app
Workflow Script app version: 1.3.1
Server configuration
Operating system: Ubuntu 18.04 LTS (Linux ubuntu-bionic 4.15.0-91-generic)
Web server: Apache
Database: PostgreSQL
PHP version: PHP 7.2.24-0ubuntu0.18.04.3 (cli)
Nextcloud Version: 18.0.3
Where did you install Nextcloud from: github.com/nextcloud/vm using the virtualbox example
Signing status:
No errors have been found.
List of activated apps:
Nextcloud configuration:
or
Insert your config.php content here
Make sure to remove all sensitive content such as passwords. (e.g. database password, passwordsalt, secret, smtp password, …)
(not available)
The text was updated successfully, but these errors were encountered: