Author |
Message
|
DirtyHowi |
Posted: Wed Dec 17, 2014 10:59 am Post subject: inputRoot["MRM][][].setvalue not working |
|
|
Novice
Joined: 17 Feb 2014 Posts: 22
|
i need to override the input root in a .net compute node for two fields that are in the tree based on decisions made in the compute node, the decision stuff works, but i cant override the inputroot values with .setvalue().
what is the best way to accomplish this? thats not esql. |
|
Back to top |
|
 |
mqjeff |
Posted: Wed Dec 17, 2014 11:02 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
Why are you trying to change InputRoot? It's not changeable for a reason.
If you need to change the message before it passes to a DecisionService node, you need to change the OutputRoot. |
|
Back to top |
|
 |
DirtyHowi |
Posted: Wed Dec 17, 2014 12:42 pm Post subject: |
|
|
Novice
Joined: 17 Feb 2014 Posts: 22
|
I tried that too, no bueno.
basically i need to set two fields on the output to values determined by other logic, simple strings, nothing complicated. then propagate that from the .net compute node to the remainder of the flow.
this should not be this difficult, its not in normal programming. set x=y if x==y do this...i have a xml tree in the form of an MRM, find the element i want, set the value of said element to a value (if needed) and propagate to out terminal of node.
outputmessage, inputmessage, outputroot, inputroot all have the same issue, object not set to an instance of an object. but i can tear them apart all day long and transfer the values that way to strings, ints, doubles, whatever i want. but i cant replace the element (of string) with another value (of string)??? |
|
Back to top |
|
 |
mqjeff |
Posted: Wed Dec 17, 2014 12:55 pm Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
|
Back to top |
|
 |
DirtyHowi |
Posted: Wed Dec 17, 2014 12:58 pm Post subject: |
|
|
Novice
Joined: 17 Feb 2014 Posts: 22
|
no choice. its coming from COBOL. old school cobol at that. |
|
Back to top |
|
 |
mqjeff |
Posted: Wed Dec 17, 2014 1:04 pm Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
DirtyHowi wrote: |
no choice. its coming from COBOL. old school cobol at that. |
If it's coming from COBOL, you should be using DFDL.
If it's *XML* data, from *anywhere*, you should be using XMLNSC.
None of this has anything to do with difficulties setting fields in the message tree. |
|
Back to top |
|
 |
Vitor |
Posted: Wed Dec 17, 2014 1:19 pm Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
DirtyHowi wrote: |
no choice. its coming from COBOL. old school cobol at that. |
DFDL does COBOL just fine. I'm a witness. Even OS-COBOL. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
Vitor |
Posted: Wed Dec 17, 2014 1:22 pm Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
DirtyHowi wrote: |
I tried that too, no bueno. |
I don't think that's an error message, even in the Spanish language version.
DirtyHowi wrote: |
but i cant replace the element (of string) with another value (of string)??? |
Yes you can. What does the user trace (not the debugger) show to be happening when the assignment is executed? Or what is the actual BIP error thrown? _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
DirtyHowi |
Posted: Thu Dec 18, 2014 7:41 am Post subject: |
|
|
Novice
Joined: 17 Feb 2014 Posts: 22
|
i'm debugging this in the .net compute node where the assignment is taking (supposedly) place. It is saying object not set to instance of object, the famous last bastion of microsoft.
if i have to recast the incoming message to DFDL i think i have an example of that somwhere.
I didnt write the original flow for this, i'm just adding a intercept for a message type from a particular set of distributors to check to see if they have gotten payment for items we are drop shipping for them. So i'm not real well versed in how this whole thing works in the first place.
it works fine if its not a vendor, mainly because i just copy the input to the output and send it along. its only when i want to change two fields of the input that i run in to trouble.
the incoming queue is set to MRM/Binary1 with the cobol copy book as its pattern. |
|
Back to top |
|
 |
mqjeff |
Posted: Thu Dec 18, 2014 7:57 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
You wouldn't "cast" the message as a DFDL message.
You would re-import the Cobol copybook as a DFDL message definition, and then change the input node to use that instead of the MRM binary.
But again, that's really irrelevant to your problem using .NET.
Did you review the code in the redbook I mentioned?
Can you show your actual code, rather than just something like "setValue". |
|
Back to top |
|
 |
DirtyHowi |
Posted: Thu Dec 18, 2014 8:02 am Post subject: |
|
|
Novice
Joined: 17 Feb 2014 Posts: 22
|
|
Back to top |
|
 |
|