none
MS-ASTASK Completing a recurring task RRS feed

  • Question

  • Previous thread was closed before I could post a response:-

    When submitting an update to a recurring task I get an error (Status 6). Via trial and error I have narrowed this down to the recurrence pattern sent in the command. I have read the specification online and have tried with DeadOccurs set to 0 which succeeds but marks the whole series complete and doesn't restart it. When I specify a non-zero value for DeadOccurs I get the Status 6 returned. I'm not modifying the recurrence pattern so I'm just passing back the same values which were received when the item was received from the server on an initial Sync. I can't find any examples of updating tasks with recurrence patterns. This is what my XML looks like:-

    <Change><ServerId>{the serverid}</ServerId>

    <ApplicationData>

    <Body xmlns="AirSyncBase:"><Type>1</Type><Data></Data></Body>

    <Subject xmlns="Tasks:">weekday recurring task</Subject>

    <Categories xmlns="Tasks:"><Category>category name</Category></Categories>

    <UTCStartDate xmlns="Tasks:">2010-12-21T11:00:00.000Z</UTCStartDate>

    <StartDate xmlns="Tasks:">2010-12-22T00:00:00.000Z</StartDate>

    <UTCDueDate xmlns="Tasks:">2010-12-24T11:00:00.000Z</UTCDueDate>

    <DueDate xmlns="Tasks:">2010-12-25T00:00:00.000Z</DueDate>

    <Recurrence xmlns="Tasks:">

    <Recurrence_Regenerate>0</Recurrence_Regenerate>

    <Recurrence_DeadOccur>1</Recurrence_DeadOccur>

    <Recurrence_Type>1</Recurrence_Type>

    <Recurrence_Start>2010-12-22T00:00:00.000Z</Recurrence_Start>

    <Recurrence_Occurrences>10</Recurrence_Occurrences>

    <Recurrence_Interval>1</Recurrence_Interval>

    <Recurrence_DayOfWeek>62</Recurrence_DayOfWeek>

    </Recurrence>

    <Complete xmlns="Tasks:">1</Complete>

    <DateCompleted xmlns="Tasks:">2010-12-22T11:00:00.000Z</DateCompleted>

    <Sensitivity xmlns="Tasks:">0</Sensitivity>

    <ReminderSet xmlns="Tasks:">0</ReminderSet>

    </ApplicationData>

    </Change>

     

    Is there any further documentation on the DeadOccur element as the specification is a bit thin on this and there are no examples involving recurrence - they are all very simplistic.

     

    Peter

    Thursday, January 6, 2011 7:28 PM

Answers

  • Peter,

    The last post from me was unclear. Let me clarify some points.

    First, the different between a recurring task as opposed to a regenerating task:

    Regarding a recurring task: when you complete the task, a new task is generated that is due on the day that you specified. For example, if you have a recurring task due every Friday, and you complete one instance of this task on Thursday, the next recurring task is due the next day, Friday.

    Regarding a regenerating task: when you complete the task, a new task is generated that is due relative to the date that the task is complete. For example, if you have a regenerating task due once a week, and you complete the task on Thursday, the next task is due the following Thursday.

    -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

    If you review the [MS-ASTASK] Specification, you will find the following sections relevant:

    Section Number      Section Title

    ----------------|      -------------|

    2.2.2.9                    Recurrence        (includes all of the sub-sections)
    2.2.2.10                  Complete
    2.2.2.11                  DateCompleted

    The "Complete" tag signifies whether or not a task has been completed: 0 - false (not completed), 1 - true (completed).

    A recurring task will terminate based upon 2 events:

    1. After so many occurrences as specified in Section 2.2.2.9.4 (Occurrences).
    2. By a certain dated as specified in Section 2.2.2.9.3 (Until).

    These two elements are mutually exclusive, and only one should be included at any given time. If they are both included, priority is given to the <Occurrences> element over the <Until> element. Please note that there is also the possibility a task MAY NOT complete and continue indefinitely.

    You SHOULD change DeadOccur to any other value other than 0 to mark a task instance as complete.

    Also, regenerate will specify whether the task will regenerate after each task instance is complete. Regenerate requires a non-zero value to be true. This value IS NOT a counter of any sort. In fact, this element relies on the <Interval> element to determine regeneration.

    Dominic Salemno
    Escalation Engineer
    Open Specifications

     

     

    Friday, January 14, 2011 10:24 PM

All replies

  • Hi, Peter,

       Thanks for your question.  One of our team member will work on this question and respond soon.

     

     


    Hongwei Sun -MSFT
    Thursday, January 6, 2011 9:18 PM
  • Peter,

    Do you have the wire traces or EAS Log files of the issue occuring on the wire that you could provide?

    Dominic Salemno
    Escalation Engineer
    Open Specifications

    Friday, January 7, 2011 2:07 PM
  • Peter,

    Setting DeadOccur ( Review Section 2.2.2.9.11 of [MS-ASTASK] ) to any non-zero value marks a task as a recurring master. Also, contained within the same section:

    Clients making command requests SHOULD set this value to a non-zero value (up to 255) when marking a task as complete.

    When a task completes it is restarted based upon the Regenerate element defined in Section 2.2.2.9.10 of [MS-ASTASK]. This element will specify the number of times a task item regenerates after it is complete. A value of 0 for <Regenerate> means that it WILL NOT regenerate.

    What are you trying to accomplish?

    Dominic Salemno
    Escalation Engineer
    Open Specifications

    Friday, January 7, 2011 4:23 PM
  • Peter,

    Do you still wish for me to investigate this matter?

    Dominic Salemno
    Escalation Engineer
    Open Specifications

    Monday, January 10, 2011 10:07 PM
  • So if I have a recurring task which is set to recur 10 times and I wish to mark the current instance as complete I should set DeadOccur to any value other than 0, and Regenerate to 9? Or do I pass back 10 and the server will decrement this automatically when the new instance is created?

     

    Peter

    Tuesday, January 11, 2011 5:59 AM
  • Peter,

    I will have an answer for you shortly, I am just researching some clarifying information on this matter.

    Dominic Salemno
    Escalation Engineer
    Open Specifications

    Friday, January 14, 2011 3:12 PM
  • Peter,

    The last post from me was unclear. Let me clarify some points.

    First, the different between a recurring task as opposed to a regenerating task:

    Regarding a recurring task: when you complete the task, a new task is generated that is due on the day that you specified. For example, if you have a recurring task due every Friday, and you complete one instance of this task on Thursday, the next recurring task is due the next day, Friday.

    Regarding a regenerating task: when you complete the task, a new task is generated that is due relative to the date that the task is complete. For example, if you have a regenerating task due once a week, and you complete the task on Thursday, the next task is due the following Thursday.

    -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

    If you review the [MS-ASTASK] Specification, you will find the following sections relevant:

    Section Number      Section Title

    ----------------|      -------------|

    2.2.2.9                    Recurrence        (includes all of the sub-sections)
    2.2.2.10                  Complete
    2.2.2.11                  DateCompleted

    The "Complete" tag signifies whether or not a task has been completed: 0 - false (not completed), 1 - true (completed).

    A recurring task will terminate based upon 2 events:

    1. After so many occurrences as specified in Section 2.2.2.9.4 (Occurrences).
    2. By a certain dated as specified in Section 2.2.2.9.3 (Until).

    These two elements are mutually exclusive, and only one should be included at any given time. If they are both included, priority is given to the <Occurrences> element over the <Until> element. Please note that there is also the possibility a task MAY NOT complete and continue indefinitely.

    You SHOULD change DeadOccur to any other value other than 0 to mark a task instance as complete.

    Also, regenerate will specify whether the task will regenerate after each task instance is complete. Regenerate requires a non-zero value to be true. This value IS NOT a counter of any sort. In fact, this element relies on the <Interval> element to determine regeneration.

    Dominic Salemno
    Escalation Engineer
    Open Specifications

     

     

    Friday, January 14, 2011 10:24 PM