It's all about the answers!

Ask a question

AssertionFailedException when invoking saveWorkItem2


Dan Sevcenco (5021823) | asked Mar 26 '14, 6:04 a.m.
edited Mar 26 '14, 3:42 p.m. by Stephanie Taylor (24115)
I am trying to change the state of a workitem programatically by invoking the saveWorkItem2 method and giving it the workflowAction ID for the action that takes the workitem to the desired target state on the workflow. However, I am getting this exception which I have to idea how to diagnose.

I am working with RTC v4.0.0 and I am doing the work-item manipulation inside a save operation participant. If needed, I can provide a sample of the code I am writing, just let me know.

The exception is this:

2014-03-26 11:50:46,229 [              WebContainer : 0] ERROR com.ibm.team.process.common                         - assertion failed: 
org.eclipse.core.runtime.AssertionFailedException: assertion failed: 
        at org.eclipse.core.runtime.Assert.isTrue(Assert.java:110)
        at org.eclipse.core.runtime.Assert.isTrue(Assert.java:96)
        at com.ibm.team.workitem.service.internal.WorkItemRepositoryService.reconcileWithCurrent(WorkItemRepositoryService.java:1179)
        at com.ibm.team.workitem.service.internal.WorkItemRepositoryService.detectConflictingUpdates(WorkItemRepositoryService.java:383)
        at com.ibm.team.workitem.service.internal.WorkItemRepositoryService.access$0(WorkItemRepositoryService.java:373)
        at com.ibm.team.workitem.service.internal.WorkItemRepositoryService$1.run(WorkItemRepositoryService.java:329)
        at com.ibm.team.workitem.service.internal.WorkItemRepositoryService$1.run(WorkItemRepositoryService.java:1)
        at com.ibm.team.repository.service.internal.PrimitiveTransactionService$3.run(PrimitiveTransactionService.java:168)
        at com.ibm.team.repository.service.internal.rdb.RepositoryDatabase.runTransaction(RepositoryDatabase.java:321)
        at com.ibm.team.repository.service.internal.rdb.RepositoryDatabase.runInTransaction(RepositoryDatabase.java:245)
        at com.ibm.team.repository.service.internal.PrimitiveTransactionService.runInTransaction(PrimitiveTransactionService.java:102)
        at com.ibm.team.repository.service.internal.PrimitiveTransactionService.runInTransaction(PrimitiveTransactionService.java:97)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
        at java.lang.reflect.Method.invoke(Method.java:611)
        at org.eclipse.soda.sat.core.internal.record.ExportProxyServiceRecord.invoke(ExportProxyServiceRecord.java:361)
        at org.eclipse.soda.sat.core.internal.record.ExportProxyServiceRecord.access$0(ExportProxyServiceRecord.java:347)
        at org.eclipse.soda.sat.core.internal.record.ExportProxyServiceRecord$ExportedServiceInvocationHandler.invoke(ExportProxyServiceRecord.java:56)
        at com.sun.proxy.$Proxy117.runInTransaction(Unknown Source)
        at com.ibm.team.repository.service.AbstractService.runInTransaction(AbstractService.java:965)
        at com.ibm.team.workitem.service.internal.WorkItemRepositoryService.saveTransaction(WorkItemRepositoryService.java:326)
        at com.ibm.team.workitem.service.internal.WorkItemRepositoryService.save(WorkItemRepositoryService.java:284)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
        at java.lang.reflect.Method.invoke(Method.java:611)
        at org.eclipse.soda.sat.core.internal.record.ExportProxyServiceRecord.invoke(ExportProxyServiceRecord.java:361)
        at org.eclipse.soda.sat.core.internal.record.ExportProxyServiceRecord.access$0(ExportProxyServiceRecord.java:347)
        at org.eclipse.soda.sat.core.internal.record.ExportProxyServiceRecord$ExportedServiceInvocationHandler.invoke(ExportProxyServiceRecord.java:56)
        at com.sun.proxy.$Proxy1018.save(Unknown Source)
        at com.ibm.team.workitem.service.internal.WorkItemServer.save(WorkItemServer.java:298)
        at com.ibm.team.workitem.service.internal.WorkItemServer.saveWorkItems(WorkItemServer.java:151)
        at com.ibm.team.workitem.service.internal.WorkItemServer.saveWorkItem3(WorkItemServer.java:120)
        at com.ibm.team.workitem.service.internal.WorkItemServer.saveWorkItem2(WorkItemServer.java:115)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
        at java.lang.reflect.Method.invoke(Method.java:611)
        at com.ibm.team.workitem.service.internal.ServiceAdapter.invoke(ServiceAdapter.java:74)
        at com.sun.proxy.$Proxy1012.saveWorkItem2(Unknown Source)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
        at java.lang.reflect.Method.invoke(Method.java:611)
        at org.eclipse.soda.sat.core.internal.record.ExportProxyServiceRecord.invoke(ExportProxyServiceRecord.java:361)
        at org.eclipse.soda.sat.core.internal.record.ExportProxyServiceRecord.access$0(ExportProxyServiceRecord.java:347)
        at org.eclipse.soda.sat.core.internal.record.ExportProxyServiceRecord$ExportedServiceInvocationHandler.invoke(ExportProxyServiceRecord.java:56)
        at com.sun.proxy.$Proxy1014.saveWorkItem2(Unknown Source)
        at itsm2.rtcext.workitem.extensions.participants.planningtasks.ManagePlanningTaskCommonLogic.saveWorkItem(ManagePlanningTaskCommonLogic.java:594)
        at itsm2.rtcext.workitem.extensions.participants.planningtasks.ManagePlanningTaskCommonLogic.propagateInProgressToParent(ManagePlanningTaskCommonLogic.java:768)
        at itsm2.rtcext.workitem.extensions.participants.planningtasks.ManageExecutionTaskParticipant.processExecutionWorkItemInProgressState(ManageExecutionTaskParticipant.java:85)
        at itsm2.rtcext.workitem.extensions.participants.planningtasks.ManageExecutionTaskParticipant.processExecutionWorkItem(ManageExecutionTaskParticipant.java:51)
        at itsm2.rtcext.workitem.extensions.participants.planningtasks.ManagePlanningTasksParticipant.run(ManagePlanningTasksParticipant.java:53)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
        at java.lang.reflect.Method.invoke(Method.java:611)
        at org.eclipse.soda.sat.core.internal.record.ExportProxyServiceRecord.invoke(ExportProxyServiceRecord.java:361)
        at org.eclipse.soda.sat.core.internal.record.ExportProxyServiceRecord.access$0(ExportProxyServiceRecord.java:347)
        at org.eclipse.soda.sat.core.internal.record.ExportProxyServiceRecord$ExportedServiceInvocationHandler.invoke(ExportProxyServiceRecord.java:56)
        at com.sun.proxy.$Proxy1938.run(Unknown Source)
        at com.ibm.team.process.internal.common.advice.runtime.OperationAdviceManager.runParticipant(OperationAdviceManager.java:1143)
        at com.ibm.team.process.internal.common.advice.runtime.OperationAdviceManager.runParticipants(OperationAdviceManager.java:973)
        at com.ibm.team.process.internal.common.advice.runtime.OperationAdviceManager.advise(OperationAdviceManager.java:318)
        at com.ibm.team.process.internal.common.util.AbstractProcess.doAdvise(AbstractProcess.java:196)
        at com.ibm.team.process.internal.service.ServerProcess.access$2(ServerProcess.java:1)
        at com.ibm.team.process.internal.service.ServerProcess$2.run(ServerProcess.java:156)
        at com.ibm.team.repository.service.internal.PrimitiveTransactionService$3.run(PrimitiveTransactionService.java:168)
        at com.ibm.team.repository.service.internal.rdb.RepositoryDatabase.runTransaction(RepositoryDatabase.java:321)
        at com.ibm.team.repository.service.internal.rdb.RepositoryDatabase.runInTransaction(RepositoryDatabase.java:245)
        at com.ibm.team.repository.service.internal.PrimitiveTransactionService.runInTransaction(PrimitiveTransactionService.java:102)
        at com.ibm.team.repository.service.internal.PrimitiveTransactionService.runInTransaction(PrimitiveTransactionService.java:97)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
        at java.lang.reflect.Method.invoke(Method.java:611)
        at org.eclipse.soda.sat.core.internal.record.ExportProxyServiceRecord.invoke(ExportProxyServiceRecord.java:361)
        at org.eclipse.soda.sat.core.internal.record.ExportProxyServiceRecord.access$0(ExportProxyServiceRecord.java:347)
        at org.eclipse.soda.sat.core.internal.record.ExportProxyServiceRecord$ExportedServiceInvocationHandler.invoke(ExportProxyServiceRecord.java:56)
        at com.sun.proxy.$Proxy117.runInTransaction(Unknown Source)
        at com.ibm.team.repository.service.internal.TransactionService.runInTransaction(TransactionService.java:37)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
        at java.lang.reflect.Method.invoke(Method.java:611)
        at org.eclipse.soda.sat.core.internal.record.ExportProxyServiceRecord.invoke(ExportProxyServiceRecord.java:361)
        at org.eclipse.soda.sat.core.internal.record.ExportProxyServiceRecord.access$0(ExportProxyServiceRecord.java:347)
        at org.eclipse.soda.sat.core.internal.record.ExportProxyServiceRecord$ExportedServiceInvocationHandler.invoke(ExportProxyServiceRecord.java:56)
        at com.sun.proxy.$Proxy190.runInTransaction(Unknown Source)
        at com.ibm.team.process.internal.service.ProcessService.runInTransaction(ProcessService.java:4614)
        at com.ibm.team.process.internal.service.ProcessService.runInTransaction(ProcessService.java:4621)
        at com.ibm.team.process.internal.service.ServerProcess.adviseAndExecute(ServerProcess.java:153)
        at com.ibm.team.workitem.service.internal.AuditableServerProcess.adviseAndExecute(AuditableServerProcess.java:86)
        at com.ibm.team.workitem.service.internal.WorkItemRepositoryService.processSave(WorkItemRepositoryService.java:566)
        at com.ibm.team.workitem.service.internal.WorkItemRepositoryService.save(WorkItemRepositoryService.java:491)
        at com.ibm.team.workitem.service.internal.WorkItemRepositoryService.save(WorkItemRepositoryService.java:464)
        at com.ibm.team.workitem.service.internal.WorkItemRepositoryService.access$3(WorkItemRepositoryService.java:460)
        at com.ibm.team.workitem.service.internal.WorkItemRepositoryService$1.run(WorkItemRepositoryService.java:340)
        at com.ibm.team.workitem.service.internal.WorkItemRepositoryService$1.run(WorkItemRepositoryService.java:1)
        at com.ibm.team.repository.service.internal.PrimitiveTransactionService$3.run(PrimitiveTransactionService.java:168)
        at com.ibm.team.repository.service.internal.rdb.RepositoryDatabase$Transaction.run(RepositoryDatabase.java:470)
        at com.ibm.team.repository.service.internal.rdb.RepositoryDatabase$1.run(RepositoryDatabase.java:294)
        at com.ibm.team.repository.service.internal.rdb.ConnectionPoolService.withCurrentConnection(ConnectionPoolService.java:381)
        at sun.reflect.GeneratedMethodAccessor78.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
        at java.lang.reflect.Method.invoke(Method.java:611)
        at org.eclipse.soda.sat.core.internal.record.ExportProxyServiceRecord.invoke(ExportProxyServiceRecord.java:361)
        at org.eclipse.soda.sat.core.internal.record.ExportProxyServiceRecord.access$0(ExportProxyServiceRecord.java:347)
        at org.eclipse.soda.sat.core.internal.record.ExportProxyServiceRecord$ExportedServiceInvocationHandler.invoke(ExportProxyServiceRecord.java:56)
        at com.sun.proxy.$Proxy85.withCurrentConnection(Unknown Source)
        at com.ibm.team.repository.service.internal.rdb.RepositoryDatabase.runTransaction(RepositoryDatabase.java:290)
        at com.ibm.team.repository.service.internal.rdb.RepositoryDatabase.runInTransaction(RepositoryDatabase.java:245)
        at com.ibm.team.repository.service.internal.PrimitiveTransactionService.runInTransaction(PrimitiveTransactionService.java:102)
        at com.ibm.team.repository.service.internal.PrimitiveTransactionService.runInTransaction(PrimitiveTransactionService.java:97)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
        at java.lang.reflect.Method.invoke(Method.java:611)
        at org.eclipse.soda.sat.core.internal.record.ExportProxyServiceRecord.invoke(ExportProxyServiceRecord.java:361)
        at org.eclipse.soda.sat.core.internal.record.ExportProxyServiceRecord.access$0(ExportProxyServiceRecord.java:347)
        at org.eclipse.soda.sat.core.internal.record.ExportProxyServiceRecord$ExportedServiceInvocationHandler.invoke(ExportProxyServiceRecord.java:56)
        at com.sun.proxy.$Proxy117.runInTransaction(Unknown Source)
        at com.ibm.team.repository.service.AbstractService.runInTransaction(AbstractService.java:965)
        at com.ibm.team.workitem.service.internal.WorkItemRepositoryService.saveTransaction(WorkItemRepositoryService.java:326)
        at com.ibm.team.workitem.service.internal.WorkItemRepositoryService.save(WorkItemRepositoryService.java:284)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
        at java.lang.reflect.Method.invoke(Method.java:611)
        at org.eclipse.soda.sat.core.internal.record.ExportProxyServiceRecord.invoke(ExportProxyServiceRecord.java:361)
        at org.eclipse.soda.sat.core.internal.record.ExportProxyServiceRecord.access$0(ExportProxyServiceRecord.java:347)
        at org.eclipse.soda.sat.core.internal.record.ExportProxyServiceRecord$ExportedServiceInvocationHandler.invoke(ExportProxyServiceRecord.java:56)
        at com.sun.proxy.$Proxy1018.save(Unknown Source)
        at com.ibm.team.workitem.service.internal.WorkItemServer.save(WorkItemServer.java:298)
        at com.ibm.team.workitem.service.internal.WorkItemServer.saveWorkItems(WorkItemServer.java:151)
        at com.ibm.team.workitem.service.internal.rest.WorkItemRestService.postWorkItem2(WorkItemRestService.java:403)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
        at java.lang.reflect.Method.invoke(Method.java:611)
        at org.eclipse.soda.sat.core.internal.record.ExportProxyServiceRecord.invoke(ExportProxyServiceRecord.java:361)
        at org.eclipse.soda.sat.core.internal.record.ExportProxyServiceRecord.access$0(ExportProxyServiceRecord.java:347)
        at org.eclipse.soda.sat.core.internal.record.ExportProxyServiceRecord$ExportedServiceInvocationHandler.invoke(ExportProxyServiceRecord.java:56)
        at com.sun.proxy.$Proxy1032.postWorkItem2(Unknown Source)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
        at java.lang.reflect.Method.invoke(Method.java:611)
        at com.ibm.team.repository.servlet.AbstractTeamServerServlet.doModelledRestService(AbstractTeamServerServlet.java:531)
        at com.ibm.team.repository.servlet.AbstractTeamServerServlet.handleRequest2(AbstractTeamServerServlet.java:2058)
        at com.ibm.team.repository.servlet.AbstractTeamServerServlet.handleRequest(AbstractTeamServerServlet.java:1878)
        at com.ibm.team.repository.servlet.AbstractTeamServerServlet.service(AbstractTeamServerServlet.java:1754)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:668)
        at org.eclipse.equinox.http.registry.internal.ServletManager$ServletWrapper.service(ServletManager.java:180)
        at org.eclipse.equinox.http.servlet.internal.ServletRegistration.service(ServletRegistration.java:61)
        at org.eclipse.equinox.http.servlet.internal.ProxyServlet.processAlias(ProxyServlet.java:126)
        at org.eclipse.equinox.http.servlet.internal.ProxyServlet.service(ProxyServlet.java:76)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:668)
        at org.eclipse.equinox.servletbridge.BridgeServlet.service(BridgeServlet.java:120)
        at com.ibm.team.repository.server.servletbridge.JazzServlet.service(JazzServlet.java:68)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:668)
        at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1227)
        at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:776)
        at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:458)
        at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:178)
        at com.ibm.ws.webcontainer.filter.WebAppFilterChain.invokeTarget(WebAppFilterChain.java:136)
        at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:97)
        at com.ibm.team.repository.server.servletbridge.BridgeFilter.processDelegate(BridgeFilter.java:133)
        at com.ibm.team.repository.server.servletbridge.BridgeFilter.doFilter(BridgeFilter.java:154)
        at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:195)
        at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:91)
        at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:928)
        at com.ibm.ws.webcontainer.filter.WebAppFilterManager.invokeFilters(WebAppFilterManager.java:1025)
        at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3761)
        at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:304)
        at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:976)
        at com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1662)
        at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:200)
        at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:459)
        at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewRequest(HttpInboundLink.java:526)
        at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.processRequest(HttpInboundLink.java:312)
        at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:88)
        at com.ibm.ws.ssl.channel.impl.SSLReadServiceContext$SSLReadCompletedCallback.complete(SSLReadServiceContext.java:1784)
        at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:175)
        at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
        at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
        at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:138)
        at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:204)
        at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:775)
        at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:905)
        at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1862)

My code is somewhere in the middle and it starts with itsm2.rtcext....

I have checked the parameters which are being passed to the saveWorkitem2 method and if the workflowAction parameter is anything but null, RTC will throw the exception above.

Anyone faced this issue before? What could I try to go around this behaviour?

Thanks!

2 answers



permanent link
sam detweiler (12.4k6182201) | answered Mar 26 '14, 6:44 a.m.
remember when your participant does a save, it will end up calling your participant again.

so, you may want to use saveworkitem3, which allows u to pass a 3rd parameter that you could detect as a recursive call

from one of my plugins
         private static Set<String> bypass = null;
         private static final String Recursion = "Approvalsbypass";
        bypass = new HashSet<String>(new ArrayList<String>(Arrays.asList(Recursion)));
        if (data instanceof ISaveParameter)
        {
            saveParameter = (ISaveParameter) data;
            // check to see if we are being called again from our save
            // if not, process, otherwise skip the work

            if ((saveParameter.getAdditionalSaveParameters() != null)
                    && (!saveParameter.getAdditionalSaveParameters().contains(Recursion)))
            {
            }

sometime earlier
            // this will cause this plugin to be called again
            saveStatus = fWorkItemServer.saveWorkItem3(workingCopy, null, null, bypass);

Comments
Dan Sevcenco commented Mar 26 '14, 7:26 a.m.

If it were an issue with recursive calls, the error would have been different. I know because I have done it and learned to avoid it.

However, in this case, what I am doing is that when my workitem reaches a particular state, I go to it's parent, via the parent - child relationship, and change the parent's state too.

Anyway, I do not think that the behaviour is normal. If it were a problem with the way the call is set up, the API should respond with an exception thrown from within the saveWorkitem2 method. Not with one which happens some tens of calls down the path.


sam detweiler commented Mar 26 '14, 7:51 a.m.

I hear you.. two of us spent 3 days debugging an 'Operation Canceled' exception, which turned out to be 'Permission Denied'.

I would expect this assertion to be, sorry that action doesn't work from this state.


Dan Sevcenco commented Mar 26 '14, 8:30 a.m. | edited Mar 26 '14, 8:32 a.m.

Well, if that exception means what you said, then hooray for cryptic messages which have no relation to the real cause!!!

That being said, if I go to the parent work-item in the Web UI and transition it to the desired state, without making any modifications whatsoever to the attributes, then RTC saves the work-item without even a hiccup. This means, in my mind, that the transition from the current state to the next state should be executed successfully even if triggered from within the participant.

The only difference from a successfully executed save operation is the fact that I am telling RTC that I want it to execute a workflow state transition by giving it the workflow action ID. This action ID is valid for the current state. This I confirmed by checking the value returned by my code against the process description (the XML view of it).


permanent link
Dan Sevcenco (5021823) | answered Mar 27 '14, 8:59 a.m.
Problem solved. Figured it out. I found the source code of the RTC classes that are referenced in the stacktrace and understood what the code is checking at the point of the assertion failure.


Comments
sam detweiler commented Mar 27 '14, 9:09 a.m.

Care to share? 


Dan Sevcenco commented Mar 27 '14, 10:41 a.m. | edited Mar 27 '14, 10:43 a.m.

Well, it is kind of embarrassing  to admit but I can hide behind the less than useful error message generated by RTC.

I failed to get a working copy of the workitem :( Although, I could have sworn that I did have it because when I fetched the item, I asked for the full profile.

Anyway, I figured it out because at the point of the assertion failure, the check was made on the workitem and whether it is a working copy. Obviously, that got me wondering...

Do I need to say that I hate this kind of useless messages that RTC is displaying and which get one chasing their own tail? Alongside with the lack of explanation on the error condition in the application log.


sam detweiler commented Mar 27 '14, 11:03 a.m.

its always something simple once u find it.    I agree, I would like more descriptive/ focused troubleshooting info. 

Your answer


Register or to post your answer.