Discussion:
Calling a function in Pasive mode.
Add Reply
Antonio Astorga
2019-10-09 08:17:57 UTC
Reply
Permalink
Hello,

Im doing some implementations in TDI using several blocks presented in TDI. Im using LDAP Connectors, Webservices and more.
But i have problems in calling a Webservice function in Pasive mode.

To call a function in pasive mode Im doing this:

if (resultCod == "0"){
task.logmsg("Esto llega a CloseTotal ISIM")
ISIMCloseTotalAdd.getFunction().initialize(null);
ISIMCloseTotalAdd.getFunction().perform(work);
}
else
{
task.logmsg("Esto llega a Update ticket ISIM")
ISIMUpdateSM.getFunction().initialize(null);
ISIMUpdateSM.getFunction().perform(work);

We choose one or another depending the resultCod presente in our ejecution.

When i run the whole Assemblyline i get this error:

10:13:45,725 ERROR - [ISIMCloseSM] CTGDIS181E Error while evaluating Hook 'Function Successful' in the Component 'ISIMCloseSM' (ISIMCloseSM.functioncall_ok).
10:13:45,725 ERROR - [ISIMCloseSM] CTGDIS810E handleException - cannot handle exception , functioncall
10:13:45,725 ERROR - CTGDIS266E Error in NextConnectorOperation. Exception occurred: java.lang.Exception: CTGDIA208E The input operation message parameter was not found in the provided input entry. The required input parameter is: UpdateChangeISIMRequest
10:13:45,725 INFO - CTGDIS315I AssemblyLine worker thread: AssemblyLines/WebServiceServerRecuperado.AxisEasyWebServiceServerConnector.0 is stopped.


Does anyone knows whats happening?
Thank you very much!!
j***@gmail.com
2019-10-10 06:09:32 UTC
Reply
Permalink
To call the function, including the hooks and attribute mapping,
you should use callreply() instead.

E.g.
ISIMUpdateSM.callreply(work)

This will cause the input attribute mapping to used, and I guess
that is where you have defined how to create the input parameter
UpdateChangeISIMRequest. After the call, work will also
have the attributes as mapped out by the output attribute mapping.

It is probably not necessary to initialize for every call, but if you really
want to do that, change the Initialize option, which you find
when you press the "More..." button in the configuration panel,
to "Initialize and terminate every time it is used".
Antonio Astorga
2019-10-10 09:57:07 UTC
Reply
Permalink
Hello!!!
Thank you very much for your answer.
I tried and to use the callReply(work) but still Im having problems.

I dont understand why this Webservice Works when is Enabled, and why is not working when is in Passive Mode.

I did like like this:

if (resultCod == "0"){
task.logmsg("Esto llega a CloseTotal ISIM")
ISIMCloseTotalAdd.getFunction().initialize(null);
ISIMCloseTotalAdd.callreply(work);

}
else
{
task.logmsg("Esto llega a Update ticket ISIM")
ISIMUpdateSM.getFunction().initialize(null);
ISIMUpdateSM.callreply(work);

}

I did the changues to initialize and terminate every time I used the Function.

And i get the next error:

11:50:32,878 ERROR - CTGDIS183E Error while mapping attribute 'UpdateChangueISIM' in the Output Attribute Map of Component 'ISIMUpdateSM' (ISIMUpdateSM.Output.UpdateChangueISIM).
java.lang.Exception: 'wsUpdateTotal' not found
at com.ibm.di.script.ScriptEngine.unWrap(ScriptEngine.java:977)
at com.ibm.di.script.ScriptEngine.interpret(ScriptEngine.java:942)
at com.ibm.di.script.ScriptEngine.interpret(ScriptEngine.java:925)
at com.ibm.di.server.AttributeMapping$SingleAttributeMap.eval(AttributeMapping.java:723)
at com.ibm.di.server.AttributeMapping.mapAttribute(AttributeMapping.java:279)
at com.ibm.di.server.AttributeMapping.mapEntry(AttributeMapping.java:504)
at com.ibm.di.server.AttributeMapping.mapEntry(AttributeMapping.java:355)
at com.ibm.di.server.FunctionComponent.callreply(FunctionComponent.java:297)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60

Do you know whats happening?
Thank you for your help!!
j***@gmail.com
2019-10-10 10:48:16 UTC
Reply
Permalink
Post by Antonio Astorga
11:50:32,878 ERROR - CTGDIS183E Error while mapping attribute 'UpdateChangueISIM' in the Output Attribute Map of Component 'ISIMUpdateSM' (ISIMUpdateSM.Output.UpdateChangueISIM).
java.lang.Exception: 'wsUpdateTotal' not found
This means that in 'ISIMUpdateSM', in the Output attribute map,
you try to map the attribute 'UpdateChangueISIM'.
The Javascript code you have written to do so, refers to a variable
'wsUpdateTotal'. This variable can not be found.

Maybe your code looks like this
return wsUpdateTotal
but you actually meant to do this
return work.wsUpdateTotal

I am only guessing, maybe your code looks completely different,
and you may also have meant to do something different from my guess.
Loading...