AnsweredAssumed Answered

CA SDM - How to create a session in spel?

Question asked by Mario Gomes on Dec 14, 2017
Latest reply on Feb 6, 2018 by Daniel Becker Bighelini

Hi guys,

I am trying to execute an insert in a new table (Custom Table) when a ticket is closed (auto-close). This action is performed for an event and an action macro that calls a spel code, but it is displaying the following error:



spelsrvr 8200 ERROR bpserver.c 559 Session ID set to zero in ActiveSession for user cnt:793ED69B4E87A545BD8E911834D829FC

spelsrvr 8200 SIGNIFICANT z_CR_Life_Cycle_Trac 259 SPEL:xxxx - 'Error setting attr 'call_req' on object 'zCR_Lifecycle:401267' to value 'cr:1089132' Illegal use of session 0 by user cnt:793ED69B4E87A545BD8E911834D829FC cr:1089132'



When I run the same code other by auto-close, direct execution by the user interface, the code works perfectly. I believe the error is in executing the code automatically by the system, which does not have a session or uses session zero (session id).


Please, check below part of the spel code:


send_wait(0, top_object(), "call_attr", "api", "insert_object", super_user, "zCR_Lifecycle", NULL, 0, "call_req", zCR_Persid, "sequence", 1000, "delete_flag", 0, "type", "CL", "call_req_type", zCR_type);



1 - Does anyone know of any spel function to login / logout or create and end a session?

2 - What does zero session mean? How does it work? Can I change the privileges of this session?


Thanks for your help.


fabiano.ldomingues EricoDellaVallePrezzi76043714