cancel
Showing results for 
Search instead for 
Did you mean: 

Is there a time delay in KW update from Unity Automation API?

Scott_Johnson3
World-Class Innovator
World-Class Innovator

Hi All

I am on 12.0.1.154 core.  I have a unity automation script that updates keywords as part of a workflow timer work.  Then later in the timer work, it tests one of those keywords to see of it is > 3.0.  The rub is the KW seem to the null when I get to the rule. But when the system work is complete the KW has the proper value.  Is there some locking going on?    How do I get at those newly computed KWs in my timer work?

Thanks

Scott

11 REPLIES 11

Rob_Biddle
Star Contributor
Star Contributor

In your WF Rule 'SYS - Run Unity Script', do you have 'Refresh document after script has executed' checked?  That can affect whether or not Rules/Actions in your timer (that occur after your Unity script changes keyword values) are able to 'see' those new values.

Scott_Johnson3
World-Class Innovator
World-Class Innovator

Hi Rob

Thank-you for the suggestion.  I tried it and recycled the timer service and the app pool and unfortunately it did not work.  Any other ideas?

Thanks

Scott

Rob_Biddle
Star Contributor
Star Contributor

In your Unity script, are you obtaining a DocumentLock before you attempt to add/update any keyword values?  Are you releasing the lock when you're done?

Scott_Johnson3
World-Class Innovator
World-Class Innovator

Hi Rob

I was told by API support a while ago I did not need document locks on the base document in unity automation scripts since a lock is automatically set and released so I did not use one.  I can add "documentLock.Release()" if you think it will help.  Thoughts?

Scott