Skill based routing eaxmple not working

Hi All,

https://github.com/camunda/camunda-consulting/tree/master/showcases/en/skill-based-routing
I followed the above link and deployed skill based routing in my camunda server, but when I try to
start the “Hanlde claim simulation process” in firefox it just keeps on loading and the form never comes up. When i try to open the same instance in chrome i get the below error message.

Start Process

Form Failure: Origin is not allowed by Acess-Control-Allow-Origin

I do not have jde server deployed in my machine. I did rename
build.properties.example to build.properties and kept in same folder
D:\camunda-consulting\showcases\skill-based-routing.

build.properties file values

I tried searching the same issue over net but of no help. Can anyone please help me resolve this issue.

Regards

Hi,

do you see any errors in the application server log on deploying the war or starting the process? Which Camunda version and application server are you using?

Cheers,
Sebastian

Hi Sebastian,

Thank you for your reply.

I am using Apache Tomcat server with Camunda 7.4.0.
When I start the application I see this error message for the Skill based routing Application.


05-Apr-2016 16:10:03.430 INFO [localhost-startStop-1] org.camunda.commons.logging.BaseLogger.logInfo ENGINE-08024 Found processes.xml file at file:/D:/software/Camunda/camunda-bpm-tomcat-7.4.0/server/apache-tomcat-8.0.24/webapps/skill-based-routing/WEB-INF/classes/META-INF/processes.xml
05-Apr-2016 16:10:03.600 INFO [localhost-startStop-1] org.camunda.commons.logging.BaseLogger.logInfo ENGINE-08023 Deployment summary for process archive 'skill-based-routing':

        handleClaimSimulation.bpmn
        determineSkills.dmn
        scoreEmployee.dmn
        determineEmployee.bpmn

[Employee [name=john, experience=Experienced, region=10xxx, claimsAssigned=5, score=10], Employee [name=mary, experience=Senior, region=22xxx, claimsAssigned=2, score=10], Employee [name=peter, experience=Junior, region=10xxx, claimsAssigned=7, score=-15]]
SELECTED EMPLOYEE: undefined
05-Apr-2016 16:10:05.751 SEVERE [localhost-startStop-1] org.camunda.commons.logging.BaseLogger.logError ENGINE-16006 BPMN Stack Trace:
        ScriptTask_11ijplt (activity-execute, ProcessInstance[c2116744-fb1a-11e5-871e-8086f27b8b3e], pa=skill-based-routing)
        ScriptTask_11ijplt
          ^
          |
        BusinessRuleTask_1edm8id#multiInstanceBody
          ^
          |
        BusinessRuleTask_1edm8id
          ^
          |
        BusinessRuleTask_1edm8id#multiInstanceBody
          ^
          |
        ServiceTask_0dg3ssk
          ^
          |
        BusinessRuleTask_0uk4ef1
          ^
          |
        StartEvent_1

05-Apr-2016 16:10:05.761 SEVERE [localhost-startStop-1] org.camunda.commons.logging.BaseLogger.logError ENGINE-16004 Exception while closing command context: Unable to evaluate script: sun.org.mozilla.javascript.internal.EcmaError: TypeError: Cannot read property "name" from undefined (<Unknown source>#22) in <Unknown source> at line number 22
 org.camunda.bpm.engine.ScriptEvaluationException: Unable to evaluate script: sun.org.mozilla.javascript.internal.EcmaError: TypeError: Cannot read property "name" from undefined (<Unknown source>#22) in <Unknown source> at line number 22
        at org.camunda.bpm.engine.impl.scripting.SourceExecutableScript.evaluateScript(SourceExecutableScript.java:119)
        at org.camunda.bpm.engine.impl.scripting.SourceExecutableScript.evaluate(SourceExecutableScript.java:60)
        at org.camunda.bpm.engine.impl.scripting.ExecutableScript.execute(ExecutableScript.java:56)
        at org.camunda.bpm.engine.impl.scripting.env.ScriptingEnvironment.execute(ScriptingEnvironment.java:97)
        at org.camunda.bpm.engine.impl.scripting.env.ScriptingEnvironment.execute(ScriptingEnvironment.java:83)
        at org.camunda.bpm.engine.impl.delegate.ScriptInvocation.invoke(ScriptInvocation.java:40)
        at org.camunda.bpm.engine.impl.delegate.DelegateInvocation.proceed(DelegateInvocation.java:54)
        at org.camunda.bpm.engine.impl.delegate.DefaultDelegateInterceptor.handleInvocationInContext(DefaultDelegateInterceptor.java:86)
        at org.camunda.bpm.engine.impl.delegate.DefaultDelegateInterceptor.handleInvocation(DefaultDelegateInterceptor.java:58)
        at org.camunda.bpm.engine.impl.bpmn.behavior.ScriptTaskActivityBehavior$1.call(ScriptTaskActivityBehavior.java:50)
        at org.camunda.bpm.engine.impl.bpmn.behavior.ScriptTaskActivityBehavior$1.call(ScriptTaskActivityBehavior.java:46)
        at org.camunda.bpm.engine.impl.bpmn.behavior.AbstractBpmnActivityBehavior.executeWithErrorPropagation(AbstractBpmnActivityBehavior.java:105)
        at org.camunda.bpm.engine.impl.bpmn.behavior.ScriptTaskActivityBehavior.execute(ScriptTaskActivityBehavior.java:46)
        at org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationActivityExecute.execute(PvmAtomicOperationActivityExecute.java:41)
        at org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationActivityExecute.execute(PvmAtomicOperationActivityExecute.java:26)
        at org.camunda.bpm.engine.impl.interceptor.AtomicOperationInvocation.execute(AtomicOperationInvocation.java:81)
        at org.camunda.bpm.engine.impl.interceptor.CommandContext.invokeNext(CommandContext.java:180)
        at org.camunda.bpm.engine.impl.interceptor.CommandContext.performNext(CommandContext.java:159)
        at org.camunda.bpm.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:134)
        at org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:494)
        at org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:471)
        at org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationTransitionNotifyListenerStart.eventNotificationsCompleted(PvmAtomicOperationTransitionNotifyListenerStart.java:56)
        at org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationTransitionNotifyListenerStart.eventNotificationsCompleted(PvmAtomicOperationTransitionNotifyListenerStart.java:26)
        at org.camunda.bpm.engine.impl.core.operation.AbstractEventAtomicOperation.execute(AbstractEventAtomicOperation.java:65)
        at org.camunda.bpm.engine.impl.interceptor.AtomicOperationInvocation.execute(AtomicOperationInvocation.java:81)
        at org.camunda.bpm.engine.impl.interceptor.CommandContext.invokeNext(CommandContext.java:180)
        at org.camunda.bpm.engine.impl.interceptor.CommandContext.performNext(CommandContext.java:159)
        at org.camunda.bpm.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:134)
        at org.camunda.bpm.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:124)
        at org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:505)
        at org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:480)
        at org.camunda.bpm.engine.impl.core.operation.AbstractEventAtomicOperation.execute(AbstractEventAtomicOperation.java:58)
        at org.camunda.bpm.engine.impl.interceptor.AtomicOperationInvocation.execute(AtomicOperationInvocation.java:81)
        at org.camunda.bpm.engine.impl.interceptor.CommandContext.invokeNext(CommandContext.java:180)
        at org.camunda.bpm.engine.impl.interceptor.CommandContext.performNext(CommandContext.java:159)
        at org.camunda.bpm.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:134)
        at org.camunda.bpm.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:124)
        at org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:505)
        at org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:480)
        at org.camunda.bpm.engine.impl.core.operation.AbstractEventAtomicOperation.execute(AbstractEventAtomicOperation.java:58)
        at org.camunda.bpm.engine.impl.interceptor.AtomicOperationInvocation.execute(AtomicOperationInvocation.java:81)
        at org.camunda.bpm.engine.impl.interceptor.CommandContext.invokeNext(CommandContext.java:180)
        at org.camunda.bpm.engine.impl.interceptor.CommandContext.performNext(CommandContext.java:159)
        at org.camunda.bpm.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:134)
        at org.camunda.bpm.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:124)
        at org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:505)
        at org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:480)
        at org.camunda.bpm.engine.impl.core.operation.AbstractEventAtomicOperation.execute(AbstractEventAtomicOperation.java:58)
        at org.camunda.bpm.engine.impl.interceptor.AtomicOperationInvocation.execute(AtomicOperationInvocation.java:81)
        at org.camunda.bpm.engine.impl.interceptor.CommandContext.invokeNext(CommandContext.java:180)
        at org.camunda.bpm.engine.impl.interceptor.CommandContext.performNext(CommandContext.java:159)
        at org.camunda.bpm.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:134)
        at org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:494)
        at org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:471)
        at org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationTransitionCreateScope.scopeCreated(PvmAtomicOperationTransitionCreateScope.java:34)
        at org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationCreateScope.execute(PvmAtomicOperationCreateScope.java:49)
        at org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationCreateScope.execute(PvmAtomicOperationCreateScope.java:23)
        at org.camunda.bpm.engine.impl.interceptor.AtomicOperationInvocation.execute(AtomicOperationInvocation.java:81)
        at org.camunda.bpm.engine.impl.interceptor.CommandContext.invokeNext(CommandContext.java:180)
        at org.camunda.bpm.engine.impl.interceptor.CommandContext.performNext(CommandContext.java:167)
        at org.camunda.bpm.engine.impl.interceptor.CommandContext$1.call(CommandContext.java:150)
        at org.camunda.bpm.engine.impl.interceptor.CommandContext$1.call(CommandContext.java:148)
        at org.camunda.bpm.engine.impl.context.ProcessApplicationClassloaderInterceptor.call(ProcessApplicationClassloaderInterceptor.java:44)
        at org.camunda.bpm.application.AbstractProcessApplication.execute(AbstractProcessApplication.java:109)
        at org.camunda.bpm.engine.impl.context.Context.executeWithinProcessApplication(Context.java:186)
        at org.camunda.bpm.engine.impl.interceptor.CommandContext.performNext(CommandContext.java:148)
        at org.camunda.bpm.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:134)
        at org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:494)
        at org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:471)
        at org.camunda.bpm.engine.impl.pvm.runtime.PvmExecutionImpl.start(PvmExecutionImpl.java:229)
        at org.camunda.bpm.engine.impl.cmd.StartProcessInstanceCmd.execute(StartProcessInstanceCmd.java:75)
        at org.camunda.bpm.engine.impl.cmd.StartProcessInstanceCmd.execute(StartProcessInstanceCmd.java:35)
        at org.camunda.bpm.engine.impl.interceptor.CommandExecutorImpl.execute(CommandExecutorImpl.java:24)
        at org.camunda.bpm.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:95)
        at org.camunda.bpm.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:30)
        at org.camunda.bpm.engine.impl.RuntimeServiceImpl.startProcessInstanceByKey(RuntimeServiceImpl.java:78)
        at com.camunda.demo.dmntraining.taskrouting.CamundaBpmProcessApplication.onDeploymentFinished(CamundaBpmProcessApplication.java:25)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at org.camunda.bpm.container.impl.deployment.PostDeployInvocationStep.performOperationStep(PostDeployInvocationStep.java:64)
        at org.camunda.bpm.container.impl.spi.DeploymentOperation.execute(DeploymentOperation.java:114)
        at org.camunda.bpm.container.impl.jmx.MBeanServiceContainer.executeDeploymentOperation(MBeanServiceContainer.java:156)
        at org.camunda.bpm.container.impl.spi.DeploymentOperation$DeploymentOperationBuilder.execute(DeploymentOperation.java:203)
        at org.camunda.bpm.container.impl.RuntimeContainerDelegateImpl.deployProcessApplication(RuntimeContainerDelegateImpl.java:88)
        at org.camunda.bpm.application.AbstractProcessApplication.deploy(AbstractProcessApplication.java:58)
        at org.camunda.bpm.application.impl.ServletProcessApplication.contextInitialized(ServletProcessApplication.java:131)
        at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4727)
        at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5167)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
        at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:725)
        at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:701)
        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:717)
        at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:945)
        at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1768)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
        at java.util.concurrent.FutureTask.run(FutureTask.java:262)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        at java.lang.Thread.run(Thread.java:745)
Caused by: javax.script.ScriptException: sun.org.mozilla.javascript.internal.EcmaError: TypeError: Cannot read property "name" from undefined (<Unknown source>#22) in <Unknown source> at line number 22
        at com.sun.script.javascript.RhinoScriptEngine.eval(RhinoScriptEngine.java:224)
        at com.sun.script.javascript.RhinoScriptEngine.eval(RhinoScriptEngine.java:240)
        at javax.script.AbstractScriptEngine.eval(AbstractScriptEngine.java:233)
        at org.camunda.bpm.engine.impl.scripting.SourceExecutableScript.evaluateScript(SourceExecutableScript.java:114)
        ... 100 more
Caused by: sun.org.mozilla.javascript.internal.EcmaError: TypeError: Cannot read property "name" from undefined (<Unknown source>#22)
        at sun.org.mozilla.javascript.internal.ScriptRuntime.constructError(ScriptRuntime.java:3770)
        at sun.org.mozilla.javascript.internal.ScriptRuntime.constructError(ScriptRuntime.java:3748)
        at sun.org.mozilla.javascript.internal.ScriptRuntime.typeError(ScriptRuntime.java:3776)
        at sun.org.mozilla.javascript.internal.ScriptRuntime.typeError2(ScriptRuntime.java:3795)
        at sun.org.mozilla.javascript.internal.ScriptRuntime.undefReadError(ScriptRuntime.java:3808)
        at sun.org.mozilla.javascript.internal.ScriptRuntime.getObjectProp(ScriptRuntime.java:1487)
        at sun.org.mozilla.javascript.internal.Interpreter.interpretLoop(Interpreter.java:1403)
        at sun.org.mozilla.javascript.internal.Interpreter.interpret(Interpreter.java:849)
        at sun.org.mozilla.javascript.internal.InterpretedFunction.call(InterpretedFunction.java:162)
        at sun.org.mozilla.javascript.internal.ContextFactory.doTopCall(ContextFactory.java:430)
        at com.sun.script.javascript.RhinoScriptEngine$1.superDoTopCall(RhinoScriptEngine.java:116)
        at com.sun.script.javascript.RhinoScriptEngine$1.doTopCall(RhinoScriptEngine.java:109)
        at sun.org.mozilla.javascript.internal.ScriptRuntime.doTopCall(ScriptRuntime.java:3160)
        at sun.org.mozilla.javascript.internal.InterpretedFunction.exec(InterpretedFunction.java:173)
        at sun.org.mozilla.javascript.internal.Context.evaluateReader(Context.java:1169)
        at com.sun.script.javascript.RhinoScriptEngine.eval(RhinoScriptEngine.java:214)
        ... 103 more

05-Apr-2016 16:10:06.131 SEVERE [localhost-startStop-1] org.apache.catalina.core.StandardContext.startInternal One or more listeners failed to start. Full details will be found in the appropriate container log file
05-Apr-2016 16:10:06.131 SEVERE [localhost-startStop-1] org.apache.catalina.core.StandardContext.startInternal Context [/skill-based-routing] startup failed due to previous errors
05-Apr-2016 16:10:06.131 WARNING [localhost-startStop-1] org.camunda.commons.logging.BaseLogger.logWarn ENGINE-07017 Calling undeploy() on process application that is not deployed.

Regards
Ashwin

Hi,

I can reproduce this problem with Java 7. I seems that the example requires Java 8. Can you test if this solves the problem also for you?

Cheers,
Sebastian

Hi,

I had a look at the example and created a pull request to make it also work with Java 6 and 7. If you don’t have Java 8 you could use this branch as long as it is not merged.

Cheers,
Sebastian

Hi Menski,

My Bad. Forgot to reply you. Thank you it works with Java 8.
Thank you for adding the note in the branch about using java 8. This will help others also.

Regards
Ashwin

Hi,

as my pull request got merged it should now also work with Java 6 and 7.

Cheers,
Sebastian