Trigger to remove workflow?

There doesn't seem to be a trigger action to remove workflow when an asset is created. Anyone got any ideas on how else I can achieve this?

[quote]
There doesn't seem to be a trigger action to remove workflow when an asset is created. Anyone got any ideas on how else I can achieve this?

[/quote]



Hi,

If you are using 3.24+ system, you can use trigger event 'After Asset Built' and action type of 'Execute Database Query'.

Query being "DELETE from sq_ast_wflow where assetid = 'YOUR_ASSET_ID_HERE';"



You would be able to get the assetid of the asset which was just created with the use of Global Keyword.



Cheers,



Ash

[quote]
Hi,

If you are using 3.24+ system, you can use trigger event 'After Asset Built' and action type of 'Execute Database Query'.

Query being "DELETE from sq_ast_wflow where assetid = 'YOUR_ASSET_ID_HERE';"



You would be able to get the assetid of the asset which was just created with the use of Global Keyword.



Cheers,



Ash

[/quote]





Would this work for 3.22? Or 3.28 since we're getting an upgrade next week?

[quote]
Would this work for 3.22? Or 3.28 since we're getting an upgrade next week?

[/quote]



Would certainly work on 3.28 since the "After Asset Built" event was added in 3.24. As for 3.22 "Execute Database Query" Trigger action surely does exist whihc can be combined with "Asset Created" event to achieve the desired result.



Cheers,



Ash

[quote]
Would certainly work on 3.28 since the "After Asset Built" event was added in 3.24. As for 3.22 "Execute Database Query" Trigger action surely does exist whihc can be combined with "Asset Created" event to achieve the desired result.



Cheers,



Ash

[/quote]



Cool thanks. Will give it a go.

[quote]
Cool thanks. Will give it a go.

[/quote]



No worries :slight_smile: