Do you want to share approved details in web service? I believe if you configure approval using approval mapping or approval rule than once service request is created approval will be attached to the request.
Or you could have integration "submit" SRD so that all background actions, including approval, take place automatically.
1 of 1 people found this helpful
start by preparing SRD as if it was supposed to be submitted by living person. Once you've designed questions, actions, approvals, fulfillment process and mappings, and verified that everything works as planned, use it to create Service Request by your web service, but don't start by creating record in SRM:RequestInterface_Create. Instead, locate all necessary questions in SRM:QuestionSRD_DefChoices, then create one record for each question's response in SRD:MultipleQuestionResponse with new Service Request's ID (one way this can be obtained is service action on that form) and populate it using data received by your web service. Finally, create record in SRM:RequestInterface_Create with appropriate Login ID and Customer Login, matching Service Request ID (InstanceId) and Service Request Definition ID (TitleInstanceID), Source Keyword set to "From UI", and z1D Action set to "CREATE". This should start the same workflow which is used when SRD is submitted manually, including approvals defined in that SRD.
When creating responses, make sure to set all non-hidden responses to "No" or they won't be visible in SRS:RequestDetails because it shows only questions where that flag is defined (this part of qualification is added behind the scenes) and isn't set to "Yes".
Hi Sinisa Mikor
firstly : thank you for your amazing explanation
secondly : i am trying to implement the suggested scenario but stuck in the step :create responses inSRD:MultipleQuestionResponse with new Service Request's ID (one way this can be obtained is service action on that form) and populate it using data received by your web service
can you just clarify how to achieve this ? should i create a filter with service action on SRD:MultipleQuestionResponse form ?
i am not experienced in Service action and never used it before :/
3 of 3 people found this helpful
location of filter depends on how you realize web service; for example, you could create your own regular form which would serve as input buffer between AR server and web service (which could offer additional benefit of restricting consumer's access to just that form, if necessary) and associate that form to your filter, or allow web service to operate directly on SRM:RequestInterface_Create and insert your filter into its Submit (FL) workflow.
As to how it might look, to reserve Service Request's ID as mentioned before, you would use Service action in your filter to activate Service workflow on form named in Form Name -- in case of SRD:MultipleQuestionResponse, that boils down to triggering filter SRD:MQR:GenerateGuidSvc which expects 'z1D_TempFlag' = "GENERATE_GUID" so you'd have to define that as Input Mapping of Service action, and collect output value of $z1D_TemplFlag$ from Output Mapping (or you could avoid Service action altogether by getting the same result by invoking $PROCESS$ Application-Generate-GUID "SR" as it does).