<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Calling an VBO action in code stage in Product Forum</title>
    <link>https://community.blueprism.com/t5/Product-Forum/Calling-an-VBO-action-in-code-stage/m-p/97175#M45248</link>
    <description>&lt;P&gt;Hi All,&lt;/P&gt;
&lt;P&gt;I need to call diferente VBO Actions dinamically, can I do it by a code stage? Something like the code below, sugested by chatGPT? (can't put this code to work beacause don't know how to declare (&lt;CODE&gt;using BluePrismAPI&lt;/CODE&gt; and witch dll to import)&lt;BR /&gt;Where can I found some documentation about BluePrismAPI / BPObject class?&lt;/P&gt;
&lt;P&gt;Thanks for your help!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;CODE&gt;using BluePrismAPI;&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;&lt;CODE&gt;&amp;nbsp;&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;&lt;CODE&gt;//Create a reference to the Blue Prism API&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;&lt;CODE&gt;BPObject bpObject = new BPObject();&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;&lt;CODE&gt;&amp;nbsp;&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;&lt;CODE&gt;//Connect to the Blue Prism environment&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;&lt;CODE&gt;bpObject.Connect(@"localhost");&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;&lt;CODE&gt;&amp;nbsp;&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;&lt;CODE&gt;//Start the object – PS: Process name should be action name???&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;&lt;CODE&gt;bpObject.Start("Object Name", "Process Name");&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;&lt;CODE&gt;&amp;nbsp;&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;&lt;CODE&gt;//Pass data to the object as inputs&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;&lt;CODE&gt;bpObject.Set("Input Name", "Input Value");&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;&lt;CODE&gt;&amp;nbsp;&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;&lt;CODE&gt;//Execute the object&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;&lt;CODE&gt;bpObject.Execute();&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;&lt;CODE&gt;&amp;nbsp;&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;&lt;CODE&gt;//Get the output from the object&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;&lt;CODE&gt;string output = bpObject.Get("Output Name").ToString();&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;&lt;CODE&gt;&amp;nbsp;&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;&lt;CODE&gt;//Disconnect from the Blue Prism environment&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;&lt;CODE&gt;bpObject.Disconnect();&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 31 Jan 2023 17:21:00 GMT</pubDate>
    <dc:creator>antonio-r-melo</dc:creator>
    <dc:date>2023-01-31T17:21:00Z</dc:date>
    <item>
      <title>Calling an VBO action in code stage</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Calling-an-VBO-action-in-code-stage/m-p/97175#M45248</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;
&lt;P&gt;I need to call diferente VBO Actions dinamically, can I do it by a code stage? Something like the code below, sugested by chatGPT? (can't put this code to work beacause don't know how to declare (&lt;CODE&gt;using BluePrismAPI&lt;/CODE&gt; and witch dll to import)&lt;BR /&gt;Where can I found some documentation about BluePrismAPI / BPObject class?&lt;/P&gt;
&lt;P&gt;Thanks for your help!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;CODE&gt;using BluePrismAPI;&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;&lt;CODE&gt;&amp;nbsp;&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;&lt;CODE&gt;//Create a reference to the Blue Prism API&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;&lt;CODE&gt;BPObject bpObject = new BPObject();&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;&lt;CODE&gt;&amp;nbsp;&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;&lt;CODE&gt;//Connect to the Blue Prism environment&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;&lt;CODE&gt;bpObject.Connect(@"localhost");&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;&lt;CODE&gt;&amp;nbsp;&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;&lt;CODE&gt;//Start the object – PS: Process name should be action name???&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;&lt;CODE&gt;bpObject.Start("Object Name", "Process Name");&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;&lt;CODE&gt;&amp;nbsp;&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;&lt;CODE&gt;//Pass data to the object as inputs&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;&lt;CODE&gt;bpObject.Set("Input Name", "Input Value");&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;&lt;CODE&gt;&amp;nbsp;&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;&lt;CODE&gt;//Execute the object&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;&lt;CODE&gt;bpObject.Execute();&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;&lt;CODE&gt;&amp;nbsp;&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;&lt;CODE&gt;//Get the output from the object&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;&lt;CODE&gt;string output = bpObject.Get("Output Name").ToString();&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;&lt;CODE&gt;&amp;nbsp;&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;&lt;CODE&gt;//Disconnect from the Blue Prism environment&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;&lt;CODE&gt;bpObject.Disconnect();&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 31 Jan 2023 17:21:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Calling-an-VBO-action-in-code-stage/m-p/97175#M45248</guid>
      <dc:creator>antonio-r-melo</dc:creator>
      <dc:date>2023-01-31T17:21:00Z</dc:date>
    </item>
    <item>
      <title>Re: Calling an VBO action in code stage</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Calling-an-VBO-action-in-code-stage/m-p/97176#M45249</link>
      <description>Hi Antonio,&lt;BR /&gt;&lt;BR /&gt;Nice, another example of ChatGPT being used in a BP case!&lt;BR /&gt;&lt;BR /&gt;The generated code seems merely an example to me, not real code for actually doing something in BP. As someone clearly &lt;A href="https://plusservices.se/chatgpt-rpg/" target="_blank" rel="noopener"&gt;demonstrated here&lt;/A&gt;, I wouldn't yet let ChatGPT do my businesss coding.&lt;BR /&gt;&lt;BR /&gt;If we ignore the ChatGPT code for a minute, and you tell us what you are trying to do, then I'm sure we (the community) can point you in the right direction.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;So, in short:&lt;BR /&gt;
&lt;UL&gt;
&lt;LI&gt;What do you mean by calling VBO's dynamically?&lt;/LI&gt;
&lt;LI&gt;From where do you want to call the VBO's?&lt;/LI&gt;
&lt;LI&gt;What are you trying to accomplish?&lt;/LI&gt;
&lt;/UL&gt;
&lt;BR /&gt;&lt;BR /&gt;Happy coding!&lt;BR /&gt;---------------&lt;BR /&gt;Paul&lt;BR /&gt;Sweden</description>
      <pubDate>Wed, 01 Feb 2023 06:13:20 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Calling-an-VBO-action-in-code-stage/m-p/97176#M45249</guid>
      <dc:creator>PvD_SE</dc:creator>
      <dc:date>2023-02-01T06:13:20Z</dc:date>
    </item>
    <item>
      <title>Re: Calling an VBO action in code stage</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Calling-an-VBO-action-in-code-stage/m-p/97177#M45250</link>
      <description>Hi @Paul JHM van Doorn&lt;BR /&gt;&lt;BR /&gt;Thanks for your feedback, just for fun the question to chatGPT was "&lt;SPAN&gt;How can I call a blueprism object from a code stage?", It gives me unusable code, but I think it was a cleaver answer.&lt;BR /&gt;&lt;BR /&gt;I am trying to do some generic process for all my robots, so I can implement comom functions only once. I want in the execution call an VBO to do the loading of itens, one to do the execution of the RPA, and write the result to da new working queue, and another one for reporting back to the bussiness personal of RPA results.&lt;BR /&gt;&lt;BR /&gt;So basically I need to call my VBO action by the name read from a config file. I don't know if is possible to call and action dinamically by its name in code stage (or global code function).&lt;BR /&gt;&lt;BR /&gt;Thanks for your help.&lt;BR /&gt;&lt;BR /&gt;António&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;​</description>
      <pubDate>Thu, 02 Feb 2023 10:20:12 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Calling-an-VBO-action-in-code-stage/m-p/97177#M45250</guid>
      <dc:creator>antonio-r-melo</dc:creator>
      <dc:date>2023-02-02T10:20:12Z</dc:date>
    </item>
    <item>
      <title>Re: Calling an VBO action in code stage</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Calling-an-VBO-action-in-code-stage/m-p/97178#M45251</link>
      <description>Hi Antonio,&lt;BR /&gt;&lt;BR /&gt;Interesting concept - a general process for all, steered by a parameter config file. Keep us posted on that one!&lt;BR /&gt;&lt;BR /&gt;Instead of doing a lot of coding outside of BP, I'd look into setting up a config file in a suitable format (text, XML, XL, ...) that holds the info for configuring and running the process.&lt;BR /&gt;&lt;BR /&gt;In general, when coding something for the first time, you should ask yourself already if this piece of code would have a potential reuse in other processes. If the answer is Yes (or even Maybe), then it should be split off in either an object or a sub-process. &lt;BR /&gt;If the answer was no, but you find yourself coding the same thing later anyway, then again, it should be split off in either an object or a sub-process, followed by implementing the plit-off code in both processes.&lt;BR /&gt;Ignoring this principle will make you end up with duplicate code in several BP processes and will eventually catch up with the developer as the code has to be adjusted to a new reality. If then the code is still held in place and not split off, it is time to look for another developer.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Happy coding!&lt;BR /&gt;---------------&lt;BR /&gt;Paul&lt;BR /&gt;Sweden</description>
      <pubDate>Thu, 02 Feb 2023 11:38:11 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Calling-an-VBO-action-in-code-stage/m-p/97178#M45251</guid>
      <dc:creator>PvD_SE</dc:creator>
      <dc:date>2023-02-02T11:38:11Z</dc:date>
    </item>
    <item>
      <title>Re: Calling an VBO action in code stage</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Calling-an-VBO-action-in-code-stage/m-p/97179#M45252</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Wise words without any doubt, thanks for your reply.&lt;BR /&gt;&lt;BR /&gt;I will look for BP support to know if is possible to call an object action dinamically by c# code.&lt;BR /&gt;&lt;BR /&gt;If I can I will post here the solution.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;António</description>
      <pubDate>Thu, 02 Feb 2023 15:48:37 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Calling-an-VBO-action-in-code-stage/m-p/97179#M45252</guid>
      <dc:creator>antonio-r-melo</dc:creator>
      <dc:date>2023-02-02T15:48:37Z</dc:date>
    </item>
    <item>
      <title>Re: Calling an VBO action in code stage</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Calling-an-VBO-action-in-code-stage/m-p/109115#M49459</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.blueprism.com/t5/user/viewprofilepage/user-id/33310"&gt;@antonio-r-melo&lt;/a&gt;&amp;nbsp;- Did you find a solution for your usecase ? I have similar scenario where I want to call 50 actions depending on a input parameter but I do not want code all 50 scenarios using a decision box.. instead I want to maintain a collection with 50 action names ("object name" and "action") and pass it as an input&amp;nbsp; to one action which can call the required actions, which will reduce the coding efforts significantly. Would you appreciate if you can respond.&lt;/P&gt;&lt;P&gt;Thank you in advance !&lt;/P&gt;</description>
      <pubDate>Mon, 01 Apr 2024 23:00:11 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Calling-an-VBO-action-in-code-stage/m-p/109115#M49459</guid>
      <dc:creator>rajeshsrilankala</dc:creator>
      <dc:date>2024-04-01T23:00:11Z</dc:date>
    </item>
  </channel>
</rss>

