完成 DescribeObjects 编排
要完成 DescribeObjects 编排,将输出映射到输入数据,将对象元数据转换为 XML 格式以符合 ci-connector-api.xsd 文件的要求,然后测试编排。
过程
- 在 Studio 的“项目”工具箱选项卡中,单击 DescribeObjects 编排。 这样会在 Studio 工作空间中显示该编排。
- 在编排中,单击提供服务活动。 这样会显示“映射输出”面板。
- 在“映射输出”面板中,单击主体。 这样会显示“节点类型”窗口,其中显示输入数据。
- 如图 1 中所示,根据 object 和 operation_name 将逻辑添加到编排以获取对象元数据。 图 1. DescribeObjects
- 将对象元数据转换为 XML 格式以符合 Cast Iron CDK 模式文件中描述的 ci-connector-api.xsd 文件的要求。在将元数据转换为 XML 后,您的模式类似如下:
< DescribeObjectResponse baseType = "sObject" baseTypeNS = "urn:sobject.partner.soap.sforce.com" name = "create" typeNS = "http://example.com/stockquote" xmlns = "http://www.approuter.com/schemas/cdk/api/" xmlns:con = "http://www.approuter.com/schemas/cdk/config/" xmlns:xsi = "http://www.w3.org/2001/XMLSchema-instance" > < object label = "createInput" maxCount = "1" minCount = "1" name = "createInput" used = "true" > < con:field configurable = "true" label = "ObjectName" maxCount = "1" minCount = "1" name = "ObjectName" used = "true" > < con:type > string </ con:type > </ con:field > < con:field configurable = "true" label = "FirstName" maxCount = "1" minCount = "1" name = "FirstName" used = "true" > < con:type > string </ con:type > </ con:field > < con:field configurable = "true" label = "LastName" maxCount = "1" minCount = "1" name = "LastName" used = "true" > < con:type > string </ con:type > </ con:field > < con:field configurable = "true" label = "Phone" maxCount = "1" minCount = "1" name = "Phone" used = "true" > < con:type > string </ con:type > </ con:field > </ object > < responseObject label = "createOutput" maxCount = "1" minCount = "1" name = "createOutput" used = "true" > < con:field configurable = "true" label = "Id" maxCount = "1" minCount = "1" name = "Id" used = "true" > < con:type > string </ con:type > </ con:field > < con:field configurable = "true" label = "ObjectName" maxCount = "1" minCount = "1" name = "ObjectName" used = "true" > < con:type > string </ con:type > </ con:field > < con:field configurable = "true" label = "Status" maxCount = "1" minCount = "1" name = "Status" used = "true" > < con:type > string </ con:type > </ con:field > </ responseObject > </ DescribeObjectResponse >
- 在 DescribeObjects 编排中,选择发送答复活动。 这样会显示“映射输入”面板。
- 在“映射输入”面板中,将生成的 XML 映射到“目标活动”面板中的 DescribeObjectResponse 参数。 您现在即可测试编排。
- 在编排中,右键单击提供服务活动。 这样会显示“验证活动”菜单。
- 在“验证活动”菜单中,选择调用服务。 这样会显示“调用服务”窗口。
- 在“调用服务”窗口中,输入标题或主体数据,然后单击执行以开始测试。要查看测试活动,请单击显示响应按钮。
结果
下一步做什么
父主题: 完成连接器接口编排