How to provide a workflow with two tasks and two different InfoPath Task-Forms? - InfoPath Dev
in

InfoPath Dev

How to provide a workflow with two tasks and two different InfoPath Task-Forms?

Last post 12-21-2009 05:39 PM by vt_asparagus. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 10-06-2009 02:10 AM

    How to provide a workflow with two tasks and two different InfoPath Task-Forms?

    Hello,
    I created allready a Visual Studio 2008 Workflow with two tasks. I don't have any problems to walk through the first task, the second one is the problem. I still get the InfoPath task form that is responsible for the first task. What do I have to do to make the form TaskVorgesetzter.xsn only available for the first task and the form TaskPersonalabteilung.xsn for the second task?

    The configuration of my feature.xml:
      <ElementManifests>
        <ElementManifest Location="workflow.xml" />
        <ElementFile Location="Association.xsn"/>
        <ElementFile Location="TaskVorgesetzter.xsn"/>
        <ElementFile Location="TaskPersonalabteilung.xsn"/>
      </ElementManifests>

    The configuration of my workflow.xml:
          <Association_FormURN>urn:schemas-microsoft-com:office:infopath:Association:-myXSD-2009-09-30T10-16-34</Association_FormURN>
          <Task0_FormURN>urn:schemas-microsoft-com:office:infopath:TaskVorgesetzter:-myXSD-2009-07-15T12-42-32</Task0_FormURN>
          <Task1_FormURN>urn:schemas-microsoft-com:office:infopath:TaskPersonalabteilung:-myXSD-2009-09-30T07-17-13</Task1_FormURN>
          <StatusPageUrl>_layouts/WrkStat.aspx</StatusPageUrl>

    Furthermore I listetd the field for both task forms in the ItemMetaData.xml.
    Do have a tipp how to solve my problem? Thank you very much indeed.
    Best Regards

  • 12-21-2009 05:39 PM In reply to

    Re: How to provide a workflow with two tasks and two different InfoPath Task-Forms?

    I remember this from a long time ago - check this out - http://social.msdn.microsoft.com/forums/en-US/sharepointworkflow/thread/737a181e-0c41-45fd-b80d-f150705541fd/.  You need to make sure you set the SPWorkflowTaskProperties.TaskType to 1 to get it to switch.

    Other thing you can do is use a single InfoPath form but just switch views.

    - Add a field to your form called View.

    - Add a rule into the load of the InfoPath form that will switch views appropiately.

    - Add code into the workflow that will set the View field to show the correct view when the form is loaded at runtime.

    Hope that makes sense...

    Jason
    http://www.k2distillery.com/
    Filed under: ,
Page 1 of 1 (2 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.