AnsweredAssumed Answered

workflow fails to set aspect

Question asked by purohitsumit on Apr 3, 2014
Latest reply on Apr 18, 2014 by purohitsumit
I am following "" and have new workflow in my share's web app.

I have reused "" example and on "approve" action I am trying to set webable aspect. But I am getting following error.

org.activiti.engine.ActivitiException: Exception while invoking TaskListener: Exception while invoking TaskListener: 03020110 Failed to execute supplied script: null

somewhere deep in the error stack I find  following lines :

at org.activiti.engine.impl.delegate.DelegateInvocation.proceed(
   at org.activiti.engine.impl.delegate.DefaultDelegateInterceptor.handleInvocation(
   at org.activiti.engine.impl.bpmn.helper.ClassDelegate.notify(
   … 189 more
Caused by: java.lang.UnsupportedOperationException
   at java.util.Collections$UnmodifiableMap.put(
   at org.alfresco.repo.node.db.DbNodeServiceImpl.addAspectsAndProperties(
   at org.alfresco.repo.node.db.DbNodeServiceImpl.addAspectsAndProperties(
   at org.alfresco.repo.node.db.DbNodeServiceImpl.addAspect(
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(
   at java.lang.reflect.Method.invoke(

I am suing exactly same "extensionElements" in my bmpn.xml file

        <activiti:taskListener event="create" class="org.alfresco.repo.workflow.activiti.tasklistener.ScriptTaskListener">
            <activiti:field name="script">
                    var setWebFlagAction = actions.create("set-web-flag");
                    setWebFlagAction.parameters["active"] = true;
                    for (var i = 0; i &lt; bpm_package.children.length; i++) {
                        logger.log("Approving node:" + bpm_package.children.nodeRef);

and I am using from "action" tutorial.

If someone can suggest me cause AND/OR fix of this issue, I will be thankful.