Subscription State is not updating quickly enough after modification by using MODIFY_SUBSCRIPTION function

  • KM01441084
  • 16-Mar-2015
  • 16-Mar-2015

Summary

Subscription State is not updating quickly enough. If we want to extract its current status right after modification by using MODIFY_SUBSCRIPTION function, we should use the following approach to get the state.

Question

Subscription State is not updating quickly enough. If we want to extract the status of subscription after using MODIFY_SUBSCRIPTION function, please refer to the following method. 

A use case would be as follows:

We have to rename and change group ownership and to achieve that we have implemented a flow, which is waiting until the subscription status becomes ACTIVE and then executing the rename subscription.
And then we get the error that the state of the subscription is not in ACTIVE/MODIFICATION_FAILED and therefore the modify subscription action is not allowed. But the OO run report retrieves the status as ACTIVE.

Answer

The real reason, is that the Subscription State is not updating enough quickly.
If we need abstract state of the subscription we have to use the service instance state checking instead of subscription state.

Here is the solution:

Please replace the call getSubscription detail with the following REST API

GET /csa/rest/artifact/?userIdentifier=&scope=base&detail=basic

And you will get a response payload similar to the one below

Extract the serviceInstance State by parsing the xpath serviceInstance/serviceInstanceState/name

1.
2.
3. 90cec0644c0cbb8a014c11c9b02e0714
4. 90cec0644c0cbb8a014c11c9b02e0714
5. 2015-03-12T23:19:32.783-07:00
6. 2015-03-12T23:19:51.730-07:00
7. false
8.
9.
10.
11.
12. /csa/images/library/Service_Design.png
13. f6724d99-10a2-42df-8ea5-4aeffd7ce178
14. Nivedita Test
15.
16. 90d96588360da0c701360da0ef470038
17. 90d96588360da0c701360da0ef470038
18. 2015-03-11T23:26:08.193-07:00
19. true
20. Active
21. /csa/images/categories/artifact_state/active.png
22. ACTIVE
23. Active
24. false
25.
26. 90d96588360da0c701360da0ef420037
27. 90d96588360da0c701360da0ef420037
28. true
29. Artifact State
30. ARTIFACT_STATE
31. Artifact State
32. false
33.
34.
35.
36. 90d96588360da0c701360da0eec50019
37. 90d96588360da0c701360da0eec50019
38. 2015-03-11T23:26:08.350-07:00
39. true
40. Service Instance
41. /csa/images/categories/artifact_type/service_instance.png
42. SERVICE_INSTANCE
43. Service Instance
44. false
45.
46. 90d96588360da0c701360da0eeb40017
47. 90d96588360da0c701360da0eeb40017
48. true
49. Artifact Type
50. ARTIFACT_TYPE
51. Artifact Type
52. false
53.
54.
55. false
56.
57. 90d96588360da0c701360da0f01b0067
58. 90d96588360da0c701360da0f01b0067
59. 2015-03-11T23:26:08.230-07:00
60. true
61. Active
62. /csa/images/categories/service_instance_state/active.png
63. ACTIVE
64. Active
65. false
66.
67. 90d96588360da0c701360da0f00d0063
68. 90d96588360da0c701360da0f00d0063
69. true
70. Service Instance State
71. SERVICE_INSTANCE_STATE
72. Service Instance State
73. false
74.
75.
76.
77. 90cec76e3fd3cff2013fd3d066e706bd
78. 90cec76e3fd3cff2013fd3d066e706bd
79. 2015-03-11T23:26:08.637-07:00
80. true
81. Sequence based designer experience
82.
83.
84. SEQUENCE_BASED
85. Sequence Based
86. false
87.
88. 90cec76e3fd3ce38013fd3cea5bf081a
89. 90cec76e3fd3ce38013fd3cea5bf081a
90. false
91. Service Designer Experience Type
92. SERVICE_DESIGNER_EXPER_TYPE
93. Service Designer Experience Type
94. true
95.
96.
97. 1.0
98.
Please also consider visiting the web-based version of this response at:
http://support.microfocus.com/kb/kmdoc.php?id=KM01441084