SharePoint Products TechCenter > SharePoint Products and Technologies Forums > SharePoint - Workflow > what does the function EnsureWorkflowInformation do to the item the workflow is running on or to the workflow itself
Ask a questionAsk a question
 

Answerwhat does the function EnsureWorkflowInformation do to the item the workflow is running on or to the workflow itself

  • Friday, October 30, 2009 10:27 AMMohammadJizi Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    i am developing a sharepoint state machine workflow using visual studio 2008

    my question is :

    what does this function do :

    public void EnsureWorkflowInformation(bool retrieveAssociations, bool retrieveWorkflows);

    and you can access it in the workflow for example like this :

    workflowProperties.Item.EnsureWorkflowInformation(true, true);


    i have read its documentation but it isnt clear what this function do to the workflow or to the item the workflow is running on .

    i wish anyone could help me in this

    thanks a lot

Answers

All Replies

  • Monday, November 02, 2009 9:17 AMLily WuMSFT, ModeratorUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    Hi 

    I think this function is used to update the workflow information about a specific list item.
    By specifying true or false in parameters, you can choose to update workflow or workflow association information about this item.
    With this function being used, the information you choose about this item will be the latest.

    Best Regards!

  • Monday, November 02, 2009 11:21 AMMohammadJizi Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    hi

    thanks for your reply

    does this means that this function updates the item always with the latest information of the workflow

    and what is the benefit of that

    i there any special fields that store the updated workflow information in the item

    and how can i use this information on the item


    or does this means that it updates the workflow with latest information of the item


    Best Regards!
  • Tuesday, November 03, 2009 10:11 AMLily WuMSFT, ModeratorUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Since this function does not return any value, I think it updates the items with the latest information about the workflow.

    I’ve no experience with using this function, this is my understanding of this function.

    Hope it helps!

    Best Regards!
  • Tuesday, November 03, 2009 1:08 PMMohammadJizi Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer
    thanks for your reply

    it was very helpful

    i will continue searching more about this function what exactly it does

    thanks a lot