I need to be a proxy taking Positions from Soap A, store them and send them to Soap B.
1. Project/Soap Interface A sends positions and events, I decode to GpsGate TrackPoint. OK
2. I log in the position and event (DeviceMapping Variable). OK.
3. I call the outgoind command which is part of Project/Soap B.
4. The command is executing and soap B responds. OK.
5. Now I don't know in Soap A if the sending was successfull or not as the command will always run in a timeout and always seems to fail (which is not the case!). NOT OK..
So 4/5 working and the last step is missing please help!
Questions in short:
1. How can I set the state (NOT! custum-state) of a command from inside the command?
2. How to set a listener when starting the command in Soap A to be called when command finishes?
State starts with "pending" as long as the command is executing.
The command uses a soap method and a http Sender and receives an success/error code.
If the code describes an error I want to set the command to "permanent failure", if the code is a success, the command should go to "finished".
I've tried to set custom state but it seems the gate will not understand it and will run into a timeout thus set the command to "permanent failure" even if it finished successfull.
I realize that this is a bit confusing with two soaps but I had a very similar problem with a device which had a chat function that would send a longer text in 1 to 8 parts and had an ack for each part.
I tried to write a multi-step command (with a dynamic stepMax). It did all work and did send correctly the x+1 part after ack for part x has come. But at the very end it would not know that the command had finished all parts and thus a timeout occurred. Then the chat plugin from gpsgate deleted the whole chat from the db as it thought the command had failed
I tried many things:
- set stepMax on command start, count up stepCurrent after each step
- override ChangeStatusForPending to return DeliveryStatus.Delivered if stepMax==stepCurrent, no success
- after last step call base.UpdateProgress(base.StepMax, base.StepMax, "Chat finished successfully", "Delivered") didn't help eather
- for this command I tried to set it to delivered from the protocol using the QueueManager but that didn't work out
With this project I had to revert to send all the parts after another without waiting for the ack thus making it a 1 step command not multi-step. All because after all had finished successfully the gate would not know it and act as if the command had failed
Please help to make the gate know that the command has finished with error or successfully.