2
0

bgapirequest.sm 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. %start MainMap::Startup
  2. %class BgApiRequest
  3. %map MainMap
  4. %%
  5. Startup
  6. {
  7. CommandReply
  8. ApiResponseStarted
  9. {
  10. }
  11. }
  12. ApiResponseStarted
  13. {
  14. ReplyText
  15. GotReplyText
  16. {
  17. }
  18. }
  19. GotReplyText
  20. {
  21. BlankLine
  22. nil
  23. {
  24. }
  25. JobUuid
  26. Startup
  27. {
  28. setRequestFinished(); callOrErrback();
  29. }
  30. }
  31. Default
  32. {
  33. BlankLine
  34. nil
  35. {
  36. setRequestFinished();
  37. errbackDeferred("Protocol failure - was not expecting blank line"); }
  38. CommandReply
  39. nil
  40. {
  41. setRequestFinished();
  42. errbackDeferred("Protocol failure - was not expecting command reply");
  43. }
  44. ReplyText
  45. nil
  46. {
  47. setRequestFinished();
  48. errbackDeferred("Protocol failure - was not expecting reply text");
  49. }
  50. ProcessLine(line)
  51. nil
  52. {
  53. setRequestFinished();
  54. errbackDeferred("Protocol failure handling bgapi response - was not expecting line needing to be processed");
  55. }
  56. }
  57. %%