none
SharePoint 2013 Workflow dictionary bug

    Question

  • Hi,

    I have a problem where a Dictionairy variable is keeping its original parameters, even though i'm re-using it without the original parameters further down the workflow. (As a debug I set the workflow to send myself an email with the dictionary value at the end of the workflow, and the value returned is a merge of the original parameters and the new ones)

    eg.

    Build dictionary HttpRequestContent

    Call HTTP Web Service

    ......

    Build dictionary HttpRequestContent

    Call HTTP Web Service

    ----------------------------------------------------

    The 2nd call to HTTP Web Service is updating a different list to the first one, and the list has different columns, and the error i'm getting is "The property 'WorkflowStatus' does not exist on type 'SP.Data.WorkflowLogsListItem'. Make sure to only use property names that are defined by the type".

    WorkflowStatus is included in the first Build dictionary action, but not the 2nd, so shouldn't be included in the dictionary.

    Additionally there appears to be no way to reset a dictionary object? If you try and set it to blank you get an error upon saving.

    Yes, i know that ordinarily you can just set another dictionary but in this case this is a complex workflow and i've already hit the limit and can't create any more. (Will be re-installing WFM and upgrading to ServiceBus 1.1 so i can increase the number of variables using powershell in the next few weeks).

    Thanks

    Martin

    jeudi 17 mai 2018 15:02

Toutes les réponses

  • Hi,

    About your parameters, how did you add the them?

    You can just add one HTTPCall, and create another workflow use the another HTTPcall.

    After that, check which one caused the error.

    Can you provide the screenshot about your whole workflow?

    Feel free to reply if there is any update.

    Best Regards,

    Carl Zhou


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnsf@microsoft.com.


    Click here to learn more. Visit the dedicated forum to share, explore and talk to experts about Microsoft Teams.

    lundi 21 mai 2018 02:38
  • Hi Carl,

    The workflow is far too long to capture in a screenshot. Would take 7 or 8 of them so have snipped the relevant parts.

    Basically its a generic workflow that will run on a specified schedule and process all items in a specified list (the actual actions performed on the individual list items are performed in a separate SP2010 workflow that is called from this SP2013 workflow). The SP2013 workflow stores records of the workflow and the activity in 2 lists in an dev/admin site collection so that activity from multiple workflows/sites can be monitored from a central location. Its effectively a timer job.

    The HttpContent dictionary is set the first time when the Workflow Register entry is created (list 1 in the dev/admin site collection). This happens when the workflow is run the first time. The workflow contains looping so that after the first run the workflow pauses, and then resumes on schedule. (ie, it never ends unless a site collection admin clicks on "End Workflow" or terminates due to error).

    The HttpRequestContent dictionary is set as follows....


    The debug email is sent showing the results...


    lundi 21 mai 2018 09:09
  • Part 2/4

    Inside the scheduling loop the Workflow Register is then updated to say that the workflow has re-started...

     

    And HttpRequestContent is re-set as follows...

     

    The debug email is sent showing the results... The parameters highlighted in yellow should not be in the dictionary!



    lundi 21 mai 2018 09:23
  • Part 3/4

    At the end of current scheduling loop the Workflow Register entry is updated to confirm that it ran succesfully...

     

    And HttpRequestContent is re-set as follows...


    The debug email is sent showing the results... Again the parameters highlighted in yellow should not be in the dictionary!

    lundi 21 mai 2018 09:26
  • Part 4/4

    Finally, the log is updated with information about which list items have been processed...


    And HttpRequestContent is re-set as follows...


    The debug email is sent showing the results... Again the parameters highlighted in yellow should not be in the dictionary! And of course this time it generates an error because the yellow columns don't exist in the Workflow Logs list.


    Hope the above adequately shows the bug.

    Thanks
    Martin



    lundi 21 mai 2018 09:28