WorkFlow для запуска WebService
Импорт WSDL
Разработка WorkFlow
После проделанного нужно создать новый WorkFlow в моем варианте название 'AL Get Refinance Propositions WF' и пример на картинке
Proccess Properties
| Name | In/Out1) | 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 | PRM ANI Utility Service |
| Business Service Method | CreateEmptyPropSet |
| Name | Create Request |
| Sequence | Input Argument | Type | Value |
| 0 | Hierarchy Name | Literal | getRefinancePropositions2) |
Output Arguments
| Property Name | Sequence | Type | Outout Argument |
| RequestProp | 1 | Output Argument | |
Set Application Type
Следующий пункт это добавление значений в структуру для дальнейшего вызова
Добавляем в WF новый элемент 'Business Service' из Workflow Designer в Property указываем
| Property Name | Proprty Value |
| Business Service Name | PRM ANI Utility Service |
| Business Service Method | SetProperty |
| Name | Set Application Type |
| 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 | |
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 |
| 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 | |
Вызов
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);
}