# Reference Process Application Provided Classes in Javascript

**URL:** <https://forum.camunda.io/t/reference-process-application-provided-classes-in-javascript/32583>\
**Category:** Discussion & Questions\
**Tags:** process-engine\
**Created:** [January 24, 2022, 10:29am UTC](https://forum.camunda.io/t/reference-process-application-provided-classes-in-javascript/32583 "2022-01-24T10:29:04Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![SlappyAUS](https://forum.camunda.io/user_avatar/forum.camunda.io/slappyaus/32/16394_2.png) [@SlappyAUS](https://forum.camunda.io/u/SlappyAUS)\
**Post date:** [January 24, 2022, 10:29am UTC](https://forum.camunda.io/t/reference-process-application-provided-classes-in-javascript/32583/1 "2022-01-24T10:29:04Z")

</div>

I am attempting to reference a custom type that has several levels of nesting of complex types in a javascript listener. I notice there is a specific way to do this in groovy ref:

> **[Scripting | docs.camunda.org](https://docs.camunda.org/manual/7.16/user-guide/process-engine/scripting/#reference-process-application-provided-classes)**
>
> documentation of the Camunda Platform 7

But there is no documentation on the javascript equivalent

The error I get is this:

```auto
The process could not be started. :
Cannot instantiate process definition CustomerQuoteProcess:10:2a49b8f5-7cfc-11ec-b590-8e712f552304: Unable to evaluate script while executing activity 'dealershipContactInformation' in the process definition with id 'CustomerQuoteProcess:10:2a49b8f5-7cfc-11ec-b590-8e712f552304':org.graalvm.polyglot.PolyglotException: TypeError: writeMember (dealership) on za.co.flow.model.CustomerApplication.vehicleInformation failed due to: Message not supported.

```

This is the script:

```auto
var scriptApplication = customerApplication;
scriptApplication.vehicleInformation.dealership = dealershipInformation["dealershipName"];

scriptApplication.vehicleInformation.dealerTelephone = dealershipInformation["dealershipTelephone"];

scriptApplication.vehicleInformation.dealerEmail = dealershipInformation["dealershipEmail"];

customerApplication = scriptApplication

```

---

<div class="post-metadata">

**Author:** ![system](https://forum.camunda.io/uploads/default/original/3X/5/8/58d50142eacca605d35cb1ef9e6b86ae85f49436.png) [@system](https://forum.camunda.io/u/system)\
**Post date:** [January 30, 2024, 1:44pm UTC](https://forum.camunda.io/t/reference-process-application-provided-classes-in-javascript/32583/2 "2024-01-30T13:44:06Z")

</div>

Closed on January 30, 2024, 1:44pm UTC


