Script task holding onto old property.

Getting this error on a script task

An error occurred while evaluating expression: submission.statusId:AC!submission.statusId (Invalid index: Cannot index property 'statusId' of type Text into type MR_ARES_submission) (Data Outputs)

Thing is statusId is no longer a property on the submission cdt, I removed it. In fact it no longer shows up anywhere in the script task. But when I run the process the script task throws this error. It apparently has not completely refreshed.

Has anyone seen this before?



  Discussion posts and replies are publicly visible

  • Hi Dave, if you reference the CDT is input tab of the script task. I am wondering if that's not updated with your newer version of the CDT. If that input points to the current CDT this error should be removed.

  • 0
    A Score Level 2
    in reply to mohanp309

    Hi Mohan,

    The script task recognizes the new cdt because it presents me with the status object (CDT) instead of the statusId when I click on the submission CDT. Its just that when its executed it appears to be looking for the original submission cdt with the statusId property.

    If I create a new script task and add the submission cdt there, then everything will work just fine. Since the new script task never knew about the earlier version of the submission cdt it doesn't look for it at runtime. The annoying thing here is that I also have to set all the properties again on the input node.

    I've run into this before, just getting tired of having to do over an entire script task because I modified a property on one of the CDT's. 

  • 0
    A Score Level 2
    in reply to DaveMC

    I've also discovered that adding a new field to a CDT and then publishing it is not an issue for the script task. It's only when a field is deleted from a CDT that this issue arises. The script task appears to be caching the list of fields and updating it with new fields added to the CDT but is unable to update it's cache by removing fields no longer in the CDT.

  • Hi Dave,

    Do you have any lower or higher Appian environments to try this on except the one you are currently facing this issue?

    I have faced weird issues with Process Modeler on one of my Appian environments where the process model would not maintain the links between nodes if I directly dragged a node over an existing link. But it would maintain connections if I connected the nodes traditionally; one by one. So i used to re-connect all my affected nodes every single time. But the same process model would work fine on other environments.

    The point is see if you run into the same issue on other Appian environments as well. If not, then your environment is at fault here.