Hi.
I have a case solution project with an attached internal process. I have mapped some process data to the case properties when i initially created the process and these mappings works fine. However i wanted to add another property to the case solution and map some process data to that new property. While the new property show up in the process, running the process results in an error as below. (Its a basic string to string value)
[11/27/23 9:12:54:420 CET] 00026c9e BPDEngineServ E CWLLG0371E: Failed to start Process: Perform Prolongation Restart Internal for Project: CML_Prolongation, SnapshotName: unnamed_snapshot, SnapshotId: TIP(Snapshot.deb0f383-77cc-4271-a26d-12aa6bf643a9). Error: com.lombardisoftware.core.TeamWorksDecoratingException: Runtime error in script ("Diagram: Perform Prolongation Restart Internal" 1:-1). TypeError: Cannot set property "value" of null to "test2" (<JSScript>#1)
Script (line 1):
<B> 1 : tw.local.caseProperties.prolongationProcessId.value = __teamworks_temp_variable_;</B>
[11/27/23 9:12:54:421 CET] 00026c9e ExternalClien E CWLLG2229E: An exception occurred in an EJB call. Error: [<268message:Runtime error in script ("Diagram: Perform Prolongation Restart Internal" 1:-1). TypeError: Cannot set property "value" of null to "test2" (<JSScript>#1)
Script (line 1):
<B> 1 : tw.local.caseProperties.prolongationProcessId.value = __teamworks_temp_variable_;</B>
><109flowObjectID:/25.a207605a-ef31-49b5-8e71-89d089dfa0e9//403b3095-3fd0-4b92-8381-f6f854eb92d1/Step (Retrieve data from case)>]
com.lombardisoftware.client.delegate.BusinessDelegateException: [<268message:Runtime error in script ("Diagram: Perform Prolongation Restart Internal" 1:-1). TypeError: Cannot set property "value" of null to "test2" (<JSScript>#1)
Script (line 1):
<B> 1 : tw.local.caseProperties.prolongationProcessId.value = __teamworks_temp_variable_;</B>
As you can see on the error it is unable to map the data and shows an error that i have not seen before.
However i found a way to get around this error by using:
tw.system.currentProcessInstance.parentCase.setCasePropertyValues(new tw.object.listOf.String(['CMLPR_prolongationProcessId']), new tw.object.listOf.String(["test2"]))
But still seems odd that adding new case properties does not work with a normal property mapping?
I have tested creating new case properties but still the same. I have tested to wait a day to see if it kicks in due to some delay but still the same. I have tested to create new snapshot of the case solution.
So if anyone has any insight to what could cause this problem please share.
------------------------------
Christian Lejon
------------------------------