Unanswered Custom infopath task doesn't update in visual studion sequential workflow

  • 12 กรกฎาคม 2555 13:45
     
      มีโค้ด

    Hi all,

    I have a probleme with an InfoPath task form

    I've been looking for a solution to my problem for few days now with now success.

    I developped a visual studio  sequential workflow, i than designed an infopath Edit Task Form

    my form have following fields :

    • Title : tbTitle
    • Status : tbStatus
    • Assigned To : tbAssignedTo
    • Start Date : pStartDate
    • Due Date : pDueDate
    • Button  to submit data to host
    • Button to cancel

    I also have these data connctions

    • Data connection to send Data to host
    • Data Connection to retreive data using xml schema

    My workflow looks like this :

    onWorkflowActivated -> replicator

    in my replicator i have an activity that do the follwing :

    createTask -> onTaskCreated -> While not completed -> onTaskChanged -> completeTask

     

    My workflow just work fine.

    i added the new custom info path form to my workflow and work fine too, the only probleme i have is that my task don't load modified data after the task is comleted, in other words : i use the form to complete task -> task is recognaised as complete and workflow too but when i re-open the task it shows in progress.

    The form don't show modified data.

    I really need your help, i spent a lot of time googling and testing sevral solutions but no success, my form dosn't seem to store data in tasklist.

     

    Thanky in advance.

    some sample of my code are here :

    private void readTask_MethodInvoking(object sender, EventArgs e)
    {
        readTask.TaskId = Guid.NewGuid();
        this.readTask_TaskProps.TaskType = 1;
        readTask_TaskProps.Title = TaskTitle;
        readTask_TaskProps.StartDate = DateTime.Now;
        readTask_TaskProps.DueDate = DateTime.Now.AddDays(7);
        readTask_TaskProps.ExtendedProperties["title"] = TaskTitle;
        readTask_TaskProps.ExtendedProperties["status"] = CurrentTaskStatus;
        readTask_TaskProps.ExtendedProperties["assignedTo"] = TaskAssignedTo;
        readTask_TaskProps.ExtendedProperties["startDate"] = String.Format("{0:d}", readTask_TaskProps.StartDate);
        readTask_TaskProps.ExtendedProperties["dueDate"] = String.Format("{0:d}", readTask_TaskProps.DueDate);
        readTask_TaskProps.AssignedTo = TaskAssignedTo;
        readTask_TaskProps.SendEmailNotification = false;
        isTaskFinished = false;
    }
    private void onReadTaskChanged_Invoked(object sender, ExternalDataEventArgs e)
    {
        isTaskFinished = onReadTaskChanged_AfterProps.ExtendedProperties["tbStatus"].Equals("Completed");
    }

ตอบทั้งหมด

  • 13 กรกฎาคม 2555 8:20
    ผู้ดูแล
     
     
    

    Hi Brahim,

    For this issue, please try to refer to the following link about developing workflow with custom task form, test it with the steps provided, it will shows how to generate the custom task form:
    Visual Studio workflow with custom task form:
    http://blog.sina.com.cn/s/blog_64800be70100x8hn.html
    http://blog.sina.com.cn/s/blog_64800be70100xkov.html

    Thanks,


    Qiao Wei

    TechNet Community Support

  • 16 กรกฎาคม 2555 21:59
     
     

    Hi Qiao, 

    Thanks very much for your reply,

    I had a look to the links and i think i followed the steps shown there.

    What they don't show is, if the task is updated when comments are changed for example.

    It's the only thing not working for me.

    will have another look to that tomorow and then get back to you.

    Brahim

  • 20 กรกฎาคม 2555 14:51
     
     

    Hi Qiao,

    I re-checked if i did some thing wrong and can't figure what is missing.

    In addition my last task never complete and don't invoke the onTaskChanged method.

    Any ideas?