<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://community.appian.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Modify a process variable being passed from external API and rerun the process</title><link>https://community.appian.com/discussions/f/process/27129/modify-a-process-variable-being-passed-from-external-api-and-rerun-the-process</link><description>Hi, 
 There is processmodel causing JDBC exception due to long data inputs for STATUS column 
 
 local! externalReq: &amp;quot;resourceName=Employee,employeeDetails=[empId=,empEmail:external@yahoo.in, status=married,married,married,married , age: 30], companyDetails</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Modify a process variable being passed from external API and rerun the process</title><link>https://community.appian.com/thread/106502?ContentTypeID=1</link><pubDate>Tue, 10 Jan 2023 18:30:50 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:6365a16c-f925-48df-a190-b963b1697777</guid><dc:creator>Praful Singhal</dc:creator><description>&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;= a!localVariables(
  local!body: a!fromJson(http!request.body),
  local!gender: if(
    index(local!body, &amp;quot;gender&amp;quot;, null) = &amp;quot;M&amp;quot;,
    &amp;quot;Male&amp;quot;,
    &amp;quot;Female&amp;quot;
  ),
  local!dictionary: a!update(local!body, &amp;quot;gender&amp;quot;, local!gender),
  a!httpResponse(
    headers: {
      a!httpHeader(
        name: &amp;quot;Content-Type&amp;quot;,
        value: &amp;quot;application/json&amp;quot;
      )
    },
    body: a!startProcess(
      processModel: cons!yourProcessmodel,
      processParameters: {
       
        requestJson: local!dictionary,
        
      },
      onSuccess: a!httpResponse(
        statusCode: 200,
        headers: rule!BCO_WEB_createJsonHeader(),
        body: a!toJson(
          {
            code: 0,
            message: &amp;quot;Success&amp;quot;,
            details: &amp;quot;The request has been accepted and is being processed&amp;quot;,
            referenceId: fv!processInfo.pp.id,
           /* messageId: local!messageId,
            correlationId: local!correlationId*/
          }
        )
      ),
      onError: rule!BCO_WEB_CreateJsonErrorResponse(
        httpStatusCode: 500,
        errors: {
          &amp;#39;type!{urn:com:appian:types:BCO_WEB}BCO_WEBErrorDetails&amp;#39;(
            message: &amp;quot;Technical Error&amp;quot;,
            origin_system: &amp;quot;Appian&amp;quot;,
            backend_system: &amp;quot;&amp;quot;,
            backend_code: &amp;quot;API-1002&amp;quot;,
            backend_message: &amp;quot;There was an error starting the process&amp;quot;
          )
        }
      )
    )
  )
)&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;In above mentioned code I have manipulated the gender before calling the process model this way you can manipulate any tag which is coming in the WEB APi. Hope this helps you&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>