Microsoft Developer Network > Página Inicial dos Fóruns > SharePoint - Workflow > Visual Studio Workflows: Modifications and Versioning
Fazer uma PerguntaFazer uma Pergunta
 

RespondidoVisual Studio Workflows: Modifications and Versioning

  • sexta-feira, 3 de julho de 2009 14:04FergusB Medalhas de usuárioMedalhas de usuárioMedalhas de usuárioMedalhas de usuárioMedalhas de usuário
     

    Hi,

    I have a Visual Studio workflow, deployed as a feature and associated with a content type.

    I can't "version" the workflow when I make changes to the code, because this effectively means creating a brand new workflow. This would need a new Workflow Status column, and my workflow acts on InfoPath forms which look up the workflow status from the current Workflow Status column.

    For small code changes, I've simply altered the VS project, rebuilt it and added the modified assembly to the GAC. This seems to work.

    I'm now going to embark on more large scale changes, with changes to the (InfoPath) task edit forms and (possibly) new states in the workflow.

    My theory is that so long as I wait until the currently running instances are complete, I can reinstall the workflow, reset the workflow to "Allow" from "No new instances" and begin using the new workflow. I've done some minimal testing on this and it seems to work. Because no existing workflows (with incompatible settings) are in progress, there shouldn't be any problems.

    Does anyone have any experience using this approach? I am trying to use this approach because I want to keep the workflow history for current instances (though my workflow does write a history as audit log entries).

    Regards,


    Fergus
    • EditadoFergusB segunda-feira, 6 de julho de 2009 16:24
    • EditadoFergusB sexta-feira, 3 de julho de 2009 15:40
    •  

Respostas

Todas as Respostas

  • terça-feira, 7 de julho de 2009 22:08Frank Chiang Medalhas de usuárioMedalhas de usuárioMedalhas de usuárioMedalhas de usuárioMedalhas de usuário
     
    Using this approach is not necessary practical because you are stopping new workflow instances and this may not be possible in a business environment. Even if you use new version for a new workflow and you have one additional workflow status column and it kind of mess up your view, you at least don't stop the business. At certain time, you can then remove the old workflow status column from the default view, and then you can create a new view that shows the old workflow status column.

    My point is, if you can stop the business from creating new workflow instance, your approach would work; but if not, then you have to tolerate having a second workflow status column.
  • quarta-feira, 8 de julho de 2009 8:10FergusB Medalhas de usuárioMedalhas de usuárioMedalhas de usuárioMedalhas de usuárioMedalhas de usuário
     
    Thanks for your response.

    Your response doesn't take into account the fact that my workflow is acting on Infopath forms. The forms have a secondary datasource which looks up the Workflow Status from the Workflow Status column in the library where the forms reside. If I added a new Workflow Status column, the forms would be looking up the OLD column, unless I altered the datasource to look up the new column which would result in the old forms looking up the wrong column!

    Regards,
    Fergus

    PS Because of this limitation, I don't think I will utilise a lookup on the Workflow Status column in future projects.
  • quarta-feira, 8 de julho de 2009 17:19Frank Chiang Medalhas de usuárioMedalhas de usuárioMedalhas de usuárioMedalhas de usuárioMedalhas de usuário
     Respondido
    In that case you may want to create a different Infopath form. There is also another solution posted by another forum user. He is having two assemblies (of different versions) in GAC. The existing workflow runs the old assembly and the new one workflow runs the new one. Please read his post:

    http://social.msdn.microsoft.com/Forums/en-US/sharepointworkflow/thread/8bede61f-6b8b-41a3-b343-64897a6e00f7

  • terça-feira, 21 de julho de 2009 9:52FergusB Medalhas de usuárioMedalhas de usuárioMedalhas de usuárioMedalhas de usuárioMedalhas de usuário
     
    Frank,

    Sorry, I don't know what you mean by "Using this approach is not necessary practical because you are stopping new workflow instances...". When you reinstall the workflow, the workflow settings on the content type get set to "No new instances", but you can then reset it to "Allow". The outage would be very acceptable - perhaps 5 minutes or less.

    Or am I missing something?

    Regards,
    Fergus