05-04-2010 10:06 AM
Wrapped Exception (with status template): Failed to execute script '/org/alfresco/slingshot/documentlibrary/doclist.get.js (in classpath store file:/opt/pbk-svn/webapps/alfresco/WEB-INF/classes/alfresco/templates/webscripts)': Workflow instance 'jbpm$82324' does not exist (catalina error log bellow)13:46:37,467 User:test ERROR [web.scripts.AbstractRuntime] Exception from executeScript - redirecting to status template error: Wrapped Exception (with status template): Failed to execute script '/org/alfresco/slingshot/documentlibrary/doclist.get.js (in classpath storefile:/opt/pbk-svn/webapps/alfresco/WEB-INF/classes/alfresco/templates/webscripts)': Workflow instance 'jbpm$82328' does not exist
org.alfresco.web.scripts.WebScriptException: Wrapped Exception (with status template): Failed to execute script '/org/alfresco/slingshot/documentlibrary/doclist.get.js (in classpath storefile:/opt/pbk-svn/webapps/alfresco/WEB-INF/classes/alfresco/templates/webscripts)': Workflow instance 'jbpm$82328' does not exist
at org.alfresco.web.scripts.AbstractWebScript.createStatusException(AbstractWebScript.java:622)
at org.alfresco.web.scripts.DeclarativeWebScript.execute(DeclarativeWebScript.java:165)
at org.alfresco.repo.web.scripts.RepositoryContainer$2.execute(RepositoryContainer.java:319)
at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:322)
at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:229)
at org.alfresco.repo.web.scripts.RepositoryContainer.transactionedExecute(RepositoryContainer.java:368)
at org.alfresco.repo.web.scripts.RepositoryContainer.transactionedExecuteAs(RepositoryContainer.java:390)
at org.alfresco.repo.web.scripts.RepositoryContainer.executeScript(RepositoryContainer.java:273)
at org.alfresco.web.scripts.AbstractRuntime.executeScript(AbstractRuntime.java:262)
at org.alfresco.web.scripts.AbstractRuntime.executeScript(AbstractRuntime.java:139)
at org.alfresco.web.scripts.servlet.WebScriptServlet.service(WebScriptServlet.java:122)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Thread.java:619)
Caused by: org.alfresco.scripts.ScriptException: Failed to execute script '/org/alfresco/slingshot/documentlibrary/doclist.get.js (in classpath storefile:/opt/pbk-svn/webapps/alfresco/WEB-INF/classes/alfresco/templates/webscripts)': Workflow instance 'jbpm$82328' does not exist
at org.alfresco.repo.jscript.RhinoScriptProcessor.execute(RhinoScriptProcessor.java:178)
at org.alfresco.repo.processor.ScriptServiceImpl.executeScript(ScriptServiceImpl.java:274)
at org.alfresco.repo.web.scripts.RepositoryScriptProcessor.executeScript(RepositoryScriptProcessor.java:108)
at org.alfresco.web.scripts.AbstractWebScript.executeScript(AbstractWebScript.java:827)
at org.alfresco.web.scripts.DeclarativeWebScript.execute(DeclarativeWebScript.java:90)
… 22 more
Caused by: org.alfresco.service.cmr.workflow.WorkflowException: Workflow instance 'jbpm$82328' does not exist
at org.alfresco.repo.workflow.jbpm.JBPMEngine.getProcessInstance(JBPMEngine.java:802)
at org.alfresco.repo.workflow.jbpm.JBPMEngine$13.doInJbpm(JBPMEngine.java:767)
at org.springmodules.workflow.jbpm31.JbpmTemplate$1.doInHibernate(JbpmTemplate.java:87)
at org.springframework.orm.hibernate3.HibernateTemplate.execute(HibernateTemplate.java:372)
at org.springframework.orm.hibernate3.HibernateTemplate.execute(HibernateTemplate.java:338)
at org.springmodules.workflow.jbpm31.JbpmTemplate.execute(JbpmTemplate.java:80)
at org.alfresco.repo.workflow.jbpm.JBPMEngine.getWorkflowById(JBPMEngine.java:761)
at org.alfresco.repo.workflow.WorkflowServiceImpl.getWorkflowsForContent(WorkflowServiceImpl.java:576)
at sun.reflect.GeneratedMethodAccessor929.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:304)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
at org.alfresco.repo.security.permissions.impl.AlwaysProceedMethodInterceptor.invoke(AlwaysProceedMethodInterceptor.java:40)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at org.alfresco.repo.security.permissions.impl.ExceptionTranslatorMethodInterceptor.invoke(ExceptionTranslatorMethodInterceptor.java:49)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at org.alfresco.repo.audit.AuditComponentImpl.audit(AuditComponentImpl.java:275)
at org.alfresco.repo.audit.AuditMethodInterceptor.invoke(AuditMethodInterceptor.java:69)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
at $Proxy51.getWorkflowsForContent(Unknown Source)
at org.alfresco.repo.jscript.ScriptNode.getActiveWorkflows(ScriptNode.java:2324)
at sun.reflect.GeneratedMethodAccessor928.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:155)
at org.mozilla.javascript.JavaMembers.get(JavaMembers.java:117)
at org.mozilla.javascript.NativeJavaObject.get(NativeJavaObject.java:113)
at org.mozilla.javascript.ScriptableObject.getProperty(ScriptableObject.java:1544)
at org.mozilla.javascript.ScriptRuntime.getObjectProp(ScriptRuntime.java:1375)
at org.mozilla.javascript.ScriptRuntime.getObjectProp(ScriptRuntime.java:1364)
at org.mozilla.javascript.gen.c14._c6(file:/opt/pbk-svn/webapps/alfresco/WEB-INF/classes/alfresco/templates/webscripts/org/alfresco/slingshot/documentlibrary/doclist.get.js:566)
at org.mozilla.javascript.gen.c14.call(file:/opt/pbk-svn/webapps/alfresco/WEB-INF/classes/alfresco/templates/webscripts/org/alfresco/slingshot/documentlibrary/doclist.get.js)
at org.mozilla.javascript.optimizer.OptRuntime.callName(OptRuntime.java:97)
at org.mozilla.javascript.gen.c14._c0(file:/opt/pbk-svn/webapps/alfresco/WEB-INF/classes/alfresco/templates/webscripts/org/alfresco/slingshot/documentlibrary/doclist.get.js:340)
at org.mozilla.javascript.gen.c14.call(file:/opt/pbk-svn/webapps/alfresco/WEB-INF/classes/alfresco/templates/webscripts/org/alfresco/slingshot/documentlibrary/doclist.get.js)
at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:393)
at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:2834)
at org.mozilla.javascript.gen.c14.call(file:/opt/pbk-svn/webapps/alfresco/WEB-INF/classes/alfresco/templates/webscripts/org/alfresco/slingshot/documentlibrary/doclist.get.js)
at org.mozilla.javascript.gen.c14.exec(file:/opt/pbk-svn/webapps/alfresco/WEB-INF/classes/alfresco/templates/webscripts/org/alfresco/slingshot/documentlibrary/doclist.get.js)
at org.alfresco.repo.jscript.RhinoScriptProcessor.executeScriptImpl(RhinoScriptProcessor.java:449)
at org.alfresco.repo.jscript.RhinoScriptProcessor.execute(RhinoScriptProcessor.java:174)
… 26 more
06-30-2010 05:30 PM
And another, even better question, that would actually help me solve the issue. Could somebody post an example of how to get the list of possible transitions for a task and then send the document down one of these?
<table cellspacing=0 cellpadding=2>
<tr>
<th>ID</th>
<th>Type</th>
<th>Name</th>
<th>Completed</th>
<th>Transitions</th>
</tr>
<tr>
<td colspan="11"><hr/></td>
</tr>
<#list workflow.assignedTasks as t>
<tr>
<td>${t.id}</td>
<td>${t.type}</td>
<td>${t.name}</td>
<td>${t.isCompleted?string("Yes", "No")}</td>
<td>
<#list t.transitions as transition>
<span class="${t.id} ${transition.id}">
${transition.label?html}
</span>
<#if transition_has_next><span class="separator">|</span></#if>
</#list>
</td>
</tr>
</#list>
</table>
var theDocument = search.findNode(docNodeRef);
var tasks = [];
// get the current task IDs and push them into the tasks array
for each (wf in theDocument.activeWorkflows)
{
var thePaths = wf.getPaths();
for (var pathKey in thePaths)
{
var theTasks = thePaths[pathKey].getTasks();
for (var taskKey in theTasks)
{
tasks.push(workflow.getTaskById(theTasks[taskKey].getId()));
}
}
}
// Now that we have the tasks for all workflows attached to the current document
// you can get the possible transitions this way.
var transitions = {};
for (var key in tasks)
{
var taskTransitions = tasks[key].getTransitions();
for (var key1 in taskTransitions)
{
transitions[tasks[key].getId()] = taskTransitions[key1].getId();
}
}
// Now that you have the transitions you can display them for
// your user but to transition one of these you do something like
// this.
var task = workflow.getTaskById(taskId);
task.endTask(transitionId);
06-30-2010 05:35 PM
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.