Avatar

Correct answer by
Level 2

I have solved this using the CreateInstanceFromModel method on xtk:queryDef. Here is the sample XML I used to create a workflow from a template, and then associate ("patch") the workflow to a campaign object:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:xtk:queryDef">

   <soapenv:Header/>

   <soapenv:Body>

      <urn:CreateInstanceFromModel>

         <urn:sessiontoken>XXXXXXXXXXXXXXXXXXX</urn:sessiontoken>

         <urn:strSchema>xtk:workflow</urn:strSchema>

         <urn:lModelId>1234</urn:lModelId>

         <urn:elemDiff>

            <workflow label="Email workflow" operation-id="9876"/>

         </urn:elemDiff>

      </urn:CreateInstanceFromModel>

   </soapenv:Body>

</soapenv:Envelope>

View solution in original post