Jump to content

Error simply updating an Existing Card; am I missing something?


Berto2002
 Share

Recommended Posts

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: &quot;Uncaught TypeError: Cannot read property &apos;record&apos; of undefined&quot; 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: &quot;Uncaught TypeError: Cannot read property &apos;record&apos; of undefined&quot; throw(e); _fc_node_exec_b9e6bd6a_057a_47e3_8b93_074bfdb84e2a</message> <errorCode>1001</errorCode> </flowcodeError> </state> </methodCallResult>

This is the flow and route:

image.thumb.png.62751de484101de0fbe16fd7e110757b.png

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>

image.thumb.png.a7e96a0d7b6e0ae4fde1c00f1167741a.png

Link to comment
Share on other sites

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

@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:

image.thumb.png.0491ab6617e6fbf02106a416078ccac9.png

Link to comment
Share on other sites

  • 2 weeks later...

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:

image.png.8320c5ed6ca3069b0db61719d9924d4b.png

The two nodes leading up to this one work ok. Notably the one that moves the card in the lane works fine.

image.png.8ce7d780d2ada5072ec04ce2c4bd1b5c.png

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: &quot;Uncaught TypeError: Cannot read property &apos;record&apos; of undefined&quot; 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: &quot;Uncaught TypeError: Cannot read property &apos;record&apos; of undefined&quot; 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

  • 2 weeks later...
  • 3 weeks later...

@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

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

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

  • 4 weeks later...

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...