Berto2002 Posted September 16, 2021 Share Posted September 16, 2021 What I thought would be a very simple operation has caused a failure. Can anyone help please? I have a node that I want to update an existing card but I get this error message: 2.550454s ERROR Execution Failed: Xmlmc method invocation failed for BPM invocation node 'stage-438aaf27/flowcode-dd35290c': <methodCallResult status="fail"> <state> <code>0207</code> <service>apps</service> <operation>updateCard</operation> <error>/apps/com.hornbill.core/flowcode/fc_modules/xmlmc.js(189): error X1001: Uncaught EspMethodCall::invoke: Operation[apps/com.hornbill.boardmanager/Card::updateCard] FlowCode Exception (com.hornbill.boardmanager/entities/Card/fc_ops/updateCard): nodeName: Update Card; nodeId: b9e6bd6a-057a-47e3-8b93-074bfdb84e2a; At 251/1: "Uncaught TypeError: Cannot read property 'record' of undefined" throw(e); _fc_node_exec_b9e6bd6a_057a_47e3_8b93_074bfdb84e2a</error> <flowcodeError> <where>Execute</where> <filename>/apps/com.hornbill.core/flowcode/fc_modules/xmlmc.js</filename> <lineNumber>189</lineNumber> <columnPos>20</columnPos> <message>Uncaught EspMethodCall::invoke: Operation[apps/com.hornbill.boardmanager/Card::updateCard] FlowCode Exception (com.hornbill.boardmanager/entities/Card/fc_ops/updateCard): nodeName: Update Card; nodeId: b9e6bd6a-057a-47e3-8b93-074bfdb84e2a; At 251/1: "Uncaught TypeError: Cannot read property 'record' of undefined" throw(e); _fc_node_exec_b9e6bd6a_057a_47e3_8b93_074bfdb84e2a</message> <errorCode>1001</errorCode> </flowcodeError> </state> </methodCallResult> This is the flow and route: In the Update Card node circled in yellow, I use this expression to get the CardID from the circled green node on the left: "&[global["flowcoderefs"]["getCardInformation"]["cardId"]]" I then use this expression in the Content to provide my updates on the Card; and they derive from the other green-circled node in the middle above: <span style="font-size: 11px">'''Summary:''' &[global["flowcoderefs"]["getReqInformationExpedited"]["summary"]]</span> <span style="font-size: 11px">'''Start:''' [&[global["flowcoderefs"]["getReqInformationExpedited"]["scheduledStartDate"]]]</span> <span style="font-size: 11px">'''End:''' [&[global["flowcoderefs"]["getReqInformationExpedited"]["scheduledEndDate"]]]</span> Link to comment Share on other sites More sharing options...
Steve Giller Posted September 16, 2021 Share Posted September 16, 2021 As we have a current Incident open for you, I took the liberty of taking a look. The screenshot you have provided matches the current draft version - the live Workflow that has errored is a different version number and none of the parameters appear to be set, which could explain the "undefined" in your error message. As a first step I'd save and republish the current draft version and test again. Link to comment Share on other sites More sharing options...
Berto2002 Posted September 16, 2021 Author Share Posted September 16, 2021 @Steve Giller. I have backed-out the version causing the issue so new CRs don't experience it. The circumstances I have described are occurring in the test copy of the BP and an example is BPM20210916000075. That is the same as v142 of the live (now backed-out) I made the offending change in v139 or 140 so have rolled back to the last known good release: Link to comment Share on other sites More sharing options...
Steve Giller Posted September 16, 2021 Share Posted September 16, 2021 Have you output the variables you're using to the Timeline to ensure they have values? Link to comment Share on other sites More sharing options...
Victor Posted September 20, 2021 Share Posted September 20, 2021 This was created under Service Manager section. For better visibility, this should have been raised in Board Manager (since we are discussing functionality for boards). We have moved this there now. Link to comment Share on other sites More sharing options...
Berto2002 Posted October 1, 2021 Author Share Posted October 1, 2021 Hi @Victor, @Steve Giller. I have got around to re-testing this and have now output the details the failing node is using to the TimeLine. The expressions in the failing node and the TimeLine update are: &[global["flowcoderefs"]["getCardInformation"]["cardId"]] <span style="font-size: 11px">'''Summary:''' &[global["flowcoderefs"]["getReqInformationExpedited"]["summary"]]</span> <span style="font-size: 11px">'''Start:''' [&[global["flowcoderefs"]["getReqInformationExpedited"]["scheduledStartDate"]]]</span> <span style="font-size: 11px">'''End:''' [&[global["flowcoderefs"]["getReqInformationExpedited"]["scheduledEndDate"]]]</span> The result arrives as the following with 770 being the CardID output: The two nodes leading up to this one work ok. Notably the one that moves the card in the lane works fine. The Update Card node fails regardless of whether I leave the CardID field as Auto (as the Move Card node does and works) or if I use the look-up to specify the CardID from a previous Get node. The log states: 2.034924s ERROR Execution Failed: Xmlmc method invocation failed for BPM invocation node 'stage-438aaf27/flowcode-dd35290c': <methodCallResult status="fail"> <state> <code>0207</code> <service>apps</service> <operation>updateCard</operation> <error>/apps/com.hornbill.core/flowcode/fc_modules/xmlmc.js(189): error X1001: Uncaught EspMethodCall::invoke: Operation[apps/com.hornbill.boardmanager/Card::updateCard] FlowCode Exception (com.hornbill.boardmanager/entities/Card/fc_ops/updateCard): nodeName: Update Card; nodeId: b9e6bd6a-057a-47e3-8b93-074bfdb84e2a; At 251/1: "Uncaught TypeError: Cannot read property 'record' of undefined" throw(e); _fc_node_exec_b9e6bd6a_057a_47e3_8b93_074bfdb84e2a</error> <flowcodeError> <where>Execute</where> <filename>/apps/com.hornbill.core/flowcode/fc_modules/xmlmc.js</filename> <lineNumber>189</lineNumber> <columnPos>20</columnPos> <message>Uncaught EspMethodCall::invoke: Operation[apps/com.hornbill.boardmanager/Card::updateCard] FlowCode Exception (com.hornbill.boardmanager/entities/Card/fc_ops/updateCard): nodeName: Update Card; nodeId: b9e6bd6a-057a-47e3-8b93-074bfdb84e2a; At 251/1: "Uncaught TypeError: Cannot read property 'record' of undefined" throw(e); _fc_node_exec_b9e6bd6a_057a_47e3_8b93_074bfdb84e2a</message> <errorCode>1001</errorCode> </flowcodeError> </state> </methodCallResult> I have reached the end of my ability to diagnose this issue without assistance. I hope you can help. Cheers, Berto Link to comment Share on other sites More sharing options...
Daniella R. Goral Posted October 1, 2021 Share Posted October 1, 2021 We have a similar issue, and would like to chime in on this separate post. It looks like you're already working in this area, which would hopefully help us come to resolution. Link to comment Share on other sites More sharing options...
Berto2002 Posted October 13, 2021 Author Share Posted October 13, 2021 Hi @Victor. Any thoughts on whether we have a defect here? I am looking to deploy my latest Change Management process to live in the next couple of weeks and would love to have the Update Card in place Link to comment Share on other sites More sharing options...
Victor Posted October 13, 2021 Share Posted October 13, 2021 @Berto2002 no idea... I can suggest raising a support request if you need this investigated in more detail... Link to comment Share on other sites More sharing options...
Victor Posted November 1, 2021 Share Posted November 1, 2021 @Berto2002 right, so the issue happens when you have an "Update Card" node that will set the same content on the card (title, content) that already exists on the card... so, for example, if the existing card on the board has the title as "This is a card title" and/or the content as "This is the card content" then an "Update Card" node that sets the same title and/or content will fail. If the "Update Card" node sets something along the lines on "This is a new card title" and/or "This is a new card content" then this will work without error... Looking at your workflow config I see it is possible to have an update card node that might try and set the same content (since is possible the variables used there have no new values since last update)... I am thinking perhaps add an additional text there, maybe the stage of the workflow? (seeing update card is present in different distinct stages)... I'll liaise with development to see how the same content update error can be handled (better)... Link to comment Share on other sites More sharing options...
Berto2002 Posted November 1, 2021 Author Share Posted November 1, 2021 Hi @Victor interesting to hear the diagnosis. My use-case is that this is a safety net so I am not expecting an update to the content because rarely do things change but the Change Manager may tweak the Summary or the Service or the Start and End Date/Time and we do not want the Change board showing the wrong information. Being able to update the card must not be dependent on unique content, I suggest; so I hope you get traction with development. Can you tell me; is the issue caused when the card as a whole doesn't have any new content (in any field) or that all fields to be updated need to have new values? In other words, could I simply put a (unique) Value, Colour, Status or Status Name while the Title and Content values may remain unchanged? Link to comment Share on other sites More sharing options...
Victor Posted November 1, 2021 Share Posted November 1, 2021 1 hour ago, Berto2002 said: In other words, could I simply put a (unique) Value, Colour, Status or Status Name while the Title and Content values may remain unchanged? ^ this, yes. EDIT: Basically the "new" update needs to bring something "different" than what exists on card already... title, content, colour, etc... Link to comment Share on other sites More sharing options...
Berto2002 Posted November 29, 2021 Author Share Posted November 29, 2021 Hi @Victor, at last I have tested this and now it is live in our flows. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now