Trigger wont change status to Pending Approval


(Kieran@parracity) #1

Hi guys,


I have an asset builder which works fine.



I have created a new trigger to set workflow schema, set future status (for later archival) and set current status as "Pending Approval". This is how another trigger for a different asset builder works and works fine.



The problem is, the trigger seems to stop After "Set future status" and before or on "Set Status" (last step). On the Asset Builder, I have it set to "Do not change status" but I get the same result if set to "Under Construstion" upon creation. The same happens whether trigger is set to flick on "Asset Created" or "After Asset Built".



The workflow schema is applied (first step) but no email is sent as a result of no "Pending Approval" automation. The workflow/users are the exact same as the other trigger i use elsewhere, and works fine.



I'm completely out of things to try.



Any help guys?


(Ashish Karelia) #2

Hi,

[quote]

The problem is, the trigger seems to stop After "Set future status" and before or on "Set Status" (last step). On the Asset Builder, I have it set to "Do not change status" but I get the same result if set to "Under Construstion" upon creation. The same happens whether trigger is set to flick on "Asset Created" or "After Asset Built".

[/quote]



I am not quite getting as to what you are trying to do here. Is the "Set future status" and "Set Status" on different triggers?

As for "Asset Created" and "After Asset Built" trigger events, the former is fired when an asset is created by any means. The later however is fired only on the asset being successfully being created by Asset builder Asset.



So if you can tell us more as to what the Asset Status is when created. What are the status "Set future status" and "Set Status" is trying to set on the assets,it would help us determine what might be going on in the system.



Did you check logs for any obvious errors?



Ash


(Webmaster) #3

Hi Kieran


Try setting the Asset Builder to set status of Live. That is how mine are configured and they seem to work fine.



Deb


(Kieran@parracity) #4

[quote]
Hi,





I am not quite getting as to what you are trying to do here. Is the "Set future status" and "Set Status" on different triggers?

As for "Asset Created" and "After Asset Built" trigger events, the former is fired when an asset is created by any means. The later however is fired only on the asset being successfully being created by Asset builder Asset.



So if you can tell us more as to what the Asset Status is when created. What are the status "Set future status" and "Set Status" is trying to set on the assets,it would help us determine what might be going on in the system.



Did you check logs for any obvious errors?



Ash

[/quote]



Hi guys,



After the asset is created in the Asset Builder, we use a trigger to do the following:

[list=1]


  • Attach the workflow
    [*]Set future status to "Up For Review" in 6 months time
    [*]Change status to "Pending Approval", which should kickstart the workflow


    What's not happening is that the workflow is not starting (The first 2 steps appear to work fine).

    [quote]
    Hi Kieran

    Try setting the Asset Builder to set status of Live. That is how mine are configured and they seem to work fine.

    Deb
    [/quote]

    Hi Deb,

    We don't want the Asset Builder to make the asset live, as then it would not need to be approved. The whole reason for the workflow is to 1. Set the newly created asset pending approval, and 2. email the correct users so they can preview/check it.

  • (Webmaster) #5

    I'm aware you don't want it Live. It won't go Live.


    My process is identical - we use workflow too. The item doesn't go Live. It goes into approval.



    Try it.


    (Kieran@parracity) #6

    [quote]
    I'm aware you don't want it Live. It won't go Live.



    My process is identical - we use workflow too. The item doesn't go Live. It goes into approval.



    Try it.

    [/quote]



    I tried it, it went live.



    :\


    (Webmaster) #7

    Hmm, odd. Let me describe what we've got and maybe it'll help somehow…? Check against this:


    We use it for job vacancies. The HR guy uploads a PDF job description and we want to workflow it before it goes live.



    Folder that job descriptions get created into has Workflow Schema applied.



    Asset Builder sets that folder as the Create Location, and has "create status" of Live.



    Trigger applies to PDF files when Asset Created in the Tree Location of that folder. Only Trigger action is to set status to Pending Approval.



    … That's it.



    I'm wondering if perhaps you don't have workflow applied to the create location and are assuming setting the trigger to set a status of Pending Approval would be sufficient to do that?



    Feel free to email me - webmaster at selwyn dot govt dot nz

    Deb


    (Kieran@parracity) #8

    [quote]
    I'm wondering if perhaps you don't have workflow applied to the create location and are assuming setting the trigger to set a status of Pending Approval would be sufficient to do that?

    [/quote]



    We don't have the workflow applied to the parent folder (where its being created), however the workflow gets attached by the trigger.

    They just aren't run.

    Running workflows on the newly created asset says "Workflow Status Workflow is not currently running for this asset" and no logs, yet Workflow Schemas has the workflow applied.





    Checked the logs and this is the only relevent error (not sure exactly what it means):

        (/core/assets/system/triggers/trigger_manager/trigger_manager.inc:1123) - FAILURE: Trigger "News Item Creation" (Trigger# 23), Event "trigger_event_after_asset_built" broadcast by "test 5555" (Id# 106203) [CORE0127]

    (Webmaster) #9

    Can you apply workflow to the parent folder? This is what works for me.


    Deb


    (Kieran@parracity) #10

    Haha, um.
    This is kind of awkward, but worth mentioning.



    Um…

    All my tests were with my admin login. If you make a backend user run through the asset builder, the workflow and trigger work perfectly…



    Yeeaaaahhhh…

    <_<