<?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 Solved. Cannot run a custom ArcGIS Pro Command in a Workflow Manager Server step in ArcGIS Pro SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/solved-cannot-run-a-custom-arcgis-pro-command-in-a/m-p/1363850#M10933</link>
    <description>&lt;P&gt;&lt;SPAN&gt;We have a custom ArcGIS Pro Command&lt;/SPAN&gt;&amp;nbsp;(addin)&lt;SPAN&gt;&amp;nbsp;in a Workflow Manager Server step not working.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;How could we debug or see whatever logs?&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MarkMindlin_idea_0-1703210942410.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/89829i57925A71BDEBDA24/image-size/medium?v=v2&amp;amp;px=400" role="button" title="MarkMindlin_idea_0-1703210942410.png" alt="MarkMindlin_idea_0-1703210942410.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Solved&lt;/P&gt;&lt;P&gt;You should add to Module file following code&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Please see the following sample for configuration needed for custom add-in to run during open pro project items step:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;A href="https://github.com/Esri/workflowmanager-samples/blob/master/ServiceBased/ProAddIn/WorkflowManagerSampleAddIn/Module1.cs#L44-L67" target="_blank"&gt;https://github.com/Esri/workflowmanager-samples/blob/master/ServiceBased/ProAddIn/WorkflowManagerSampleAddIn/Module1.cs#L44-L67&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;        /// &amp;lt;summary&amp;gt;
        /// Override this method to allow execution of DAML commands specified in this module.
        /// This is needed to run commands using the Open Pro Project Items step.
        /// &amp;lt;/summary&amp;gt;
        /// &amp;lt;param name="id"&amp;gt;The DAML control identifier.&amp;lt;/param&amp;gt;
        /// &amp;lt;returns&amp;gt;A user defined function that will execute asynchronously when invoked.&amp;lt;/returns&amp;gt;
        protected override Func&amp;lt;Task&amp;gt; ExecuteCommand(string id)
        {
            return () =&amp;gt; QueuedTask.Run(() =&amp;gt;
            {
                try
                {
                    // Run the command specified by the id
                    IPlugInWrapper wrapper = FrameworkApplication.GetPlugInWrapper(id);
                    ICommand command = wrapper as ICommand;
                    if ((command != null) &amp;amp;&amp;amp; command.CanExecute(null))
                        command.Execute(null);
                }
                catch (Exception e)
                {
                    ArcGIS.Desktop.Framework.Dialogs.MessageBox.Show($"ERROR: {e}", "Error running command");
                }
            });
        }&lt;/LI-CODE&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 22 Apr 2024 23:25:28 GMT</pubDate>
    <dc:creator>MarkMindlin_idea</dc:creator>
    <dc:date>2024-04-22T23:25:28Z</dc:date>
    <item>
      <title>Solved. Cannot run a custom ArcGIS Pro Command in a Workflow Manager Server step</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/solved-cannot-run-a-custom-arcgis-pro-command-in-a/m-p/1363850#M10933</link>
      <description>&lt;P&gt;&lt;SPAN&gt;We have a custom ArcGIS Pro Command&lt;/SPAN&gt;&amp;nbsp;(addin)&lt;SPAN&gt;&amp;nbsp;in a Workflow Manager Server step not working.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;How could we debug or see whatever logs?&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MarkMindlin_idea_0-1703210942410.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/89829i57925A71BDEBDA24/image-size/medium?v=v2&amp;amp;px=400" role="button" title="MarkMindlin_idea_0-1703210942410.png" alt="MarkMindlin_idea_0-1703210942410.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Solved&lt;/P&gt;&lt;P&gt;You should add to Module file following code&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Please see the following sample for configuration needed for custom add-in to run during open pro project items step:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;A href="https://github.com/Esri/workflowmanager-samples/blob/master/ServiceBased/ProAddIn/WorkflowManagerSampleAddIn/Module1.cs#L44-L67" target="_blank"&gt;https://github.com/Esri/workflowmanager-samples/blob/master/ServiceBased/ProAddIn/WorkflowManagerSampleAddIn/Module1.cs#L44-L67&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;        /// &amp;lt;summary&amp;gt;
        /// Override this method to allow execution of DAML commands specified in this module.
        /// This is needed to run commands using the Open Pro Project Items step.
        /// &amp;lt;/summary&amp;gt;
        /// &amp;lt;param name="id"&amp;gt;The DAML control identifier.&amp;lt;/param&amp;gt;
        /// &amp;lt;returns&amp;gt;A user defined function that will execute asynchronously when invoked.&amp;lt;/returns&amp;gt;
        protected override Func&amp;lt;Task&amp;gt; ExecuteCommand(string id)
        {
            return () =&amp;gt; QueuedTask.Run(() =&amp;gt;
            {
                try
                {
                    // Run the command specified by the id
                    IPlugInWrapper wrapper = FrameworkApplication.GetPlugInWrapper(id);
                    ICommand command = wrapper as ICommand;
                    if ((command != null) &amp;amp;&amp;amp; command.CanExecute(null))
                        command.Execute(null);
                }
                catch (Exception e)
                {
                    ArcGIS.Desktop.Framework.Dialogs.MessageBox.Show($"ERROR: {e}", "Error running command");
                }
            });
        }&lt;/LI-CODE&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 22 Apr 2024 23:25:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/solved-cannot-run-a-custom-arcgis-pro-command-in-a/m-p/1363850#M10933</guid>
      <dc:creator>MarkMindlin_idea</dc:creator>
      <dc:date>2024-04-22T23:25:28Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot run a custom ArcGIS Pro Command in a Workflow Manager Server step</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/solved-cannot-run-a-custom-arcgis-pro-command-in-a/m-p/1363940#M10935</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;If you have code of custom add-in, it is the same as debugging add-in. Start add-in debugging from Visual Studio. Place breakpoint inside Custom Command&amp;nbsp;OnClick() method. Then execute workflow.&lt;/P&gt;</description>
      <pubDate>Fri, 22 Dec 2023 14:38:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/solved-cannot-run-a-custom-arcgis-pro-command-in-a/m-p/1363940#M10935</guid>
      <dc:creator>GKmieliauskas</dc:creator>
      <dc:date>2023-12-22T14:38:12Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot run a custom ArcGIS Pro Command in a Workflow Manager Server step</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/solved-cannot-run-a-custom-arcgis-pro-command-in-a/m-p/1364405#M10936</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/42133"&gt;@GKmieliauskas&lt;/a&gt;&amp;nbsp;thank you for your answer.&amp;nbsp;&lt;/P&gt;&lt;P&gt;The point is we cannot hit the breakpoint. An addin in not called at all.&lt;/P&gt;&lt;P&gt;We might be missing some setting when designing our workflow step and our addin.&lt;/P&gt;</description>
      <pubDate>Wed, 27 Dec 2023 02:41:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/solved-cannot-run-a-custom-arcgis-pro-command-in-a/m-p/1364405#M10936</guid>
      <dc:creator>MarkMindlin_idea</dc:creator>
      <dc:date>2023-12-27T02:41:47Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot run a custom ArcGIS Pro Command in a Workflow Manager Server step</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/solved-cannot-run-a-custom-arcgis-pro-command-in-a/m-p/1364444#M10938</link>
      <description>&lt;P&gt;1. Make a copy of your workflow.&amp;nbsp;&lt;/P&gt;&lt;P&gt;2. Delete all steps in your workflow which goes after your add-in calling and your add-in calling step.&lt;/P&gt;&lt;P&gt;3. Execute your new workflow.&lt;/P&gt;&lt;P&gt;4. Execute your add-in from ArcGIS Pro ribbon by pressing it's button.&lt;/P&gt;</description>
      <pubDate>Wed, 27 Dec 2023 08:53:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/solved-cannot-run-a-custom-arcgis-pro-command-in-a/m-p/1364444#M10938</guid>
      <dc:creator>GKmieliauskas</dc:creator>
      <dc:date>2023-12-27T08:53:46Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot run a custom ArcGIS Pro Command in a Workflow Manager Server step</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/solved-cannot-run-a-custom-arcgis-pro-command-in-a/m-p/1378923#M11062</link>
      <description>&lt;P&gt;I am having a similar issue.&lt;/P&gt;&lt;P&gt;Using the Open Pro Items step under Pro 3.2 Enterprise 11.2 I attempt to run a custom Pro command.&lt;/P&gt;&lt;P&gt;The Open Pro Open step works fine, opening a map, but the command is not run: nothing happens.&lt;/P&gt;&lt;P&gt;I know the add-in command works. I can run it from the ribbon.&lt;/P&gt;&lt;P&gt;The Add-In command is a button with a On Click to trigger its action.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there some restriction on the type of commands that can be run?&lt;/P&gt;&lt;P&gt;What is supposed to happen?&lt;/P&gt;</description>
      <pubDate>Tue, 06 Feb 2024 23:35:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/solved-cannot-run-a-custom-arcgis-pro-command-in-a/m-p/1378923#M11062</guid>
      <dc:creator>StefanDieters1</dc:creator>
      <dc:date>2024-02-06T23:35:52Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot run a custom ArcGIS Pro Command in a Workflow Manager Server step</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/solved-cannot-run-a-custom-arcgis-pro-command-in-a/m-p/1413834#M11402</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/353478"&gt;@StefanDieters1&lt;/a&gt;&amp;nbsp;It is solved. I updated the main topic&lt;/P&gt;</description>
      <pubDate>Mon, 22 Apr 2024 23:27:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/solved-cannot-run-a-custom-arcgis-pro-command-in-a/m-p/1413834#M11402</guid>
      <dc:creator>MarkMindlin_idea</dc:creator>
      <dc:date>2024-04-22T23:27:19Z</dc:date>
    </item>
    <item>
      <title>Re: Solved. Cannot run a custom ArcGIS Pro Command in a Workflow Manager Server step</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/solved-cannot-run-a-custom-arcgis-pro-command-in-a/m-p/1414566#M11415</link>
      <description>&lt;P&gt;That's it.&lt;/P&gt;&lt;P&gt;Now have my test addin being run when I Open Pro Project Command.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Wed, 24 Apr 2024 05:55:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/solved-cannot-run-a-custom-arcgis-pro-command-in-a/m-p/1414566#M11415</guid>
      <dc:creator>StefanDieters1</dc:creator>
      <dc:date>2024-04-24T05:55:54Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot run a custom ArcGIS Pro Command in a Workflow Manager Server step</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/solved-cannot-run-a-custom-arcgis-pro-command-in-a/m-p/1414567#M11416</link>
      <description>&lt;P&gt;Thanks in another spot&lt;/P&gt;</description>
      <pubDate>Wed, 24 Apr 2024 05:56:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/solved-cannot-run-a-custom-arcgis-pro-command-in-a/m-p/1414567#M11416</guid>
      <dc:creator>StefanDieters1</dc:creator>
      <dc:date>2024-04-24T05:56:27Z</dc:date>
    </item>
  </channel>
</rss>

