After Create Trigger does not run after Object created by Ja

Posted by cohezive on 04-Apr-2015 10:28

I created a trigger to set the status of an object after it was created.   The object is being created as a result of a Custom Trigger.  However, after the object is created, the trigger does not run.  

 

All Replies

Posted by Orchid Corpin on 06-Apr-2015 10:50

Hi cohezive,

I need more  info.

In your custom trigger to create the record what Rollbase API did you use?

Is the trigger have "Trigger Delay Time" set? If yes, what are the values?

Thank you.

Regards,

Orchid

Posted by cohezive on 06-Apr-2015 10:56

I have just confirmed that an "After Update" trigger is also not working with Custom Triggers.

These are standard triggers.  No delays.  They operate fine when create/update are performed via UI.

I can only assume this is the same bug that I found with expressions not updating except with UI generated activity.

Posted by pvorobie on 06-Apr-2015 11:14

Please provide Java code you use to create a record, I'll try to help you with that.

Posted by Orchid Corpin on 06-Apr-2015 11:23

Have you tried the trigger timing with "after create" since this will run after create of record?

If this does not work also maybe you can include the status value in the custom trigger when creating a record (applicable if no conditions)

Regards,

Orchid

Posted by cohezive on 06-Apr-2015 11:45

Yes, tried it all.  Nothing functions.

The JAVA code works just fine.  I will make it available to Product Management as necessary.

Posted by Orchid Corpin on 06-Apr-2015 11:49

Can you provide your java code as per [mention:05b5f00eae4a468d844fa8bedcafd110:e9ed411860ed4f2ba0265705b8793d05] comment above, he may help you on this.

Regards,

Orchid

Posted by pvorobie on 06-Apr-2015 11:52

Apparently your Java code does not work fine since it does not run triggers as expected.

Posted by cohezive on 06-Apr-2015 13:36

That's an interesting assumption.  Care to tell me where the ERROR MESSAGES would be if this is not working?

I already RESOLVED the A480 error (that is not documented) that kept the Workflow batch processes from running.  

I think it's a VERY GOOD assumption that the lack of error messages in ANY log file in Rollbase and that the Create and Update java calls are working perfectly and the Trigger Operation completed that the Java code is NOT the issue.  

This is precisely the same behavior that I reported for Expressions not being updated by an Non-UI based record update.  I would very much appreciate a more respectful response given the circumstances.

Posted by pvorobie on 06-Apr-2015 13:42

I strongly suspect that you pass NULL as reference to TriggerRunner in DataObjectHandler.create() method. But since you do not share your Java code I cannot say more.

Please make sure you have "Enable API Log" checked on "Account Settings" page, and records creation will be logged in main.log

Posted by cohezive on 06-Apr-2015 16:57

The "java.code" is a couple hundred lines of code referencing a large library from Amazon Marketplace Web Calls.  IT has been supplied to a Rollbase support tech for review.  

Here are the specific calls (and yes, null is already set):

DataObjectHandler.update(runner.getTransaction(), data, fieldmap, runner.getUser(), null);

DataObjectHandler.update(runner.getTransaction(), data, fieldmap, runner.getUser(), null);

API log is checked.  This is the only output in main.log from the Trigger call:

[2015-04-06 21:48:05,389] Action "Get Product Listing Info" has been performed on 1 Product Listing Lookups

Posted by pvorobie on 06-Apr-2015 19:03

Please try this instead:

DataObjectHandler.update(runner.getTransaction(), data, fieldmap, runner.getUser(), runner);

This change should fix problem with triggers.

Posted by cohezive on 06-Apr-2015 22:47

As much as I hoped that would fix it, it did not.  No change in result.

Posted by pvorobie on 07-Apr-2015 11:19

Please double check that your new call runs triggers (it should). Use Trigger debugger window, create simple trigger to do log etc.

Posted by cohezive on 07-Apr-2015 12:57

Actually, the triggers already are written to log to the jobs.log file, as is the custom trigger.  The log file shows the trigger run when I use a Workflow Action on the object in the UI.  The log file DOES NOT show the trigger run after update from the custom trigger.

Posted by pvorobie on 07-Apr-2015 13:03

Sorry I can no longer help based on the info you've provided.

Posted by cohezive on 10-Apr-2015 09:42

Update/Clarification.   Create Triggers are running after the addition of the "runner" in the create call.  Update Triggers are still not functioning.

This thread is closed