I want to use the standard "Delivery" activity to extract a direct mail file (as opposed to using the "Direct Mail" activity), and after the activity has completed it needs to run the Jobs on service providers (supplierMgt) workflow if a Service Provider has been attached to the DM delivery template.
![1776003_pastedImage_15.png 1776003_pastedImage_15.png](/t5/image/serverpage/image-id/18201i61F536381EEEF43C/image-size/large?v=v2&px=999)
![1776004_pastedImage_16.png 1776004_pastedImage_16.png](/t5/image/serverpage/image-id/18202i4CF499BDD5DC8E7C/image-size/large?v=v2&px=999)
![1776010_pastedImage_17.png 1776010_pastedImage_17.png](/t5/image/serverpage/image-id/18203i809242A1EC295DEB/image-size/large?v=v2&px=999)
![1776038_pastedImage_18.png 1776038_pastedImage_18.png](/t5/image/serverpage/image-id/18204iC563C9B933D358D6/image-size/large?v=v2&px=999)
I've looked at the Scheduler javascript activity in the supplierMgt workflow and I can see that I need to ensure the delivery.state needs to be either "Ready to be delivered" or "Finished", and the delivery.extractionStatus should be "Approved".
I can manually execute the Scheduler javascript activity, and the Service Provider Jobs are triggered as expected. However I want to be able to trigger this automatically after the delivery has finished executing.
I presume I can only do this using the JSAPI, as there are no properties on the standard "Delivery" activity which will trigger this. Does anyone know how I can trigger this?