<?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 Re: Perform Workflow Transition on a newly created workspace item from actionscr in Fusion Manage Forum</title>
    <link>https://forums.autodesk.com/t5/fusion-manage-forum/perform-workflow-transition-on-a-newly-created-workspace-item/m-p/4324044#M7409</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;SPAN&gt;Biggie and Joe,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks for your responses! One thing we tried initially was to put the script in that first transition, however we were running another performWorkflowTransition() in the createScript for this item, so it was routing it somewhere else before the first transition was executed.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;We didn't think an item created via script would run the create script because it was written in another post somewhere, b&lt;/SPAN&gt;ut turns out it did in the end so what we did was put a check in the creation script to see if the newly created item contained a value for the link back to the other workspace, and if it does, it performs the workflow transition.&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks again for the help.&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 09 Jul 2013 14:11:05 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2013-07-09T14:11:05Z</dc:date>
    <item>
      <title>Perform Workflow Transition on a newly created workspace item from actionscript</title>
      <link>https://forums.autodesk.com/t5/fusion-manage-forum/perform-workflow-transition-on-a-newly-created-workspace-item/m-p/4320363#M7405</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We're creating an actionscript that spawns a new workspace item and performs a workflow transition on it, however we're having problems performing the transion using the&amp;nbsp;&lt;SPAN&gt;performWorkflowTransition() function.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;First we create the new workspace item from an actionascript which is contained in WS_WORKSPACE_A like this:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;//Create new item with the values&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;var newItem = createNewItem('&lt;SPAN&gt;WS_WORKSPACE_B&lt;/SPAN&gt;', newProperties);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Where&amp;nbsp;&lt;SPAN&gt;newProperties is an array of the fields for the item. This part is tested and works.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;Then we try and push the newly created item along a transition:&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;//Pushes the item to new state&lt;BR /&gt;newItem.performWorkflowTransition(348);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But we get this error:&amp;nbsp;&lt;SPAN&gt;Item is not in correct state&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Even though when we navigate to the newly created items workflow tab, we can see it is in the first state, and the transition comes from that first stte and carries it to another state.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Is it that the item isn't actually created until the script is finished executing? And as a result&amp;nbsp;&lt;SPAN&gt;performWorkflowTransition() cannot be performed that soon?&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Hope this makes sense!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 05 Jul 2013 11:20:31 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-manage-forum/perform-workflow-transition-on-a-newly-created-workspace-item/m-p/4320363#M7405</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-07-05T11:20:31Z</dc:date>
    </item>
    <item>
      <title>Re: Perform Workflow Transition on a newly created workspace item from actionscr</title>
      <link>https://forums.autodesk.com/t5/fusion-manage-forum/perform-workflow-transition-on-a-newly-created-workspace-item/m-p/4322628#M7406</link>
      <description>&lt;P&gt;Hello Michael,&lt;/P&gt;
&lt;P&gt;Welcome to the forums!&lt;/P&gt;
&lt;P&gt;To answer your question, Yes, you are correct the item in question does not technically have a workflow until after the item is created.&lt;/P&gt;</description>
      <pubDate>Mon, 08 Jul 2013 14:12:10 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-manage-forum/perform-workflow-transition-on-a-newly-created-workspace-item/m-p/4322628#M7406</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-07-08T14:12:10Z</dc:date>
    </item>
    <item>
      <title>Re: Perform Workflow Transition on a newly created workspace item from actionscr</title>
      <link>https://forums.autodesk.com/t5/fusion-manage-forum/perform-workflow-transition-on-a-newly-created-workspace-item/m-p/4323946#M7407</link>
      <description>&lt;P&gt;Michael and Welcome,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We have accomplished this by putting the perform workflow function in the action script for the first transistion of the workflow. The Action Script associated with the first transition is triggered automatically when the spawn script is fully completed and therefore the new workspace record exists. (See Attached Screen Shot)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;That should work for you?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;BD&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 09 Jul 2013 13:11:16 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-manage-forum/perform-workflow-transition-on-a-newly-created-workspace-item/m-p/4323946#M7407</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-07-09T13:11:16Z</dc:date>
    </item>
    <item>
      <title>Re: Perform Workflow Transition on a newly created workspace item from actionscr</title>
      <link>https://forums.autodesk.com/t5/fusion-manage-forum/perform-workflow-transition-on-a-newly-created-workspace-item/m-p/4324003#M7408</link>
      <description>&lt;P&gt;Biggie,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;True, the primary transition can be used to accomplish this; I do not recommend did not recommend this as a solution. You must keep in mind that the primary transition does not follow the same rules of the rest of the transitions, (time limits and access points available). Therefore it is not recommended to be used with scripting. Although the development team is still looking at the feasibility and possible expanding support of using the primary transition, there is also a possibility of the ability to use the primary transition going away in the future.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I would personally recommend not relying on the primary transition as an anchor point for scripts.&lt;/P&gt;</description>
      <pubDate>Tue, 09 Jul 2013 13:49:08 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-manage-forum/perform-workflow-transition-on-a-newly-created-workspace-item/m-p/4324003#M7408</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-07-09T13:49:08Z</dc:date>
    </item>
    <item>
      <title>Re: Perform Workflow Transition on a newly created workspace item from actionscr</title>
      <link>https://forums.autodesk.com/t5/fusion-manage-forum/perform-workflow-transition-on-a-newly-created-workspace-item/m-p/4324044#M7409</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;SPAN&gt;Biggie and Joe,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks for your responses! One thing we tried initially was to put the script in that first transition, however we were running another performWorkflowTransition() in the createScript for this item, so it was routing it somewhere else before the first transition was executed.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;We didn't think an item created via script would run the create script because it was written in another post somewhere, b&lt;/SPAN&gt;ut turns out it did in the end so what we did was put a check in the creation script to see if the newly created item contained a value for the link back to the other workspace, and if it does, it performs the workflow transition.&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks again for the help.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 09 Jul 2013 14:11:05 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/fusion-manage-forum/perform-workflow-transition-on-a-newly-created-workspace-item/m-p/4324044#M7409</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-07-09T14:11:05Z</dc:date>
    </item>
  </channel>
</rss>

