1

私は、workflowManager.StartWorkflow を呼び出し、以下のワークフローの XML を渡すことで、プログラムでワークフローを開始しています。ワークフローは単にエラーになり、失敗します。私が使用しているワークフローは、OOTB 承認ワークフローです。XML の構造が正しくありませんか?

<?xml version="1.0" encoding="UTF-8"?>
<dfs:myFields xmlns:dfs="http://schemas.microsoft.com/office/infopath/2003/dataFormSolution"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:dms="http://schemas.microsoft.com/office/2009/documentManagement/types"
xmlns:q="http://schemas.microsoft.com/office/infopath/2009/WSSList/queryFields"
xmlns:d="http://schemas.microsoft.com/office/infopath/2009/WSSList/dataFields"
xmlns:ma="http://schemas.microsoft.com/office/2009/metadata/properties/metaAttributes"
xmlns:pc="http://schemas.microsoft.com/office/infopath/2007/PartnerControls"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <dfs:dataFields>
  <d:SharePointListItem_RW>
     <d:Approvers>
        <Assignment>
           <Assignee>
              <pc:Person>
                 <pc:DisplayName>Jia Ji JOnes</pc:DisplayName>
                 <pc:AccountId>ZZZDomain\jjones</pc:AccountId>
                 <pc:AccountType>User</pc:AccountType>
              </pc:Person>
           </Assignee>
           <d:Stage xsi:nil="true" />
           <d:AssignmentType>Parallel</d:AssignmentType>
        </Assignment>
        <Assignment>
           <Assignee>
              <pc:Person>
                 <pc:DisplayName>Matthew Jones</pc:DisplayName>
                 <pc:AccountId>ZZZDomain\mjones</pc:AccountId>
                 <pc:AccountType>User</pc:AccountType>
              </pc:Person>
           </Assignee>
           <d:Stage xsi:nil="true" />
           <d:AssignmentType>Parallel</d:AssignmentType>
        </Assignment>
        <Assignment>
           <Assignee>
              <pc:Person>
                 <pc:DisplayName>Maree H Jones</pc:DisplayName>
                 <pc:AccountId>ZZZDomain\mhjones</pc:AccountId>
                 <pc:AccountType>User</pc:AccountType>
              </pc:Person>
           </Assignee>
           <d:Stage xsi:nil="true" />
           <d:AssignmentType>Parallel</d:AssignmentType>
        </Assignment>
     </d:Approvers>
     <d:ExpandGroups>true</d:ExpandGroups>
     <d:NotificationMessage>A skill rating has been created which requires your approval.</d:NotificationMessage>
     <d:DueDateforAllTasks xsi:nil="true" />
     <d:DurationforSerialTasks>5</d:DurationforSerialTasks>
     <d:DurationUnits>Day</d:DurationUnits>
     <d:CC />
     <d:CancelonRejection>true</d:CancelonRejection>
     <d:CancelonChange>false</d:CancelonChange>
     <d:EnableContentApproval>true</d:EnableContentApproval>
  </d:SharePointListItem_RW>
</dfs:dataFields>
</dfs:myFields>
4

1 に答える 1

1

XMLは承認ワークフローに対して無効でした。正しいXMLは以下のとおりです。

<?xml version="1.0" encoding="UTF-8"?>
<dfs:myFields xmlns:dfs="http://schemas.microsoft.com/office/infopath/2003/dataFormSolution" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:dms="http://schemas.microsoft.com/office/2009/documentManagement/types" xmlns:q="http://schemas.microsoft.com/office/infopath/2009/WSSList/queryFields" xmlns:d="http://schemas.microsoft.com/office/infopath/2009/WSSList/dataFields" xmlns:ma="http://schemas.microsoft.com/office/2009/metadata/properties/metaAttributes" xmlns:pc="http://schemas.microsoft.com/office/infopath/2007/PartnerControls" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
   <dfs:queryFields />
   <dfs:dataFields>
  <d:SharePointListItem_RW>
     <d:Approvers>
        <Assignment>
           <Assignee>
              <pc:Person>
                 <pc:DisplayName>Jia Ji JOnes</pc:DisplayName>
                 <pc:AccountId>ZZZDomain\jjones</pc:AccountId>
                 <pc:AccountType>User</pc:AccountType>
              </pc:Person>
              <pc:Person>
                 <pc:DisplayName>Matthew Jones</pc:DisplayName>
                 <pc:AccountId>ZZZDomain\mjones</pc:AccountId>
                 <pc:AccountType>User</pc:AccountType>
              </pc:Person>
           </Assignee>
           <d:Stage xsi:nil="true" />
           <d:AssignmentType>Parallel</d:AssignmentType>
        </Assignment>
     </d:Approvers>
     <d:ExpandGroups>true</d:ExpandGroups>
     <d:NotificationMessage>test</d:NotificationMessage>
     <d:DueDateforAllTasks xsi:nil="true" />
     <d:DurationforSerialTasks>5</d:DurationforSerialTasks>
     <d:DurationUnits>Day</d:DurationUnits>
     <d:CC />
     <d:CancelonRejection>false</d:CancelonRejection>
     <d:CancelonChange>true</d:CancelonChange>
     <d:EnableContentApproval>true</d:EnableContentApproval>
  </d:SharePointListItem_RW>
   </dfs:dataFields>
</dfs:myFields>
于 2013-02-12T21:33:51.717 に答える