MOSS workflow with Infopath task forms - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

MOSS workflow with Infopath task forms

Last post 05-10-2009 07:11 AM by faraz45pk. 6 replies.
Page 1 of 1 (7 items)
Sort Posts: Previous Next
  • 02-21-2008 11:54 AM

    MOSS workflow with Infopath task forms

    I have implemented an state machine workflow using infopath as the task forms. I have two problems that I have not been able to solve.

    • When a user clicks edit task on a task that has previously been completed I would like to pass the status to the task form. If the task has been completed I want to hide any submission buttons so they can't submit a task as completed again.
    • Workflows run under a system account. How can I pass the currently logged in user back to the workflow when a task is completed?

    Jeff

    Filed under:
  • 02-21-2008 01:12 PM In reply to

    Re: MOSS workflow with Infopath task forms

    Typically I store the status in the form as well. Or maybe you could have it check the current status via a data connection.  Then you can use conditional formating to hide the approver if the status warrants.

    Do you identify the user in the form when it is opened? Via Sharepoint or Active Directory?  That is another thing I usually store in the form.

  • 02-21-2008 02:59 PM In reply to

    Re: MOSS workflow with Infopath task forms

    I have tried both of those, but I must be doing something wrong. The submit button has a rule that sets the form's status to Completed then closes the form. If the user then chooses to edit the task from the task list the form opens. The form's status is back to the default of In Progress.

     As far a setting the user on open I have tried connecting to the web service GetUserByProfileName. I have tied that to a textbox but nothing shows up.

     Thanks

  • 02-21-2008 03:16 PM In reply to

    Re: MOSS workflow with Infopath task forms

    For the submit, check your rules and actions order and make sure you are not submitting before the field gets set. That would be my guess is that the form is submitted a bit early.

  • 03-28-2008 07:40 AM In reply to

    Re: MOSS workflow with Infopath task forms

    Hi Lunch Money,

    Regarding your first problem, Where you want to hide the Submit Button of Review Task form,

    1. Created a status field in infopath from(set default value as "NotReviewed")

    2

     i.In submit button's display property set the Filter condition that,if Status is not equals to "NotReviewed" the hide this Control.

     ii.Added one action to button that "Set Status fileds value as Reviewed"

    3.Passed the Status field value of the Task form from Workflow as workflowProperties.ExtendedProperty["Status"]=Status(The Current Status Value after Submit button Click)

    Now, when the first time the task form is opened the Status field value is "Notreviewed",hece the Submit button will be displayed.So after the button click the Status field value changes to "Reviewed".This value(Reviewed) is passed to task list again when the task form is reopened.As the value of status field is now "Reviewed", therefore the Submit button cant be visible,based on Filter condition.

    Sorry,I tried this way ! I dont know why this is not working for me?

    Thanks & Regards,
    Srikrushna Patro.
  • 11-10-2008 09:05 PM In reply to

    Re: MOSS workflow with Infopath task forms

    HI Srikrushna:

    It would be great if you can help me in this issue. It Is bit urgent.


    I have similar issue, where user should not be able to make any changes on the completed task. I want the submit button to be disabled.

    I tried your method, but no luck.  I am bit confused in your 3rd point. Where do I need put extended properties code.

    Here is how the code:

    Void DeptManager_ TaskCreated()
     {
      //Task assigned task to dept manager
     }
    Void DeptManager_OnTaskCreated()
     {
      //Send an email with URL to Dept manager on created task.
     }
    Void DeptManager_OntaskChanged()
     {
      //Dept Manager Approves/rejects.
     }
    Void DeptManager_TaskComplete()
     {
      //Code to complete the task.
     }
     
    //New task Created for Dept Vice-president as soon as Dept Manager completed the task.

    Void DeptVP_ TaskCreated()
     {
     //Task assigned task to Dept VP
     }
    Void DeptVP_OnTaskCreated()
     {
     //Send an email with URL to Dept VP on created task.
     }
    Void DeptVP_OntaskChanged()
     {
      //Dept VP Approves/rejects.
     }
    Void DeptVP_TaskComplete()
     {
      //Code to complete the task.
     }

    Now the code works without any issues.  In this case, if the Dept Manager makes any changes on his completed task, the Dept VP task doesn’t gets triggered.

    I want Dept Manager task button to be disabled once he hits submit button.

    Any ideas?

    Thanks!
    Ravi

  • 05-10-2009 07:11 AM In reply to

    Re: MOSS workflow with Infopath task forms

    This can only be achieved if you call the updateTask activity after the OnTaskChanged event. You need to have a hidden field in the InfoPath Task form called Submitted as boolean and in the updateTask activity from the SharePoint workflow set the extendedProperty for Submitted to false.

     The submit button in the infopath form has conditional formatting applied and should gets disabled when Submitted is equal to true

     

     Faraz Javaid

    Faraz Javaid
Page 1 of 1 (7 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.