Question
Accenture
IN
Last activity: 7 Apr 2017 14:06 EDT
Error when using addwork activity
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Pegasystems Inc.
IN
Hi,
I could see that activity is running successfully at my end . In the below screenshot, you can observe that pyWorkPage is of class Level-1, and workPage is of class Level-2. Level1 is a child of Level2.
I have ran the activity from Level-1
Can you please provide the screenshot of your configuration ?
Pegasystems Inc.
US
Hi Najiya,
Work-AddWork activity will add a new work object using the primary page data. This activity saves the new work object on the deferred list.
Call this activity to create a new work object from a Utility or Post-Processing activity. Prior to calling this activity create and populate a new work object page using Work-createWorkPage activity then use it as the primary page to call this activity. Caller must commit changes using Work-commitWithErrorHandling.
For more understanding you can look into the activities @baseclass-pxAddFeedback or @baseclass-pzTEstAct activities.
If you had followed the same process mentioned above for AddWork then kindly share the tracer file of your usecase for further investigation.
Regards
Mahesh
-
Ganesh Sekar
Accenture
IN
Pegasystems Inc.
US
Hello,
When you trace this, what is happening when the error occurs? I assume you are doing an Obj-Open-By-Handle of the object in Class A. I also assume that object was in a Review harness and not Perform, because if you were on the Perform harness, you should have already acquired a lock. So you may want to trace the opening of the object in Class A, with locking turned on, and continue to trace calling addWork and focus on where locks are acquired/released. And then if you need to manually get a lock before calling addWork, modify your activity to do that.
Thanks,
Mike
Accenture
IN
Pegasystems Inc.
US
Hello,
I'm not sure I follow. You do a page-new and get a locking error? Is the error there BEFORE the first step of your activity? (i.e. is it an old error lingering from something else?) How do you call your activity and did you trace that? Does the cover object exist at the time you're trying to lock it? " cannot/unable to acquire lock on cover object " is your error, which means the system is trying to lock it and can't. Trying to lock an object that isn't in the DB could possibly do that. I think? Normally, if I wanted to lock an object that I already have open, I'd call the method Obj-Refresh-And-Lock. If I didn't have the object already, I'd use an Obj-Open-By-Handle with locking checked.
Thanks,
Mike
PEG
US
If you see the error on the beginning (step begin) of the page-new, then it is a leftover from a previous operation.
I suggest you set the logging level to DEBUG (Designer Studio >> System >> Operation >> Logs >> Log Level Settings) for the class lockmanagerimpl and then go through the same operations. You should also have Tracer on and be Tracing lock events as well as activity and activity steps.
You should see in the PegaRULES log file the complete locking history. You may get some additional information stating why the lock cannot be achieved.