Blue Prism:将名称转换为电子邮件地址吗?

问题描述

我正在构建一个自动化程序,该程序读取具有两列(名称和日期)的excel文件,并将其存储到集合中,然后根据这些相同的参数发出日历邀请。

分别提取数据和发送邀请都可以正常工作,但是我现在要做的是将包含名称的列转换为电子邮件地址格式,例如将“一个人”转换为“ Person.One@emailaddress.com”。

此外,某些“名称”行包含以下格式的两个人-“第一个人和第二个人”,因此我需要将其拆分为两个单独的电子邮件地址,以便他们都可以接收邀请的日历适当的日期。

我猜测我应该使用“实用程序-字符串”功能中的某些功能来做到这一点?谁能指出我正确的方向?非常感谢,谢谢

Rota Example

需要成为

New Collection

解决方法

将名称转换为电子邮件地址需要两个主要组件:

  1. & (空格和号)序列上拆分收件人的初始列表。
  2. 对于每个收件人,通过用句号(.字符替换空格并附加@email.com域,来计算电子邮件地址。

这样,您的过程将类似于以下内容:

Process flow


您可以在Blue Prism 6.9环境中使用此方法,方法是将以下XML保存为.bpprocess.xml文件,然后使用Blue Prism Interactive Client中的File > Import > Process / Object菜单选项将其导入:

<process name="Test Process" version="1.0" bpversion="6.9.0.26970" narrative="" byrefcollection="true" preferredid="f848bd78-240d-4b87-82b4-ade6ea8e40d8">
  <view>
    <camerax>0</camerax>
    <cameray>-21</cameray>
    <zoom version="2">1.25</zoom>
  </view>
  <preconditions />
  <endpoint narrative="" />
  <stage stageid="81bc6e0a-2151-4fae-80d7-3ad8d2d9826a" name="Start" type="Start">
    <display x="15" y="-105" />
    <onsuccess>69469193-4784-4519-bd10-974fb3d7e1da</onsuccess>
  </stage>
  <stage stageid="b527e78b-915b-4498-bf59-5f662104bb9d" name="End" type="End">
    <display x="15" y="165" />
  </stage>
  <stage stageid="92f4087e-5cdf-41a1-a889-088d7ef7c469" name="Stage1" type="ProcessInfo">
    <display x="-195" y="-105" w="150" h="90" />
  </stage>
  <stage stageid="f9d08d9a-ac87-4c6b-8aa9-2dc864ce8d8d" name="Input" type="Block">
    <loginhibit onsuccess="true" />
    <display x="-270" y="-45" w="150" h="60" />
    <font family="Segoe UI" size="10" style="Regular" color="7FB2E5" />
  </stage>
  <stage stageid="9fd57578-1b94-43f5-989e-f0fac142744f" name="Recipients" type="Data">
    <loginhibit onsuccess="true" />
    <display x="-195" y="-15" w="150" h="30" />
    <datatype>text</datatype>
    <initialvalue xml:space="preserve">Person One</initialvalue>
    <private />
    <alwaysinit />
  </stage>
  <stage stageid="5ea9beac-25e7-4560-9253-28706cf4f247" name="Output" type="Block">
    <loginhibit onsuccess="true" />
    <display x="-270" y="30" w="150" h="90" />
    <font family="Segoe UI" size="10" style="Regular" color="7FB2E5" />
  </stage>
  <stage stageid="71130d29-3d68-4809-809f-11429da8ca1d" name="Recipient Contacts" type="Collection">
    <display x="-195" y="75" w="150" h="60" />
    <datatype>collection</datatype>
    <private />
    <alwaysinit />
    <collectioninfo>
      <field name="Name" type="text" />
      <field name="Email" type="text" />
    </collectioninfo>
  </stage>
  <stage stageid="69469193-4784-4519-bd10-974fb3d7e1da" name="Utility - Strings::Split Text" type="Action">
    <loginhibit onsuccess="true" />
    <display x="15" y="-60" w="120" h="30" />
    <inputs>
      <input type="text" name="Text to Split" friendlyname="Text to Split" narrative="The text to split" expr="[Recipients]" />
      <input type="text" name="Split Char" friendlyname="Split Char" narrative="The split delimiter" expr="&quot; &amp; &quot;" />
      <input type="text" name="Collection Field Name" friendlyname="Collection Field Name" narrative="The name of the field for the resulting collection" expr="&quot;Name&quot;" />
    </inputs>
    <outputs>
      <output type="collection" name="Split Values" friendlyname="Split Values" narrative="The resulting collection containing the split values" stage="Split Values" />
    </outputs>
    <onsuccess>fe157559-e2e0-4a5d-95b7-4681fc9089ce</onsuccess>
    <resource object="Utility - Strings" action="Split Text" />
  </stage>
  <stage stageid="54353e0c-0125-4a3f-9870-8adc655e82a1" name="Split Values" type="Collection">
    <display x="165" y="-60" w="90" h="60" />
    <datatype>collection</datatype>
    <private />
    <alwaysinit />
  </stage>
  <stage stageid="fe157559-e2e0-4a5d-95b7-4681fc9089ce" name="Loop Split Values" type="LoopStart">
    <loginhibit onsuccess="true" />
    <display x="15" y="-15" w="150" h="30" />
    <onsuccess>1f522616-2dbf-4355-97f1-082fa9a00406</onsuccess>
    <groupid>31b533a9-c80b-49d2-bba7-2fa7f270cd72</groupid>
    <looptype>ForEach</looptype>
    <loopdata>Split Values</loopdata>
  </stage>
  <stage stageid="174f331c-b597-4053-aba2-e65f3f054f7c" name="Loop Split Values" type="LoopEnd">
    <loginhibit onsuccess="true" />
    <display x="15" y="120" w="150" h="30" />
    <onsuccess>b527e78b-915b-4498-bf59-5f662104bb9d</onsuccess>
    <groupid>31b533a9-c80b-49d2-bba7-2fa7f270cd72</groupid>
  </stage>
  <stage stageid="1f522616-2dbf-4355-97f1-082fa9a00406" name="Add Row to Output Collection" type="Action">
    <loginhibit onsuccess="true" />
    <display x="15" y="30" w="120" h="30" />
    <inputs>
      <input type="text" name="Collection Name" friendlyname="Collection Name" narrative="The name of the collection to act upon" expr="&quot;Recipient Contacts&quot;" />
    </inputs>
    <onsuccess>6547bfb9-ae7e-4735-96b4-07fbca2678f0</onsuccess>
    <resource object="Blueprism.AutomateProcessCore.clsCollectionActions" action="Add Row" />
  </stage>
  <stage stageid="6547bfb9-ae7e-4735-96b4-07fbca2678f0" name="Store Name and Calculated Email for Recipient" type="MultipleCalculation">
    <loginhibit onsuccess="true" />
    <display x="15" y="75" w="120" h="30" />
    <onsuccess>174f331c-b597-4053-aba2-e65f3f054f7c</onsuccess>
    <steps>
      <calculation expression="[Split Values.Name]" stage="Recipient Contacts.Name" />
      <calculation expression="Replace([Split Values.Name],&quot; &quot;,&quot;.&quot;) &amp; &quot;@email.com&quot;" stage="Recipient Contacts.Email" />
    </steps>
  </stage>
</process>

相关问答

错误1:Request method ‘DELETE‘ not supported 错误还原:...
错误1:启动docker镜像时报错:Error response from daemon:...
错误1:private field ‘xxx‘ is never assigned 按Alt...
报错如下,通过源不能下载,最后警告pip需升级版本 Requirem...