title: How can I instantiate the `execution` object in a Camunda JavaScript service task?
body: <p>I see lots of JavaScript references and code snippets on the forum/documentation (<a href="https://forum.camunda.org/t/create-and-resolve-incidents-through-scripts-javascript-examples-internal-api/3728" rel="nofollow noreferrer">like this one</a>) where the <code>execution</code> object is used for a range of useful things, such as:</p>
  
  <pre><code>execution.createIncident(String incidentType, String configuration);
  execution.resolveIncident(String incidentId);
  execution.setVariable("name", value);
  </code></pre>
  
  <p>However, nowhere have I seen an example of how to instantiate the <code>execution</code> object, and when I try to use it I get an error like this:</p>
  
  <pre><code>The process could not be started. :
  Cannot instantiate process definition Finswitch_Tx:14:42ef803b-67df-11e8-a127-0242ac11001b: Unable to 
  evaluate script: ReferenceError: "execution" is not defined in &lt;eval&gt; at line number 7
  </code></pre>
  
  <p>Please could you give me an example of how to instantiate access to that object?</p>