====== WorkFlow для запуска WebService====== ===== Импорт WSDL ===== Для начала понадобиться произвести [[integration:importwsdl|Импорт WSDL]]\\ ===== Разработка WorkFlow ===== После проделанного нужно создать новый WorkFlow в моем варианте название 'AL Get Refinance Propositions WF' и пример на картинке\\ {{:integration:wf_proccess01.jpg?1000|}} ==== Proccess Properties ==== ^Name^In/Out((могут быть In/Out In или Out и None))^Data Type^Default String/Date/Number^Описание^ | RequestProp | In | Integration Object | Объект (структура) который в процессе выполнения WF мы будем наполнять данными для дальнейшего вызова Web Service| | ResponseProp | Out | Integration Object | Объект (структура) который по результату выполнения WF будет заполнен данными | | pApplicationType| In | String | Дополнительные переменные которые можно передать на вход в WF для использования | ==== Create Request ==== Первый и самый главный пункт.\\ В результате его выполнения мы получаем пустую но правильную структуру необходимую для вызова WebService\\ Добавляем в WF новый элемент 'Business Service' из Workflow Designer в Property указываем ^Property Name ^ Proprty Value^ | Business Service Name | [[bs:prn_ani_utility_service|]] | | Business Service Method| CreateEmptyPropSet | | Name | Create Request | === Input Arguments=== ^ Sequence ^ Input Argument ^ Type ^ Value ^ | 0 | Hierarchy Name | Literal | getRefinancePropositions((Сюда мы указываем название интеграционного объекта который был создан в процессе [[integration:importwsdl|Импорт WSDL]] )) | === Output Arguments=== ^Property Name^ Sequence^Type^Outout Argument^ | RequestProp | 1 | Output Argument | SiebelMessage ==== Set Application Type ==== Следующий пункт это добавление значений в структуру для дальнейшего вызова\\ Добавляем в WF новый элемент 'Business Service' из Workflow Designer в Property указываем ^Property Name ^ Proprty Value^ | Business Service Name | [[bs:prn_ani_utility_service|]] | | Business Service Method| SetProperty| | Name | Set Application Type | === Input Arguments=== ^ Sequence ^ Input Argument ^ Type ^ Value ^ Property Name ^ | 0 | Hierarchy Path: | Literal | getRefinancePropositions | | | 1 | SiebelMessage | Process Property| | RequestProp | | 2 | Property Name | Literal | applicationType | | | 3 | Property Value | Process Property | | pApplicationType | === Output Arguments=== ^Property Name^ Sequence^Type^Outout Argument^ | RequestProp | 1 | Output Argument | SiebelMessage ==== External Call WevService ==== Следующий пункт это вызов сервиса \\ Добавляем в WF новый элемент 'Business Service' из Workflow Designer в Property указываем ^Property Name ^ Proprty Value^ | Business Service Name | getRefinancePropositions | | Business Service Method| VerificationPTPortType | | Name | Externall Call WebService | === Input Arguments=== ^ Sequence ^ Input Argument ^ Type ^ Value ^ Property Name ^ | 0 | getRefinancePropositionsRequest:parameters | Process Property | RequestProp | | === Output Arguments=== ^Property Name^ Sequence^Type^Outout Argument^ | ResponseProp | 1 | Output Argument | getRefinancePropositionsResponse:parameters ===== Вызов ===== var ws = TheApplication().GetService("Workflow Process Manager"); var wsInput = TheApplication().NewPropertySet(); var wsOutput = TheApplication().NewPropertySet(); wsInput.SetProperty("ProcessName", "AL Get Refinance Propositions WF"); wsInput.SetProperty("pApplicationType", "CCREFINANCE") try { ws.InvokeMethod("RunProcess", wsInput, wsOutput); pOutputs.SetProperty("ratePercent", ToNumber(wsOutput.GetChild(0).GetChild(0).GetChild(0).GetChild(0).GetChild(0).GetProperty("ratePercent"))); pOutputs.SetProperty("maxLoanTerm", ToNumber(wsOutput.GetChild(0).GetChild(0).GetChild(0).GetChild(0).GetChild(0).GetProperty("maxLoanTerm"))); } catch (e) { TheApplication().RaiseErrorText("Нет данных реструктуризации. "+e.errText); }